问题描述
我已经从源码构建了openCV 3.0 alpha版本,支持CUDA和TBB。现在,我想使用SURF算法进行特征检测和特征匹配。 SurfFeatureDetector存在于包含文件中
I have built the openCV 3.0 alpha version from source with support for CUDA and TBB. Now, I want to do feature detection and feature matching using SURF algorithm. SurfFeatureDetector is present in the include file
但是openCV版本中缺少nonfree模块。我尝试检查opencv论坛在answers.opencv.org但网站正在建设中。
But the module nonfree is missing in this version of openCV. I tried checking the opencv forums at answers.opencv.org but the site is under construction.
如何使用非自由模块?
How to use the non free modules?
推荐答案
与opencv3.0,SURF / SIFT和其他一些东西已被移动到单独的。
with opencv3.0, SURF/SIFT and some other things have been moved to a seperate opencv_contrib repo .
您必须下载它,将其添加到您的主opencv cmake设置请查看自述文件),然后重新运行cmake / make。
you will have to download that, add it to your main opencv cmake settings (please look at the readme there), and rerun cmake/make.
然后:
#include "opencv2/xfeatures2d.hpp"
...
Ptr<SIFT> sift = cv::xfeatures2d::SIFT::create(...);
sift->detect(...);
这篇关于OpenCV 3.0中缺少Nonfree模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!