微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

为什么ORB找不到关键点

如何解决为什么ORB找不到关键点

enter image description here

我正在尝试合并两个图像,但是ORB找不到关键点。这只是使用同一图像的一个示例,暗点是由采集引起的,不是很好的参考点,因此我应用了遮罩来避免它们。问题是,如果遮盖了黑点,则不会检测到任何关键点,我想知道是什么问题。

    final ORB orb = ORB.create(100);
    MatOfKeyPoint keypoints = new MatOfKeyPoint();
    Mat descriptors = new Mat();
    final Mat ones = Mat.ones(426,195,CV_8U);
    orb.detectAndCompute(draw,zeroMask,keypoints,descriptors);
    MatOfKeyPoint keypoints2 = new MatOfKeyPoint();
    Mat descriptors2 = new Mat();
    final List<KeyPoint> keyPoints = keypoints.toList();
    orb.detectAndCompute(draw,keypoints2,descriptors2);

    final DescriptorMatcher matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMING);
    final MatOfDMatch matches = new MatOfDmatch();
    matcher.match(descriptors,descriptors2,matches);
    final Mat links = new Mat();
    final MatOfByte ones1 = new MatOfByte();
    org.opencv.features2d.Features2d.drawMatches(draw,draw,matches,links,new Scalar(0),ones1);

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。