我用python运行下面的代码
import numpy as np import cv2
print "hello"
img = cv2.imread('image.JPG',0) print img
cv2.imshow('sood',img)
我每次都会遇到以下错误-有人能帮忙吗!在
OpenCV Error: Unspecified error (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 cvShowImage, file /Users/travis/build/skvark/opencv-python/opencv/modules/highgui/src/window.cpp, line 583 Traceback (most recent call last): File "cv2ImageProcessing.py", line 9, in cv2.imshow('sood',img) cv2.error: /Users/travis/build/skvark/opencv-python/opencv/modules/highgui/src/window.cpp:583: 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
你为什么不安装
libgtk2.0-dev
它似乎在要求你安装它。尝试sudo apt-get install libgtk2.0-dev
。在如果不成功,请尝试安装script中提到的所有依赖项。我用这个脚本在我的系统上安装了OpenCV,一切正常。在
这个脚本起作用:
很可能您的OpenCV3没有正确安装。试着重新安装它。读this how-to。使用*.whl file在Windows上安装Python OpenCV3非常容易。在
相关问题 更多 >
编程相关推荐