OpenCV:不支持GPU(该库是在不支持CUDA的情况下编译的)
OpenCV: No GPU support (The library is compiled without CUDA support)
我安装了带有cmake和选项with_CUDA=ON的opencv 2.4.6.1。我试用了一些示例代码,效果很好。但是gpu库存在一些问题。我在源文件中添加:
cv::gpu::printShortCudaDeviceInfo(cv::gpu::getDevice());
它回来了:OpenCV Error: No GPU support (The library is compiled without CUDA support) in getDevice, file /build/buildd/opencv-2.4.2+dfsg/modules/core/src/gpumat.cpp, line 182 terminate called after throwing an instance of 'cv::Exception' what(): /build/buildd/opencv-2.4.2+dfsg/modules/core/src/gpumat.cpp:182: error: (-216) The library is compiled without CUDA support in function getDevice
我该怎么修?
您的系统上似乎混合了两个不同版本的OpenCV(2.4.6.1和2.4.2)。旧版本(2.4.2)似乎是在没有GPU支持的情况下构建的。
您可以尝试完全删除任何旧版本的OpenCV,然后重新开始2.4.6.1的构建过程。
相关文章:
- 为什么istream不支持右值提取
- 错误:(-210:不支持的格式或格式组合)功能'create'中的硬件视频解码器不支持视频源
- Casablanca/cpprestsdk listener.support接受函数,但不支持方法
- 为什么C++不支持对未初始化变量进行智能分析?
- 在 c++ 中连接字符串和整数,以便在 C++ 11 不支持计算机的情况下读取多个文件
- 在 Ubuntu 18.04 上编译 GLSL 着色器时"不支持 GLSL 3.30"?
- 为什么联机C++ IDE 不支持"graphics.h"头文件?
- Clang编译器不支持aarch64-apple-darwin上的-fxray-instrument
- 为什么我的 clang 格式不支持 PPDirectiveIndentStyle 选项?
- 为什么某些 STL 容器(堆栈、队列、优先级队列)不支持迭代器?
- 为什么不支持 Xcode 1.5?
- C++20 从括号中的值列表初始化聚合,不支持内部数组
- 为什么结构化绑定不支持可变数组?
- 不支持外部调用 - CUDA
- 编译一个不支持c++11和.cxx文件的cuda代码需要一个带有vexcl示例的c++11
- CUDA 7.0抱怨不支持gcc 4.9
- 抢占模式下不支持 CUDA 动态并行调试.断点将被禁用
- 带有 g++ 的 CUDA 6.5 不支持 c++11
- OpenCV:不支持GPU(该库是在不支持CUDA的情况下编译的)
- 使用OpenCv 2.4.10 + Cuda 7.5 + W10不支持GPU