Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nonfree module is missing in OpenCV 3.0

Tags:

c++

opencv

surf

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

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?

like image 277
Chaitanya Uttarwar Avatar asked Dec 11 '14 08:12

Chaitanya Uttarwar


1 Answers

with opencv3.0, SURF/SIFT and some other things have been moved to a seperate opencv_contrib repo .

you will have to download that, add it to your main opencv cmake settings (please look at the readme there), and rerun cmake/make.

then:

#include "opencv2/xfeatures2d.hpp"

...
Ptr<SIFT> sift = cv::xfeatures2d::SIFT::create(...);
sift->detect(...);
like image 91
berak Avatar answered Nov 10 '22 21:11

berak