ubuntu16.04安装编译opencv3.2

1.下载opencv-3.2.0和opencv_contrib-3.2.0安装包

   链接:https://pan.baidu.com/s/1DLo39O0UX8f_ieQIoBuN7g 密码:8bhp

2.

$ 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

$ cd /opencv-3.2.0
$ mkdir build
$ cd /build
$ cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=/home/xiaoyi/opencv_contrib-3.2.0/modules/ ..

$ make 
$ sudo make install
$ sudo gedit /etc/bash.bashrc
添加环境变量
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig export PKG_CONFIG_PATH

你可能感兴趣的:(opencv编译)