How to include xfeatures2d.hpp from the extra modules to run SURF [closed]
I have gone through the instructions for running cmake a number of times, and it works for the basic modules that are included in Opencv, but when it comes to the old 'nonfree' modules, in the Extra Modules git download , it won't compile to be able to run a program that has #include "opencv/xfeatures2d.hpp"
https://github.com/Itseez/opencv_contrib ^This is the place to download the extra modules
This what Terminal gives me when I try to 'make'
smithj :surf_matcher smithj$ make
Scanning dependencies of target SurfMatcher
[ 50%] Building CXX object CMakeFiles/SurfMatcher.dir/Surf_Matcher.cpp.o /Users/smithj/research/opencv-Work/surf_matcher/Surf_Matcher.cpp:11:10: fatal error: 'opencv2/xfeatures2d.hpp' file not found
#include "opencv2/xfeatures2d.hpp"
\ ^
1 error generated. make[2]: * [CMakeFiles/SurfMatcher.dir/Surf_Matcher.cpp.o] Error 1 make[1]: [CMakeFiles/SurfMatcher.dir/all] Error 2 make: ** [all] Error 2
when building the opencv libs, did you run a
make install
? this should have copied all the headers to your install/include folder.I am also having the same error, and I did make install. But when I run my project it says xfeatures2d.hpp file not found.