Quantcast
Viewing all articles
Browse latest Browse all 41027

QT5.5+Opencv3.0.0 Undefined symbols for architecture x86_64S

I tried to use SURF detector and descriptor in opencv3.0.0. However, the error is Undefined symbols for architecture x86_64: "cv::xfeatures2d::SURF::create(double, int, int, bool, bool)", referenced from: _main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) **QT project setting** QT += core QT -= gui TARGET = test4 CONFIG += console CONFIG -= app_bundle TEMPLATE = app INCLUDEPATH += /usr/local/include INCLUDEPATH += /usr/local/include/opencv INCLUDEPATH += /usr/local/include/opencv2 LIBS += -L/usr/local/lib \ -lopencv_calib3d \ -lopencv_core \ -lopencv_features2d \ -lopencv_flann \ -lopencv_highgui \ -lopencv_imgcodecs \ -lopencv_imgproc \ -lopencv_ml \ -lopencv_objdetect \ -lopencv_photo \ SOURCES += main.cpp **Code** #include #include #include #include #include #include #include using namespace cv; using namespace std; using namespace cv::xfeatures2d; int main(int argc, char *argv[]) { Mat img_1 = imread( "../testImg/left.jpg", CV_LOAD_IMAGE_GRAYSCALE ); Mat img_2 = imread( "../testImg/right.jpg", CV_LOAD_IMAGE_GRAYSCALE ); imshow("Display1",img_1); imshow("Display2",img_2); if( !img_1.data || !img_2.data ){ std::cout<< 'no image loaded' < f2d = SURF::create(minHessian); // Ptr f2d = ORB::create(); } I have checked that nonfree and xfeatures2d are already installed by using cmake. Ptr f2d = ORB::create(); // is worked but SURF and SIFT don't.

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>