OpenCV》的功能没有实现.使用 Windows 重建库" [英] OpenCV "The function is not implemented. Rebuild the library with Windows"

查看:47
本文介绍了OpenCV》的功能没有实现.使用 Windows 重建库"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现问题无法解决.当我尝试导入 numpy

I see problem unsolvable.I get this error when I try to import numpy

import cv2
import numpy as np

img=cv2.imread('image.jpg',1)
cv2.imshow('image', img)
cv2.waitkey()
cv2.destroyAllWwindows()

当我运行属性 imread 不起作用

when I run attribute imread is not working

cv2.error: OpenCV(3.4.1) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:636: error: (-2) 函数没有实现.使用 Windows、GTK+ 2.x 或 Carbon 支持重建库.如果你使用的是 Ubuntu 或 Debian,请安装 libgtk2.0-dev 和 pkg-config,然后重新运行 cmake 或在函数 cvShowImage 中配置脚本

cv2.error: OpenCV(3.4.1) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:636: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvShowImage

请帮忙,Python 版本 3.6

OpenCV 版本:3.4.1

matplotlib 版本:2.2.2

推荐答案

我也遇到了同样的问题.尽管它们以前安装过,但我通过以下方式再次安装了它们:

I had the same issue too. Despite they were installed before, I've installed them again via:

pip install opencv-python 
pip install opencv-contrib-python 

问题解决了.

这篇关于OpenCV》的功能没有实现.使用 Windows 重建库"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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