
We convert our image to grayscale, remove some noise by applying a Gaussian blur, and finally detect the edges using the Canny edge detector. Gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) Now we can preprocess our image: # convert the input image to grayscale, The first thing we need to do is to import the required packages.

Now, create a new Python file and write the following code: from easyocr import Reader
#License plate recognition source code c language install
If you don't know which command you used to install OpenCV, then uninstall them all with pip uninstall and reinstall only one package because if you have both packages installed in the same environment you may have unexpected consequences: pip uninstall opencv-pythonĪnd reinstall it: pip install opencv-python=4.5.4.60 Number Plate Recognition Or if you have installed opencv-contrib-python, you can simply downgrade using the command below: pip install opencv-contrib-python=4.5.4.60 To downgrade, just run the following command: pip install opencv-python=4.5.4.60

Please note that at the time of this writing OpenCV version (4.5.5.62) is not compatible with EasyOCR, so if you have it installed you'll need to downgrade to version 4.5.4.60 (I spent several hours to figure this out x)). To install the EasyOCR package we can simply use the pip command: pip install easyocr
