I am trying to run a simple program that reads an image from OpenCV. However, I am getting this error:
error: ......\\modules\\highgui\\src\\window.cpp:281:
img=cv2.imread('testpaper01-01.png')
cv2.imshow('image',img)
cv2.waitKey(0)
cv2.destroyAllWindows()
You have to mention the same format of your image file in the code(eg:-.jpg/.png/.jpeg/.tif etc.) and the directory of the image file must be same as the source code, I also got the same error but I rectified this way