我想使用 ORB 特征检测器和提取器实现基于特征的对齐算法。
到目前为止,我使用 OpenCV 中的 ORB 类提取了特征
ORB 球体;
orb(gray_image,Mat(),features.keypoints,features.descriptors);
并使用 openCV 中的 knnMatch 函数进行匹配 matcher.knnMatch(features1.descriptors, features2.descriptors,pair_matches,2);
之后,我尝试使用 findHomography 函数查找单应性,但此函数需要图像特征之间至少有 4 个匹配,并且在我测试的大多数图像上,我得到的匹配少于 4 个。
有人使用过此功能吗?是否有任何关于它的文档,或者关于 OpenCV 中的 ORB 类(ORB 构造函数参数的含义)?
PS这是我的第一个问题。而且我不能发布超过 2 个链接。对于 opencv 文档,请使用此。
I want to implement a feature-based alignment algorithm using the ORB feature detector and extractor.
So far, I extracted the features using ORB class from OpenCV
ORB orb;
orb(gray_image,Mat(),features.keypoints,features.descriptors);
and matched them using the knnMatch function from openCV matcher.knnMatch(features1.descriptors, features2.descriptors, pair_matches,2);
After that I am trying to find a homography using findHomography function, but this function needs at least 4 matches between the image features, and on most of the images i tested I got less than 4.
Has anybody used this feature? Is there any documentation about it, or about the ORB class from OpenCV(the meaning of the ORB constructor parameters)?
P.S. This is my first question. and I can't post more than 2 links. For opencv documentation use this.
发布评论
评论(1)
更新:现在它在 OpenCV 文档中,在这里:
http://opencv.itseez.com/modules/features2d/doc/feature_detection_and_description.html#orb< /a>
算法的详细描述可以在这里找到:http://www.willowgarage.com/sites /default/files/orb_final.pdf
OpenCV 文档中没有提到,但实际上 OpenCV 有:
两种类型的描述符:
和相应的匹配器:
FlannBase
BruteForce; >
BruteForce; >
//自2.3.1起BruteForce; >
暴力破解
暴力破解
FlannBased
带有 LSH 索引 //since 2.4.0所以你需要修改你的代码例如,使用 ORB 描述符的
BruteForce
匹配器。可以使用 L2 或 L1 距离来匹配 uchar 描述符,但结果将不正确,并且 findHomography 返回的结果不令人满意。UPDATE: Now it is in the OpenCV documentation, here:
http://opencv.itseez.com/modules/features2d/doc/feature_detection_and_description.html#orb
A detailed description of the algorithm is found here: http://www.willowgarage.com/sites/default/files/orb_final.pdf
It is not mentioned in OpenCV documentation but actually OpenCV has:
Two types of descriptors:
And corresponding matchers:
FlannBased
BruteForce<L2<float> >
BruteForce<SL2<float> >
//since 2.3.1BruteForce<L1<float> >
BruteForce<Hamming>
BruteForce<HammingLUT>
FlannBased
with LSH index //since 2.4.0So you need to modify your code to use for example
BruteForce<Hamming>
matcher for ORB descriptors. It is possible to use L2 or L1 distance for matching uchar descriptors but results will be incorrect and findHomography returns unsatisfactory results.