我運行下面的代碼在pythonCV imshow拋出錯誤
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
我在打印「img」時得到一個數組,所以圖像越來越可能被讀取,但imshow仍然無法正常工作。 –
看看[這個SO PAGE](http://stackoverflow.com/questions/40207011/opencv-not-working-properly-with-python-on-linux-with-anaconda-getting-error-th?rq = 1) –