Ubuntu16.04下安装OpenCV3.2.0
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu16.04下安装OpenCV3.2.0相关的知识,希望对你有一定的参考价值。
1.安装官方给的opencv依赖包
$ sudo apt-get install build-essential
$ sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
$ sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev # 处理图像所需的包
$ sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
$ sudo apt-get install libxvidcore-dev libx264-dev # 处理视频所需的包
$ sudo apt-get install libatlas-base-dev gfortran # 优化opencv功能
$ sudo apt-get install ffmpeg
2.下载opencv3.2.0
这里需要下载opencv和opencv_contrib(后者会在cmake配置的时候用到),这是因为opencv3以后SIFT和SURF之类的属性被移到了contrib中,。
$ wget https://github.com/opencv/opencv/archive/3.2.0.zip # 从github上直接下载或者clone也可
$ wget https://github.com/opencv/opencv_contrib/archive/3.2.0.zip
3a.配置编译opencv (无NVIDIA CUDA版本)
cd opencv-
3.2
.
0
mkdir build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
以上是关于Ubuntu16.04下安装OpenCV3.2.0的主要内容,如果未能解决你的问题,请参考以下文章
ubuntu16.04 cuda8.0 opencv3.2.0 caffe安装
Ubuntu16.04+anaconda2+opencv3.2.0
Ubuntu16.04+anaconda2+opencv3.2.0