saswat0 / License-Plate-Recognition

Detection of license plate and recognising the registration number
Other
23 stars 12 forks source link

video.py , OpenCV Error: Unknown error code -10 #2

Closed Fahad-Alsabr closed 4 years ago

Fahad-Alsabr commented 4 years ago

i tried to use the video.py on my local device , but shows me error

OpenCV Error: Unknown error code -10 (Raw image encoder error: Empty JPEG image (DNL not supported)) in throwOnEror, file /build/opencv-ys8xiq/opencv-2.4.9.1+dfsg/modules/highgui/src/grfmt_base.cpp, line 131 Traceback (most recent call last): File "video2.py", line 237, in <module> _, buffer = cv2.imencode('.jpg', reads) cv2.error: /build/opencv-ys8xiq/opencv-2.4.9.1+dfsg/modules/highgui/src/grfmt_base.cpp:131: error: (-10) Raw image encoder error: Empty JPEG image (DNL not supported) in function throwOnEror

i used the code of this repo https://github.com/sergiomsilva/alpr-unconstrained

and it worked for me but for the video.py in your repo it shows me that error , any idea to solve this problem?

saswat0 commented 4 years ago

I have made some changes in darknet files to support opencv images as well. Do make those in your code or simply copy the darknet folder from /alpr/darknet

Fahad-Alsabr commented 4 years ago

I've downloaded the repo and I have the same error , do you think the problem with the dependency ?

keras : 2.1.5 tenserflow : 1.15.0 opencv : 2.4.9.1 Numpy : 1.16.6

saswat0 commented 4 years ago

Keras-2.2.4 Tensorflow-1.5.0 OpenCV-4.1 Numpy-1.19 I have used these dependencies

saswat0 commented 4 years ago

Also, I think the error is maybe due to empty source file path. Create directories named "test_input" and "test_output" for storing intermediate outputs

Fahad-Alsabr commented 4 years ago

Yes thank you it worked for me , the problem has been solved by creating a Directories named "test_input" and "test_output" . do you think it can be uses for real time plate detection ?

saswat0 commented 4 years ago

Real time recognition is pretty laggy unless you have really good hardware resources. I was able to get an fps of 2