当前位置:   article > 正文

Ubuntu16.04安装OpenCV

ubuntu 16.04 安装 opencv

1.安装 opencv 所需依赖包

如果后面还要遗漏的,出错再补上

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get -y install libopencv-dev build-essential cmake git libgtk2.0-dev pkg-config python-dev python-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libtiff5-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libxine2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev libqt4-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264v4l-utils unzip

2.下载 opencv3.2.0

这里需要下载 opencv 和 opencv_contrib (后者会在 cmake 配置的时候用到), 这是因为 opencv3以后 SIFT 和 SURF 之类的属性被移到了 contrib 中,执行下面两条指令下载 OpenCV3.2.0

$ wget https://github.com/opencv/opencv/archive/3.2.0.zip
$ wget https://github.com/opencv/opencv_contrib/archive/3.2.0.zip

(3.2.0.zip就是opencv-3.2.0.zip)
(3.2.0.zip.1就是opencv_contrib.zip)

3.解压下载的两个文件

$ unzip opencv-3.2.0.zip -d ~/opencv
$ unzip opencv_contrib-3.2.0.zip -d ~/opencv

4.创建并进入 build 目录,执行 cm

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号