a. Project title: License Plate Recognition
b. Member: Zhang Hanxiong, Hou Xiangtai, Tianyuan Zhao
c. Email: zhanghx.eric@gmail.com
d. Course Name:EECS 349, Northwestern Univ.,2015 Spring
e.
i.motivation: We want to develop a system which could automatically detect and recognize a car's license plate. If this could be used in real industry, we believe it has a large potential of use.
ii.solution: We use two machine learning methods. Neural Network and KNN.Using Neural Network and KNN methods to recognize, under Matlab.
iii.how we train and test it??: Because KNN is lazy, we don't train it. For Neural Network,We use Neural Network Toolbox of MATLAB to train and test.Our training set has 252 pictures and our validation set has 50 pictures.
iv.result: KNN achieves a 90% accuracy for prediction while Neural Network only has a accuracy of 30%
f. example:
We only consider English characters and Arabic numbers. In this case, KNN recognizes correctly. Neural Network only recognize 2 characters correctly.
We translate each template image to a binary image. Three to six 40 x 20 (800 pixels) template binary images for each character or number ( A – Z, 0 – 9 ). For example, for number 4, first we have the original picture segmented from a real photo:
Original 4:
Then we translate RGB picture into binary then rotate it. Thus we have 7 pictures for number 4.(The differences may be hard to detect for human eyes.)Binary 4: | ||
Right rotate 1°: | Right rotate 2°: | Right rotate 3°: |
Left rotate -1°: | Left rotate -2°: | Left rotate -3°: |
Since the input is an image file, the type of all attributes is the binary value for each element (pixel here) in one row vector of length 800 (40 x 20 2D matrix => 1 x 800 1D vector). There are 800 attributes in total for each character, one for each pixel.In total, we have more than 252 binary pictures for training.
We have used the following preprocessing techniques:
(1) gray scale
(2) median filter
(3) edge detection
(4) image dilation
(5) image erosion
(6) image smoothing
(7) remove noisy points
(8) image segmentation
Grayscale is a range of shades of gray without apparent color. The darkest possible shade is black, which is the total absence of transmitted or reflected light. The lightest possible shade is white, the total transmission or reflection of light at all visible wavelength s. Intermediate shades of gray are represented by equal brightness levels of the three primary colors (red, green and blue) for transmitted light, or equal amounts of the three primary pigments (cyan, magenta and yellow) for reflected light.
step2: gray scaleIn signal processing, it is often desirable to be able to perform some kind of noise reduction on an image or signal. The median filter is a nonlinear digital filtering technique, often used to remove noise. Such noise reduction is a typical pre-processing step to improve the results of later processing.
step3: median filterEdge detection identifies object boundaries within images.
step4: edge detectionMorphology is a broad set of image processing operations that process images based on shapes. The most basic morphological operations are dilation and erosion. Dilation adds pixels to the boundaries of objects in an image, while erosion removes pixels on object boundaries. The number of pixels added or removed from the objects in an image depends on the size and shape of the structuring element used to process the image. In the morphological dilation and erosion operations, the state of any given pixel in the output image is determined by applying a rule to the corresponding pixel and its neighbors in the input image. The rule used to process the pixels defines the operation as a dilation or an erosion. This table lists the rules for both dilation and erosion.
step5: image dilation and erosionSmoothing, also called blurring, is a simple and frequently used image processing operation. There are many reasons for smoothing. In this tutorial we will focus on smoothing in order to reduce noise.
step6: image smoothingRemoving small noisy points.
step7: remove noisy pointsSegment the whole pictures into several single characters.
step8: image segmentation(Click picture for details)
Analysis
Generally, KNN(K=5) has a better performance than Neural Network.
Both of them have high accuracy when characters are more different than the other, like C.
Both of these two methods perform terrible when they try to recognize I, because number 1 looks similar to I.
KNN has higher accuracy dealing with O and S.
Result AnalysisIf you have any advice, please email to us. We are looking forward to your voice.