Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to include xfeatures2d.hpp from the extra modules to run SURF

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