Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

SURF identifier not defined

I set up the Opencv_contrib module properly with Cmake (On Visual Studio ). However, when I use the SurfFeatureDetector identifier, I get the following error: 'SURF identifier not defined'.

Part of it code :

Mat image1 = imread("...);

if (!image1.data)
{
    cout << " --(!) Error reading images " << endl;
    return -1;
}


int minHessian = 400;
SurfFeatureDetector detector(minHessian);
std::vector<KeyPoint> keypoints_1;
detector.detect(image1, keypoints_1);

... header files are as follows :

include "opencv2/core/core.hpp"

include "opencv2/highgui/highgui.hpp"

include "opencv2/xfeatures2d/nonfree.hpp"

include "opencv2/features2d/features2d.hpp"

include "opencv2/xfeatures2d.hpp"

Are there any ones that can help solve the problem? ( I am using the Opencv 3.2.0 version.) Thanks , good works.