OpenCV Error:
The function/feature is not implemented
< OpenCV was built without SURF support> in unknown function,file
..\..\..\src\opencv\modules\legacy\src\features2d.cpp,
line 77
source code
#include <opencv2/objdetect/objdetect.hpp> #include <opencv2/features2d/features2d.hpp> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/legacy/legacy.hpp> #include <opencv2/legacy/compat.hpp> #include <opencv2/flann/flann.hpp> #include <opencv2/calib3d/calib3d.hpp> #include <opencv2/nonfree/features2d.hpp> #include <opencv2/nonfree/nonfree.hpp> using namespace std; using namespace cv; int main() { cv::initModule_nonfree();//THIS LINE IS IMPORTANT IplImage *image1 = cvLoadImage("C:\\SURF\\1.jpg"); IplImage *image2 = cvLoadImage("C:\\SURF\\2.jpg"); CvMemStorage* memoryBlock = cvCreateMemStorage(); CvSeq* image1KeyPoints; CvSeq* image1Descriptors; CvSeq* image2KeyPoints; CvSeq* image2Descriptors; // Only values with a hessian greater than 500 are considered for keypoints CvSURFParams params = cvSURFParams(500, 1); cvExtractSURF(image1, 0, &image1KeyPoints, &image1Descriptors, memoryBlock, params); cvExtractSURF(image2, 0, &image2KeyPoints, &image2Descriptors, memoryBlock, params); return 0; }
The SIFT and SURF code was moved in OpenCV v2.4 to a new module called nonfree
. Make sure you are linking (DLL in Windlows) to it. In linux this library is called
libopencv_nonfree.so
.
The SIFT and SURF code was moved in OpenCV v2.4 to a new module called nonfree
. Make sure you are linking (DLL in Windlows) to it. In linux this library is called
libopencv_nonfree.so
.
http://stackoverflow.com/questions/11175794/opencv-surf-function-is-not-implemented