- This project demonstrates how to detect and recognize license plates from an image using Python Image Processing.
- It is a practical implementation of computer vision and OCR techniques, suitable for applications such as vehicle monitoring systems or parking management.
- it only works for images
- Reading the Image: The input image is read using OpenCV, and then it's displayed using
matplotlib
for visualization. - Grayscale Conversion: The image is converted to grayscale to simplify processing, focusing on intensity rather than color.
- Noise Reduction: A bilateral filter is applied to reduce noise while preserving the edges, preparing the image for edge detection.
- Edge Detection: The Canny edge detection algorithm is used to identify edges, highlighting the boundaries of objects like the license plate.
- Finding Contours: The system identifies contours (closed shapes) in the image, filtering out the most relevant contours that are likely to be the license plate.
- Approximating License Plate: A polygon approximation is used to detect a quadrilateral contour, assuming the license plate is rectangular.
- Masking and Cropping: The license plate area is isolated from the image, and the region is cropped for OCR.
- Text Recognition: EasyOCR is used to extract text from the cropped license plate image.
Installing dependencies:
pip install easyocr
pip install imutils
pip install opencv-python
pip install matplotlib