You are on page 1of 16

International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing

and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


65

Farsi License Plate Detection based on Element Analysis
and Characters Recognition


Mehran Rasooli
Electrical Engineering
Department, Islamic Azad
University, South Tehran
Branch, Tehran, Iran.
Mehran.rasooli@yahoo.com

Sedigheh Ghofrani
Electrical Engineering
Department, Islamic Azad
University, South Tehran
Branch, Tehran, Iran.
S_ghofrani@azad.ac.ir

Emad Fatemizadeh
Department of Electrical
Engineering, Sharif
University of Technology,
Tehran, Iran.
Fatemizadeh@sharif.edu

Abstract

In this paper, a safe and powerful method is presented which can detect and identify
Farsi license plate irrespective of distance (how far a vehicle is), rotation (angle between
camera and vehicle), and contrast (being dirty, reflected, or deformed). In addition, more than
one car can be existed in an image. The proposed method extracts edges and then determines
the candidate regions by using adaptive image enhancement and applying window movement.
Finally by region elements analysis, the license plates are detected. The region elements
analysis is working according to the plate geometric structure, continuity and parallelism. After
detecting license plates, we estimate rotation angle and try to compensate it. In order to identify
a detected plate, every character should be recognized. For this purpose, we present 53 features
and use them as input to artificial neural network classifier.


1. Introduction

Rapid advancement of technology in artificial intelligence and computer science
knowledge and then feel the need to search and security automated systems are because of the
appearance of intelligent systems based on image processing and spread this knowledge. One of
these intelligent systems is license plate recognition (LPR) system. Usually, LPR systems
consist of three main parts: license plate detection, character segmentation, and character
recognition. License plate detection is the most important and difficult stage. During recent
years, several methods have been proposed for detecting license plate in an image. Wie et al.
and Kim et al. [1] - [2] used color processing where the unique color or color combination
between the license plate and vehicle body or between the plate background and text color has
been considered as the key feature to detect the license plate location. But these methods are not
robust to the different environments. Zheng et al., Jia et al. and Ming et al. [3] - [6] used edge
analysis. The edge features of a car image are very important and edge density can be used to
successfully detect a number plate location due to the characteristics of the number plate. To
improve the edge image, eliminate the highest and lowest portions of the edge density to
simplify the whole image. But some of the plate region identity will be lost in this method. Park
et al. and Wang et al. used neural networks and other classifier for locating the license plate [7]
[8]. These methods can be used as filters for analyzing small windows of an image and
deciding whether each window contains a license plate. A post processing combines these
filtered images and find the location of the license plates in an image. Anyway, most of existing
methods fail in real scenario or strongly depending on input images. In this paper, we have
International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


66

considered the content plate characteristics and present a reliable algorithm to detect multiple
license plates under various photographs and different conditions.
There are numerous algorithms for character recognition such as: statistical classifiers,
computational intelligence architectures, and pattern matching techniques. Although there are
various types of classifiers for recognizing license plates characters, artificial neural network
(ANN) is a well known classifier. ANN needs the value features as input. In this paper, we
suggest 53 features and use multilayer perceptron ANN to recognize the license plate
characters.
The rest of this paper is organized as follows: extracting edges in section 2, extracting
candidate regions in section 3, analyzing region elements in section 4, detection experimental
results in section 5, compensating rotation in section 6, recognizing characters in section 7, and
finally recognition experimental results is presented in section 8. At last, in section 9 we draw
some conclusions.

2. Extracting edge

In order to extract edges, two different procedures have done. It means image
enhancement and image edges detection. They are described in detail in following.

2.1 Image enhancement

The advantage of license plate detection system is performing in photographed different
conditions, such as low contrast image, dirty license plate, or affected plate by reflection.
Therefore, image enhancement is necessary, and for this purpose, the below high frequency
emphasis mask is used:
( (( (
( (( (
( (( (

( (( (






C C C
C 1 A 9 C
C C C
) (

We denote that the usual used values for the two parameters C, A of the above mask are 1 C = == = ,
and 1 A > >> > . In this work we have obtained them adaptively according to the each input image as
follows:

) ( + ++ + = == = 1 1 A (1)
2
A
C

= == =
(2)
where is the standard deviation.


2.2. Image edge detection

It seems that, the density of vertical edges is more than horizontal edges for the most
characters of any Farsi license plates such as others [4]-[6]. So we have used just the vertical
Sobel mask and increased the speed of running algorithm. Figure 1 illustrates the four different
pose original images and figure 2 shows extracting edges results.


International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


67

3. Extracting candidate regions

After detecting edges in section 2, the candidate regions are determined via three steps;
it means window movement, region modification, and candidate regions selection as well.
Every procedure will be explained in detail in following sub sections.

3.1. Window movement

In window movement, at first we select the smallest window size that can be a license
plate and move a window on all of the rows and columns in image. Then we increase window
size and move on the rows and columns again. The window movement procedure stops when
the window size is bigger than the image size. During every window movement, the considered
property for license plate candidate is controlled and the contents of a window that could not
satisfy the proposed merit would be removed or discard. We apply edge density to determine
the presence of license plate in a window, it is obtained as:
y x
j i ed
density edge
x
1 i
y
1 j

= == =

= == = = == =
| ) , ( |
(3)
where x and y are window size, and ) , ( j i ed is edge value which is obtained in section 2. The
windows that their edge densities are greater than predefined threshold are selected as license
plate probable region and the remaining areas are removed. About 40% of Farsi license plates
area is empty and 60% is characters area. So, we have chosen the threshold value equals to 55.
Our experimental results confirm the suitability of the selected threshold. Figure 3, shows the
window movement output images.

3.2. Candidate regions modification

We know license plate includes characters, so we consider this feature to discard wrong
candidate regions. First, we perform closing and opening operators on each remaining regions.
Then, we subtract the opened and closed images [9]. So the smoothed area is de-emphasized
and peaks and valleys are highlighted. Therefore the license plate region can be distinguished
from surrounding by using the proper threshold as well. Anyway, Performing opening and
closing needs structure elements. Since this Process performs on each of the remaining regions.
We determine the structure element for each region adaptively. Let the length and width of a
structural element are Y and X respectively, then the structure element for each region, defined
by the below equation:



= == =
= == =
my) round(0.2 Y
mx) round(0.1 X
(4)
where mx and my are average of active pixels for all of row and column in order in every
region. Now, by subtracting the closed and opened images, the characters area in result image
are brighter than surrounding. In order to distinguish the character areas those belong to the
license plate better, we have chosen the average of difference image as the threshold value for
each area separately. Figure 3 shows the result of candidate region modification. As it can be
seen, in comparison with Figure 4, some regions those have been selected by mistake now are
discarded.


International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


68



a) b)


c) d)
Figure 1. Original images are chosen from our
database. a) three cars, b) big angle between
license plate and camera, c) short distance and
rotation, d) low contrast and untidy license
plate.


3.3. Candidate regions selection

Although the aspect ratio (proportion of length to width) of standard Farsi license plate
is 5, it is changed if camera and car make an angle. In this paper, the maximum angle is
supposed to
be 70 degree. Now, according to this maximum Angle, we suggest using equation (5) to obtain
the minimum and maximum value for the aspect ratio:



= == =
= == =
) cot( /
) cot(
angle maximum 5 ratio aspect Maximum
angle maximum 5 ratio aspect Minimum
(5)
where
) sin(
) cos(
) cot(
x
x
x = == = . So, the maximum and minimum aspect ratios of Farsi license plates
regions are 13.7 and 1.8 respectively. In addition, we consider the smallest value for the Farsi
license plate area equal to 0.55 and the smallest size equal to 1050 pixels. So the candidate
license plate should have at least 275 (0.551050) pixels. In this paper, we consider these two
features (aspect ratio and the smallest plate size) to discard some more regions before arriving
in element analysis, Figure 4 shows the result.




International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


69



a) b)


c) d)
Figure 2. Extracting edges by using high
frequency emphasis mask (enhancement) and
vertical Sobel mask.


4. Analyzing region elements

As it can be seen in Figure 4, although many wrong candidate regions are removed
during execute procedure in section 3, these are some regions in addition to the license plate
which should be omitted. So we employ the region elements analysis. In general, it analyzes
every candidate regions to decide whether there are any character strings. Region elements
analysis includes four stages: binarization, character geometric analysis, character continuity
analysis, and at last character parallelism analysis.

4.1.Binarization

It is necessary to have a threshold to convert any gray image to binary. Since the
general threshold makes losing or merging elements, the threshold value must be determined for
each region separately. We use the modified Niblack method [10] to obtain the threshold value
for a region as follows:

) ) . ( ( + ++ + = == = k 1 0 sign m Th (6)

where Th is the desired threshold value, m and are average illumination and standard
deviation of a region, and k is a constant that considered to be -0.2. In this way, every candidate
regions are converted to binary adaptively.
After image binarization, the 8 neighbor connect component algorithm are applied for
image segmentation and extracting the elements. In this method scroll the image pixels from left
International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


70

to right and from top to bottom to extract the connected pixels. Each group of connected pixels
is



a) b)


c) d)
Figure 3. In window movement procedure,
many regions in addition to license plate are
candidate.

identified as one element in selected region. In following subsections, we analyze the obtained
elements and evaluate the similarity of these elements with license plate characters.
Although, there are 32 characters in Farsi language, just 16 characters are used to identify the
Farsi license plates. These characters are written in table 1. We have also categorized license
plates to three groups. It means private plates those have an owner, public plates those are used
for public transportation, and governmental plates those belong to the government. These three
different license plates may use different characters and colors as it can be seen in table 1.

4.2. Character geometric analysis

This analysis considers two features, character aspect ratio and active pixels per
character area (APR). The highest aspect ratio (width to height) in the Iranian standard license
plates is related to the characters " " and " " and the lowest aspect ratio is related to number
"1". These ratios in the worst possible conditions are 3 and 0.1 respectively. So each element
can be considered to be a character if it's computed aspect ratio is in interval [0.1 3].
Character area obtains with multiplying major axis by minor axis of character. This
rectangular embed on character. On the other hand, active pixels are pixels that formed the
character. So for the second feature, we define the active pixels per character area or active
pixels ratio (APR) as:

axis minor axis major
pixels active
APR


= == = (7)
International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


71

We have considered the Farsi license plate characters in different conditions and determined the
maximum and minimum value for APR equal 0.75 and 0.2 in order.




a) b)


c) d)
Figure 4. After region modification, some
wrong candidate regions are discarded.


4.3. Character continuity analysis

Obviously, those elements belong to license plate set one after another. In other word
there is continuity between elements (that belongs to the plate) with before and after element or
the distance between license plate elements are not too much. Using this property as a feature,
we use Euclidean distance for the centers of mass elements as follows:
axis major 1 1 y y x x
2
i 1 i
2
i 1 i
< << < + ++ +
+ ++ + + ++ +
. ) ( ) ( (8)
axis major 1 1 y y x x
2
1 i i
2
1 i i
< << < + ++ +

. ) ( ) ( (9)
where
i
x and
i
y

are width and height of mass centers, and major-axis is the biggest length
(horizontal or vertical length) of element. The structure of Farsi characters require that each
center of mass element locates between of two neighbor center of mass as smaller than 1.1 its
major axis. For the first element just inequality (8) is used and for the last element just
inequality (9) is applied, whenever for other elements the both (8) and (9) are considered. Each
element which does not satisfy the requirements would be removed from region. The process is
done iteratively until all remained elements satisfy the continuity requirements.

4.4. Character parallelism analysis

In this section, we evaluate the height and width of region elements. For Farsi
characters, the height and width interval ratios via different situations in order are: [0.4 2.5].
International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


72

Any not parallelism element with other elements should be removed from region. Parallelism
analysis is also an iterative process. At the end of the process, all the remaining characters will
be similar in width and height. In addition, we notice that the number of Farsi license plates
characters is




a) b)


c) d)
Figure 5. Results of candidate regions
selection. There already exist some other
regions except license plate. They would be
omitted by using the region elements
analysis.

Table 1. Three types of Farsi license plates and their characters and colors.

Plate type Characters Colors
private


white-black
public yellow-black
governmental red-white


8, so any region which includes less or more than 8 elements can not be a license plate and must
be removed.

5. Detection experimental results

In general, we have defined some elements features to distinguish those belong to Farsi
license plate from other. Figure 6 shows the result of region elements analysis. As it can be
seen, although these four images are captured in different conditions, our proposed algorithm is
able to detect the license plates as well. Any way there is not a standard bank for Farsi license
International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


73

plate, so we ourselves prepared the database which includes 300 images. As images are
captured in different conditions, we split the database to six categories based on: camera
distance (short and normal), camera angle (low and high), low resolution (dirty, reflection, and
deformed plates), and multiplicity of plates in image. We have run the explained algorithm and



a) b)


c) d)
Figure 6. The results of region elements
analysis for the four selected image. It is
seen even for low contrast image (d), the
algorithm succeeded to detect the license
plate correctly.

reported the accuracy for Farsi license plate detection in table 2. We mention that the results of
license plate detection are reported in table 2, belong to private cars. As we have mentioned in
section 4, Farsi license plates can be categorized to 3 different types. Before continuing to
recognize a plate characters, we specify these three license plates in detail more. Basically, the
color of their plate background and characters are different. They (background and characters
colors) for private, public, and governmental plates are white-black, yellow-black, and red-
white respectively (table 1). Figure 7 shows samples of these Farsi license plates.



a) private

b) public

c) governmental

Figure 7. Three type of Farsi license plate.

Although we have processed only the private cars, the same procedure can be done for public or
governmental plate detection. We are able to specify the type of detected plate by obtaining the
license plate background color and notifying to table 1.

International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


74

6. Compensating rotation

Extracted plates may have an angle with the horizontal or even vertical line. If we
estimate the rotation angle, then compensating is possible. So we label the all elements of a
detected plate according to use 8 neighbor connect component which was explained in section
4, then we compute the central mass of each element and compute angle between every side by
side elements via using equation (10):



a) the estimated
angles are 3,1, and
2 degree in order
from top to bottom

b) the estimated
angle is 17 degree

c) the estimated
angle is 28 degree
d) the estimated
angle is 2 degree

Figure 8: The detected plates are shown and estimated angles are written for
each one.



a) b)

c) d)
Figure 9: The detected plates after rotation compensating, the plates are ready to
be recognized.

) (
difference horizontal
difference vertical
arctg angle


= == = (10)

where vertical and horizontal difference refer to the vertical and horizontal mass difference
of the two side by side elements (the reference point with coordinate (0, 0) are considered to be
at left-up hand of a detected plate). As we know, any license plate includes just 8 characters, so
after computing 7 angles between elements, we determine the average rotation angle and we do
rotation counter clockwise. Now the detected plates are shown in figure 8, and the computed
angles for every plate are also written. Figure 9 shows the license plates that we compensated
International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


75

them. We believe this compensation would improve our accuracy for executing the next part;
character recognition.

7. Recognizing characters

Character recognition means specify exactly letters and numbers which are in a region
or in this work detected license plate. For this purpose, at first we should extract characters (the
method described in section 4) and then recognize every 8 characters that there are in Farsi
license plate.

Table 2. Accuracy of the proposed algorithm for license plate detection. As it can
be computed easily, the number of images that the method fails is just 6 while
the total numbers of processing images are 300.


Different Situations

Number
of images
Accuracy
(%)
Distance
Short
(<3 m)
40 100
normal
( >3 m & <20
m)
120 99
Angle
Low
(<30)
40 100
High
( >30 & <70)
40 95
Low contrast
(dirty, reflected, or
deformed)
40 95

Multiple plate

20 95

As we know, in order to distinguish characters, we need to define some features [11] - [14]. In
this work, we extract 53 features that derived from Zoning, Geometric, and statistical analysis
as well.

7.1. Zoning features

For every particular character, we have done lattice, vertical and horizontal zoning as well
and derived 13 features totally. Before describing how zoning works, we mention that each
character is embedded by a rectangular with a known size. At first for lattice zoning, a character
region is divided to four equal parts as shown in figure 10. Then we compute the amount of
active pixels for every region according to equation (11) and obtained 4 lattice zoning features.
4 3 2 1 i
pixels Total
pixels Active
Z
i
i
, , ,
) (
= == =


= == = (11)


International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


76

Region 2 Region 1
Region 4 Region 3

Figure 10. Lattice zoning for character recognition.

As the image is binary, active-pixels are those with value 1, and the total-pixels is referred to a
character size or embed rectangular size perfectly. In addition to four features that obtained
from each region, we determined 3 other features by employing equation (12) as follow:
2 3
4 1
udlr
4 2
3 1
lr
4 3
2 1
ud
Z Z
Z Z
Z
Z Z
Z Z
Z
Z Z
Z Z
Z
+ ++ +
+ ++ +
= == =
+ ++ +
+ ++ +
= == =
+ ++ +
+ ++ +
= == = ` (12)
In this way 7 features are obtained from lattice zoning. Although lattice zoning has applied for
recognizing Arabic characters before [ ], the above 3 suggested features (equation (12)) never
have been used by researchers. Now if we divide a character area to three equal parts once along
vertical axis and once along horizontal axis as shown in figure 11, it named vertical and
horizontal zoning. We calculate the zoning features according to equation (11) for every region
and derive 6 features. So at the end of zoning process, we obtain 13 features for each character.


b)
Region 1
Region 2
Region 3


a)
Region 3 Region 2 Region 1

Figure 11: Vertical and horizontal zoning a) vertical zoning b) horizontal zoning.


7.2. Geometrical features

These features are obtained from 1) mass center of a character area and the mass centers of
the 4 regions obtained of lattice zoning, 2) Intersection points of vertical and horizontal lines
with a character, and 3) Distance between character border and vertical and horizontal walls.
For every mass centers, two features are defined, angle and distance. So at the end we extract 10
features for a character. In order to determine angle and distance for every five mass center, we
need to localize the reference point with coordinate (0, 0). So the reference point for a character
International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


77

region and four lattice zoning regions are considered to be at left-bottom of the corresponding
area as shown in Figure 12. Remaining geometric features have been used for recognizing the
car plate's characters before [12]. We use the method to derive some features. In fact, we would
like to guess appearance of character with these characteristics. Now we suppose a character
size is being XY. After counting the character intersections with vertical and horizontal lines,
the two matrixes (1X) and (Y1) are determined. Figure 13 shows a sample Farsi character,
"", and some crossing horizontal and vertical lines. The two matrixes are divided to three parts
and the maximum values of every 6 parts are computed and used as features. The third
geometry feature is distance between a character border and vertical and horizontal walls. These
distances are the first active pixel of a character with the left wall and the last active pixel of the
character with the right wall.



Figure 12. Mass center and its angle for character and 4 regions obtained of
lattice zoning.

(a) (b)
Figure 13. Samples of Intersection points of vertical and horizontal lines with
character a) vertical intersection points b) horizontal intersection points.


(a)
(b)
Figure 14: Samples of distance between character border and surrounding walls
a) distance with top and bottom walls b) distance with left and right walls.

International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


78


(b) (a)
Figure 15. Sample of horizontal and vertical projection related to character " "
a) vertical projection b) horizontal projection.

In contrast, it is clear that the vertical distance means distance between the first active pixel of a
character with the top wall and the last active pixel of the character with the bottom wall. Figure
14 shows a sample of distance between the Farsi character, "", border and the surrounding
walls. In this process, we obtain 4 matrixes, two with size 1X and two with size Y1. We
divide every matrix into three equal parts and consider the largest distance in each part as a
feature. In this way we have determined 12 features for each character.

7.3. Statistical features

At the last step of feature extraction, we consider the statistical characteristics of character
[14]. In this section we study the statistical properties related to the vertical projection and the
horizontal projection of characters. Horizontal projection means that moving on the horizontal
axis and calculating projection of columns. Vertical projection means that moving on vertical
axis and calculating projection of rows. To perform this purpose, first we draw the vertical and
horizontal histogram and then calculate the statistical characteristics of them. In order to draw
these histograms, we calculate sum of the active pixels in each vertical and horizontal lines. It is
clear that the length of horizontal projection is the character columns and length of vertical
projection is the character rows. Figure 15 shows a sample of horizontal and vertical projection
related to Farsi character "" which is also used in previous steps. Statistical properties that can
be extracted from these histograms are in according to equation (13)-(18):


= == =
= == =
1 L
0 i
i i
Z P Z m ) ( (13)


= == =
= == =
1 L
0 i
i
2
i 2
Z P m Z Z ) ( ) ( ) ( (14)


= == =
= == =
1 L
0 i
i
3
i 3
Z P m Z Z ) ( ) ( ) ( (15)


= == =
= == =
1 L
0 i
i
4
i 4
Z P m Z Z ) ( ) ( ) ( (16)


= == =
= == =
1 L
0 i
i
2
Z P Z U ) ( ) ( (17)
) ( log ) ( ) (
i 2
1 L
0 i
i
Z P Z P Z e


= == =
= == = (18)
where m is mean, ) (Z
2
is variance, ) (Z
3
is the third order of central moment, ) (Z
4
is the
fourth order of central moment, ) (Z U is a criterion for uniformity, and ) (Z e is entropy of
International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


79

histogram. L in horizontal histogram is number of columns and in vertical histogram is number
of rows. ) (
i
Z P is the probability that class i occurs. In this way, we determine 6 features for
each horizontal and vertical histogram.

8. Recognition experimental results

During character analysis in section 7, we obtain 53 features (zoning features are 13,
geometric are 28, and statistical are 12). In order to recognize an unknown character we should
use a classifier, we found neural networks may be the best. As there is just one letter in Farsi
license plate as shown in figure 6, we employ two neural networks to recognize letters and
numbers as well. The first classifier is to recognize the numeric characters and contains 53


Table 3: Accuracy of the characters recognition for our proposed algorithm.


Type of image

Number
of image
Accuracy
(%)
Distance
Short
(<3m)
40 95
Normal
(>3m & <
20m)
119 95.8
Angle
Low
(<30)
40 97.5
High
( >30 & <70)
38 94.7
Low contrast
(dirty , reflected or
deformed )
38 92.1

Multiple plate

19 84

neurons in input layer, 35 neurons in middle layer and 9 neurons in output layer. Second
classifier is to recognize the alphabetic characters and contains 53 neurons in input layer, 45
neurons in middle layer and 13 neurons in output layer. Number of neurons in middle layers
obtains by try and error. Table 3 reports the accuracy of character recognition. As it can be seen
in second column of table 3 (the number of image), we have run the recognition algorithm on
those plates that we detected them correctly. In addition even one character does not recognize
correctly we consider the algorithm has been failed. Any way, it is easy to compute that our
algorithm for classification fails just for 16 images while the total numbers of processing images
are 294. It means we achieved accuracy equal 94.5% in average which is satisfaction.

9. Conclusion

We have presented a reliable method for Farsi license plate detection and characters
recognition. The method can be used for images those include more than one car, or the camera
International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition International Journal of Signal Processing, Image Processing and Pattern Recognition
Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011 Vol. 4, No. 1, March 2011


80

has been rotated and so there is angle between license plate and camera, or the plate is dirty and
deformed as well as the normal images. The proposed algorithm for license plate detection has
been run on the provided database which includes 300 images and the obtained average
accuracy is appropriate. We have also employed the artificial neural network classifier to
recognize characters. Although the algorithm has been used for Farsi license plate detection, we
believe it can be used for numerical signs and municipality plates as well.

References

[1] W.Wie, M.Wang and Z.Huang, An automatic method of location for number plate using color feature,
international conference on image processing, vol.1, pp.782-785, 2001.
[2] KL.Kim, K.Jung and JH.Kim, Color texture-based object detection: an application to license plate
localization, the first international workshop on pattern recognition with support vector machines, pp. 293-309,
2002.
[3] G.H.Ming, A.L.Harvey and P.Danelutti, Car number plate detection with edge image improvement, Forth
International Symposium on signal processing and its application, vol. 2, pp. 597-600, 1996.
[4] W.Jia, H.Zhang and X.He , Region-based license plate detection, Journal of Network and Computer
Applications, vol.30 , pp. 1324- 1333, 2007.
[5] D.Zheng, Y.Zhao and J.Wang, An efficient method of license plate location, Elsevier, pattern recognition
letters, vol.26, pp.2431- 2438, 2005.
[6] V.Abolghasemi, A.Ahmadyfard, A Fast Algorithm for License Plate Detection, Springer-Heidelberg, Lecture
notes in computer science (LNCS) 4781, pp.468- 477, 2007.
[7] Park.S.H, Kim.K.I and Kim.H.J, Locating car license plate using neural networks, Electron.letter.35 (17),
pp.1475-1477, 1999.
[8] F.Wang, L.Man, B.Wang, Y.Xiao, W.Pan and X.Lu, Fuzzy-based algorithm for color recognition of license
plates, Elsevier, pattern recognition letters, vol.29, pp.1007-1020, 2008.
[9] N.Ezaki, M.Bulacu and L.Schomaker, Text detection from natural scene images: towards a system for visually
impaired persons, International conference on pattern recognition (ICPR), IEEE Computer Society, pp. 683-
686 , 2004.
[10] B.Gatos, I.Pratikakis and S.J.Perantonis, Adaptive degraded document image binarization, Elsevier, pattern
recognition, vol.39, pp. 317- 327, 2006.
[11] J.Jiao, Q.Ye, Q.Huang, "A configurable method for multi-style license plate recognition", Elsevier, pattern
recognition, vol.42, pp.358-369, 2009.
[12] X.Pan, X.Ye, S.Zhang, "A hybrid method for robust car plate character recognition", Elsevier, engineering
applications of artificial intelligence, vol.18, pp.963-972, 2005.
[13] S.Abdleazeem, E.El-sherif, "Arabic handwritten digital recognition", Springer-Heidelberg, international journal
on document analysis and recognition (IJDAR), vol.11, pp.127-141, 2008.
[14] A.Broumandnia, J.Shanbehzadeh, "Fast Zernike wavelet moments for Farsi character recognition", Elsevier,
image and vision computing, vol.25, pp.717-726, 2007.

You might also like