This project aims to implement basic ANPR(Automatic Number Plate Recognition system) using OpenCV and Tesseract-OCR in Python. The program extracts the number plate information from a picture or a static videoframe and stores it in CSV file with date of entry.
Automatic number-plate recognition is a technology that uses optical character recognition on images to read vehicle registration plates to create vehicle location data. It can use existing closed-circuit television, road-rule enforcement cameras, or cameras specifically designed for the task. ANPR is an advanced version of what I am going to show you in this article. Here, we will be implementing the software part. The hardware part can be implemented using CCTV cameras and Raspberry Pi.
- Read the original image
- Resize the image
- Convert it to grayscale.
- Apply Bilateral Filter.
- Identify and store the Canny edges.
- Find the contours in from the edges detected and sort the top 30 contours.
- Get the perimeter of each contour and select those with 4 corners.
- Mask all other parts of the image and show the final image.
- Read the text using Tesseract OCR.
- Append to csv file.