You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/269328946

Optimization of ANPR algorithm on android mobile phone

Conference Paper · November 2013


DOI: 10.1109/ICSIMA.2013.6717950

CITATIONS READS
7 841

4 authors:

Abdul Mutholib Teddy Surya Gunawan


Syarif Hidayatullah State Islamic University Jakarta International Islamic University Malaysia
8 PUBLICATIONS   80 CITATIONS    290 PUBLICATIONS   2,013 CITATIONS   

SEE PROFILE SEE PROFILE

Jalel Chebil Mira Kartiwi


University of Sousse International Islamic University Malaysia
51 PUBLICATIONS   384 CITATIONS    181 PUBLICATIONS   1,991 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Information systems sustainability View project

National E-Cigarette Survey (NECS) 2016 View project

All content following this page was uploaded by Abdul Mutholib on 19 September 2018.

The user has requested enhancement of the downloaded file.


Proc. of the IEEE International Conference on Smart Instrumentation, Measurement and Applications (ICSIMA)
26-27 November 2013, Kuala Lumpur, Malaysia

Optimization of ANPR Algorithm


on Android Mobile Phone
Abdul Mutholib#1, Teddy S. Gunawan#2, Jalel Chebil#3, Mira Kartiwi*4
#
Electrical Computer Engineering Department, International Islamic University Malaysia
P.O. Box 10, 50728 Kuala Lumpur, Malaysia
1antholib@gmail.com

2tsgunawan@iium.edu.my

3jalel@iium.edu.my

*
Information System Department, International Islamic University Malaysia
P.O. Box 10, 50728 Kuala Lumpur, Malaysia
4mira@iium.edu.my

Abstract— Since the past decades, many researchers proposed localization step as we can capture only the number plate using
their methods to recognize the vehicle number plate. One of the Android mobile phone’s camera.
methods is template matching which is executed in the optical
character recognition (OCR) step of the automatic number plate
recognition (ANPR) system. In previous researches, many TABLE I. ANDROID MOBILE PHONE SPECIFICATION DETAILS
researchers are used a high end desktop PC and high resolution Component Specification
camera to implement the ANPR system. In this paper, the CPU 800 MHz 1 Core ARM v6
optimization of ANPR algorithm on limited hardware of Android GPU Adreno 200
mobile phone is presented. First, various steps to optimize ANPR Chipset Qualcomm MSM7227
and OCR block using template matching are described. Our Memory 278.34 MB
proposed algorithm was based on Tesseract library. For ROM 178.39 MB
comparison purpose, the template matching based OCR will be Network Data 2G / 3G / HSDPA 7.2
compared to Artificial Neural Network (ANN) based OCR. The OS Android 2.3.7
optimization on ANPR was performed as currently there is no Screen size 3.5 inch
LCD technology TFT 16M colors multi touchscreen
image processing tool available on the standard Android mobile
Resolution HVGA (480 x 320) ~165 ppi pixel density
phone. By optimization of ANPR, many advantages could be
Camera Resolution 5 MP (2592x1944 pixels)
achieved, such as higher recognition accuracy, less resource Digital/Optical Zoom Up to 2x digital zoom
consumption, and less computational complexity. Results on 30 Shot Mode Single / Smile / Continuous / Panorama
images showed that the recognition rate was 97.46% while the Photo Effects Normal / Negative / B&W / Sepia
processing time was 1.13. White Balance Auto / Daylight / Cloudy / Incandescent /
Fluorescent
Keywords— ANPR; Template Matching; ANN; OCR; GPS AGPS
Android Wi-Fi 802.11b/g/n

I. INTRODUCTION
ANPR as an intelligent device which is eradicating the need
Automatic Number Plate Recognition (ANPR) is simply
of human involvement, it obliges to have a high accuracy
the combination of hardware and software which have the
degree. There are numerous of variable that need to be paid an
ability to read the character and number on the vehicle’s
attention for gaining a high accuracy of the number plate
license plate. Commonly, the ANPR systems are used in
recognition, for example, time of day, weather and angles
various access control and traffic law enforcement, namely toll
between the cameras and the license plates [1]. Android as the
gate access, parking area access, speed trap and traffic light
popular mobile operating system has capability to complement
tress passing [1]. There are numerous algorithms that can be
those variables. Android offers open development environment
used to improve the accuracy and processing time of ANPR,
which is built on open-source Linux kernel. Accessing the
such as RGB or YCbCr, image binarization, image filter, fuzzy
hardware resources is available to all applications through the
algorithm, template matching and neural network [2]. API libraries. The third-party and native Android applications
Generally, the ANPR system works in five steps, image are constructed with the same APIs and executed on the same
acquisition, image pre-processing, number plate localization, run time. Developers can eliminate and replace any native
character segmentation and the last is optical character application with a third-party developer alternative [4]. The
recognition (OCR) to recognize the individual character with specification of the Android mobile phone used in this research
the help of database stored for each and every alphanumeric can be seen in Table 1.
character [3]. In this paper we eliminate the number plate Minimalizing the computational cost, maximizing the
recognition result and recognition time are the main objectives

978-1-4799-0843-1/13/$31.00 ©2013 IEEE


of this paper. To achieve those goals, optimization of template Duan et. al. [10] used detection method based on the
matching algorithm for ANPR implemented on Android boundary features. The method sequentially consists of graying
mobile phone is proposed. the image, normalizing the image using Sobel filters to extract
the edging image and histogram equalization using adaptive
II. EXISTING ANPR METHOD thresholding algorithm to binarize the image.
The successful of the number plate recognition is depend Finally, Yo-Ping Huang et. al. [11] used Gaussian filter in
on the correctly of the As a component of an ANPR system, order to smooth the image for reduction influences noises. It
successful character recognition on a number plate is to will make the pixels near the center of image have higher value
correctly specify the each component of the number plate than the pixels far for the center of the image. To enhance the
either as the character on the number plate from A to Z or as a contrast of the image, they used Power Law transformation.
digit number from 0 to 9. In this section, the existing methods
which are handles the each of process of a character C. Feature Extraction
recognition system will be presented. In addition, the reviews In humans’ perception, a number plate is a small of plastic
of some well-known method for character recognition will or metal plate patch to a vehicle for official identification
discuss in this section. The common processes of ANPR are purposes. However, the machines do not understand this
consists of following five steps. There are image acquisition, description as well as they do not understand what vehicle, or
pre-processing, feature extraction, segmentation, and whatever else is. In consequence, the alternative way of
recognition as shown in Fig. 1. description of a number plate is needed by the machines.
Start Kim et. al. [7] in their paper showed the alternative way to
teach the machine what and where is the number plate. The
methods they used for this stage are two Neural Network-based
Image acquisition filters as an input and a post processor to combine the two
filters images in order to locate the license plate. The filter that
used in two Neural Networks are vertical and horizontal filters,
Image pre-processing
which observe small windows of vertical and horizontal cross
sections of an image and resolve whether each window
Feature extraction contains a license plate. Cross-sections have adequate data for
differentiating a plate from the background.

Character segmentation
Duan et. al. [10] proposed the combination of the Hough
Transform and Contour algorithm that produces higher
accuracy and fast processing, thus can be implemented into real
Optical character recognition time system. While Badr et. al. [6] were applying Sobel vertical
edge detection, threshold and doing a vertical projection (Y-
axis) in sequent. The process will produce the strongest peak.
Stop The image will cut according the range of this peak.

Fig. 1. General ANPR Process D. Character Segmentation


Many different methods for character segmentation have
A. Image Acuisition been proposed in the previous researches and some of them are
Image acquisition is first important step for the ANPR as follows.
system. It is due to this step offers the input image for the Khalifa et. al. [9] used Connected-Component which is
whole process in the ANPR system. The previous researchers following the four steps to segment the character of the license
used many capture method. In paper published by Maarif and plate. The first step is stretching the contrast of the image to
Sardy [5], they used digital camera to acquire license plate. The extend over the entire range of gray levels available (0-225).
infrared lighting that embedded in camera was presented in The next step is threshold the image using Otsu method.
Badr et. al. paper [6]. In another paper published by Kim et. al. Thirdly, search for connected components in the image and
[7] and Yan et. al. [8] were presented a video camera to assign a special label for each connected component. Finally,
capture the number plate image. resize each character from previous step to the standard size
(20x10) to be used for next step recognition process.
B. Image Pre-processing
Duan et. al [10] used a horizontal projection for detecting
The objective of this step is to increase the image quality
and segmenting rows in two rows plates and vertical projection
especially to sharpen the edge features of the image. Numerous
for character segmentation. While, Maarif and Sardi [5] used
methods were proposed by many researchers for the pre-
thin window scanning with the size of partition 56 x 1 pixels.
processing step. For example, Khalifa et. al. [9] enhance the
They divided the plate into three blocks. First, block contained
input image by convert it to gray scale by taking the luminance
letter which corresponds to area domain of the car. Second,
component of National Television System Committee (NTSC)
block contains number and the last is block contained letter.
standard method.
E. Optical Character Recognition foreground colors and finally binarizing the image using Otsu
Optical character recognition (OCR) is the process to algorithm due to remove the noise.
convert the images of handwritten, or typewritten into machine In the character segmentation step, the optimization is
encoded text. In the previous researches, there are numerous accomplished by detecting the skew of image and performed
methods such as Euclidean distance [12], Hidden Markov the fixed pitch detection and chopping method (see Fig. 4). It
Model (HMM) [10], Artificial Neural Network (ANN) [13] can determine whether the text lines are fixed pitch. Where it
[14] [9], Support Vector Machine (SVM) [15] and template finds fixed pitch text, it will chop the words into characters
matching [16] [17]. using the pitch, and restricts the chopper and associates on
these character for the word recognition step [18].
III. OPTIMIZATION
The optimization implies to the best meet of the criteria set
for character recognition. The most common used criterion for
the evaluation of the classification method is the accuracy. One Fig. 4. Character segmentation optimization
more criterion is the permanence. An algorithm is considered
has the good performance if it always achieved a better result Finally, in the optical character recognition we proposed
for various sets of input data. The cost of acquiring data or the the template matching algorithm. As the description in
cost of classification errors and the computational complexity Brunelli’s book [19], the template matching technique can be
are the other of the criteria. illustrated as vector in Fig. 5. A planar distribution of light
intensity values is converted into a vector x that can be
The optimization is not relying on separate step of the compared, in a coordinate-wise mode to a spatially
ANPR process. It is based on the set of auxiliary method which corresponding light distribution similarly represented by vector
is supporting in every process step as shown in Fig. 2. y.

Start
Based on the description above, Brunelli stated that a major
issue in template matching is the consistency of match scores
with deference to noise extended to include un-modeled
Image Acquisition occurrences. It is happen because a template may unveil some
inconsistency, not all of the instances are precisely identical.
Optimization

Image Pre-Processing Many commonly used estimators suffer from a lack of


robustness: small perturbations in the data can drive them
towards uninformative values [19].
Character Segmentation

Character Recognition

Stop
(60, 40, 20, 100, 20, ...)
Fig. 2. Optimization of ANPR Process

As can be seen in Fig. 2, optimization guarantees that each


x = (x1, x2, ...)
input plate number image has to have the best meet criteria for
the next process. In the image acquisition, we take a 600x480 Fig. 5. Illustrated of template matching method as matix
pixels image of the number plate. For optimize the next process If the matrix has countless coordinate, in the other word the
and reduce the computational complexity, we convert the enormous number of sample points image for current
picture to 8bit image. By doing this, we also gain high speed discussion, it can lead the inconsistency of the image identical.
processing and low cost of resources. To reduce this inconsistency, we need to reduce the resolution
of the image which is bring on the reducing the number of
sampling points. The reducing resolution of course based on
the training image. In this paper, we set the training image in
(a) 8bit. Hence, we need to convert the input image to 8bit.
Another optimization for template matching in our research
(b) (c) (d) is limited the training and the input number plate image as
character A to Z and number 0 to 9. With the addition of this
Fig. 3. Imag pre-processing optimization, (a) original image, (b) unsharp limitation or we called it white list; the recognition process can
masking, (c) inverting, (d) binnarizing
be speed up.
In the pre-processing image, optimal process methods have
to perform sequentially (see Fig. 3), such as unsharp masking
method for edge enhancing, inverting the background and
IV. EXPERIMENTAL RESULT use of ANN in OCR step for the proposed algorithm is not
The experiments have been performed to test the significantly improves the recognition rate. It only gained
performance of proposed optimization and to measure the 60.95% with the longest recognition time around 53.97
accuracy. The images for the input with the size 640x480 seconds.
pixels converted to 8bit image. The test images were taken
under various time, conditions and angle. As the result of the TABLE III. OPTIMIZATION ANPR RESULT USING TEMPLATE MATCHING
implementation the proposed algorithm on Android mobile AS OCR

phone, it can be seen in Fig. 6. Recognized Processing Recognizing


No Plate
Output Time (ms) rate (%)
1 WAX5739 WAX5739 960 100.00%
TABLE II. ORIGINAL ANPR RESULT USING TEMPLATE MATHING AS
OCR 2 PDG7628 PDG7628 786 100.00%
Number Recognized Processing Recognition 3 BFP2569 BFP2569 754 100.00%
No
Plate Output Time (ms) rate (%) 4 WGA2761 WGA2761 1120 100.00%
1 WAX5739 1121 0.00% 5 MAH8015 MAH8015 996 100.00%
2 PDG7628 538 0.00% 6 MCH929 MCH929 954 100.00%
3 BFP2569 BFP2569 696 100.00% 7 WRF5851 WRF5851 904 100.00%
4 WGA2761 VIGA2761 3219 85.71% 8 CBS1300 CBSI300 972 85.71%
5 MAH8015 MAH8015 830 100.00% 9 MAP5384 HAP5384 908 85.71%
6 MCH929 MCHS29 1263 83.33% 10 WNM344 WNM344 888 100.00%
7 WRF5851 WKSS 1071 14.29% 11 CBT4465 CBT4465 988 100.00%
8 CBS1300 CBS1206 1016 71.43% 12 WVV7054 WVV7054 1157 100.00%
9 MAP5384 MAP5382 805 100.00% 13 MBG127 MBG127 1765 100.00%
10 WNM344 WNM344 812 100.00% 14 WGQ6464 WGQ6464 1332 100.00%
11 CBT4465 CBT4465 848 100.00% 15 WUT4251 WUT4251 1351 100.00%
12 WVV7054 WVV7054 732 100.00% 16 BJW3236 BJW322G 1585 100.00%
13 MBG127 MBG127 679 100.00% 17 WGQ7921 WGQ7921 1327 100.00%
14 WGQ6464 WGQ6464 1059 100.00% 18 KCM4303 KCM4303 1131 100.00%
15 WUT4251 UT4251 837 85.71% 19 WPM9605 WPM9605 1023 100.00%
16 BJW3236 BJWF323S 1454 85.71% 20 PKA4220 PKA4220 1082 100.00%
17 WGQ7921 WGQ7921 963 100.00% 21 BEN3688 BEN3688 1315 100.00%
18 KCM4303 KCM4303 883 100.00% 22 DBP8757 DBP8757 914 100.00%
19 WPM9605 WPM9805 811 85.71% 23 WDG292 1FWDCI1292 1230 66.67%
20 PKA4220 PKA4220 668 100.00% 24 WDB6306 WDB6306 1131 100.00%
21 BEN3688 BENY3688 772 85.71% 25 WPN1674 WPN1674 1435 100.00%
22 DBP8757 DBP8757 862 100.00% 26 WGF8459 WGF8459 1210 100.00%
23 WDG292 JIIDGI1292 1034 83.33% 27 WNX7895 WNX7895 890 100.00%
24 WDB6306 WDB6306 871 100.00% 28 AFW7480 AFW1480 1825 85.71%
25 WPN1674 QWPN1674 1189 85.71% 29 ABS1544 ABS1544 922 100.00%
26 WGF8459 WSFJE459 1265 71.43% 30 WWW8946 WWW8946 1145 100.00%
27 WNX7895 NNX7895 632 85.71% 1133.333 97.46%
28 AFW7480 AFW7480 816 100.00%
29 ABS1544 ABS1544 736 100.00%
30 WWW8946 QWWW8946 790 85.71%
975.7333 83.65%

The optimization of the proposed algorithm using Template


Matching in OCR step can be seen in Table III. It can be
compared to the original algorithm in the Table II and Table IV
for proposed algorithm with ANN in the OCR step.
It is shown that Table II achieved 83.65% for the accuracy
and gained 0.98 second for the recognition time. However,
after performed the optimization, the accuracy is significantly
increased up to 97.46% and unfortunately it was paid by the
recognition time at 1.13 second. In Table IV, it shows that the Fig. 6 ANPR recognition result shown on Android mobile phone
TABLE IV. OPTIMIZATION ANPR RESULT USING ANN AS OCR REFERENCES
Recognized Procesing Recognition [1] Hamey, L.G.C. and C. Priest, Automatic Number Plate Recognition for
No Plate
Output Time (ms) (%) Australian Conditions. Proceedings of the Digital Imaging Computing:
1 WAX5739 TTHY5739 41341 57.14% Techniques and Applications, 2005: p. 8.
2 PDG7628 POLL7828 59168 57.14% [2] Chen, Z.-X., et al., Automatic License-Plate Location and Recognition
Based on Feature Salience. IEEE TRANSACTIONS ON VEHICULAR
3 BFP2569 BF2569 52213 85.71% TECHNOLOGY, 2009. 58(7): p. 3781-3785.
4 WGA2761 TI312781 39872 42.86% [3] Qadri, M.T. and M. Asif, Automatic Number Plate Recognition System
5 MAH8015 1KHLL8015 44102 71.43% for Vehicle Identification Using Optical Character Recognition.
International Conference on Education Technology and Computer,
6 MCH929 LL0HL929 63921 66.67%
2009: p. 335 - 338.
7 WRF5851 WF5851 39073 85.71% [4] Meier, R., Professional Android 2 Application Development2010,
8 CBS1300 C891300 50839 71.43% Indianapolis, Indiana: Wiley Publishing, Inc. 399.
9 MAP5384 HH5384 55822 57.14% [5] Maarif, H.A.-Q. and S. Sardy, Plate Number Recognition by Using
Artificial Neural Network. Prosiding Semiloka Teknologi Simulasi dan
10 WNM344 TINI43TL4 37134 50.00% Komputasi serta Aplikasi, 2006: p. 176-182.
11 CBT4465 CBT4485 51112 100.00% [6] Badr, A., et al., Automatic Number Plate Recognition System. Annals of
12 WVV7054 TILLL7054 45404 57.14% the University of Craiova, Mathematics and Computer Science Series,
2011. 38(1): p. 62-71
13 MBG127 TTIIYIT27 51237 33.33%
[7] Kim, K.K., et al. Learning-based approach for license plate recognition.
14 WGQ6464 TTIMIYL64 52500 28.57% in Neural Networks for Signal Processing X, 2000. Proceedings of the
15 WUT4251 JIITYF625F 41316 28.57% 2000 IEEE Signal Processing Society Workshop. 2000.
16 BJW3236 BDLFI3F3T 54769 42.86% [8] Dai, Y., et al. A high performance license plate recognition system based
on the web technique. in Intelligent Transportation Systems, 2001.
17 WGQ7921 ILAL7921 46890 57.14% Proceedings. 2001 IEEE. 2001.
18 KCM4303 KCMWD3FY3 58606 71.43% [9] Khalifa, O., et al., Malaysian Vehicle License Plate Recognition. The
19 WPM9605 GLPMS6CE 68959 28.57% International Arab Journal of Information Technology, 2007. 4(4): p.
359-364.
20 PKA4220 PKAD220 61233 85.71%
[10] Duan, T.D., et al., Building an Automatic Vehicle License-Plate
21 BEN3688 BEN3688 57650 100.00% Recognition System. Intl. Conf. in Computer Science – RIVF’05,
22 DBP8757 BB8757 50565 71.43% Vietnam, 2005: p. 59-63.
23 WDG292 VLLLLLTT292 64434 50.00% [11] Yo-Ping, H., L. Shi-Yong, and C. Wei-Po. A template-based model for
license plate recognition. in Networking, Sensing and Control, 2004
24 WDB6306 LLLDB6306 73644 85.71% IEEE International Conference on. 2004.
25 WPN1674 GGDN167D 71637 57.14% [12] Hegt, H.A., R.J. de la Haye, and N.A. Khan. A high performance license
26 WGF8459 FR3FBD59 65902 42.86% plate recognition system. in Systems, Man, and Cybernetics, 1998. 1998
IEEE International Conference on. 1998.
27 WNX7895 1LLNX7895 49931 85.71%
[13] Xiaojun, Z., F. Bensaali, and R. Sotudeh. OCR-based neural network for
28 AFW7480 RHFLLR7480 56598 71.43% ANPR. in Imaging Systems and Techniques (IST), 2012 IEEE
29 ABS1544 HBS15DD 54669 57.14% International Conference on. 2012.
30 WWW8946 1LLLLLLLEB9D6 58551 28.57% [14] Radzi, S.A. and M. Khalil-Hani, Character Recognition of License Plate
Number Using Convolutional Neural Network. International Visual
53969.73 60.95% Informatics Conference, IVIC, 2011. 2: p. 45-55.
[15] Ying, W., et al., An Algorithm for License Plate Recognition Applied to
V. CONCLUSION Intelligent Transportation System. Intelligent Transportation Systems,
IEEE Transactions on, 2011. 12(3): p. 830-845.
This paper has presented the optimization of template [16] Ozbay, S. and E. Ercelebi, Automatic Vehicle Identification by Plate
matching for ANPR which is implemented on Android mobile Recognition. World Academy of Science, Engineering and Technology,
phone. This optimization is only designed for the identification 2007. 9: p. 778-781.
of Malaysian number plates and the system is evaluated over [17] Kasaei, S.H., S.M. Kasaei, and S.A. Kasaei, New Morphology-Based
30 images captured using Android mobile phone’s camera. Method for Robust Iranian Car Plate Detection and Recognition.
International Journal of Computer Theory and Engineering 2010. 2(2):
Results showed that the accuracy of the proposed optimization p. 264-268.
is around 97.46% while the processing time is around 1.13 [18] Smith, R. An Overview of the Tesseract OCR Engine. in Document
second. The original ANPR was compared with the optimized Analysis and Recognition, 2007. ICDAR 2007. Ninth International
ANPR using template matching and ANN. The additional Conference on. 2007.
overhead for optimization is negligible compare to the higher [19] Brunelli, R., Template Matching Techniques in Computer Vision:
recognition rate achieved. Further study could include redesign Theory and Practice 2009, United Kingdom: Wiley.
the proposed algorithm for multinational car license plates and
optimize the recognition process.

View publication stats

You might also like