C++ 如何在opencv中创建自己的特征检测方法?
让我们看一看名为Features2D+单应性的基本教程,以查找已知对象。它使用SurfFeatureDetector检测功能:C++ 如何在opencv中创建自己的特征检测方法?,c++,opencv,feature-detection,keypoint,C++,Opencv,Feature Detection,Keypoint,让我们看一看名为Features2D+单应性的基本教程,以查找已知对象。它使用SurfFeatureDetector检测功能: SurfFeatureDetector detector( minHessian ); std::vector<KeyPoint> keypoints_object, keypoints_scene; detector.detect( img_object, keypoints_object ); detector.detect( img_s
SurfFeatureDetector detector( minHessian );
std::vector<KeyPoint> keypoints_object, keypoints_scene;
detector.detect( img_object, keypoints_object );
detector.detect( img_scene, keypoints_scene );
SurfFeatureDetector检测器(minHessian);
std::矢量关键点\对象,关键点\场景;
检测器。检测(img_对象、关键点_对象);
检测器。检测(img_场景、关键点_场景);
然后,它使用SurfDescriptorExtractor
使用检测到的特征计算描述符(特征向量)
我的问题是:
4) 总之,在示例中,两幅图像上的所有关键点都是连接的(正如您在教程的最后一张图片上看到的),然后用矩形高亮显示。但是当我使用Trajkovic算法时,它们以错误的方式连接,这就是为什么没有突出显示的矩形。虽然我们无法在不查看您的实现的情况下确定问题,甚至可能进行一些调查,但我可以为您指出解决方案的方向:OpenCV源代码,您可以与它们的实现进行比较 查看
detectAndCompute()
函数: