Cv2 error problem

Traceback (most recent call last):
File “E:/masterclass/AI/”, line 3, in
cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-oduouqig\opencv\modules\highgui\src\window.cpp:376: error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘cv::imshow’

Your img has zero width or zero height, or both. Now, how could that be?

raceback (most recent call last):
File “E:/certifi.m/”, line 3, in
cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-oduouqig\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function ‘cv::cvtColor’


I see this error a lot for myself and it is usually down to the path to your img is not correct.
Can you confirm that is correct.

1 Like