dag*_*agi 5 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);
Run Code Online (Sandbox Code Playgroud)
所以,当我调试它并检查关键点(kp)时,它会显示<0 items>
使用类似的代码,其他探测器如ORB,SIFT或SURF按预期工作!
有人可以建议一个解决方案.
我正在使用opencv 2.4.9和Qt creator 2.5.2
谢谢
好吧,我自己搞定了!
对于感兴趣的人来说,BriskFeatureDetector 参数的默认值(即 Octaves = 3 和 thres = 30)根本没有给我关键点。但是当我按照原作者的演示中所示更改octaves = 0以使用Brisk的AGAST检测器时,它给了我相当多的关键点。
谢谢并享受!
| 归档时间: |
|
| 查看次数: |
2650 次 |
| 最近记录: |