Cuda9.0以上安装opencv3.0以上

问题一:由于Cuda9.0以上不支持opencv2.0架构,安装时会报错

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

需要修改几个文件

1) FindCUDA.cmake  (opencv-2.4.13/cmake/FindCUDA.cmake)

2) OpenCVDetectCUDA.cmake

cuda_fp16.h (opencv\modules\cudev\include\opencv2\cudev\common.hpp)

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


问题二: Linux环境下装OpenCV3 缺少ippicv问题

由于直接在cmake时下载很有可能会提示下载失败,因此可以单独下载后,对文件名进行hash放进对应的路径中

$ ipp_file=ippicv_2017u2_lnx_intel64_20170418.tgz&&

> ipp_hash=$(md5sum ../$ipp_file | cut -d" "-f1) &&

> ipp_dir=.cache/ippicv &&

> mkdir -p ${ipp_dir} &&

> sudo cp ../$ipp_file $ipp_dir/$ipp_hash-$ipp_file

参考:https://www.cnblogs.com/lynsyklate/p/7719500.html


问题三:Unsupported gpu architecture'compute_11'解决方法

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

参考:https://blog.csdn.net/sysuwuhongpeng/article/details/45485719


问题四:error: #error "libswscale is necessaryto build the newer OpenCV ffmpeg wrapper"

修改文件/home/liuyujun/opencv-2.4.13/modules/highgui/src/cap_ffmpeg_impl.hpp

直接添加以下头文件,删除带有上述error的语句

#include <libavcodec/avcodec.h>

#include <libswscale/swscale.h>



评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值