Hi friends i just now installed opencv and checking the basic code but it results in error. The code is
import numpy as np
import cv2
img=cv2.imread(\'C:\\U
The error says that the image you opened doesn't satisfy the condition height > 0
and width > 0
. This may have several reasons.
Most of the times, it is due to an inexistent image address given in imread
.
Sometimes it may be also because the complier failed to load the image. For example, if you write some random strings in notepad and save the file as a.jpg
, the compiler may not be able to load it.