+ All Categories
Home > Documents > A vehicle license plate detection method using region and edge based methods

A vehicle license plate detection method using region and edge based methods

Date post: 07-Dec-2016
Category:
Upload: des
View: 213 times
Download: 0 times
Share this document with a friend
12
A vehicle license plate detection method using region and edge based methods q Mahmood Ashoori Lalimi a , Sedigheh Ghofrani a,, Des McLernon b a Electrical Engineering Department, Islamic Azad University, South Tehran Branch Tehran, Iran b School of Electronic and Electrical Engineering, The University of Leeds, Leeds, UK article info Article history: Available online xxxx abstract In this paper, a license plate detection system is implemented. For this purpose, we improve the contrast at possible locations where there might be a license plate, we propose a filtering method called ‘‘region-based’’ in order to smooth the uniform and background areas of an image, we apply the Sobel operator and morphological filtering to extract the vertical edges and the candidate regions respectively, and finally, we segment the plate region by considering some geometrical features. In fact the novelty and the strength of our license plate detection system is in applying the region-based filtering that decreases the run time and increases the accuracy in the two final stages: morphological filtering and using the geometrical features. The experimental results show that our proposed method achieves appropriate performance in different scenarios. We should mention that our sys- tem is reliable because the accuracy is above 92% in average for different scenarios and it is also practical because of the low computational cost. Ó 2012 Elsevier Ltd. All rights reserved. 1. Introduction An intelligent transportation system (ITS) is an important tool for analyzing and controlling the moving vehicles in cities and highways [1] and in recent years much research on ITS has been carried out. Nowadays automatic vehicle license plate (VLP) recognition is a key ingredient for any ITS such as security control of restricted areas, traffic law enforcements, auto- matic payment of tolls on highways and parking management systems. In these examples, a camera captures the vehicle images and a computer processes the captured images, detects the car license plate from the input image and then reads the information on the license plate by applying various image processing and optical character recognition techniques. Gen- erally, an automatic VLP recognition system is made up of four modules: image pre-processing, license plate detection, char- acter segmentation and character recognition (Fig. 1). Among these four modules in Fig. 1, license plate detection is the most important and the most difficult task in any VLP recognition system because of images with low contrast, blurring and dirty plates. The most common solutions for VLP detection include analyzing the texture [1,2], edge extraction [3–6], morpholog- ical filtering [7,8], color feature [7,9], combining of edge statistics and color feature [10], combining of edge and morphology operations [11], Hough transform [12], neural networks [6], learning-based approaches [13], Gabor filtering [14] and Wave- let analysis [15]. An edge approach is normally simple and fast. Texture [1,2] and edge based methods [3–6] are widely used to find plate candidates under different lighting conditions. These methods use this fact that since characters are written on a plate, so the whole area contains rich edge and texture information. However, this approach is sensitive to noise. Color [7,9] 0045-7906/$ - see front matter Ó 2012 Elsevier Ltd. All rights reserved. http://dx.doi.org/10.1016/j.compeleceng.2012.09.015 q Reviews processed and recommended for publication to Editor-in-Chief by Deputy Editor Dr. Ferat Sahin. Corresponding author. Address: No. 9, 14th Street, Pakistan Street, Shahid Beheshti Street, Pars Gostareh, 15317 (1531764611), Tehran, Iran. Tel.: +98 21 88731446; fax: +98 21 88532683. E-mail addresses: [email protected] (M.A. Lalimi), [email protected] (S. Ghofrani), [email protected] (D. McLernon). Computers and Electrical Engineering xxx (2012) xxx–xxx Contents lists available at SciVerse ScienceDirect Computers and Electrical Engineering journal homepage: www.elsevier.com/locate/compeleceng Please cite this article in press as: Lalimi MA et al. A vehicle license plate detection method using region and edge based methods. Comput Electr Eng (2012), http://dx.doi.org/10.1016/j.compeleceng.2012.09.015
Transcript

Computers and Electrical Engineering xxx (2012) xxx–xxx

Contents lists available at SciVerse ScienceDirect

Computers and Electrical Engineering

journal homepage: www.elsevier .com/ locate/compeleceng

A vehicle license plate detection method using region and edgebased methods q

Mahmood Ashoori Lalimi a, Sedigheh Ghofrani a,⇑, Des McLernon b

a Electrical Engineering Department, Islamic Azad University, South Tehran Branch Tehran, Iranb School of Electronic and Electrical Engineering, The University of Leeds, Leeds, UK

a r t i c l e i n f o

Article history:Available online xxxx

0045-7906/$ - see front matter � 2012 Elsevier Ltdhttp://dx.doi.org/10.1016/j.compeleceng.2012.09.01

q Reviews processed and recommended for public⇑ Corresponding author. Address: No. 9, 14th Stree

88731446; fax: +98 21 88532683.E-mail addresses: [email protected]

Please cite this article in press as: Lalimi MA etElectr Eng (2012), http://dx.doi.org/10.1016/j.

a b s t r a c t

In this paper, a license plate detection system is implemented. For this purpose, weimprove the contrast at possible locations where there might be a license plate, we proposea filtering method called ‘‘region-based’’ in order to smooth the uniform and backgroundareas of an image, we apply the Sobel operator and morphological filtering to extract thevertical edges and the candidate regions respectively, and finally, we segment the plateregion by considering some geometrical features. In fact the novelty and the strength ofour license plate detection system is in applying the region-based filtering that decreasesthe run time and increases the accuracy in the two final stages: morphological filtering andusing the geometrical features. The experimental results show that our proposed methodachieves appropriate performance in different scenarios. We should mention that our sys-tem is reliable because the accuracy is above 92% in average for different scenarios and it isalso practical because of the low computational cost.

� 2012 Elsevier Ltd. All rights reserved.

1. Introduction

An intelligent transportation system (ITS) is an important tool for analyzing and controlling the moving vehicles in citiesand highways [1] and in recent years much research on ITS has been carried out. Nowadays automatic vehicle license plate(VLP) recognition is a key ingredient for any ITS such as security control of restricted areas, traffic law enforcements, auto-matic payment of tolls on highways and parking management systems. In these examples, a camera captures the vehicleimages and a computer processes the captured images, detects the car license plate from the input image and then readsthe information on the license plate by applying various image processing and optical character recognition techniques. Gen-erally, an automatic VLP recognition system is made up of four modules: image pre-processing, license plate detection, char-acter segmentation and character recognition (Fig. 1). Among these four modules in Fig. 1, license plate detection is the mostimportant and the most difficult task in any VLP recognition system because of images with low contrast, blurring and dirtyplates. The most common solutions for VLP detection include analyzing the texture [1,2], edge extraction [3–6], morpholog-ical filtering [7,8], color feature [7,9], combining of edge statistics and color feature [10], combining of edge and morphologyoperations [11], Hough transform [12], neural networks [6], learning-based approaches [13], Gabor filtering [14] and Wave-let analysis [15]. An edge approach is normally simple and fast. Texture [1,2] and edge based methods [3–6] are widely usedto find plate candidates under different lighting conditions. These methods use this fact that since characters are written on aplate, so the whole area contains rich edge and texture information. However, this approach is sensitive to noise. Color [7,9]

. All rights reserved.5

ation to Editor-in-Chief by Deputy Editor Dr. Ferat Sahin.t, Pakistan Street, Shahid Beheshti Street, Pars Gostareh, 15317 (1531764611), Tehran, Iran. Tel.: +98 21

(M.A. Lalimi), [email protected] (S. Ghofrani), [email protected] (D. McLernon).

al. A vehicle license plate detection method using region and edge based methods. Computcompeleceng.2012.09.015

PreprocessingLicense plate

detection

Charactersegmentation

Characterrecognition

Input vehicle image

Recognized licenseplate

Fig. 1. The flowchart of a typical VLP recognition system.

2 M.A. Lalimi et al. / Computers and Electrical Engineering xxx (2012) xxx–xxx

is a distinctive feature which can be used for VLP detection. Using the color feature is useful when the lighting condition isunchanged and stable. In order to perform VLP detection, a combination of these methods may provide a better detectionrate or accuracy. For example, combination of edge statistics and color features [10] and also a combination of edge and mor-phology operations [11] can improve performance. The Hough transform [12] is another technique which attempts to findrectangular shapes. It can be used to find the boundary box of a license plate. Large memory space and a considerableamount of computing time are the main disadvantages of this method. Neural networks are also widely used for VLP detec-tion and recognition. Zhang et al. [13] proposed a learning-based method for VLP detection which uses the ‘‘AdaBoost’’ algo-rithm for generating a strong classifier from a set of weak classifiers. They used both global (statistical) and local (Haar-like)features to detect the license plate. Using a Gabor filter [14] and wavelet analysis [15] are other suggested approaches fortexture analysis which can be used for VLP detection.

In this paper, we present an accurate VLP detection algorithm that is robust to problems such as different lighting, poorweather conditions and varying the distance and angle between the vehicle and the camera. To start with, we increase theimage contrast of plate-like regions by using the one of two possible different methods which gives the best performance.After image enhancement, we propose an efficient algorithm to smooth the non-plate regions. In this paper, we modify theregion-based method [16] and introduce a new method for the Iranian license plate detection. Then by applying morpholog-ical operators, we constitute candidate regions and finally considering the features of each candidate region (the tested fea-tures are: area, aspect ratio, and edge density), the license plate region is localized accurately. Although based on Iranianlicense plate shape and size, some parameters such as the size of structuring element and geometrical features are opti-mized, and for evaluation of the proposed algorithm, we use the database which includes 425 digital images of Iranian vehi-cles with size 480 � 640 pixels, we believe that our approach can be used for foreign vehicle plates as well.

The paper is organized as follows: our proposed method includes different stages, which are image enhancement, region-based filtering and license plate segmentation, are explained in Section 2. The experimental results by considering differentscenarios such as bad weather condition and with various distances or angles between the camera and the vehicle are givenin Section 3 and the paper is concluded in Section 4.

2. The proposed VLP detection algorithm

In this work, we have succeeded in developing an algorithm to detect VLPs in complex scenes. The procedure of our pro-posed method is summarized in the flowchart of Fig. 2. The proposed system is composed of three major parts: imageenhancement, smoothing and filtering non-plate regions by using a region-based procedure and finally accurately localizingthe license plate.

In the following, for image enhancement we try two different methods and then choose the best one. Then for smoothingand filtering non-plate regions, we use the modified region-based algorithm. Finally, by using certain features such as ver-tical edge and geometrical features, the VLP is detected. In this paper, we modify the region-based algorithm and use it for gray-scale images. As it smoothes the non- plate regions and removes the unwanted edges, the algorithm run time decreasesconsiderably and the algorithm accuracy also increase.

2.1. Image enhancement

Since nearly, all vehicle images need some form of enhancement, we try to improve the contrast at locations where theremight be a license plate. This kind of improvement would increase the accuracy achieved by a VLP detection system. For this

Please cite this article in press as: Lalimi MA et al. A vehicle license plate detection method using region and edge based methods. ComputElectr Eng (2012), http://dx.doi.org/10.1016/j.compeleceng.2012.09.015

Image enhancement

Smoothing and filtering non-plateregions using a region-based

procedure

Accurate localizationof license plate

Input image

Detected VLP

Fig. 2. The flowchart of our proposed system for VLP detection.

M.A. Lalimi et al. / Computers and Electrical Engineering xxx (2012) xxx–xxx 3

purpose, we will enhance our images by using intensity variance as well as edge density and then choose the one with thesuperior performance. The selected enhancement method is robust when the distance and angle between the camera and thevehicle are increased. In the following, these two methods are explained in detail.

2.1.1. Intensity varianceZheng et al. [5] used a local variance criterion in order to improve image contrast at regions that include the license plate.

The idea is based on the fact that the local variance of a complex background is much higher than the license plate region. Incontrast, the variance of smoothed regions is considerably low. Using this fact, Zheng et al. [5] proposed an enhancementalgorithm which boosts image contrast at plate-like regions where the local standard deviation of the image intensity isaround 20. The suggested enhancement function is as follows:

PleaseElectr

I0i;j ¼ f ðrwi;jÞðIi;j � Iwi;j

Þ þ Iwi;jð1Þ

where Ii,j and I0i;j denote the pixel values at location (i, j) in the input grayscale image and the enhanced image respectively,and wi,j is a window centered on a pixel belonging to the image at (i, j). Furthermore Iwi;j

and rwi;jare respectively the mean

and standard deviation of the pixels in the window wi,j. The enhancement coefficient function (shown in Fig. 3) is defined by:

0 20 40 60 80 100 1200

1

2

3

4

Enha

ncem

ent C

oeffi

cien

t

Local Standard Deviation

Fig. 3. The graph of enhancement coefficient, f(rwi,j), based on the local standard deviation, rwi;j.

cite this article in press as: Lalimi MA et al. A vehicle license plate detection method using region and edge based methods. ComputEng (2012), http://dx.doi.org/10.1016/j.compeleceng.2012.09.015

(a)

(c)

(b)

Fig. 4. (a) Input grayscale image. Iranian license plate before (b) and after (c) enhancement using the intensity variance method of (1) and (2).

(a)

(b) (c)

Fig. 5. (a) Input grayscale image, (b) vertical edge image and (c) the edge-density image.

4 M.A. Lalimi et al. / Computers and Electrical Engineering xxx (2012) xxx–xxx

PleaseElectr

f ðrwi;jÞ ¼

32

400ðrwi;j�20Þ2þ1

; if 0 6 rwi;j< 20

32

1600ðrwi;j�20Þ2þ1

; if 20 6 rwi;j< 60

1; if rwi;jP 60

8>>><>>>: ð2Þ

As we can see from Fig. 3, those pixels belonging to the input grayscale image with a local standard deviation between 0 and60 are enhanced. The local standard deviation of pixels belonging to the plate region is considered to be around 20. The en-hanced car license plate image using Zheng method is shown in Fig. 4.

2.1.2. Edge densityAbolghasemi and Ahmadyfard [10] used the density of vertical edges (instead of the intensity variance) as the criterion for

local enhancement in plate-like regions. In order to estimate the density of vertical edges, we first convolve the input imagewith the vertical Sobel mask (h(m, n) in Eq. (3)) and thus obtain the gradient image:

hðm;nÞ ¼�1 0 1�2 0 2�1 0 1

264375: ð3Þ

Then by comparing pixel values of the gradient image with a predefined threshold, the vertical edge image was obtained(Fig. 5b). The threshold value is considered to be four times the average absolute value of the gradient image [5]. Continuing,we then estimate the normalized edge density by using the two dimensional (2-D) Gaussian kernel and the result is shown inFig. 5c. In order to improve the input image with respect to the estimation of the edge density (Fig. 5c), an enhancementfunction similar to (1) is used:

cite this article in press as: Lalimi MA et al. A vehicle license plate detection method using region and edge based methods. ComputEng (2012), http://dx.doi.org/10.1016/j.compeleceng.2012.09.015

0 0.2 0.4 0.6 0.8 10

1

2

3

4

Enha

ncem

ent C

oeffi

cien

t

Normalized Edge Density

Fig. 6. The graph of enhancement coefficient, f(qwi,j), based on normalized edge density, qwi,j.

(a)

(b)

(c)

Fig. 7. (a) Input grayscale image. Iranian license plate before (b) and after (c) enhancement using the edge density method of (4) and (5).

M.A. Lalimi et al. / Computers and Electrical Engineering xxx (2012) xxx–xxx 5

PleaseElectr

I0i;j ¼ f ðqwi;jÞðIi;j � Iwi;j

Þ þ Iwi;jð4Þ

where Ii;j; I0i;j and Iwi;j

are as defined in (1), and f ðqwi;jÞ is the enhancement coefficient function and qwi;j

is the normalized edgedensity. The enhancement coefficient is defined as follows:

f ðqwi;jÞ ¼

32

0:32ðqwi;j�0:3Þ2þ1

; if 0 6 qwi;j< 0:3

32

ð0:5�0:3Þ2ðqwi;j

�0:3Þ2þ1; if 0:3 6 qwi;j

< 0:5

1; if qwi;jP 0:5

8>>>><>>>>: ð5Þ

And the plot of f ðqwi;jÞ is shown in Fig. 6. As can be seen in Fig. 6, the regions with normalized edge density in the interval [0

0.5] are enhanced and those greater than 0.5 are left unchanged. Although the interval [0 0.5] is obtained experimentally,never does it change. A sample of the improved image using this edge density method is shown in Fig. 7.

2.1.3. Compare the two enhancement methodsAlthough the performance of these two image enhancement methods ((A) and (B)) is broadly similar in a normal situa-

tion, our experimental results show that the Abolghasemi method (B) is preferred when both the distance and angle betweencamera and vehicle are increased as in two sample images shown in Fig. 8. In order to compare these two image enhance-ment approaches precisely, the algorithms run time and accuracy achieved for 200 different images are given in Table 1. Thetwo algorithms are implemented on the same computer with 2.26 GHz CPU. So in this work we will employ an edge densitymethod for image enhancement.

2.2. Region-based filtering

After image enhancement we try to obtain all candidate regions that may be a license plate. Obviously using vertical edgedetection also extracts many useless long background curves and noisy edges. So, in this paper we employ an algorithm tosmooth and filter non-plate regions from the enhanced image before using the vertical edge detector. The method used is re-gion-based [16]. As the region-based the run time is quite significant), we modify this approach in algorithm was originallyapplied in color images (where as order to use with gray scale images. The applied region-based method is explained asfollows.

An image is typically represented as a 2-dimensional lattice of r-dimensional vectors, where r = 1 for grayscaleimages and r = 3 for color images. The space of the lattice is known as the spatial domain while the gray level or the color

cite this article in press as: Lalimi MA et al. A vehicle license plate detection method using region and edge based methods. ComputEng (2012), http://dx.doi.org/10.1016/j.compeleceng.2012.09.015

(c)

(d)

(e)

(f)

(g)

(h)

(a)

(b)

Fig. 8. (a and b) Input grayscale image. Iranian VLP, (c and f) without enhancement, (d and g) improved using intensity variance method and (e and h)improved using edge density method.

Table 1Comparison two image enhancement methods.

Method Processing time (s) Number of images with enhanced plates (out of 200) Accuracy (%)

Intensity variance �3 125 62.5Edge density �1.3 185 92.5

6 M.A. Lalimi et al. / Computers and Electrical Engineering xxx (2012) xxx–xxx

information is known as the range domain. After proper normalization, we multiply these two domains and obtain a spatial-range domain. Then using region-based filtering in the spatial-range domain, we smooth the non-plate regions in the en-hanced image. Let P and Q refer to the enhanced image and (region-based) filtered image. In addition suppose pi,j is a pixelvalue in location (i,j) that belongs to the enhanced image and qi,j is the (region-based) processed pixel value. For every inputpixel, pi,j, we run the region-based procedure according to the following steps:

1. We construct a normalized Gaussian filter with size (2hs + 1, 2hs + 1). Its central value is equal one and all other values areless than one. The parameter hs controls the Gaussian filter bandwidth and it is called the bandwidth of the spatialdomain. In this work the Gaussian filter (K) has dimensions 13 � 13 (the dimension of the Gaussian filter is obtained fromour experimental results and it is kept constant).

2. The generated K is used as a mask to process the enhanced input image and our pixel normalization procedure isexplained in following. We consider the window values of size (2hs + 1, 2hs + 1) from the enhanced image and name thisnew matrix rA with pi,j the central pixel and others pixels are its neighbors. Now we subtract pi,j from all values in matrixrA according to the following equation:

PleaseElectr

RA ¼ rA � pi;j ð6Þ

so that the value of the central pixel in the new matrix RA is always zero. Using the power rule, we ensure that all elements inthe matrix bRA ¼ ðRAÞ2 are non-negative. So in order to obtain the normalized matrix, rweight, the exponential function below isapplied to each pixel in bRA:

rweight ¼ exp�bRA

h2r

!ð7Þ

where hr is the bandwidth of the range domain. Now all elements belonging to the normalized matrix, rweight, lie between 0and 1 and the central element value is always one.3. Now rweight and K are multiplied:

cite this article in press as: Lalimi MA et al. A vehicle license plate detection method using region and edge based methods. ComputEng (2012), http://dx.doi.org/10.1016/j.compeleceng.2012.09.015

(a) (b)

Fig. 9. (a) Enhanced image by using edge density method, (b) filtered image by using region-based method.

(a) (b)

Fig. 10. Vertical edge image obtained from (a) enhanced image (Fig. 9a), and (b) filtered image (Fig. 9b).

Fig. 11.cropped

M.A. Lalimi et al. / Computers and Electrical Engineering xxx (2012) xxx–xxx 7

PleaseElectr

weight ¼ rweight � K ð8Þ

4. We now form r̂A ¼ rA �weight and sum all values belong to matrix r̂A and call it r̂A. The sum of all values that belong to thematrix weight is also obtained and is named weight. Finally, the new value for pixel pi,j is qi;j ¼ r̂A

weight.

The steps 2–4 are iterated until all the pixels belonging to the enhanced image get new values. A sample filtered imagebased on using this region-based approved is shown in Fig. 9. As can be seen, those regions belonging to the background andnon-plate regions are almost completely smoothed, while the details in the VLP area are considerably less affected. Althoughthe region-based filter is essentially a low pass filter in general and it does not smooth all plate-like regions. As we will showin Fig. 10, filtering based on a region-based approach considerably reduces the detected vertical edges and thereby candidateregions.

2.3. Accurate location of license plate

The aim of this stage is to obtain an accurate location of the license plate region. Vertical edge detection, morphologicalfiltering and geometrical features are used to segment any license plate in an image.

2.3.1. Vertical edge detectorEdge detection is one of the most important processes in image analysis. An edge constitutes a significant portion of the

information contained in an image and thus it is useful to extract these features from an image. An edge map has greatly

(a) (b)

(c)

(a) VLP possible/candidate regions using the morphological process, (b) correct VLP region selected by using three geometrical features, and (c)license plate image.

cite this article in press as: Lalimi MA et al. A vehicle license plate detection method using region and edge based methods. ComputEng (2012), http://dx.doi.org/10.1016/j.compeleceng.2012.09.015

Table 2Three types of Iranian VLP.

Plate type Plate color Character color

Private White BlackPublic Yellow BlackGovernmental Red White

Fig. 12. Three different classes for the Iranian VLP; the left is private; the middle is public; the right is governmental.

Fig. 13. Some sample images from our database of Iranian VLPs.

8 M.A. Lalimi et al. / Computers and Electrical Engineering xxx (2012) xxx–xxx

reduced complexity but retains important information in the image. There are many gradient-based edge detection methodssuch as the Sobel operator and the Canny operator. We have used the Sobel edge detector because it is quick to implementand non-complex.

Please cite this article in press as: Lalimi MA et al. A vehicle license plate detection method using region and edge based methods. ComputElectr Eng (2012), http://dx.doi.org/10.1016/j.compeleceng.2012.09.015

Table 3Accuracy of our proposed method.

Images in different scenarios Number of images Accuracy (%)

Distance Short 100 98Normal 100 94

Angle Low 75 94.6High 75 92

Low quality 75 92Average (425 Images) 94.12

M.A. Lalimi et al. / Computers and Electrical Engineering xxx (2012) xxx–xxx 9

Due to the presence of some characters and text, most edges in the region of a license plate are vertical and so we use thevertical Sobel edge detector. In order to show the benefit of using the region-based procedure, we have performed the ver-tical edge detection (Sobel mask) on an enhanced image (Fig. 9a) and a filtered image (Fig. 9b) and illustrated the results inFig. 10. Comparing Fig. 10a with b, many background edges are automatically discarded when the region-based procedure isused before applying the vertical edge detector. So after convolving the filtered image (Fig. 9b) with the vertical Sobel maskand obtaining the vertical gradient image, we generated a binary image (by adjusting a suitable threshold to get Fig. 10b).

2.3.2. Morphological filteringMathematical morphology is a powerful tool for image analysis and is based on nonlinear neighborhood operations. The

neighborhood is called a structuring element (SE). The basic morphological operations are erosion and dilation:

PleaseElectr

Closing operation I � Sm�n ¼ ðI � Sm�nÞ � Sm�n ð9Þ

Opening operation I � Sm�n ¼ ðI � Sm�nÞ � Sm�n ð10Þ

Vehicle image Edges before using region-

based

Edges after using region-

based

Fig. 14. Original images, first column. Edge images before and after using the region-based filtering, second and third column in order.

cite this article in press as: Lalimi MA et al. A vehicle license plate detection method using region and edge based methods. ComputEng (2012), http://dx.doi.org/10.1016/j.compeleceng.2012.09.015

Vehicle image After applying region-based

License plate

(a)

(b)

(c)

(d)

(e)

(f)

(g)

Fig. 15. License plate detection using region and edge based methods.

10 M.A. Lalimi et al. / Computers and Electrical Engineering xxx (2012) xxx–xxx

where I denotes an edge image extracted from the previous section and � and � denote the dilation and erosion operations,respectively. In addition Sm�n denotes a structuring element (SE) with size m � n and all entries in Sm�n are one. With respectto Iranian license plate shape, a rectangular SE is used. After finding the optimum size of structuring element, it remains con-stant irrespective of camera angle and distance. Performing the closing operation on the edge image (Fig. 10b) and then theopening operation yield several connected regions which are plate candidates. As can be seen in Fig. 11a after morphologicalfiltering many regions in addition to the correct license plate are also possible candidates. Then by employing geometricalfeatures, all candidate regions are discarded except the desired license plate.

Please cite this article in press as: Lalimi MA et al. A vehicle license plate detection method using region and edge based methods. ComputElectr Eng (2012), http://dx.doi.org/10.1016/j.compeleceng.2012.09.015

M.A. Lalimi et al. / Computers and Electrical Engineering xxx (2012) xxx–xxx 11

2.3.3. Geometrical featuresThe result of the previous stage is the retention of a few candidate regions as possible license plates. We now have to find

which candidate is the true and so three important features will be applied to discard the wrong candidate regions. Thesefeatures are areas, aspect ratio and edge density as well:

PleaseElectr

Area : A ¼ H �W ð11Þ

Aspect ratio : AR ¼ H=W ð12Þ

Edge density : ED ¼ 1=nXði;jÞ

Eði; jÞ ð13Þ

where H and W refer respectively to height and width of the region, and E(i, j) is the edge magnitude of each pixel belongingto the region, and n is the total number of pixels existing in the region. We consider the predefined values for these threefeatures and check all candidate regions. By checking the three features ((11)–(13)), the true license plate region is detectedand localized (see Fig. 11b) and then the license plate is segmented accurately (see Fig. 11c). The values for the three featuresare obtained based on our database that includes 425 images. So we mention how the values are achieved but we believewriting the exact values is of no use because they may vary for other databases.

3. Experimental results

In general, there are three classes for an Iranian VLP that summarized in Table 2 and a sample of every license plate areshown in Fig. 12. Although each class uses a different character and has a different plate color, all use 7 numbers in order toobtain a unique license plate. In this paper we will consider private Iranian license plate detection although we believe thatour proposed algorithm can be used for either of the other two classes of Iranian vehicles (or foreign vehicles as well). Asthere are not any standard databases for the vehicle license plate of Iranian cars and so we ourselves collected 425 digitalimages of Iranian vehicles with size 480 � 640 pixels. The proposed images in our database were captured under differentlighting and weather conditions such as sunny, cloudy, rainy, darkness as well as various distances and angles between cam-era and vehicles. Some image samples of our proposed database are shown in Fig. 13. In order to evaluate the accuracy of ourproposed method, we segmented the database into three main categories which include: angle high (30� < / 6 60�) and low(/ 6 30�); distance normal (4 m < d 6 12 m)) and short (d 6 4 m); and low quality due to severe illumination and bad weath-er conditions. Table 3 shows the accuracy achieved by our proposed algorithm under the aforementioned conditions. As canbe seen in Table 3, the average accuracy of our VLP detection system is 94.12% and the proposed method is very robust toillumination changes. Although running the region based filtering takes time, it increases the accuracy for both morpholog-ical filtering and geometrical features by removing most non-plate edges. In order to highlight this property, some examplesof image edges before and after using the region-based filtering are shown in the Fig. 14. As can be seen in Fig. 8, in the imageenhancement section, Zheng’s method [5] is sensitive to real conditions such as long distance and high angle. In the detectionstage, although our accuracy is less than Zheng et al. [5] we believe our image database is more complicated. The perfor-mance of two algorithms can be compared whenever they used exactly the same database. Fig. 15 shows some results ofthe region-based procedure and the detected plates for several vehicle images in our database.

Fig. 15a–d shows the license plate perfectly segmented under conditions such as short distance, normal distance, low an-gle and high angle. In addition Fig. 15e–g shows good results even though there are severe problems such as evening, nighttime and sunlight conditions. Smoothing and filtering non-plate regions using the region-based procedure is the crucial stepin our proposed system. As can be seen in Fig. 15, applying the region-based procedure caused the plate to be detected suc-cessfully. We observed that our algorithm does not work properly for images that have been taken under an extreme viewingangle (greater than 60�) and also for far distances (greater than 12 m) between the camera and the license plate. Two sam-ples of these images are shown in Fig. 16.

Fig. 16. Two sample images (with extreme viewing condition) where our algorithm failed.

cite this article in press as: Lalimi MA et al. A vehicle license plate detection method using region and edge based methods. ComputEng (2012), http://dx.doi.org/10.1016/j.compeleceng.2012.09.015

12 M.A. Lalimi et al. / Computers and Electrical Engineering xxx (2012) xxx–xxx

4. Conclusion

We proposed a simple but efficient license plate detection method in this paper. At first, in order to alleviate problemssuch as low quality of input car images, we improved the image contrast at license plate regions by using two different meth-ods and chose the best one with appropriate performance where the distance and angle between camera and vehicles areprogressively increased. Then we suggested an algorithm in order to smooth and filter the background and non-plate re-gions. Finally, we segmented the license plate region accurately by employing a vertical edge detector, morphological filter-ing and testing three important geometrical features. The proposed algorithm is able to detect license plates with differentsizes, rotation, severe illumination conditions (such as sunlight and shadow) and bad weather condition (such as rain andclouds). Although our proposed algorithm is efficient in detecting any Iranian license plate, we also believe that it can beused for foreign vehicle plates as well.

References

[1] CNE, Anagnostopoulos IE, Anagnostopoulos. A license plate recognition algorithm for intelligent transportation system applications. IEEE Trans IntellTransp Syst 2006;7(3).

[2] Shapiro V, Gluhchev G, Dimov D. Toward a multinational car license plate recognition system. Mach Vision Appl 2006;17(3):173–83.[3] Sarfraz M, Ahmed MJ, Ghazi SA. Saudi Arabian license plate recognition system. In: International conference on geometric modeling and graphics; July

2003. p. 36–41.[4] Wang SZ, Lee HJ. Detection and recognition of license plate characters with different appearances. In: Proceedings of 2003 IEEE intelligent

transportation systems conference, vol. 2, 2003. p. 979–84.[5] Zheng D, Zhao Y, Wang J. An efficient method of license plate location. Pattern Recogn. Lett. 2005:2431–8.[6] Kim S, Kim D, Ryo Y, Kim G. A robust license plate extraction method under complex image conditions. In: Proceedings of the 16th international

conference on pattern recognition, vol. 3, July 2002. p. 216–9.[7] Wei Gang, Guo Jiang, Xing. A study of locating vehicle license plate based on color feature and mathematical morphology. In: 6th International

conference on signal processing, vol. 1, August 2002. p. 748–51.[8] Hsieh JW, Yu SH, Chen YS. Morphology-based license plate detection from complex scenes. In: 16th International conference on pattern recognition,

vol. 3, August 2002. p. 176–9.[9] Shi X, Zhao W, Shen Y. Automatic license plate recognition system based on color, image processing. Lect Notes Comput Sci 2005;3483:1159–68.

[10] Abolghasemi V, Ahmadyfard AR. An edge-based color-aided method for license plate detection. Elsevier J Image Vision Comput 2008.[11] Bai H, Liu C. A hybrid license plate extraction method based on edge statistics and morphology. In: Proceedings of the 17th international conference on

pattern recognition, vol. 2, 2004. p. 831–4.[12] Yanamura Y, Nishiyama D, Soga M, Nakatani H, Saji H. Extraction and tracking of the license plate using hough transform and voted block matching. In:

Proceedings of IEEE intelligent vehicles symposium; 2003. p. 243–6.[13] Zhang H, Jia W, He X, Wu Q. Learning-based license plate detection using global and local features. ICPR 2006;2:1102–5.[14] Kahraman F, Kurt B, Gokmen M. License plate character segmentation based on the gabor transform and vector quantization. Lect Notes Comput Sci

2003;2869:381–8.[15] Kumar S, Khanna N, Chaudhury S, Joshi SD. Locating text in images using matched wavelets. In: Proceedings of the 8th international conference on

document analysis and recognition; 2005.[16] Jia Wenjing, Zhang Huaifeng, He Xiangjian. Region-based license plate detection. J Network Comput Appl 2007;30:1324–33.

Mahmood Ashoori Lalimi received BSc degree in Electronic Engineering from Birjand University, Iran, in 2007, and the MSc. Degree in ElectronicEngineering from Islamic Azad University, South Tehran branch, Iran, in 2010. His research interest is image processing.

Sedigheh Ghofrani recieved BSc degree in Electronic Engineering from Tehran university, Iran, in 1991, the MSc. Degree in communication from IslamicAzad university, south Tehran branch, Iran, in 1997 and Ph.D. in Electronic from Iran university of science and technology, in 2004. She has been theassistant professor of Electrical Engineering Department at the Islamic Azad University, south Tehran branch since 2004. Her area of research includesimage processing and signal processing.

Des McLernon received both his BSc and MSc from the Queen’s University of Belfast, N. Ireland. He then worked on radar systems with Ferranti Ltd. inEdinburgh, Scotland and later joined Imperial College, University of London, where he took his PhD in signal processing. He is currently at the School ofElectronic and Electrical Engineering, the University of Leeds, UK, where he is the Director of Graduate Studies. He has published around 240 journal andconference research papers.

Please cite this article in press as: Lalimi MA et al. A vehicle license plate detection method using region and edge based methods. ComputElectr Eng (2012), http://dx.doi.org/10.1016/j.compeleceng.2012.09.015


Recommended