Featuretracker: OpenCV has been compiled without SIFT support
Hi,
I tried runnign the "hybridtrackingsample" example (from the contrib module) and got an "OpenCV has been compiled without SIFT support" exception. I looked trough the "featuretracker.cpp" file and added #include "opencv2/nonfree/nonfree.hpp" and initModule_nonfree(); , however that just gives me another error: libopencv_contrib.so.2.4.6: undefined reference to `cv::initModule_nonfree()'. I think it has something to do with the order in which the modules are compiled or linked, but I'm new to C++ so I got stuck at this point.
Here is the full error message i get when running cpp-example-hybridtracker: "OpenCV Error: The function/feature is not implemented (OpenCV has been compiled without SIFT support) in CvFeatureTracker, file /opt/opencv-2.4.6.1/modules/contrib/src/featuretracker.cpp, line 58 terminate called after throwing an instance of 'cv::Exception' what(): /opt/opencv-2.4.6.1/modules/contrib/src/featuretracker.cpp:58: error: (-213) OpenCV has been compiled without SIFT support in function CvFeatureTracker"
Hot to reproduce:
Build opencv >= 2.4, make sure to also build the examples. Run the cpp-example-hybridtrackingsample with the live parameter.
Any ideas on how I could get the featuretracker to work ?
You have to compile or get a compiled version of opencv which includes the nonfree module.
I've built opencv from source. I used cmake-gui and made sure the BUILD_opencv_nonfree is ticked. I can use surf and sift after building the project. The order in which it builds the modules might be wrong, but since I don't know much c/c++ i got stuck there.