使用opencv的nonfree模块

系统ubuntu14.04

问题:安装的opencv没有nonfree模块,用不了sift算法

安装:

  sudo apt-get update

  sudo add-apt-repository --yes ppa:xqms/opencv_nonfree

  sudo apt-get update

  sudo apt-get install libopencv-nonfree-dev

在cmake中添加链接库:

  首先查找链接库位置

  find /usr -name libopencv_nonfree.so

  我的系统显示 /usr/lib/x86_64-linux-gnu/libopencv_nonfree.so

  因此在CMakeLists.txt中添加一行

  TARGET_LINK_LIBRAIRES( /usr/lib/x86_64-linux-gnu/libopencv_nonfree.so )

原文地址:https://www.cnblogs.com/zzx2cnblogs/p/7580107.html