Linked Questions

Popular Questions

Error in reading image through OpenCV in Python

Asked by At

I am getting issues in reading an image using opencv in Python.Can someone please help??

What I had done??

Installed opencv in Anaconda and using jupyter notebook for running the code.I am using python3. Below is the code:

img =cv2.IMREAD("C:/Users/u266772/Desktop/Video/maddy.jpg",cv2.IMREAD.GRAYSCALE)

cv2.imshow ('image',img)
cv2.waitkey(0)
cv2.destroyAllWindows()

The error:

AttributeError Traceback (most recent call last) in () ----> 1 img = cv2.IMREAD("C:/Users/u266772/Desktop/Video/maddy.jpg",cv2.IMREAD.GRAYSCALE) 2 3 cv2.imshow ('image',img) 4 cv2.waitkey(0) 5 cv2.destroyAllWindows()

AttributeError: module 'cv2' has no attribute 'IMREAD'

Related Questions