BRISK特征检测器检测到零关键点

时间:2012-09-13 12:36:14

标签: opencv github qt-creator

下面显示的Brisk探测器没有给我任何关键点。有人可以建议一个问题。 我将尝试用下面的代码解释我在做什么。

#include "opencv2/features2d/features2d.hpp"

using namespace cv;    
using namespace std;

Ptr<FeatureDetector> detector;
detector =  FeatureDetector::create("BRISK");

// the filename is given some path

Mat img = imread(filename, 0);
CV_Assert( !img.empty() );

vector<KeyPoint> kp;

detector->detect(img, kp);

所以,当我调试这个并检查关键点(kp)时,它说&lt; 0 items&gt;

使用类似的代码,其他探测器如ORB,SIFT或SURF按预期工作!

请有人建议解决方案。

我正在使用opencv 2.4.9和Qt creator 2.5.2

由于

1 个答案:

答案 0 :(得分:3)

好的,我自己拿到了它!

对于有兴趣的人,BriskFeatureDetector的参数的默认值,即octaves = 3和thres = 30,根本不给我关键点。但是当我改变原作者演示中显示的octaves = 0以使用Brisk的AGAST检测器时,它给了我相当多的关键点。

谢谢,尽情享受!

相关问题