問題描述
我已經從源代碼構建了 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
opencv2/nonfree/features2d.hpp &opencv2/nonfree/features2d.hpp
opencv2/nonfree/features2d.hpp & opencv2/nonfree/features2d.hpp
但是這個版本的 openCV 中缺少 nonfree 模塊.我嘗試在 answers.opencv.org 上查看 opencv 論壇,但該站點正在建設中.
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.
如何使用非免費模塊?
推薦答案
with opencv3.0, SURF/SIFT 和其他一些東西已經移到一個單獨的 opencv_contrib repo .
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 中缺少非自由模塊的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!