An Advanced ANPR System Using OCR in Matlab
An Advanced ANPR System Using OCR in Matlab
I. INTRODUCTION
Image processing techniques were first developed in 1960s.The main objective and focus is to develop the medical imaging
segmentation, character recognition and create high quality images at the microscopic level. Digital image processing is primarily
concerned with extracting useful information from images which is done by the computer. Each License plate has a unique number
assigned to it for vehicle identification. It is a powerful automated system which can have immense applications in our todays
modern world where a number of vehicles are increasing exponentially day by day and to control such immense traffic effectively
this system can be of utmost importance over the last few years, the ANPR has become a useful approach for vehicle surveillance.
Typically, an ANPR system consists of three main stages: 1) Number Plate Localization (NPL), 2) Character Segmentation (CS),
and 3) Optical Character Recognition (OCR). The NPL stage is where the Number Plate is being detected. The Character
Segmentation stage is an important pre-processing step before applying OCR, where each character from the detected Number Plate
is segmented before recognition. In the last stage, characters are segmented from the Number Plate so that only useful information is
retained for recognition. ANPR can perform vehicle surveillance by scrutinizing vehicle theft, automation at toll booths, parking
management and many others [4]. This paper will explore and elaborate the proposed algorithm for ANPR. Automated license plate
recognition has many applications. It can facilitate access to secure premises and improve security by detecting unauthorized
vehicles and alerting security personnel. Police cars fitted with a system for the detection and recognition of license plate can pull
relevant history about a moving vehicle (e.g., repeated speed violations, expired registration, or the like). The input to the system is
a digital image, taken by the high speed rotor cameras or digital cameras in our case, of a car and converted to gray scale using
NTSC standard [6]. The illumination condition which is a main bottleneck is improved first by enhancing the image by finding the
variance, and performs contrast stitching or equalization of the histogram. License Plate Detection and Recognition System is an
image-processing technique used to identify a vehicle by its license plate. In fact, this system is one kind of automatic inspection of
transport, traffic and security systems and is of considerable interest because of its potential applications to areas such as automatic
toll collection, traffic law enforcement and security control of restricted areas. License plate location is an important stage in vehicle
license plate recognition for automated transport system. Automatic License Plate Identification is an essential stage in intelligent
traffic systems. Nowadays, vehicles play a vital role in transportation [13].
A. PHASES OF ALPR
Phases of ALPR system work according to the given phases:
Obtain image
License Plate Separation
License Plate Segmentation
Number Identification
Image need to be captured first and the image should not be blurred so that system should be able to do necessary processing on
image for number identification. Then the license plate needs to be extracted from the whole image. Segmentation is performed on
extracted image. Through Segmentation the extracted image is divided into many segments for further processing. Noise needs to be
removed from the image for proper number identification. The final phase of Automatic License Plate Recognition (ALPR) is
Number identification.
Input image
Thresholding of an image
Edge detection
Character segmentation
The proposed method designed for extraction of number plate with accuracy. It composed of seven stages, including image
capturing, localization of number plate, and edge detecting, region of interest filtration, dilation and candidate regions detection and
accurate plate detection/extraction, as shown in Figure 2. The input of the method is the original image of the vehicle in RGB scale
of size 20481536 pixels taken from real scene. The details of other stages are presented in the following subsections.
A. WORKING OF ALPR
1) INPUT A RAW IMAGE: Capture the image from an Android device Camera. The resolution of camera needs to be good so that the
captured image can be further utilized for processing; Captured image is given to the ALPR as input.
Figure 2
2) CONVERTING IMAGE INTO GREY SCALE: Grey scale conversion is nothing but converting an image into black and white view with
grey shades. Colored images doesn't help us to identify the important edges and other features. so the image needs to be
converted in Grey scale format.
Figure 3
3) BINARIZATION: Otsu Thresholding method is used to convert the grey scale image to monochrome. This method reduces the
complexity of captured image (input)[6].
Figure 4
4) MORPHOLOGICAL OPERATION (BOUNDARY EXTRACTED AND DILATION): On Grey scale image This operation starts with the
dilation of an image then erosion needs to be performed after that by applying median filtering noise can be reduced.
Figure 5
5) EDGE DETECTION: The main step is to detect the edges of the license plate. In general the shape of the License Plate is
rectangular. The edges of rectangular area need to be finding first[8]. Depending upon the Threshold value of an input image,
edges can be detected. hence the whole license plate can be recognized.
Figure 6
6) CHARACTER EXTRACTION FROM LICENSE PLATE OCR ALGORITHM IS USED FOR CHARACTER EXTRACTION.
Figure 7
7) SHOWING DOCUMENT OF THE EXTRACTED NUMBER Search and Display the Details of extracted number of License plate with
Matlab Application of number plate with 86.73 accuracy.
Figure 8
All the edge detection operators are grouped under two groups as
1st order Derivative
Prewitt operator
Sobel operator
Canny operator
Test operator
2nd Order Derivative:
Laplacian operator
Zero-crossings.
IV. MEDIAN FILTERING
A median filter is a non-linear digital filter which is able to preserve sharp signal changes and is very effective in removing impulse
noise (or salt and pepper noise). An impulse noise has a gray level with higher or lower value that is different from the
neighbourhood point.
A standard median operation is implemented by sliding a window of odd size (e.g. 3x3 window) over an image. At each window
position, the sampled values of signal or image are sorted, and the median value of the samples replaces the sample in the center of
the window as shown in Figure8.
3 x 3 window
A. CHARACTER RECOGNITION
Low-resolution template matching method is adopted, namely the using a lower pixel resolution to represent the images and
templates to be recognized. Each matrix element corresponds to a sub-matrix in a high-resolution matrix. The element's value is the
average of the pixel gray value in the corresponding high-resolution sub- matrix. Compared with the high-resolution matching
algorithm, correct identification rate of the letters and numbers is greatly enhanced. The reason is that if the resolution rate goes
through a moderate reduction, the error generated by the image distortion and the noise will be decreased. The recognition errors of
letters and numbers mainly occur in some of the characters with the very similar main structures but some detailed
differences, such as B and 8, O and 0, S and 5.
VI. CONCLUSION
The Objective of this paper is to review the idea behind making ALPR System. Studying and resolving all the issues regarding
Algorithms used for ALPR in previous few years. The algorithm used in this paper not only accelerates the process but also
increases the probability of detecting the license plate and extraction of characters, under certain set of constraints. Character
segmentation performs an important role. The result of ALPR shows higher accuracy of region removal other than character region
and thus it results a better recognition of each letters and numbers after the segmentation process. Real time vehicle identification
system plays an important role in detecting security threat. The system uses MATLAB R2010a and image processing for its
implementation. The system robustness can be increased if high resolution camera is used
REFRENCES
[1] Jie Yanga ,Ran Yanga, Shigao Lib,S.Shoujing Yina, Qianqing Qina, A Novel Edge Detection Based Segmentation Algorithm for Polarimetric Sar Images,
The International Archives of the Photogrammetric, Remote sensing and Spatial Information ,Sciences. Vol. XXXVII, Part B7.Beijing 2008
[2] E. Argyle. Techniques for edge detection, Proc. IEEE, vol. 59, pp. 285-286, 1971.
[3] Orlando, J, Tobias & Rui Seara (2002) Image Segmentation by Histogram Thresholding Using Fuzzy Sets, IEEE Transactions on Image Processing, Vol.11,
No.12, 1457-1465.
[4] Punam Thakare (2011) A Study of Image Segmentation and Edge Detection Techniques, International Journal on Computer Science and Engineering, Vol 3,
No.2, 899-904.
[5] Rafael C. Gonzalez, Richard E. Woods & Steven L. Eddins (2004) Digital Image Processing Using MATLAB, Pearson Education Ptd. Ltd, Singapore.
[6] Zhao Yu quian ,Gui Wei Hua ,Chen Zhen Cheng,Tang Jing tian,Li Ling Yun, Medical Images Edge detection Based on mathematical Morphology,
Proceedings of the 2005 IEEE.
[7] Yu, X, Bui, T.D. & et al. (1994) Robust Estimation for Range Image Segmentation and Reconstruction, IEEE trans. Pattern Analysis and Machine
Intelligence, 16 (5), 530-538.
[8] S.Lakshmi,Dr. V .Sankaranarayanan, A study of Edge Detection Techniques for Segmention Computing Approaches, IJCA special issue on Computer
Aided Soft Computing Techniques for imaging and Biomedical ApplicationsCASCT,20
[9] J. Koplowitz On the Edge Location Error for Local Maximum and Zero-Crossing Edge Detectors, IEEE Trans. Pattern Analysis and Machine Intelligence,
vol.16, pg-12, Dec.1994.
[10] Lakshmi,S & V. Sankaranarayanan (2010) A Study of edge detection techniques for segmentation computing approaches, Computer Aided Soft Computing
Techniques for Imaging and Biomedical Applications, 35-41.
[11] Marr, D & E. Hildreth (1980) Theory of edge detection, Proc. Royal Society of London, B, 207, 187217.
[12] T.A. Mohmoud; S.Marshal, Edge Detected Guided Morphological Filter for Image sharpening, Hindawi Publishing orporation EURASIP Journal on image
and video Processing volume 2008.
[13] Canny, J. F (1986) A computational approach to edge detection, IEEE Transaction on Pattern Analysis and Machine Intelligence, 8, 679-714. 14. R. C.
Gonzalez and R. E. Woods. Digital Image Processing. 2nd ed. Prentice Hall, 2002.
[14] Yo-Ping Huang, Shi-Yong Lai,Wei-Po Chuang, A Template-Based Model for License Plate Recognition Proceedings of t he 2004 IEEE International
Conference on Networking, Sensing & Control Taipei, Taiwan. March 21- 23, 2004.