Development of Iraqi License Plate Recognition System based on Canny Edge Detection Method

I n recent years, there has been expanding development in the vehicular part and the number of vehicles moving on the road in all the sections of the country. Vehicle number plate identification based on image processing is a dynamic area of this work; this technique is used for security purposes such as tracking of stolen cars and access control to restricted areas. The License Plate Recognition System (LPRS) exploits a digital camera to capture vehicle plate numbers is used as input to the proposed recognition system. Basically, the developing system is consist of three phases, vehicle license plate localization, character segmentation, and character recognition, the License Plate (LP) detection is presented using canny Edge detection algorithm, Connect Component Analysis (CCA) have been exploited for segmenting characters. Finally, a Multi-Layer Perceptron Artificial Neural Network (MLPANN) model is utilized to recognize and detect the vehicle license plate characters, and hence the results are displayed as a text on GUI. The proposed system successfully identified and recognized multi_style Iraqi license plates using different image situations and it was evaluated based on different metrics performance, achieving an overall system performance of 91.99%. This results shows the effectiveness of the proposed method compared with other existing methods, whose average recognition rate is 86% and the average processing time of one image is 0.242s which proves the practicality of the proposed method.


INTRODUCTION
License Plate Recognition System (LPRS) is a significant application in the computer intelligent transportation field; It exploits digital image processing and detection techniques. The objective of this work is to recognize the characters from the License Plate (LP) placed on the front or back side of the car body, which is used to recognize and detect the vehicle and its owner, into text The motivations of this work is to design and implement Iraqi license plate system which is very important for enforcing traffic law, controlling security in restricted area and identifying vehicles in unattended parking zone, so the main contribution of this work is to introduce an enhanced version of Iraqi LPRS based on a hybrid model of canny edge detection and Multi Layer Perceptron (MLP) artificial neural network using 50 images from Iraq natural scenes where taken under different conditions. A Successful (LPRS) is based on the effective performance of software and hardware components together, hardware components are mainly composed of a camera, computer and auxiliary apparatus. The LPRS works as follow: the camera will take a picture for the vehicle from the LP side when the vehicle is sensed, and hence, an image will be moved into the computer as the primary image. Computer software will pick up the LP image, then process vehicle image to obtain the LP text (Mr.Binay B. K., et al., 2015). While each country may have unique regular rules that concerns with plates types, language, and design used, there are three general stages used to realize the aim, which are license plate localization, character segmentation, and character recognition (Khader M, et al., 2013). Localization process is the procedure of finding the section or region in an image that contain LP, to present the algorithm for license plate localization the color image must convert to gray image then canny edge detection algorithm is present, in gray scale image, an edge is define as disjoint in gray level values to formula main object boundaries, then connect edge to rectangle based on morphology operation, the license plate located by using geometrical feature for license plate. Segmentation phase is an important step to segment LP characters into a single character by using Connect Component Analysis (CCA). Finally, the recognition phase, we can obtain the plate number as a text accomplished by a Multi-Layer Perceptron Artificial Neural Network (MLPANN) on segment characters to recognize it, Artificial Neural Network (ANN) is an image processing technique that is influenced by the identical way of biological nervous system, similar to the brain system, that get more accuracy recognition rates with faster time recognition The rest of this paper is organized as follows: section 2 provides a summary of related works that has been implemented and tested, section 3 described materials and methods that used to implement the proposed algorithm and section 4 gives the experimental results and compares the performance with well-known methods. Finally, section 5 describe the conclusion of this work. (Muhammad Kamal, et al., Muhammad K H, et al., 2018), the author take advantage of the color contour algorithm and aspect ratio in located Bangladeshi license plate section, vertical and horizontal projection in segment characters, and feed forward neural network to recognize the characters and digits, the results show that the accuracy of the system with rate of 85.56%. Safaa S. Omran and Jumana A. Jarallah (Safaa S O and Jumana A J., 2017), in this work locating License Plate is done based on intensity detection method and mathematical morphology operations, Optical Character Recognition (OCR) is used with correlation approach and template matching for character recognition, the system is investigated using 40 images, the results shows that the performance for the system is 86.6%. Shigeharu Miyata and Kenji Oka (Shigeharu M and Kenji O, 2016), in this paper the detection process detects only the edge, vertical components, and candidate license plates are narrowed down using the contours obtained by dilation and erosion processing and region fill processing, SVM (Support Vector Machine) is used to determine whether or not the candidate is a license plate, this method was applied to detect license plates of japan vehicles and reported 90% as accuracy result. (A. Abd El Rahman, et al., Abd El Rahman A, A.Hamdy and F.Zaki, 2008), this work presented a license plate recognition system for the Egyptian vehicle, the localization stage uses the main feature of the plate where high contrast text-background is tagged with colored or gray area, and connected component analysis is applied in segmentation stage, template match technique is introduced to recognize the digits and letters, the accuracy achieved for the system was 81%.

MATERIALS AND METHODS
The model of this work is to simulate the ALPRS performance which consists of three stages, In the first stage, the process of finding the object that belong to LP and its Location of an image, second stage is used to segment the characters (numbers, alphabets and word) into sub images, while the last stage is a character recognition, through this process each character in LP image are recognized separately and displayed as a text on GUI. Fig. 1 illustrates the main stages of the LPRS system.

Plate Region Detection
The main stages of detecting LP are summarized in the following steps:  Read image.  Convert image from color to gray image.  Edge detection using Canny method.  Edge Finding and Linking to Rectangle.  Candidate plate finding.
The program steps for LP detection are shown in details in Fig. 2 Input images for License Plate Recognition System (LPRS) have been taken from Iraqi natural scenes and its belong to a different type of vehicles, All the image were taken in outdoor environments and in a different times of the day using day light, these pictures have been acquired using 8 megapixel iPhone 6 camera with high resolution. Fig. 3 shows some of these samples.

Convert Image to Gray
The input image to the proposed system is RGB color of JPG form which take more time to process and largest storage space because RGB color use 24 bit to represent each pixel, while Gray image take 8 bit to represent each pixel, so convert to gray image results in order to reduce the number of bits, where highlight on the white area founded in the input image (Yasser M A, 2011, Amir  H A, 2014). Fig. 4 shows the result of a color image after transform to gray image.
where gm (m,n) is first derivative in a horizontal direction and gn (m, n) is derivative in a vertical direction.  Non-maximum suppression is applied to give a thin line in the output image and most of the noise is suppressed.  Hysteresis, the final step in the canny algorithm is introduce to track along the other remained pixels that have not been removed and accurate in representation edge like real edges.
The details of the acquired image are controlled using the standard deviation of the Gaussian filter (Sigma), a proper threshold value are chosen to confirm the area of LP. Fig. 5 shows canny edge detection implementation.

Edge Finding and Linking to Rectangle
The main steps for finding edge and linking to rectangle are summarized as follows:  After finding an edge for the whole image using canny filter, lines for License Plate (LP) need to be updated from the previous step, and other unrelated lines would be suppressed, corrosion behavior technique is applied in the whole image to eliminates boundary points, unrelated lines and preserve LP lines by using corrosion function with a proper linear Structure Element (SE).  The second step is to connect LP area using closing operation with rectangle SE, which is simply a corrosion after expansion, this operation is mainly used to obtain closed shape, eliminating small holes by filling the interior gap.  Hence , the morphological filtered image is applied to removes small objects with an area less than the LP area.

Candidate Plate Finding
It is the final step for localizing License Plate, according to the previous step a number of candidate objects are formed with various size, it is important to find the exact location of LP object and extract it, the process is done by using the following measure properties:  One of the rough positioning determines the starting position and ending position for the line and column of each object.  To estimate the optimal object region, by comparing the region with standard LP size according to limited threshold value as shown in Table 1.

Character Segmentation
Segmentation stage is an essential part for License Plate Recognition System, this step bounded each character separately preparing it for recognition process, the procedure for segment characters are describe as follow:  Read and Resize License Plate Image.  Binarization and Find Complement, the quality of input images be different greatly based on lighting and location conditions of the image, so there is a need to choose a tolerable threshold value in order to initiate a correct bounding box, the appropriate threshold value is chosen according to the difference between foreground and background, and hence when the significance difference appears, the selected threshold value is the best. Fig. 6a demonstrate the main step for character segmentation.  Finding and computing the area of the bounding box, depended on Connect Component Analysis (CCA) for binary image.  Crop out Arabic character, any box that located within limited aspect ratio will be extract and the others will be removed. Fig. 6b shows the results for character segmentation.

Character Recognition
Character recognition is an essential part of the proposed system, by which the segmented characters are detect and recognize. The main algorithm of this step is Artificial Neural Networks (ANN) , Its contains of a set of nodes from input layer connected by direct links to the output layer or to the hidden layer, and each link have a numerical weight associated with it (Dr. Tarik Z I and Dhurgham R M, 2016, Ahmed S A and Shaymaa J Z, 2019), the most popular neural networks is a Multi-Layer Perceptron Artificial Neural Networks that allow being stable for noises and some position modifications of characters on license plate. The network was trained with 460 character images of different illuminations and backgrounds, each segmented character converted into input vector set, consequently the input of network are 85 nodes, based on the basic lines of character skeleton resulted from structure features, 5 nodes representing the binary code for each output character corresponding to 14 Arabic alphabet and 10 Indian numerals, the number of nodes of hidden layer are 100 nodes chosen experimentally, Tansig and Linear TF was used as an activation function for hidden and output layers respectively. Fig.7 shows the neural network architecture that used for the proposed system. the network have the ability to adapt with their input changing and produce best results with an iterative procedure known as Back Propagation neural network. The training system is completed when the error reached to 0.000302, where network output fit to the desirable output. The Maximum number of performed iterations was 500 for each input set, when the system reached to the minimum error rate of the proposed system, the iteration will be stop.

Results and Discussion
In this work, the collected data set have been depended on several images with different resolution rates and sizes (640x480 pixels) and (350-450 KB); due to the lake of finding a complete data set that contain Iraqi LP images, the images have been captured from 2 to 5 meters distance between camera and vehicle. The simulation tests have been done using Matlab R2018a under a development environment with Intel (R) Core i7 CPU-4510U CPU, 2.00GHz 2.60 GHz with 8 GB RAM. Fig. 8 display the experiments results for the extraction plate region and recognition stage were obtained from the proposed system described previously which are mainly depending on the canny edge algorithm and MLP artificial neural network, are evaluated from test 50 images where taken under different conditions, such as strong sunshine, shadow, cloudy weather, the vehicle and LP have the same color, complex sense, different Iraq styles. The obtained results have been achieved 96% as detection rate, 97.916% and 97.872% for segmentation and recognition rate respectively causing an overall system performance to be 91.99%, and hence the time of testing system takes about 0.242s to complete one operation of LP recognition.  Table 2. these results illustrate that the proposed method demonstrations better performance in compared with traditional algorithms and it is promising for future implementation.

CONCLUSION
In this paper, we present a developed system for detecting different styles belong to Iraqi license plates. In each stage, a suitable algorithms have been chosen to develop the system, canny edge algorithm is selected with the morphological operation in detecting license plate that achieved better results with 96% as detection rate, especially for a noisy image. On the other hand MLP artificial neural network classifier is used to verify or reject the results achieving 97.872% as recognition rate. Our proposed system are tested by 50 input images with successfully rate of 91.99% and the results show that the proposed algorithms is very effective compare to other existing methods, for different viewpoints and illumination conditions.