1 下载opencv(在opencv官网上下载3以上的版本,linux选择“source”)
2安装opencv
(1)附加依赖项:
必备项:sudo apt-get install build-essential libgtk2.0-dev libvtk6-dev libjpeg-dev libtiff5-dev libjaper-dev libopenexr-dev libtbb-dev
(2)编译安装opencv
cd opencv
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local .
make
sudo make install
3 错误①:在ubuntu16.04上安装Opencv的时候,执行编译命令
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local …后一直卡在下载ippicv的地方。
由于墙的原因,ippicv下载不下来,最好手动下载下来,下载后将ippicv_linux_20151201.taz放在:
/opencv-3.1.0/3rdparty/ippicv/downloads/linux-808b791a6eac9ed78d32a7666804320e文件夹下,重新运行:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREF