This project extracts and recognizes text from vehicle license plates using OpenCV for image processing and EasyOCR for Optical Character Recognition (OCR). The recognized license plate is formatted according to the Indian vehicle registration system.
- Detects and extracts the license plate from an image.
- Uses OCR to recognize text from the extracted license plate.
- Formats the extracted text to match Indian license plate conventions.
- Highlights and displays the recognized license plate on the original image.
Install the required dependencies using the following command:
pip install -r requirements.txtopencv-python
numpy
imutils
matplotlib
easyocr
-
Clone the repository or download the script.
-
Ensure you have Python installed (Python 3.x recommended).
-
Place the image containing the license plate in the specified path.
-
Run the script using the command:
python license_plate_recognition.py
-
The recognized license plate text and its formatted breakdown will be displayed in the console.
-
The script will display an image with the recognized license plate highlighted.
After running the script, the extracted license plate text is printed in the following format:
LICENSE PLATE NUMBER: MH20DV2366
License Plate Breakdown:
State Code: MH
RTO Code: 20
Unique Code: DV2366
In India, car number plates follow a format of two letters for the state/UT, two digits for the RTO/district, and then a unique alphanumeric code (letters and numbers).
Example: TN 01 AB 1234 (TN = Tamil Nadu, 01 = RTO code, AB = series, 1234 = unique number)
- Ensure that the image provided contains a clear and visible license plate for better accuracy.
- Modify the image path in the script if necessary.
- If no text is detected, try adjusting the image quality or OCR settings.
Vuyyala Kavya