Opencv 错误:没有 GPU 支持(库在没有 CUDA 支持的情况下编译) [英] Opencv Error: no GPU support (library is compiled without CUDA support)

查看:29
本文介绍了Opencv 错误:没有 GPU 支持(库在没有 CUDA 支持的情况下编译)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 CUDA 在 GPU 上使用 opencv 处理一些图像处理任务.我正在使用 ubuntu.我毫无问题地设置了我的两个产品 Opencv 和 Cuda,我对此很确定.但是,当我尝试在 Eclipse 中运行 sampleCOde 时,出现错误:

I am trying to work some image-process tasks with opencv on GPU with CUDA. I am using ubuntu. I setup my two products Opencv and Cuda without a problem, I am sure about that. However, when I attempt to run sampleCOde in eclipse, I have get an error:

OpenCV 错误:在 mallocPitch,文件/home/muad/Source/OpenCV-2.4.2/modules/core/src/gpumat.cpp,第 749 行中不支持 GPU(编译库时不支持 CUDA)

我重新制作了我的 opencv,但我仍然明白.

I remade my opencv, but I still get that.

推荐答案

如文档中所述,您必须使用 CMake 构建 OpenCV 并设置标志 WITH_CUDA=ON.然后您将获得功能齐全的 OpenCV GPU 模块.否则,该模块仍会构建,但您会收到 CV_GpuNotSupported 异常.

As stated in the documentation, you have to build OpenCV using CMake and set the flag WITH_CUDA=ON. Then you will get the full-featured OpenCV GPU module. Otherwise the module is still built, but you recieve an exception with CV_GpuNotSupported.

有关更多信息,请阅读此处:http://docs.opencv.org/modules/gpu/doc/introduction.html

For further information, read here: http://docs.opencv.org/modules/gpu/doc/introduction.html

这篇关于Opencv 错误:没有 GPU 支持(库在没有 CUDA 支持的情况下编译)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆