A Real-time Vehicle License Plate Recognition System

by Gil Zemer
Supervised by Johanan Erez


     A license plate recognition system is an automatic system that is able to recognize a license plate number, extracted from a video device. Such a system is useful in many fields and places: parking lots, private and public entrances, border control, theft and vandalism control, etc.

     This project focuses on implementing a system that will be used in a private entrance, allowing only authorized cars to pass. The project has 2 parts: receiving a video sequence and extracting a license plate from it; receiving a license plate and identifying the license number. The 1st part of the project was developed by me and was integrated with the 2nd part, which was based on an earlier project (see "License Plate Recognition Using Image Processing Techniques & SVM Classifier" by Ido Shemesh and David Arieh Fellman). This project documentation mostly relates to the 1st part. Refer to the 2nd part project for a detailed documentation regarding that part.

The problem:

     The system faces several problems: different size, location, digit size and shape of license plates; different intensities due to changes of weather or daytime; dirty/unclear/damaged license plates; yellow cars; real time demands;
examples for different types of plates:

The solution:

     The algorithm of the solution is described in the following flow chart:

Figure 1 - The program flowchart. Partial type 1 - when a vehicle is about to enter the frame. Partial type2 - when a vehicle is about to leave the frame.

Any motion?
     This question is answered by checking the absolute difference between the last 2 frames according to a specific threshold.

A new plate?
     To answer this question the program analyzes the current frame. Finding the license plate area is done by thresholding the hue, saturation and value pictures of the frame:

     After labeling the received picture the algorithm finds the largest region that is not bigger than a given upper bound for license plate size (thus handling the case of a yellow car - the big regions that define the car will be ignored, and the medium region that defines the license plate will be used):

     If the selected region size is smaller than a given lower bound for the license plate size, the region is probably not a license plate - no plate in frame. If the selected region overlaps the upper or right edge of the frame, the car is about to enter the frame - this is partial type 1. If the selected region overlaps the lower or left edge of the frame, the car is about to leave the frame - this is partial type 2.

     In any case, if the current frame doesn't contain a new license plate (according to a flag) - the system will wait for a new one to appear.

Is the gate opened?
     This question is answered by checking the absolute difference between 2 small regions, one of a given gate picture and the other of the current picture, where the gate is expected to be if it's closed. The decision is made according to a specific threshold.

Is the car authorized?
     This question is answer by searching the number extracted from the picture in a local database.


     The program was developed in the VISL PC farm, using Matlab. The main Matlab toolboxes that were used are image acquiring and image processing. The video was taken from videotapes, which were recorded in the past using a simple camera. The acquisition of the frames by Matlab was done by a simple "winvideo" card.

     Since the results of the project met the expectations, it was decided that the code won't be transferred to C/C++.


     The program produces good results when the license plate lighting is uniform and the numbers of the license plate are clear and seperable. Dealing with shadows (of the gate, for example) or unclear digits is an advanced problem which isn't solved in this project.


I want to thank my project supervisor Johanan Erez for his help and guidance throughout this work.
I also want to thank the Ollendorff Minerva Center Fund for supporting this project.

Related documentation