Installation of Libopencv-nonfree-dev in OpenCV: undefined reference to ' cv::initmodule_nonfree () '

Source: Internet
Author: User

Do it together today rgb-d SLAM (3),
The program will receive the following error:
Cv::initmodule_nonfree ();

/home/yhzhao/slam/src/detectfeatures.cpp:32:undefined reference to ' Cv::initmodule_nonfree () '

It's strange that I can find libopencv_nonfree.so.2.4.9 in my Libs folder.
But in my own cmake,

Message in CMake ("Opencv_libs = ${opencv_libs}")
Opencv_libs = Opencv_videostab;opencv_video;opencv_ts;opencv_superres;opencv_stitching;opencv_photo;opencv_ocl;o Pencv_objdetect;opencv_ml;opencv_legacy;opencv_imgproc;opencv_highgui;opencv_gpu;opencv_flann;opencv_ Features2d;opencv_core;opencv_contrib;opencv_calib3d

There is no opencv_nonfree, Dosegango reminders, and then the following method to install a library. Give a wake up to the same situation later.

sudo add-apt-repository--yes ppa:xqms/opencv-nonfreesudo apt-get updatesudo apt-get Install Libopencv-nonfree-dev

After installation
Message in CMake ("Opencv_libs = ${opencv_libs}")

Opencv_libs = Opencv_videostab;opencv_video;opencv_ts;opencv_superres;opencv_stitching;opencv_photo;opencv_ocl;o Pencv_objdetect; Opencv_nonfree; Opencv_ml;opencv_legacy;opencv_imgproc;opencv_highgui;opencv_gpu;opencv_flann;opencv_features2d;opencv_core;o Pencv_contrib;opencv_calib3d

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Installation of Libopencv-nonfree-dev in OpenCV: undefined reference to ' cv::initmodule_nonfree () '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.