Automatic Identification of Personal Automobiles Plates of Iran Using Genetic Algorithm

In this study, a new method for using LPR systems for Iranian plates number has been presented. Increasing the precision of the letter recognition process and reducing the amount of training are in fact the main advantages of the new hybrid model. The K-NN has been implemented as the first classification method, because it was simple, and it was resistant to the noisy data, and for large datasets it is also effective at zero cost. The confusion problem related to the similarity of letters in plate numbers has also been resolved by using the classification model of the multi-class genetic algorithm. The genetic algorithm improves K-NN performance in the recognition of similar letters. Vehicle license plate recognition (LPR) plays an important role in ITS and is mainly used in access control systems.The purpose of this research is to determine the Iranian plate automobiles that are specifically owned by the automobile. The confusion caused by the similarity between the letters of the alphabet and numeric characters is one of the problems of the Persian LPR systems at the diagnostic stage. In this regard, a method using the KNN-based advantages of genetic algorithm as a hybrid model is presented in this study to overcome the above problem. The genetic algorithm has been trained and tested only with the same letters, thus the cost of training for the genetic algorithm has significantly decreased. Comparison of the results obtained from the experiments carried out in this study with the results of a similar study shows that the combined KNN-genetic algorithm model significantly improved the detection rate of the letters for all tested cases from 94% to 97.03% .


Introduction
With respect to the huge amounts of automobiles and other vehicles, it is clear that the labor alone and without the use of a computer system can not control and manage such a traffic even in small dimensions such as a public parking lot. In addition, the cost of using the labor is very high and it also has a very low efficiency. Therefore, the need for mechanization in this area is very high and noteworthy. In the automatic identification system of the plate number the main purpose is identifying the location of the license plate in an image to read the plate's number. The concept of automatic identification of a place of plate in a picture is in a way that the number will be readable. The automatic identification of the license plate replaces the manual operation of the license plate numbering of the vehicles. There are hundreds and maybe thousands of traffic violations every day and special cameras record the offending vehicle. If all these images are to be checked by humans and the plate numbers are entered manually, much time and labor will be wasted. Therefore, the automatic identification of the license plate and the identification of the number plate with high precision are important. It is also evident that there are problems with these systems. Therefore, in this research, for the sake of higher efficiency, we try to stabilize the body of the algorithm to be resistant to unwanted interference. In addition, by providing a more comprehensive database of different characters, we can further improve the readability of the plate at the identification stage of the extracted characters. In addition, we try to carry out the operation on colorful images because it makes it possible for international plates to identify the type of flag inserted on the plate and its nationality. The first study, which proposed the idea of combining excellent resolution techniques and automotive detection systems, was a lowresistivity high-resolution method in which qualitive images are modeled as a random Markov model in a generalized previous approach which operates on the basis of a double-sided filtering for maximum bias probability.
This model maintains the edges and is resistant to double-sided filtering noise. Computational complexity and computational problems reduce the maximum probability of real-time processing. The following method provides a fast algorithm based on the maximum probability of resolution It reduced the computational complexity using the vinyl filter and thus increased processing speed. However, due to the elimination of errors in the registration phase of this model, it is not sustainable. Other method is a non-uniform interpolation method based on the plate images of registered vehicles, which has the advantage of high processing speed and the disadvantage of high sensitivity of the algorithm to the estimation of vehicle speed. In another work a learning-based framework is proposed to enlarge the characters in the blurred automobile's plates. In this study, they have taken pictures as pieces of the image. Initially, the system of compatibility function is trained by using nonparametric density estimation by random selection of educational data. Then, by using the non-parametric propagation algorithm, they deduce non-parametric deductions, and ultimately high-quality images are retrieved. In fact, existing methods using a series of the low quality images create a high-resolution image from the scene. For example, an interpolation-based method with a pixel equivalent in a different image of a car plate makes high-quality pixels. The problem with these methods is the need for multiple images of the same size of the automobile to have the same pixels. In addition, since the images taken from the car are not the same as the fixed objects due to the movement, the effectiveness of these methods is low. Therefore, in order to eliminate the blurring of the automobile's plates, using high-resolution methods that work on a picture from the scene has a higher efficiency. The main hypotheses in this article are: It is assumed that validated system performance can be verified using valid and global parameters such as FP, FN, TN, TP.
1 Robust 1 Markov random field 1 Bilateral filtering 1 Bayesian Maximum a posteriori 1 Real time 1 Wiener filter 1 Registration error 1 Non-uniform interpolation 1 Patches 1 Compatibility functions 1 Nonparametric kernel density 1 Nonparametric belief propagation algorithm If we can work on colorful images instead of working on a gray surface image, this will make it possible for international plates to identify the type of flag inserted on the plate and its nationality.
In the automatic identification system of the license plate number, the main purpose is to identify the location of the license plate in a digital image to read the license plate number and convert it to the equivalent code. According to the issues mentioned in the problem statement, there are problems with the correct, accurate and fast identification of the plate number and its conversion into an ASCII code. In recent years, extensive researches have been conducted in the area of identifying the plate of the car, and there are several plate recognize numbers, but in our knowledge, despite the worries about the rapid and correct identification of the license plate, no precise and effective system has been provided. Therefore, in this project, we have been focusing on this particular field.

Procedures of Genetic Algorithm
After expressing the basic concepts, various stages in the use of the genetic algorithm are investigated. First, depending on the problem, the variables which should be determined are specified. Then these variables are properly encoded and displayed in the form of a chromosome. Based on the objective function, a suitability function for the chromosomes is defined and an arbitrary initial population is also randomly selected. Subsequently, the measurement of the suitability function is calculated for each primary population chromosome. Then the steps shown in the following are done in the following order. What has been presented as the general structure of the genetic algorithm has been presented by Gerfenstet and Baker, and summarized as follows: Procedure: Genetic Algorithm Begin Initialize P (t) Evaluate P (t) While (recombination condition) do Recombination P (t) to yield C (t) Evaluate C (t) Select P (t + 1) 1 from P (t), C (t) End

Figure 1 Genetic algorithm implementation steps
Step 1: At this point, a good number of chromosome pairs are selected based on their suitability level to be used in later stages. Chromosomes that have a high degree of elegance may be selected several times in the production process, while chromosomes that are low in suitability may never be selected. The easiest way to run this step is to use a roulette wheel model. In this model, the wheel surface is divided into different parts, the number of which is equal to the number of members of the population and the surface of each section, proportional to the amount of suitability of each chromosome. The wheel then turns around to stop at the crash point. This point specifies the chromosome that is selected.

Convergence of the genetic algorithm
An important question that can be raised is whether the method of genetic algorithm always converges to absolute optimality? In 1994, Ronclough's research proves the convergence of the genetic algorithm under certain conditions. In this research, it has been shown that the convergent to absolute optimality is not an intrinsic property of the genetic algorithm, but it is possible under certain conditions. The mathematical analysis done in the form of several theorems and using the Markov chain model, in this study has shown that at each stage of production of the genetic algorithm, the best answers are kept and with probability one, enter to the next step, and the algorithm Converges to absolute optimality. Several factors contribute to the speed of convergence of the genetic algorithm. The initial population, the probabilities of mutation and displacement, how to perform displacement and mutation, the suitability function, and how to select the population of the next stage are from these factors. The effect of these factors on the speed of convergence of the genetic algorithm depends on the problem and is obtained through the experiment.

Application of vehicle plate's number recognition system in public parking lots
Public parking can be calculated from the automatic identification number of the license plate to determine the length of the parking stops and the parking of automobiles in the parking lot by recording the time of arrival and departure of the automobile and receiving the payment through credit cards or the headquarters of the subscription number and receiving the payment through the bank account of the subscribers and, in addition to meeting the need for human resources and reducing costs, increases the accuracy and efficiency, and speeds up customer satisfaction. (Radmer, 2008)   Controlling and entry tax on traffic limits plan Today, many cities, including Tehran, have limited access to the border area of the city in order to control its traffic. Since the use of traditional methods (the placing police forces at all frontiers) is too costly, there are some new ways of controlling and taking tolls into the city's catchment area. One of these uses is it's based on plate recognition technology. These solutions use the technology of license plate recognition. In this solution, the license plate recognition cameras will be installed at all stages of the project, and the entry of each vehicle will be recorded in the scope of the plan. Then, as with the method of charging, the driver is given the opportunity to pay the scheduled entry fee.

Control of input and output in protected areas
Authorized vehicles are identified from their plate and the input gate is automatically raised. It is also possible to allow certain people to enter or leave at certain times. In these systems, by registering inputs and outputs, it is possible to refer to databases to identify potential car crime offenders. Examples of using this system include parking of offices and governmental centers. The following figure shows an example of this application. (Site, 2010)

Methodology
In this study, a new method for using LPR systems for plate numbers is presented. Increasing the degree of accuracy of the letter recognition and reducing the amount of training is in fact the main advantages of the new hybrid model. The K-NN is implemented as the first classification method, because it is simple, and resistant to the no dynamic codebook, and is effective for a large collection of children with zero educational costs.

Image reading function in MATLAB
MATLAB software identifies all the images as matrices. The command to read the images is imread , the common form of which is as follows: im = imread ('current path image and file name') By this command the image is called and stored in the matrix in the variable im.

Strel structure
Structures consist of one or more pixels that, by placing these pixels together, form a particular shape, which is usually referred to as a Cernel. Convert arbitrary matrix to structure 'arbitrary'

Graphical environment of the project (gui)
For the project to have a special graphical environment, so that the user can easily communicate with the program's algorithm. With using MATLAB software, we will design this graphic environment.

Making gui
From the Fill menu, select New, then click Gui.

Figure 5 Entering the Gui environment
We enter the environment. Put a pushbutton and five Axes as shown below.

Figure 6 The necessary layout in the Gui environment
After placing the necessary parts, click on the Save option. Then click to make Gui a M.fill. The axes are used to display the images. To display the image in Axes, we use the following command: w = imread ('w.bmp') subplot (handles. a6), imshow (w) The placed key is because the user can clicking on this key to upload the image from the desired path. We Double-click on the key and type "Load / Start" in the string. (We want the key word be this statement)  Figure 7 Change the key string Go to the callback section and click the check mark (this will be redirected to the M.fill's Key Settings section)

Image Processing
As shown in Fig. 2, the image-processing step consists of two parts: identification of the place of the plate and the segmentation of the letters. In order to obtain the desired result in this study, morphology has been performed because it is a strong method. After the color images are converted to Gray Level Format, the Prewitt and Dilate Image Functions are provided by morphology. Imfill and liner functions help fill the missing pixels of the image; these missing pixels are called holes and left out of the previous step, as well as to remove noise in the horizontal direction and They also help in vertical direction. The final format of these processes, as shown in Figure 3, becomes a matrix of tagging. The label matrix attributes different values to each object to identify them.
In order to identify the location of the license plate inside the image, a "for loop" is applied after the labeling matrix. If one of the following conditions is true, the location of the plate will be detected. The extracted location of the car plate is shown in Figure 3, part g. • The width of the place is less than 3 points; • The width of the place should be more than 4/1 width of the input image; • The height of the place is less than 8 points; • The height of the location is greater than 1/3 of the height of the input image; • The plain area width is less than 0.1; • The width of the plaque place to its height is greater than 4 (not due to two or three letters connected); • The ratio of the area of the plaque placement to the boundary area is less than 0.15; The segmentation of the letters and numbers contained in the plate is performed after the stage of extracting the plate from the inside of the vehicle's image. In this regard, all stages of the morphology of image processing are applied to the letters of the license plate. Additionally, before the car's plate is rotated on a horizontal portrait. Figure 4 illustrates the steps for segmenting the letters.

Feature Extraction
Each letter from the plate was first normalized (32 × 30 pixels), then turned into a feature vector to be called as the input to the detection stage. In order to identify the license plate letters, a hybrid machine is used in this research; therefore, each car needs specific feature vectors. By reviewing the related articles, it has been noted that these two main features are common in the feature extraction stage for non-conformal character recognition articles in Arabic and Persian. In this regard, the structural property and histograms of the horizontal (H) and vertical (V) counts for the KNN machine were applied to identify the character of the KNN to distinguish non-similar letters (Table 2). Similar letters (Table 2), which are recognized by the genetic algorithm, also require another feature vector. The method of extracting the zoning property has been applied to each similar letter (Table 2). Similar images are divided into 12 equal regions (10x8 pixels). The zoning features are extracted from the pixels of each region and are moved along the 10 × 10 pixel diameters. Each divided region has 17 diagonal lines. In total, 19 properties are extracted through the zoning method used in the genetic algorithm. The experimental results obtained from the combined KNN-genetic algorithm In order to assess the impact of the proposed method in this study, 257 images of license plates have been tested as part of this study. These images from the plates were randomly taken by conventional digital camera with a size of 1024 x 768 pixels in RGB and JPG formats. The camera is in the range of 5 to 10 meters from the car. The image is divided into two groups: T1 -plates with at least one letter (n = 137) and T2 -plates without the same letters (n = 120). Test results for each group are shown in Table 4. Common fractures at the stage of extracting the plate boundaries, as well as in the segmentation of letters in both groups, have been created due to punctuation and inefficient letters in capturing images. K-NN (K = 1) with Euclidean distance functions was applied in the first step of the classification and a multi-class genetic algorithm was also implemented with the RBF core as a recovery step. By comparing the results obtained from the letter recognition process in this study with similar articles, we can state that although the speed of the letter recognition step in this research is not faster than reference research, [33] but the accuracy of the diagnosis is higher (Table 5). In addition, the low cost of training the proposed system is not comparable to other models.

Conclusion
In this study, a new method for using LPR systems for license plate numbers is presented. Increasing the precision of the letter recognition process and reducing the amount of training are in fact the main advantages of the new hybrid model. The K-NN has been implemented as the first classification method, because it is simple, and is resistant to the intelligent collection, and for large databases, it is also effective at zero educational cost. The confusion problem related to the similarity of letters in plain numbers has also been resolved by using the classification model of the multi-class genetic algorithm. The genetic algorithm improves K-NN's performance in detecting similar letters. The genetic algorithm has been trained and tested with just the same letter , thus the price of teaching and learning is reducing for the genetic algorithm significantly. The comparison of the results from the experiments carried out in this study with the results of a similar study shows that the combination model of the KNN-genetic algorithm detects the amount of letter recognition for all tested cases has been improved from 94% to 97.03%.