A Real-Time License Plate Detection System for Parking Access

The automatic and real-time license plate detection system can be used as an access control entry of vehicles into the parking area. The problem is how to recognize the vehicles that will go into the parking lot and how to recognize various types of license plates in various light conditions quickly and accurately. In this research, the prototype was developed with a detection system to recognize the vehicles that will enter the parking area, and a license plate recognition system. In the license plate recognition system, the Fourier transform and Hidden Markov model method have proposed to detect location of license plate and as characters segmentation to recognize Indonesia license plates. The research results have shown that the developed prototipe system has successfully recognized all Indonesia license plates in several of light condition and camera position. The percentage of plate recognition in the real-time experiment is 84.38%, and the average execution time for all recognition process is 5.834 second.


INTRODUCTION
The system of license plate recognition (LPR) is an image processing technology used to identify the vehicles through their license plates.This technology is used in various security and traffic applications.One is for the parking system license plate is used for admission to subscribe automatically and calculates a parking ticket for not subscribe (to see the time in and out).The existing license plate detection and recognition systems can be divided into two major categories: on lane and on road [1].On lane applications, it is often used at car park or entrance of place.Many of those are using some sensors to determine the car has been stopped in the appropriate place before capturing image, and then detect plate on predefined area.The plate would not be detected if the car is not at proper position.
The main problem of this system is how to recognize and read the vehicle license is automatically [2]- [4].The first step should be done in automatic vehicle identification license is to identify the area (region) from the license plate itself, so the system can distinguish which is the license plate area and the area that is not license plates.The second step is to read the letters and numbers from license plates of vehicles that are the vehicle license license automatically.Research to identify the location of license plates of vehicles mostly use edge detection and Hough transform [5]- [8], and use connected component analysis [3].Acosta [9] in his research found that for license plates that have a background color (background) the same color as the vehicle difficult to identify by using edge detection and Hough transformation.Acosta found that recognition method using spectral analysis have a higher success rate and a faster computation time to recognize license plates of vehicles in the USA.
In this study, a real-time LPR system for parking access that consists of two subsytem: car detection subsystem and license plate detection subsystem is proposed.The car detection subsystem uses a detector distance circuit using distance sensor PING.Microcontroller Basic Stamp will count the time needed to receive the ultrasonic waves and determine the distance to the car.License plate detection subsystem has two moduls: license plate location detection using Fourier Transformation that based on research of Acosta [9]; and character segmentation and character recognition uses Hidden Markov Model.In the character segmentation stage, a preprocessing technique was proposed to determine the type of vehicle license plate.This study used an experiment with the plate number of private vehicles (a white background and black characters), the government vehicle (a white background and red characters) and public transportation (yellow background and black characters).The research is expected to contribute in the field of LPR, which will be developed and applied to a system of border controls access, parking system, or automatically to help solve traffic problems and security in Indonesia.

Architecture System
In general the way the system works is to take the object (vehicle) with a camera if there is a certain distance of the distance sensor, then the camera will capture images of objects (cars) and stored in JPEG at once recognizable type by using the vehicle LPR system.The connection of hardware prototype circuit consists: Basic Stamp 2, computer, power supply, a PING and a camera, and using RS232 and USB.PING sensor module detects the distance of objects in a way emit ultrasonic waves (40 kHz) during tBURST (200 Is) then detect the reflections [10].PING sensor module transmits ultrasonic waves in accordance with the control of the microcontroller controlling.Web camera and poles where the distance detection circuit made of steel tubes with a height of 140 cm and a diameter of 4 cm.The shape of the finished pole and camera placement and distance detection circuit can be seen in Figure 2. The camera is placed at the upper position of the distance detection circuit.The second device is connected to a laptop via a USB serial connection.The program to detect the distance by the distance sensor is written using PBASIC 5.2 mode with BS2.This program will send data via serial port connected to the PC in the form of characters 'a' if it detects an object with a distance less than the specified limit value and sends the character 'b' if it does not detect objects at such distances.Furthermore, Java programs will detect the data sent via the serial port with membuku relation to that port, then capture the image of the object vehicle if the program reads the characters 'a' and detecting vehicle license plates from images captured.
Figure 3 shows the license plate recognition process it offline through the Load Image menu.If the system successfully detect, the license plate numbers will appear in the text area license plates.Then the system will search the database whether the license plate member is registered as a member.If yes, then in the text area will appear STATUS registered post.In addition, the system also records the time of entry (processing time).Below the images, there are tables used to display all transactions that occur, whether registered or not registered, unless the license plate did not work recognized Position the camera and sensors on the mast (height from the ground), as shown in Figure 4, where L1 is the sensor height above the ground, L2 is the height of camera from ground level, and A is distance vehicle from pole.To measure an object with a distance of more than 30 cm, the sensor height above the ground level is 50cm or more.That license plates can be viewed with a web camera and can be read properly is the height L2 from 60 cm to 90 cm.The distance of objects around B = 150cm with angle θ of 30 degrees, the distance A can be calculated to determine the pole position on the actual entry point, namely: = tg 30 0 *150 = 0.5774 * 150cm = 86.6025cm.

License Plate Recognition System
In general the LPR system consists of three main steps, namely recognition of vehicle license plate location, character segmentation and recognition of characters on license plates.The first step should be done in automatic vehicle identification number is to identify the area (region) from the license plate itself, so the system can distinguish which is the license plate area and the area that is not license plates.The next step is to divide the image in a piece of license plate image and recognize characters of license plate characters, which is the vehicle license number automatically.

Figure 5. Flowchar of candidate line plate detection
To identify the location of vehicle license plates used spectral analysis approach that implements the Fourier transform to detect the location of the license plates of vehicles in a grayscale image.Spectra obtained from different text image with another image type.A periodogram of Fourier power spectrum which will generate a peak profile identifies the presence of a license plate.
At the initial step, the image color space transformation from RGB to YUV model but only the luminance is taken to do further processing.Then do the luminance image thresholding to minimize the differences result from changes in ambient conditions and increase the contrast between characters and background plates.The next stage is to detect the candidate row number plates.In general, the used methods at this stage shown in Figure 5.The scene image, with M rows and N columns, is analyzed one row at a time in order to determine if the row crosses license plate characters.A periodogram is calculated on the intensity (gray scale) values of each row: a. Transform the intensity values in line with the one-dimensional Fast Fourier Transform.b.Calculate the power spectrum, each pixel (sampling rate is N).Because the resulting onesided spectrum (not including the negative frequencies), then only the components between [1, N / 2 +1] are obtained.c.Finally, the remaining components are multiplied by a factor of two, to preserve the total energy, and normalized by N: A car image and its profile is shown in Figure 6.

its periodogram profile, (c). its periodogram mean profile, (d). its row license plate candidate
After a row of vehicle license plates are determined, the vertical boundary of license plate is determined by calculating the periodogram of each intensity value in each column of the image.Vertical threshold was obtained from range profile peaks less than 50 pixel.The result is shown in Figure 7. Furthermore, we check and only select out candidates that have the ratios of width to height satisfying pre-defined constraint: 2.6 < width/height < 6.5.
The segmentation process have three steps: preprocessing stage, horizontal segmentation and vertical segmentation.The preprocessing step, as shown in Figure 8, has three stages: normalise size of image, determination of plate kind and object enhancement.Two kind of Indonesian license plate: the private vehicle (a black background and white characters) But the public transportation (yellow background and black character) will give a white background and black character in gray scale image.Therefore, the grayscale image of public transportation license plate must be inverted, as shown in Figure 9.
In the preprocessing stage, there is a procedure to determine size of character at license plate.According to Zhang [4], a normal license plate has number of character pixel about 20% of all pixels.If count of character pixel is greater than 20% then we do an erotion morphological process.Otherwise, the dilation morphological process is done, as shown in Figure 10.After determination process, the enhancement process for noise and illumination is done, as shown in Figure 11.After the segmentation process is the introduction of character traits or commonly called optical character recognition (OCR) as shown Figure 13.This research used Hidden Markov Model.The weaknesses of OCR methods are difficult to distinguish the number 0 and the letter O or the number 8 and the letter B. For that we need to use syntax analysis techniques to identify the position of the character of letters or numbers adjusted by the rule-making license plates of vehicles in Indonesia.Training model is applied to perform the classification features of 36 classes, 26 classes of characters (A, B, C, ..., Z) and 10 numeric grade (0, 1, 2, ..., 9).The classification in this case is to re-estimate the parameters of Hidden Markov Models.All subimages will be used in the training stage of the model and the image must have the same size 50X50 pixels.Feature used in this model were obtained by counting the number of foreground pixels in each subwindow, the value of features that will be generated ranging from 0 to 9. Subwindow used to scan, has a size of 3x3 pixels.Subwindow driven on the window from left to right and top to bottom.Overlapped window is scanned subwindow third.In this way, obtained feature vector n-dimension.
The training model using the algorithm forward-backward procedure and Baumwelch, as shown in Figure 14

RESULTS AND DISCUSSION
In the offline experiment, our license plate location recognition system was evaluated with sets of Indonesia license plate.Images were taken by a digital camera, with size of 800x1024 pixels, in different light condition and camera position, as shown in Table 1.The yellow license plates have less number of succes because most of yellow license plates are bad and broken.Average execution time per image is about 0.5 seconds.Table 2 show the result of experiments on segmentation stage and character recognition stage.In segmentation stage, we have result so high.But in segmentation and character recognition stage, we just have result 87.87%.This is caused some license plate image that has noises, as shown in Figure 15.Therefore, although segmentation process was success, character recognition process could not recognize the character that broken.
In the real-time experiment, we used 32 images of vehicles which are captured by web camera with position.The resolution of web camera is 480x640.Percentage of success plate recognition is 84.38%.From the result, we know that the reduction of image resolution will influence the success of license plate recognition.Average execution time for all recognition process in the real-time experiment is about 5.834 second : 0.1 second for license plate location stage, 0.282 second for segmentation stage, 1.140 second for character recognition and 4.312 second for database connection.

CONCLUSION
The proposed system has succesfully implemented with various kinds of Indonesia license plates types Indonesia: private vehicles (a black background and white characters), the goverment vehicle (a red background and white characters) and public transportation (yellow background and black characters) with various light condition and camera position.Based on the result of the experiment, it can be shown that the proposed approach is robust, but there are still some images failed in the experiment.The algorithm still needs further research, such that how to improve the method for low resolution image.

Figure 1 .
Figure 1.The overall diagram system and how the system works, (a) hardware system block diagram (b).flowchart of the control system

Figure 2 Figure 4 .
Figure 2. Pole of camera Figure 3. Sample of plate recognition process Figure 6(b) shows periodogram profile of car image in Figure 6(a).Furthermore, to increase the profile peaks in the periodogram which will be recognized as license plates, each profile value less the value of the mean profile.If results are negative, the value at which point the profile is set to 0. The periodogram mean profile shown in Figure 6(c).To identify which row which is the location of license plates used a threshold value of the maximum value.The next range of rows with values greater than threshold is extracted as a license plate.In this research we used a 25 pixel threshold value.The row license plate candidate of the image is shown in Figure 6(d).

Figure 7 .
Figure 7. Three vertical periodogram mean profile and its license plate candidate

Figure 15 .
Figure 15.The real-time experiment, (a) license plate image with noise, (b) segmentation result

Table 1 .
Experiment results of license plate location recognition

Table 2 .
Experiment Results of segmentation and character recognition