Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

undefined reference, you're missing a library when linking

it can't find SURF (which is nonfree)

so besides opencv_features2d, for SIFT or SURF you need the opencv_nonfree library

#include "opencv2/nonfree/nonfree.hpp

and, in the first line of main:

cv::initModule_nonfree();

undefined reference, you're missing a library when linking

it can't find SURF (which is nonfree)

so besides opencv_features2d, for SIFT or SURF you need the opencv_nonfree librarylibrary when linking

also, to set it up, you need some additional code:

#include "opencv2/nonfree/nonfree.hpp

and, in the first line of main:

cv::initModule_nonfree();