简体   繁体   English

opencv-python:haveOpenCL返回False

[英]opencv-python: haveOpenCL return False

Should return True if the the prebuilt binaries are compiled with OpenCL support. 如果预编译的二进制文件是在OpenCL支持下编译的,则应返回True I've seen many examples where it just works out of the box. 我已经看到了许多示例 ,这些示例可以立即使用。 So my assumption is that the binaries are built with OpenCL support. 因此,我的假设是二进制文件是通过OpenCL支持构建的。 So why might it not be working for me? 那么,为什么它对我不起作用?

Also it works from C++ for OpenCV installed from source. 它也可以从源代码安装的C ++中用于OpenCV。 So my computer has OpenCV runtime installed: 因此,我的计算机安装了OpenCV运行时:

[ INFO:0] Initialize OpenCL runtime... [INFO:0]初始化OpenCL运行时...

opencv-python version: 3.4.2 opencv-python版本: 3.4.2

Stupid mistake. 愚蠢的错误。

Turns out I've been using the cv2 from anaconda. 原来我一直在使用anaconda的cv2。 There I get: 我得到:

Use Cuda: NO 使用Cuda:否

Use OpenCL: NO 使用OpenCL:否

When using cv2 from opencv-python I get: 当从opencv-python使用cv2时,我得到:

OpenCL: YES (no extra features) OpenCL:是(没有其他功能)

Include path: NO 包含路径:否

Link libraries: -framework OpenCL 链接库:-framework OpenCL

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

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