Error cv::SURF::SURF(double,int,int,bool,bool) in Implementation SURF with OpenCV and C++ -


possible duplicate of opencv surf function not implemented

my error code is:

error lnk2019: unresolved external symbol "public: __thiscall cv::surf::surf(double,int,int,bool,bool)" (??0surf@cv@@qae@nhh_n0@z) referenced in function _main

i don't know how fix it.

my code is:

#include <opencv\cv.h> #include <opencv\highgui.h> #include <iostream> #include <conio.h> #include <opencv2\nonfree\features2d.hpp> #include <opencv2\legacy\legacy.hpp> #include <opencv2\core\core.hpp> #include <stdio.h>  using namespace cv; using namespace std;  int main() {     mat img_1 = imread("kmu1.jpg", cv_load_image_grayscale);     mat img_2 = imread("all.jpg", cv_load_image_grayscale);      if(!img_1.data || !img_2.data)     {         cout << "could not open or find image" << endl;         return -1;     }      int minhessian = 400;     surf surf( minhessian );      vector <keypoint> keypoints_1, keypoints_2;     mat descriptors_1, descriptors_2;      surf(img_1, mat(), keypoints_1, descriptors_1, false);     surf(img_2, mat(), keypoints_2, descriptors_2, false);      bfmatcher matcher(norm_l2, false);     vector<dmatch> matches;     matcher.match(descriptors_1, descriptors_2, matches);      mat img_matches;     drawmatches(img_1, keypoints_1, img_2, keypoints_2, matches, img_matches);      imshow("matches", img_matches);      waitkey(0);     _getch();     return 0; }  

try add libs if in debug mode , using opencv 2.4.5:

opencv_nonfree245d.lib  opencv_features2d245d.lib 

in project -> properties -> linker -> input -> additional dependencies.

i had same error doing feature description tutorial , fixed it.


Comments