本文介绍了ORB计算错误:它删除所有关键点与小图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小图像50x50。我找到ORB关键点与:

I have a small image 50x50. I find ORB keypoints with:

(注意,我必须更改patchSize的默认参数从31到14,以检测一些关键点):

(Notice that I have to change the default param of patchSize from 31 to 14 to get some keypoints detected):

 OrbFeatureDetector det(500,1.2f,8,14,0,2,0,14);   //> (From 31 to 14)
 OrbDescriptorExtractor desc;

 det.detect(image,kp)
 //> kp.size() is about 50 keypoints



现在如果我将我的关键点传递给orb.compute所有关键点都已清除。

Now If i pass my keypoints to orb.compute I get all keypoints erased.

 desc.compute(image,kp,kpDesc);
 //> Now kp.size() == 0

这意味着在我调用.compute方法后删除所有关键点。

This mean that after I have called .compute the method has deleted all keypoints.

我使用的图像是:

The Image I am using is this:

我相信这是一种错误。有人可以确认?我使用OpenCV 2.4.5

I believe this is some sort of bug. Someone can confirm? I am using OpenCV 2.4.5

推荐答案

不是一个错误。

问题是OrbDescriptorExtractor不知道您已经更改了FeatureDetector中的参数。所以你必须再次设置正确的参数:

The problem is that OrbDescriptorExtractor doesn't know that you have changed the param in the FeatureDetector. So you have to set the right params again:

OrbFeatureDetector      det(500,1.2f,8,14,0,2,0,14);   //> (From 31 to 14)
OrbDescriptorExtractor desc(500,1.2f,8,14,0,2,0,14);

这篇关于ORB计算错误:它删除所有关键点与小图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 00:50