[英]No GPU Support using OpenCv 2.4.10 + Cuda 7.5 + W10
Im trying to get GPU up and running using: 我正在尝试使用以下方法来启动并运行GPU:
I have compiled OpenCv using CMake with WITH_CUDA=ON, and then installed the libraries by opening OpenCv.sln and built ALLBUILD and INSTALL projects. 我已经使用CMake和WITH_CUDA = ON编译了OpenCv,然后通过打开OpenCv.sln安装了库,并构建了ALLBUILD和INSTALL项目。
Set my Project configuration as: 将我的项目配置设置为:
VC++ Directories VC ++目录
Linker-general-Additional libraries 链接程序通用附加库
Linker-input-Additional Depencies 链接器输入-其他依赖
My environment variables: Path= C:\\Program Files\\NVIDIA GPU Computing;Toolkit\\CUDA\\v7.5;C:\\OpenCv\\opencv\\build\\install\\x64\\vc12\\bin;C:\\OpenCv\\opencv\\build\\x64\\vc12\\bin 我的环境变量: Path = C:\\ Program Files \\ NVIDIA GPU Computing; Toolkit \\ CUDA \\ v7.5; C:\\ OpenCv \\ opencv \\ build \\ install \\ x64 \\ vc12 \\ bin; C:\\ OpenCv \\ opencv \\ build \\ 64 \\ VC12 \\ BIN
Testing code: 测试代码:
#include "opencv2\opencv.hpp"
#include "opencv2\gpu\gpu.hpp"
using namespace cv::gpu;
using namespace std;
int main() {
{
setDevice(0);
int gpu = getCudaEnabledDeviceCount();
cout << gpu ;
system("pause");
return 0;
}
}in
But setDevice throws 但是setDevice抛出
no GPU support (The library is compiled without CUDA support) in EmptyDeviceInfoFuncTable::setDevice, file c:\\builds\\2_4_PackSlave-win64-vc12-shared\\opencv\\dynamicuda\\include\\opencv2/dynamiccuda/dynamicuda.hpp.
在EmptyDeviceInfoFuncTable :: setDevice中,文件c:\\ builds \\ 2_4_PackSlave-win64-vc12-shared \\ opencv \\ dynamicuda \\ include \\ opencv2 / dynamiccuda / dynamicuda.hpp中没有GPU支持(该库在没有CUDA支持的情况下进行编译)。 line 84
84行
and if i comment setDevice(0) the gpu is still not detected, getCudaEnabledDeviceCount returns 0. 并且如果我注释setDevice(0)仍未检测到gpu,则getCudaEnabledDeviceCount返回0。
问题是Opencv 2.4.10支持CUDA 4.2,我的视频卡仅与CUDA 6.5和7.5兼容,我通过安装OpenCV 3.0.0解决了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.