EGYPTIAN LICENSE PLATE RECOGNITION USING ENHANCED STROKE WIDTH TRANSFORMATION AND FUZZY ARTMAP

License Plate Recognition (LPR) is the most importa nt type of Intelligent Transportation System (ITS). LPR is used in many different types of ITS like ele ctronic payment systems, toll station, parking fees , freeway and arterial management systems for traffic surveillance. Few years ago, Egyptians government changed the car license plate to include letters an d numbers. So the needs for efficient LPR System fo r the new license plate are increased in different ITS fi elds. This study presents an enhanced LPR detection algorithm for the new Egyptian licenses plate. The detection enhancement is done using Stroke Width Transform algorithm to extract letters from candida te reas combined with Fuzzy ARTMAP classifier. Stroke Width Transform (SWT) is a state of art algo rithm developed by Microsoft Research Lab for detecting text in natural scene, it seeks to find t he value of stroke width for each image pixel and demonstrate its use on the task of text detection i n atural images. This study is focusing on detecti ng Arabic letters in the candidate license plate area using SWT image map instead of binary image map whe re not all Arabic letters have uniformly stroke width and some letters have a dot above and below it. The proposed model shows 26% detection accuracy enhance ment than conventional LPR systems (Sobel Edge detection with binary image map using template matc hing technique).


INTRODUCTION
LPR is kind of Intelligent Transport Systems (ITS) that implements computer vision and character recognition algorithms (Ktata et al., 2013); LPR has become one of the most important digital image processing systems to be used. Since every vehicle carries a unique license plate, LPR is used as core modules for intelligent infrastructure systems like (electronic payment systems, toll station, parking fees, freeway and arterial management systems for traffic surveillance (Anagnostopoulos et al., 2008;Maglad, 2012).
LPR system is effective in crowded cities where the controlling of vehicles becomes a big problem and difficult to solve. For example Cairo, The capital of Egypt, is a crowded city where the number of vehicles increased because of population growth and due to the cheapness of domestic cars and each family may have one or more car.
LPR models are composed of three processing steps: (1) License plate detection, (2) Character segmentation, (3) Character recognition. The first two steps incorporate image processing techniques on standalone images or frame sequences (Videos), whose evaluation relies on the true recognition rate and the error recognition rate.
The Egyptian license plate features such as color, numbers and letter specification depend on the issue purpose and the Governorate of release. The license plate has a fixed size 17×32 cm divided horizontally into two parts. The ratio between the upper colored side and the white part is 1:2 (Massoud, 2013).
Stroke Width Transformation (SWT) (Epshtein et al., 2010) is a novel state of art image operator for detecting text from natural scene; SWT converts the image from an array contains gray values to an array contains likely stroke widths for each pixel. This information suffices for extracting the text by measuring the width variance in each component since text tends to maintain fixed stroke width which puts it apart from other image elements such as foliage.
The proposed model used SWT (Epshtein et al., 2010) to extract objects with similar stroke width. The SWT processing for whole image consume long time, so Sobel edge detection is used to extract candidate areas to be processed by SWT which reduce processing time.
Other morphological image analysis is used to detect the properties of each extracted stroke width region.
The rest of this study is organized as follows. Section II defines the problem statement. Section III discusses Stork Width Transformation algorithm. Section IV discusses the proposed model. Section V discusses experimental results. Section VI concludes the proposed model and results.

PROBLEM STATEMENT
SWT gave great advantage to extract text from natural scene by distinguishing the objects that have uniform stroke width. Recognition of license plate that contains Latin alphabetical is easier than Arabic alphabetical. As for the Arabic letters, a dot can distinguish between different letters. Many letters don't have uniform shape like ‫"و"‬ and when applying SWT on it, it will be detected as two strokes; the upper part as a cycle and the lower part as a letter which can be interfered with letter ‫."ر"‬ Also, if the license plate is dirty it may affect the stroke width. Egyptians license plate also contains elements that are not letters but have uniform stroke width like Arabic word " " and "Egypt", so depending on SWT only is not enough. The proposed model overcomes the previous problems by keeping only strokes with predetermined black and white color properties otherwise the stroke is ignored.

STROKE WIDTH TRANSFORMATION
A typical stroke is defined as a contiguous part of an image that forms a band of a nearly constant width. The Stroke Width Transform is a local image operator which computes per pixel the width of the most likely stroke containing the pixel (Epshtein et al., 2010) which transforms the image data from containing color values per pixel to containing the minimum width of the most likely strokes width. The SWT operator is linear in the number of edge pixels in the image and also linear in the maximal stroke width, determined at the training stage. The output of the SWT is an image of size equal to the size of the input image where each element contains the width of the stroke associated with the pixel. SWT is defining a suitable image operator whose output enables fast and dependable detection of text. SWT is able to detect text regardless of its scale, direction, font and language. SWT do not assume to know the actual width of the stroke but rather recover it. Figure 1a shows a typical stroke example on stroke pixels darker than the background pixels. The initial value of each element of the SWT is set to ∞. In order to recover strokes, SWT first compute edges in the image using canny edge detector (Canny, 1986). After that, a gradient direction d p of each edge pixel is considered as shown in Fig. 1b. If lies on a stroke boundary, then d p must be roughly perpendicular to the orientation of the stroke. SWT follow the ray r = p+n. d p , n>0 until another edge pixel q is found. SWT consider then the gradient direction d q at pixel q. If d q is roughly opposite to dp (d q = -d p ±ΙΙ/6), each element s of the SWT output image corresponding to the pixels along the segment [p,q] is assigned the width unless it already has a lower value as shown in Fig. 1c. Otherwise, if the matching pixel q is not found, or if d q is not opposite to d p , the ray is discarded. Figure 1 shows the process of SWT computation. Figure 2 shows an example on how pixels are filled with the minimum width value. Figure 2a shows example on simple strokes fill, where the red pixel is filled with the minimum width between the L lengths of the vertical and horizontal rays passing through it. shows an example on the SWT values in more complex situations, like corners, will not be true stroke widths after the first pass described above. Therefore, SWT pass along each non-discarded ray

JCS
again and calculate the median SWT value m of all its pixels and then set all the pixels of the ray with SWT values above m to be equal to m.

PROPOSED MODEL
The proposed model consists of 3 stages: (1) Detect candidate areas, (2) Apply SWT on candidate areas and filter strokes and (3) Segmentation and character recognition. Figure 3 shows the structure of proposed model.
As a preprocessing step the input image is resized to 400 pixel height and the width is calculated dynamically to keep the aspect ratio of the image. By practical experiments, image resizing reduces processing time with the same results accuracy. Figure 4 shows resized image captured for a low speed moving car.

Stage 1: Detect Candidate Areas
This stage extracts the license plate candidate area using Sobel edge detection. Sobel is the most effective for LPR applications since Sobel method detect the outline of objects that have a clear contrast using two filters of size 3×3 pixels, one of which is designed to detect the horizontal difference and the other vertical difference. The filters have a double weight in the center of the order of 2, which is more effective in practice (Fares, 2013). After applying Sobel edge detection as shown in Fig. 5, the morphological operations (Soille, 1999) dilation, filling closed areas and eroding takes place in sequence to extract candidate areas. The result of previous operations gives the candidate parts that may contain license plate. Since the license plate dimensions are known and then each candidate area dimension is checked if it has area more than 2000 pixel and width/ height ratio between 2 and 9 (chosen empirically) or not as shown in Fig. 6. Otherwise the candidate areas are ignored, so it will decrease the number of the candidate areas to be processed by SWT and that will reduce the processing time.

Stage 2: Apply SWT on Candidate Areas and Filter Strokes
This stage takes the image inside each candidate regions in Fig. 6 and applies SWT on it. SWT will calculate the stroke width of every object inside the image. The result of this process is shown in Fig. 7.
The output from SWT algorithm may contain strokes which have uniform width but they are not letters in black and white colors. So each stroke will be checked that its color is black and its background is white based on threshold value chosen empirically. Based on this value, the stroke will be removed as shown in Fig. 8.

Stage3: Segmentation and Character Recognition
This stage is concerned with detecting character images from license plate image and matches its corresponding ASCII values. First a horizontal projection is applied on Fig. 8, Often the character part have the greater horizontal projection, so we will calculate each curve area and take the largest curve area and that will be the character area to be cropped as shown in Fig. 9 where the blue line shows the values of horizontal projection while the red line shows start and end points to be cropped from original image. The cropped image is shown in Fig. 10.
Vertical projection is then applied to separate each character as shown in Fig. 11. After detecting the start point and end point of each character, it is cropped into separated image and resized to 70×50, which is the size of letters trained by Fuzzy ARTMAP and then extracts its geometrical features (Ghosh, 2010) to be sent to Fuzzy ARTMAP to be classified and then its ASCII values returned.
Fuzzy ARTMAP is neural network architecture which is based on Adaptive Resonance Theory (ART) (Chralampidis et al., 2001). It has been used in condition monitoring. The Fuzzy ARTMAP architecture is capable of fast, online, supervised incremental learning, classification and prediction. The fuzzy ARTMAP operates by dividing the input space into a number of hyper boxes, which are mapped to an output space. Fuzzy ARTMAP is preferred due to its incremental learning ability. As new data is sampled, there will be no need to retrain the network.
The proposed model detected the license plate region correctly as shown in Fig. 12 where the green rectangle is the license plate region while the red rectangle shows non license plate region.

EXPERIMENTAL RESULTS
The proposed model is tested using 265 image datasets, the dataset contains images with different characteristic such as resolution, different cameras, day light time, night light time and captured for a moving and a static cars. The proposed model (Sobel Edge detection with SWT image map) performance is compared with a conventional LPR System for Egyptian license plate that was presented by (Massoud, 2013) where Sobel Edge detection with binary image map and using template matching technique was used. The proposed model and the conventional LPR (Massoud, 2013) are tested using two character recognition techniques, template matching and the Fuzzy ARTMAP classifier. The classifiers are trained using 722 Arabic letters images which are resized to 70×50. The conventional LPR system using template matching technique detected 60% correctly with no character recognition errors, while the proposed model using template matching technique detected 80.4% correctly with no character recognition errors as shown in Table 1. The conventional LPR system using Fuzzy ARTMAP classifier detected 66.8% correctly with no character recognition errors, while the proposed model using Fuzzy ARTMAP classifier detected 86% correctly with no character recognition errors as shown in Table 2.
The previous tables show that the detection accuracy is improved using the proposed model compared to the conventional LPR (Massoud, 2013). This improvement is gained by using SWT which emphases letter strokes and ignores noise strokes and by employing Fuzzy ARTMAP instead of template matching to achieve better character recognition accuracy. The best correct detection results gained when we used SWT combined with Fuzzy ARTMAP classifier.

CONCLUSION
This study present an adaptation to a state of art Stroke Width Transformation technique for detecting Arabic letters for license plate recognition systems. SWT have great advantage for detecting text in natural scene, but it consume long time for large image, the proposed model extracted candidate area using Sobel edge detection and morphological operations, which decrease processing time than SWT only. The proposed model checks black and white color features for each stroke which eliminates non letter strokes and merge two strokes if they belong to the same letter. Two techniques are tested for character recognition, template matching technique and Fuzzy ARTMAP classifier. The proposed model using Fuzzy ARTMAP classifier shows 26% detection accuracy enhancement than using conventional LPR system (Sobel Edge detection with binary image map using template matching). The Fuzzy ARTMAP classifier used outperforms the template matching technique in detecting the Arabic characters. However, SWT has a limitation when dealing with high blurred image. Hence, images of high speed cars may not be detected correctly if it was taken by modest camera. So enhancing SWT performance for blurred image is a big challenge that has to be tackled in the future.