WITH_CUDA 勾选上 使得OpenCV支持GPU加速
需要利用CMake自编译
相关软件: OpenCV3.0 CUDA8.0 VS2013 64位 Win10
问题描述:
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 tested correctly in the CMake files:
CUDA_cufft_LIBRARY (ADVANCED)
CUDA_nppi_LIBRARY (ADVANCED)
CUDA_nppc_LIBRARY (ADVANCED)
CUDA_npps_LIBRARY (ADVANCED)
......
解决方案
查看C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib\x64安装目录下cufft.lib,nppi.lib, nppc.lib npps.lib等库是否存在
注意:
# In CUDA 8.0 NPP was splitted onto 12 separate libraries.
+ find_cuda_helper_libs(nppc)
+ find_cuda_helper_libs(nppial)
+ find_cuda_helper_libs(nppic)
+ find_cuda_helper_libs(nppicom)
+ find_cuda_helper_libs(nppidei)
+ find_cuda_helper_libs(nppif)
+ find_cuda_helper_libs(nppig)
+ find_cuda_helper_libs(nppim)
+ find_cuda_helper_libs(nppist)
+ find_cuda_helper_libs(nppisu)
+ find_cuda_helper_libs(nppitc)
+ find_cuda_helper_libs(npps)
如果不存在,需要重新安装CUDA8.0
其他注意事项:
(1)CUDA8.0重新安装注意一点,一定不要选择安装CUDA里面自带的驱动,仅安装第一个选项下的Runtime和Document即可。
(2)CMake的编译器一定要选择 VS2013 Win64,即64位编译器
否则会发生:fatal error LNK1112: 模块计算机类型“X86”与目标计算机类型“x64”冲突问题