问题描述
下面显示的轻灵探测器不给我任何关键点。有人可以提出一个问题。我会尝试用一些代码解释我在做什么。
#includeopencv2 / features2d /features2d.hpp
using namespace cv;
使用namespace std;
Ptr< FeatureDetector>探测器;
detector = FeatureDetector :: create(BRISK);
//文件名被赋予一些路径
Mat img = imread(filename,0);
CV_Assert(!img.empty());
vector< KeyPoint> KP;
detector-> detect(img,kp);
因此,当我调试并检查关键点(kp)时,它说< 0 items> / p>
使用类似的代码,其他检测器如ORB,SIFT或SURF可以按照预期工作!
有人可以提出解决方案。
我使用的是使用Qt创建器2.5.2的opencv 2.4.9感谢
$ $ $$ b
好的,我自己做到了!
对于感兴趣的人, BriskFeatureDetector的参数即八度= 3和三= 30并不给我关键点。但是,当我将原作者的演示中显示的octaves = 0更改为使用Brisk的AGAST检测器时,它给了我相当多的关键点。
谢谢并享受!
The Brisk detector shown below gives me no keypoints. Can somebody please suggest a problem.I will try to explain what I am doing below with some of the codes.
#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);
So, when I debug this and check the keypoint (kp) it says <0 items>
with similar code other detector like ORB, SIFT or SURF work as intended!
Can somebody please suggest a solution.
I am using opencv 2.4.9 with Qt creator 2.5.2
Thanks
Okay, I got it myself!
For someone interested, the default values of the parameters for BriskFeatureDetector i.e octaves = 3 and thres = 30 doesn't gave me keypoints at all. But when I change the octaves = 0 as shown in the original author's demo to use AGAST detector of Brisk, it gave me a considerable amount of keypoints.
Thanks and enjoy!
这篇关于BRISK特征检测器检测零关键点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!