cmake编译opencv的cuda库的注意事项
- 说明
- 一、Cmake编译opencv的基本使用
- 二、需要准备的工具
- 三、opencv_contrib下载
- 四、出现的问题
-
- 1、CMake Error at cmake/OpenCVModule.cmake:295 (message)
- 2、CMake Warning at cmake/OpenCVDownload.cmake:202 (message)
- 3、CMake Warning at cmake/OpenCVDownload.cmake:202 (message):
- 4、cudacodec::VideoReader requires Nvidia Video Codec SDK. Please resolve dependency or disable WITH_NVCUVID=OFF"
- 5、cuDNN:No
- 6、error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list
- 7、错误:xxx\gen_opencv_objc_source_osx.rule”的自定义生成已退出,代码为 -200
- 8、错误 C2039 "pixelBitDepthMinus8": 不是 "_NV_ENC_CONFIG_HEVC" 的成员
- 9、警告:Policy CMP0146 is not set: The FindCUDA module is removed. Run "cmake --help-policy CMP0146" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
- 10、vs生成解决很慢
- 11、Error in configuration process,project files may be invalid
- 12、没有使用c++11进行编译
说明
1、相关版本
cuda8.0.60+opencv3.4.16+vs2013+windows7+cmake3.25.0
2、文章内容
主要对一些容易忽略的安装步骤和错误进行分析
一、Cmake编译opencv的基本使用
参考我的这篇博客的第五节:编译32位的库
二、需要准备的工具
在编译之前,需要安装好cuda并配置好系统环境,下载好opencv_contrib库,因为cuda属于额外的库。
三、opencv_contrib下载
1、官网
githup
直接浏览器下载也不慢,使用迅雷更快。
参考下图选择自己需要的版本