- Open Access
- Total Downloads : 1316
- Authors : Gaikwad Dhiraj Yeshwant, Samhita Maiti, P. B. Borole
- Paper ID : IJERTV3IS071132
- Volume & Issue : Volume 03, Issue 07 (July 2014)
- Published (First Online): 29-07-2014
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License: This work is licensed under a Creative Commons Attribution 4.0 International License
Automatic Number Plate Recognition System (ANPR System)
(ANPR System)
Gaikwad Dhiraj Yeshwant Electrical Department V.J.T.I.
Mumbai, India
Samhita Maiti
Electrical Department V.J.T.I.
Mumbai, India
Prof. P. B. Borole Electrical Department V.J.T.I.
Mumbai, India
Abstract Automatic Number Plate Recognition system i.e. ANPR system is an image processing technology. In this technology we use license plate of vehicle to recognize the vehicle. Automatic Number Plate Recognition system is used in various areas nowadays such as automatic toll collection, Border crossings, parking system, Traffic control, stolen cars tracking, maintaining traffic activities and law enforcement etc. several techniques have been proposed for plate recognition, each one having its own advantages and disadvantages. The technique used in this paper is a histogram based approach. This technique has an advantage of being simple and faster compare to any other technique. This ANPR system works in four main steps to get the required information. These four steps are image acquisition, plate localization, character segmentation and character recognition. This system is implemented and simulated in Matlab 2010a.
KeywordsANPR, OCR
-
INTRODUCTION
With rising traffic on roads and number of vehicles on roads, it is getting very difficult to manually handle laws, traffic rules and regulations for smooth traffic moment. Toll-booths are installed on freeways and parking complex, where the vehicle has to stop to pay the toll or parking charge fees. Also, Traffic maintenance systems are constructed on freeways to analyze for vehicles moving at speeds not allowed by law. All these operations have a scope of improve development. In the center of all these processes lies a vehicle. The vital question here is how to find a particular vehicle? The obvious response to this question is by using the vehicles number plate. This number differentiate one vehicle from the other, which is effective especially when both are of same type of make and model. An automated system can be developed to find the license plate of a vehicle and recognize the characters from the region having a license plate. The vehicle license plate number which can be utilized to fetch farther information data about the vehicle and its owner, which can be used for further processing.
We have implemented algorithm for Automatic Number Plate Recognition System using MATLAB. This algorithm initially used different inbuilt functions and implemented some user defined techniques related to image processing. Once the algorithm was implemented, it was checked
with multiple input images having vehicle number plates. The input vehicle images consist of number plates that were aligned with some angle from horizontal axis. Once the algorithm was completely verified, the in-built functions of MATLAB were replaced by user defined functions. A flowchart shown below is the basic implementation algorithm which is shown in figure number 1. After this algorithm the characters are segmented individually. An OCR is used to recognize each character.
-
IMPLIMENTATION
Input image
Colour to gray conversion
Dilation
Horizontal edge processing
Vertical edge processing
Segmentation
Region of interest extraction
Character recognition using OCR
Output image
Figure 1: Implemented Algorithm.
-
Convert a Colored Image into Gray Image
The above algorithm shown is independent of the type of colors(RGB) in image and depends mainly on the gray scale of an image for processing and extracting the essential data. Color components like Red, Green and Blue value are not used in this algorithm. Thus, if the input image is a colored i.e. RGB image represented by three-dimensional array in MATLAB, it is converted to a two-dimensional gray scale image before further processing. The example of original color i.e. RGB input image and converted gray scale image is shown below. So first step is conversion of color to gray is implemented.
Figure 2:-Colour image.
Figure 3:-Gray scale image.
-
Dilation
Dilation is a process in which given image is improved by filling holes in an image, sharpen the edges of objects and join the broken lines in an image and it also increase the brightness of an image. Using dilation, the noise from an image can also be removed. By shaping the edges sharper, the variation of gray value between neighboring pixels at the edge of an object can also be improved which will help in edges detention. In Automatic Number Plate Recognition, the image
of a vehicle plate may not always have the same brightness and shades. During the conversion of RGB image to gray form some important parameters like difference in color, lighter edges of object, etc. can be lost. So the process of dilation will help to nullify these losses.
-
Horizontal and Vertical Edge Processing of an Image
Histogram is a graph representing values of a variable quantity over a given range. In this Automatic Number Plate Recognition algorithm, we have used horizontal and vertical histogram which gives us column-wise and row-wise histogram respectively. These histograms shows the sum of differences of gray values between neighboring pixels of an image, column-wise and row-wise. In this step, first the horizontal histogram is calculated. To calculate a horizontal histogram, the algorithm traverses through each column of an image. In each process of histogram calculation, the algorithm starts with second pixel from the top and the difference is calculated between second and first pixel. If the difference is exceeds the given threshold, then it is added to the total sum of differences. Then algorithm goes downwards to calculate the difference between third and second pickles. So on, it will calculate until the end of a column pixel and finally calculate the total sum of differences between neighboring pixels. In the end, an array containing the column-wise sum is created. In the same way vertical histogram is being calculated. In this case, rows are processed instead of columns.
-
Passing Histograms through a Low Pass Digital Filter
Referring to the figures number 3 shown below, we can analysis that the histogram values varies drastically between consecutive columns and rows. For that, to prevent loss of important information in further steps, it is suitable to smooth out such drastic changes in values of histogram. For the smoothing, the histogram is passed through a low-pass digital filter. For performing this step, each histogram value is averaged out considering the values on it right-hand side and left-hand side. This step is performed on both the horizontal histogram as well as the vertical histogram. Below are the figures number 4 shows the histogram before passing through a low-pass digital filter and after passing through a low-pass digital filter.
Figure 4:- Horizontal Histogram.
-
Filtering out Unwanted Regions in an Image
Once the histograms are passed through a low-pass digital filter, a filter is applied to remove unwanted areas from an image. In this case, the undesirable areas are the rows and columns with low histogram values. A low histogram value shows that the part of image have very small amount of variations among neighboring pixels. As the probable region with a license plate have a plain background with alphanumeric characters in the region, the difference in the adjacent pixels, especially at the edges of chaacters and number plate, will be very high. This results in a high histogram value for such part of an image. Accordingly, a region with probable license plate has a high horizontal and vertical histogram values. We do not require the area having less value anymore. The unwanted areas are removed from an image by applying a dynamic threshold. In this algorithm, value for the dynamic threshold the average value of a histogram. Now both horizontal and vertical histograms which we have calculates are passed through a low pass filter with this dynamic threshold. The output of this process is histogram showing regions having high possible of containing a number plate. The filtered histograms are shown below in figure number 5.
Figure 5:- Vertical Histogram.
-
Segmentation
In this segmentation stage we will find out region where the probable license plate is present. Coordinates of all such probable region of interest are stored in an array. And the output of this is the image having probable license plate which is shown in figure number 5
Figure 6:- Probable ROI.
The output of this segmentation step is all the probable regions that having maximum probability of containing a license plate. Out of these probable regions, we want the one with the maximum histogram value. Which will be considered as the most probable candidate for number plate. All these regions are processed row-wise and column-wise to find a common region which is having maximum horizontal and vertical histogram value. This is the region having highest possibility of having a license plate. The image detected license plate is shown in figure number 6.
Figure 7:- ROI with highest histogram value.
This algorithm was tested with several input images having resolution ranging from 680 * 480 to 1600 * 1200. Also images having vehicles of different colors and varying intensity of light. With all these images, this algorithm works correctly and recognized the number plate. This algorithm is also tested on images having number plate with certain angle (6-10 degree) to horizontal axis. Even with this angled images, this algorithm successfully detects number plates. This algorithm is implemented and verified in MATLAB.
-
Character Recognition
Optical character recognition (OCR) is used to compare the each individual character against the complete alphanumeric database. The OCR actually uses correlation method to match individual character and finally the number is identified and stored in string format in a variable. The character is then compared with the database for the vehicle authorization. The resultant signals are given according to the result of comparison.
Templates will exist for all the characters i.e. A-Z and 0-9 as shown in figure number 7.
Figure 8:- Templets.
The major steps in the OCR process are first the image is converted into a black and white image i.e. binary image. The next step would be to crop and separate the lines from the image rows. The same process is repeated on the columns of each row to separate each character. The templates files are then loaded. The templates file is a file in which the images of all the letters and numbers have been stored and against which all the characters will be compared to identify the character.
-
Separation of lines from image
Black and white images are stored in MATLAB as a two dimensional array containing 1s and 0s where 0 represents black and 1 represents white. The values in a single row are all added together. If the sum is not equal to zero, then it means that there is at least one non-zero value in the row. However, if the sum is equal to zero, then it indicates that the row contains only zero elements. A row with all zeroes is a row with only blank space and without any text and a row with some non-zero elements is a row with some portion of the text. So, a row with all zeroes is removed. The group of rows between 2 eliminated rows represents a row of text. This group is extracted and passed to the next block for extracting individual characters.
-
Separation of characters from line
Extracting characters from each line is similar to extracting lines from the image. All the operations which were being performed on the rows while extracting lines are now performed on the columns. The values in a single column are all added together. If the sum is not equal to zero, then it means that there is at least one non-zero value in the column. However, if the sum is equal to zero, then it indicates that the column contains only zero elements. A column with all zeroes
is a column with only blank space and without any text and a column with some non-zero elements is a column with some portion of the text. So, a column with all zeroes is removed. The group of columns between 2 eliminated columns represents a character. This group is extracted and passed to the next block for identifying individual characters.
-
Identifying individual characters
-
Once the characters have been extracted from the image, they are passed to the read letter block for identification. A template file containing all the characters in Times New Roman font is stored in the same folder. This folder is loaded. Two-dimensional correlation function is then used to find the best match between the extracted character and the characters stored in the templates file. The character from the templates file that gives the highest correlation is the extracted character and it is written into a text file.
-
-
RESULTS
-
Segmentation of characters
In this stage we are segmenting individual characters from extracted region of interest which is extracted from captured image. As we have the text area i.e. number plate. The segmentation of charter is to crop and separate the lines from the image rows. The same process is repeated on the columns of each row to separate each character. Figure shows the extracted region of interest (ROI), in which we have find the centroids for each character to know the number of characters present in ROI.
Figure 9:- Number of characters.
Figure 10:- segmented individual characters.
As we can see from figure 9 each character has been segmented from extracted region of interest (ROI). The values in a single column are all added together. If the sum is not equal to zero, then it means that there is at least one non- zero value in the column. However, if the sum is equal to zero, then it indicates that the column contains only zero elements. A column with all zeroes is a column with only blank space and without any text and a column with some non-zero elements is a column with some portion of the text. So, a column with all zeroes is removed. The group of columns between 2 eliminated columns represents a character. And finally we get the segmented individual characters.
-
Text output
The character from the templates file that gives the highest correlation is the extracted character and it is written into a text file. Table no shows the output value and their respective characters Figure 10 shows the text output of segmented characters.
Figure 11:- text output.
-
-
CONCLUSION
In this paper, the Automatic Number Plate Recognition system using vehicle license plate is presented. This system use image processing techniques for recognition of the vehicle from the database stored in the computer. The system works satisfactorily for wide variation of conditions and different types of number plates. The system is implemented and executed in Matlab and performance is tested on genuine images.
This ANPR system works quite well however, there is still room for improvement. This ANPR system speed can be
increase with high resolution camera. Which can be able to capture clear images of the vehicle. The OCR method is sensitive to misalignment and to different sizes, so we have to create different kind of templets for different RTO specifications. The statistical analysis can also be used to define the probability of detection and recognition of the vehicle number plate. At present there are certain limits on parameters like speed of the vehicle, script on the vehicle number plate, skew in the image which can be removed by enhancing the algorithms further.
-
FUTURE SCOPE
Today advances technology took Automatic Number Plate Recognition (ANPR) systems from hard to set up, limited expensive, fixed based applications to simple mobile ones in which point to shoot method can be used. This is possible because of the creation of software which ran on cheaper PC based and also non specialist hardware in which their no need to give pre- defined direction, angels, speed and size in which the plate would be passing the camera field of view. Also Smaller cameras which can read license plates at high speed, along with smaller, more durable processors that can fit in police vehicles, allowed law enforcement officers to patrol daily with the benefit of license plate recognition in real time.
-
REFERENCES
Nov 1994.
[4]. Cheng, Y., Lu, J., Yahagi, T.: Car license plate recognition based on the combination of principal components analysis and radial basis function networks. Signal Processing, Proceedings, ICSP '04, 7th International Conference, vol.2, pp. 1455- 1458(2004). [5]. Yoh-Han Pao,Adaptive Pattern Recognition and Neural Network.Pearson Education Asia, 2009. [6]. F. Martin, M. Garcia and J. L. Alba. New methods for Automatic Reading of VLPs (Vehicle License Plates),in Proc. IASTED Int. Conf. SPPRA, 2002, pp: 126- 131. [7]. Optasia Systems Pte Ltd, The World Leader in License Plate Recognition Technology Sourced from: www.singaporegateway.com/optasia, Accessed 22 November 2008. [8] Francesca O.:Experiments License Plate Recognition System.DISI, Università degli Studi di Genova, Technical Report number: DISI-TR- 06-17(2007).