OpenCV3.2安装+CUDA9.2

1.首先在解压完的目录下新建build文件夹

2.安装依赖库

sudo apt-get install build-essential libgtk2.0-dev libvtk5-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev libtbb-dev

3.然后进入到build文件夹右键打开终端

 cmake -D CMAKE_BUILD_TYPE=bulid -D CMAKE_INSTALL_PREFIX=/usr/local -D CUDA_GENERATION=Kepler ..

4.如果遇到CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and test
ed correctly in the CMake files:
CUDA_nppi_LIBRARY (ADVANCED)
linked by target "opencv_cudev" in directory D:/Cproject/opencv/opencv/sources/modules/cudev

可以参考这篇神作:https://blog.csdn.net/u014613745/article/details/78310916

5.如果有遇到-- ICV: Downloading ippicv_linux_20151201.tgz... CMake Error at 3rdparty/ippicv/downloader.cmake:73 (file): file DOWNLOAD HASH mismatch

或者

在此过程中会出现下载 ippicv_linux_20151201.tgz 或者 protobuf-cpp-3.1.0.tar.gz 包失败的情况,若 下载失败 或者 file DOWNLOAD HASH mismatch

可以去https://github.com/opencv/opencv_3rdparty/tree/ippicv/master_20151201/ippicv下载相应的包然后

参考这篇文章的做法:https://blog.csdn.net/youngpan1101/article/details/58027049

6.在完成第4步后

make -j4

7.sudo make install

搞定!

猜你喜欢

转载自blog.csdn.net/WILLIAMMMS/article/details/82288064
今日推荐