UBUNTU18.04 (CUDA10.1)装OPENCV3.2.0 + OPENCV_CONTRIB3.2.0

我怀着务必激动的心情做好出好多bug的准备去安装3.2.0,但是经过将近一天的努力我还是内成功,出了个玄学bug解决不了,各位如果是UBUNTU18请绕行3.2.0版本。
正式安装之前看下这个:
https://www.pianshen.com/article/18601108002/
下载地址:

百度盘

参考地址:

https://blog.csdn.net/hiram_zhang/article/details/103467737

https://www.cnblogs.com/RichardYao/archive/2018/11/03/9900268.html

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

上面命令执行会报错,错误说libjaster-dev无法安装,解决办法如下:

sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt update
sudo apt install libjasper1 libjasper-dev

2、如果cuda版本是8以上,要改文件,具体是个:CUDA_nppi_LIBRARY (ADVANCED)错误。
3、加入opnecv_contrb后提示错误:
opencv-3.2.0/cmake/OpenCVUtils.cmake:1043 (file):
file DOWNLOAD HASH mismatch

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 # 处理图像所需的包
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev liblapacke-dev
sudo apt-get install libxvidcore-dev libx264-dev # 处理视频所需的包
sudo apt-get install libatlas-base-dev gfortran # 优化opencv功能
sudo apt-get install ffmpeg

2、对于 ippicv_linux_20151201.tgz 下载过慢问题

https://blog.csdn.net/u013468614/article/details/103381002

3、出现问题:
CUDA_nppi_LIBRARY (ADVANCED)
解决:

https://blog.csdn.net/u014613745/article/details/78310916

版本切换
https://www.cnblogs.com/xiangdongBig1/p/12091980.html

你可能感兴趣的:(UBUNTU18,opencv)