400 likes | 591 Views
PEMBUATAN APLIKASI PENGENALAN PLAT NOMOR KENDARAAN DENGAN METODE JARINGAN SYARAF TIRUAN Hendra (26406129). Background. In the present day license plate has an important role in a parking security systems. The use of computers and cameras as a security system is increasing.
E N D
PEMBUATAN APLIKASI PENGENALAN PLAT NOMOR KENDARAAN DENGAN METODE JARINGAN SYARAF TIRUAN Hendra (26406129)
Background • In the present day license plate has an important role in a parking security systems. • The use of computers and cameras as a security system is increasing. • Application that can automatically recognize the license plates of vehicles through the images captured by the camera.
Objective • Create an application that facilitates the control of the parking system. • This application will be able to recognize license plates from a camera image, using image processing and artificial neural networks.
Image Processing • Image processing is a method to managing or manipulating images in the form of two-dimensional (digital image). • Image processing used in this application : • Grayscaling • Thresholding • Plate Finder Algorithm (Smearing) • Thinning
Grayscaling (1) • Grayscaling used to convert color images into grayscale images by calculating the average color elements of Red, Green, and Blue. • Function : Grayscale = ((WR*R)+( WG*G)+( WB*B)) / 256 where: WR = Weight for red, WG = Weight for green, WB = Weight for Blue, R = Red value, G = Green Value, B = Blue.
Grayscaling (2) • Result : Color Image Grayscale image
Thresholding (1) • Thresholding used to convert grayscale image into black and white image. • In thresholding there are threshold value, pixel that have values below the threshold value will be changed to 0 (black), and pixels that have a value above the threshold was changed to 255 (white).
Thresholding (2) • Result : Grayscale Image Threshold Image
Plate Finder Algorithm (Smearing) • Smearing is a method for extracting the location of text in an image. • Smearing will process the image vertically and horizontally (scan-lines). If the number of consecutive black pixels is less than the specified threshold then the image will be changed to white.
Plate Finder Algorithm (Smearing) • For Example : If the limit value has been determined 10 and 100 for horizontal and vertical smearing. If number of ‘black’ pixels < 10 ; pixels become ‘white’ Else ; no change If number of ‘black’ pixels > 100 ; pixels become ‘white’ Else ; no change
Plate Finder Algorithm (Smearing) • In this application to find the locatian of license plate in an image, smearing is running three times : • Smearing to find black pixel between character. • Smearing to find white pixel is detected as character. • Smearing to find black pixel is detected as license plate .
Plate Finder Algorithm (Smearing) Smearing I Smearing II Smearing III Merge Smearing I & II
Character Segmentation • Character segmentation used to divide each character in plate image. • In this process each line of pixels scan vertically. • If the line pixel is detected as the beginning of of characters the value is 1. • If the line pixel is detected as the end of character the value is 2. • If the line pixel is detected as the middle of character the value is 3.
Character Segmentation Plate Image Segmentation Result
Encode Weight • Encode weight used to get the weight to be processed in neural network. • By using the center of mass for each region will be divided on 30 degrees. • For each region, white pixel will be calculated and its percentage is calculated.
Self Organizing Maps • Self Organizing Maps (SOM) is a type of artificial neural network to cluster the data that has similarities with using an environment map. • From the results of clustering data we can get any information about the output of each cluster, in this application the output information is character recognize.
2 Dimension Map SOM Component: • Input • Weight Matrix • Array • Distance formula • Weight evaluation Process : • Training • Testing
Training • Initialization of input neurons : x1, x2, x3, ..., xi • Initialize output neurons (2 dimensional) : y11, y12, y13, ..., yjl. • Initialize weight matrix between input neuron and output neuron (ijl), with vrandom value between 0 and 1.
Training • Repeat step 5 to 8 until no change in the weight map or iteration has reached the maximum iteration. • Choose an input from the existing input vectors. • Calculating the distance between the input vector of weight (djl) with each neuron output with Euclidean distance formula: • From the calculating distance choose the smallest value. The smallest value is winning neuron (most similar map). • For each connection weights updated using this formula: • Save convergen weight.
Learning Rate ((t)) • Shows how the adaptation of learning to the data. Adaptation scalar valued function 0 ≤ (t) ≤ 1. • (t) will approach to 0, weight changes will be smaller and the input vectors can be mapped properly. • Function: Where: t number of current iteration; T max iteration; learning rate decrease value
Neighborhood Function • Neighborhood function have value between 0 and 1. • Gaussian function is used to find neighoorhood value: • |rij – rbc| is the distance between the neurons that will be changed to the winning neuron. • (t) is the kernel width (the width dimensions of the output neurons) that are influenced by (multiplied by) learning rate (t). • This change is to get the neurons to a stable position / convergence.
Testing (Clustering) • Testing Algorithm is same like training algorithm without update weight matrix. • Testing algorithm: • Initialize weight matrix ijl with convergent weight (training result) • Clustering data vectors (use before) like training process, but without updating the weights. • Define the output specifications of each cluster. • Enter the new data vector in the test and do clustering for all the new data vector. • Update output specifications of each new data with the output specifications of each cluster, where he is mapped.
Database Store • Data storage in this application using txt files.
Testing for Contrast Images • In this application need a picture with the high contrast between plate character and background plate (bright characters and a dark background) and between the car color and license plate color. Reason : Smearing process based on the calculationof plate area. If a dark color car then smearing process is difficult to separate between plate area and car body. Car Color and License Plate with low contrast
Testing for Contrast Images • Lighting must be balanced in plate area. Low Lighting High Lighting
Testing for Contrast Images Balance Lighting
Testing for Distance Taking Pictures • This application requires images taken from a distance of ±2 meters. • Reason : Smearing method is a method of detecting a character in specific range. In this application plate that can be detected with size between 90-190 pixels for width, and 15-55 pixels for height.
Testing for Skew Angle • This application can only detect the plate with 0 degree skew. • Reason : Smearing is a scan-line method, when the plate is not in 0 degree, there will be intersection in plate location.
Testing for Skew Angle 5 Degree Skew Angle
Testing for Process Training SOM • Larger width of the SOM map and larger amount of data need more iteration and time for the training process. • Training process time and result is influenced by several factors: • the initial random weight • width of the SOM map • the number of data sample • Between the map width and amount of data sample has a close relationship.
Testing for Recognize • By using the results of voting winner this application can recognize up to 78% for the overall character recognition with data sample has been trained before. • Test results based on voting winner this application can recognize characters 62% with new data. • From the test result the accuracy of the SOM clustering algorithm in this application is 70,042% by looking at their environment map.
Testing for Recognize • Causes of failure recognition: • Some letters that have similarity form. • Different forms of writing license plates. • Font size difference. • Difference thickness of the letters • different forms of font.
Conclusion • Time required for image processing of about 7-10 sec. • Training required minimum map size 7x7 (49 boxes). • Smearing algorithm can only detect the field with a box-shaped with a certain range • Tthe best threshold value is 100 for the best thresholding result for this application.
Suggestion • Before searching the license plate location in the picture should be a process for detecting the skew angle of the license plate. • With the successful equal to 70%, the SOM algorithm is not suitable for the recognition process. • The input image is not too big because it will take a long processing time, is also not too small because it will be difficult to recognize. • Regioning process not only done by one method.