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:
seems hard to install opencv on ubuntu, I finally get it with a docker image
https://hub.docker.com/r/jjanzic/docker-python3-opencv/
or you can download sources and make install as described on https://milq.github.io/install-opencv-ubuntu-debian/ using bash script
Post a Comment for "Python Opencv Imshow Fails"