Skip to content Skip to sidebar Skip to footer

Python Opencv Imshow Fails

I installed opencv on my Ubuntu 14.04 system system with pip install python-opencv my Python version is 2.7.14 import cv2 cv2.__version__ tells me that I have the OpenCV version

Solution 1:

Try checking if the image you are reading is loading

image = cv2.imread(filepath,0) #0 for gray scaleif image isNone:
    print"Cant Load Image"else:
    cv2.imshow("Image", image)
    cv2.waitKey(0)

Solution 2:

Apparently

pip install python-opencv

is not working at all and should not be used. After I installed Opencv from their website it worked

Solution 3:

Post a Comment for "Python Opencv Imshow Fails"