【深度学习】ubuntu16.04下安装opencv3.4.0
1、首先安装一些编译工具
# 安装编译工具 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
2、下载opencv
https://github.com/opencv/opencv/archive/3.4.0.zip
3、编译安装
# 打开文件夹: cd opencv-3.4.0 # 新建一个文件夹用于存放临时文件: mkdir release # 切换到该临时文件夹: cd release # 开始编译: cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local .. make -j4 # 开启线程 按照自己的配置 sudo make install