简体   繁体   English

用gpu cuda支持编译opencv

[英]compiling opencv with gpu cuda support

I am using OpenCV 2.3.1 with CUDA 4.0. 我正在将OpenCV 2.3.1与CUDA 4.0一起使用。

I have installed the OpenCV 2.3.1 by CMAKE with WITH_CUDA flag on. 我已经通过CMAKE在WITH_CUDA标志打开的情况下安装了OpenCV 2.3.1。 And then I compiled the OpenCV solution in release and debug mode, but still when I used the getCudaEnabledDevice function of CV::GPU it is returning 0. This means it is not detecting the CUDA enabled device. 然后,我在发布和调试模式下编译了OpenCV解决方案,但是当我使用CV::GPUgetCudaEnabledDevice函数时,它仍返回0。这意味着它没有检测到启用CUDA的设备。

It seems that I have done everything right, still what is happening?? 看来我做对了所有事情,还是正在发生什么??

Can Anybody suggest where can be the problem now??. 有人可以建议现在哪里出问题吗?

Thanks in advance. 提前致谢。

I had the same problem. 我有同样的问题。 I fixed it by copying opencv_core243d.dll from E:\\opencv\\build\\gpu\\x64\\vc10\\lib folder to the work directory with the .exe. 我通过将E:\\opencv\\build\\gpu\\x64\\vc10\\lib文件夹中的opencv_core243d.dll复制到带有.exe的工作目录中来进行修复。
Don't know why that should matter but it did. 不知道为什么这很重要,但确实如此。

Using cuda 5.0 使用CUDA 5.0
VS2010 express VS2010 Express
win 7 x64 赢7 x64

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM