I am doing a vehicle license plate detection and recognition project. My code was working perfectly fine and then all of a sudden it stopped working. It seems as if opencv
stopped working completely.
This is the error I am getting.
Traceback (most recent call last):
File "c:\Users\user-pc\Desktop\Python Project VSCode\Code\main.py", line 5, in <module>
cv2.imshow("real image", image)
cv2.error: OpenCV(4.5.4) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1006: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'
I am just running a smaller code to get get opencv working. This is the code i am running.
import cv2
image = cv2.imread('T2.jpg')
cv2.imshow("real image", image)
cv2.waitKey(0)
I have tried uninstalling and reinstalling opencv
. I have even tried in a different IDE but I get the same error. I dont know what to do.
Please help