License Plate Automatic Recognition based on Edge

0 downloads 0 Views 1MB Size Report
Abstract-In this paper, we present an Automatic License. Plate Recognition System (ALPRS) to identify license plates which is an application of image ...
Downloaded from http://iranpaper.ir

License Plate Automatic Recognition based on Edge Detection Pooya Sagharichi Ha

Mojtaba Shakeri

Faculty of Computer and IT Engineering Islamic Azad University, Qazvin Branch Qazvin, Iran [email protected]

Faculty of Computer and IT Engineering Islamic Azad University, Qazvin Branch Qazvin, Iran [email protected]

Abstract-In this paper, we present an Automatic License

6

Plate Recognition System (ALPRS) to identify license plates which is an application of image processing. The main process of ALPRS is divided into four steps:

The noise in the image is

removed by using FMH filter. A simple algorithm is used for background subtraction. Canny edge detection is used to localize the license plate location. Finally, letters and digits are extracted through template matching technique. The proposed algorithms

Fig. I. Iran number plat

have two advantages: First, the method has strong robustness against noise. Second, it can deal with license plates with different

There are four types of number plates being used in Iran:

colors. The performance of the algorithm is tested in a real-time video stream. Based on the result, our algorithm shows the

I. Private vehicle's number plate consists of white background with black letters and digits on it.

missing rate is almost 16% from 70 vehicle images.

Keywords-image processing; image subtraction; canny edge

2. Public transportations number plate consists of yellow background with black letters and digits on it.

detection; license plate recgonition; 1.

INTRODUCTION

3. Governmental vehicles have a red background with white letters and digits constitute their number plates.

In the Intelligent Transportation Systems (ITS), the Automatic License Plate Recognition System (ALPRS) is a must. Nowadays, vehicles play an important role in transportation and their application is increasing rapidly. ALPRS usage have shown to have positive effect on controlling vehicle traffic. It is also very important for the development in the transportation infrastructure globally, especially in the developing countries such as Iran, where the ITS have been rising since few years ago. ALPRS is an image processing technology that identifies vehicles by tracking their number plate without direct human intervention. ALPRS is also known by other various terms such as automatic license plate recognition, automatic license plate reader, number plate tracking, car plate recognition, vehicle number plate recognition, automatic vehicle identification, etc. The features of a standard number plate are as follows: background color, character color, character size, aspect ratio of number plate, font style, etc. Aspect ratio is a very important factor in vehicle's number plates and it is deducted by dividing number plates' width by it's height. Recognition of Iranian vehicle's number plates is difficult in comparison to foreign number plates because it follows particular standard shown in Figure 1 in which: represent two-digit state district code, represent one­ letter code, represent three-digits code and represent actual registration number that is unique for each city of Tran.

4. Police vehicles number plates are composed of a green background and white letters and digits. The ALPRS has many applications including traffic monitoring, controlling and stolen vehicles detection. For a human being it is very easy to detect the number plate but for a machine it is really a difficult task because of the following reasons: Weather conditions (rain, snow, fog) responsible for incurring image noise.

I.

2.

Noise that can occur during camera capture.

3.

Lighting conditions that will change image contrasts.

4. Wrong plate or camera position that results distortion. 5.

Dirty plates may difficulties in image detection.

6.

Low resolution of the vehicle image.

into

The framework for this research is adapted as shown in Figure 2 which includes 4 phases:

978-1-5090-2169-7/16/$3l.00 ©2016 IEEE 170

I.

Pre-processing

2.

Vehicle detection and tracking

Downloaded from http://iranpaper.ir

3.

License plate location

A.

4.

Character extraction

The captured input image is RGB type. The purpose of converting RGB image into gray scale image is to reduce the number of colors. Red, Green and Blue components are separated from 24bit color value of each pixel and 8bit color value is converted.

Capture Video

1

I I

Convert RGB to gray scale

)1

Vehicle detection

pre-processing Convert to Binary

Noise Removal

I I

Initialize -

background frame

Subtraction background and current frame

,I

Segmentation using T hresholding

Contrast enhancement

Character extraction License plate Segmentation

Fig. 3. Gray scale image ---

I

Recognition

!

I

Edge detection

B. Noise removal

There are various noise removal techniques but the median filter choice because it does not blur edge of vehicles. It's the weak point is that it might remove narrow lines and comers, for solution of problem FIR median hybrid (FMH) [1] filters were used. The evolution of a FMH filter:

Localization of plate

Alphanumeric Text

Fig. 2. Flow chart of proposed method

In this paper, we propose a multi-phase solution approach for our ALPRS. The proposed algorithms have two advantages: First, the method has strong robustness against noise. Second, it can deal with license plates with different colors. The remainder of this work is organized as follows: Section 2 discus is mainly used to improve the contrast of the image, enhance the processing speed, and to reduce the noise in the image. Present vehicle detection and tracking in section 3, Tn Section 4 the exact location of number plate is detected from whole vehicle image and then extracted that portion of image, introduce an efficient way to filter out the segmentation results, Results of the methods described in this paper are presented in Section 5. Finally, future works and conclusions are given in Section 6. II.

median [9(x,Y),91(X,Y),9z(X,y)]

fFMH (x,y)

=

91(x,y)

=

median [9(X,y), gew(X,y),9ns(X,y)]

9z(X,y)

=

median [9(X,y),9ne(X,y),9se(X,y)]

For low resolution images a median filter is used to remove noise, after median filter process is spatial filter used finally the last process is sharpening of an image to increase resolution. C. Contrast enhancement

Contrast is an important factor in any subjective evaluation of image quality. Tn visual perception, contrast is determined by the differences in color and brightness of the object with other objects. Histogram equalization is a method for spreading the histogram of pixel's level more effectively TTT.

VEHICLE TRACKING

Vehicle tracking is a commonly used technique for vehicle detection. A simple background subtraction [2] followed by background subtraction is used in this project to recognize a moving object, the major reason for using this algorithm is that it is simple and can be implemented of a real-time system. There are many challenges in developing a good background subtraction algorithm :

PRE-PROCESSING

Tn Pre-Processing firstly Red Green Blue (RGB) image is converted into gray scale image and then the noise of an image is removed using median filter, finally contrast enhancement is done using histogram equalization.

171

Downloaded from http://iranpaper.ir

C. Threshoulding 1.

To subtract the moving object from the current frame we use a certain amount of threshold. To do so, we use the following equation [0, 1].

It must be resistant against changes in illumination.

2. It should avoid detecting non-stationary background objects such as moving leaves, rain, snow and shadows cast by moving objects.

g(x,y)

=

3. It should be sensitive to changes made onto static background (background model). Image subtraction will detect moving regions by subtracting the current image pixel-by-pixel from a reference background image that is created by averaging images over time in an initialization period. First it initializes a background image, then by subtracting current frames (in which moving objects are present) from the background image, the moving object will be distinguished and detected. Ideal results will be achieved when background image and current frame both have the same sizes. Finally two images will be present: one is the current foreground and the other one is background model as shown in Fig 4.

[

(x,othy) rs;:::s: T

{10 i[

e i e

BackGro un d 5 u btracti on

Current F"""e

BackGround

Fig. 5. Image subtraction

IV.

The edge detecting an image significantly reduces the amount of data and filters out useless information, while preserving the important structural properties in the image. There are several edge detection methods used, For example, error minimization, maximization object function, fuzzy logic[3], morphological[4], genetic algorithm[5], neural network[6] and Bayesian approach[7]. The canny edge detection is an operator which is a useful algorithm to determine a wide range of edges in a noisy image [8,9].The algorithm runs in 4 separate steps:

Fig. 4. Background and foreground model

A. initialization backgroundframe The background frame initialization is very important because it will be referred to as the reference frame. The initial background image will be using median pixel brightness.

l. Use the Gaussian filter G(m,n) to smooth out the image f(m,n). This will reduce noise and texture.

B. Background subtraction Background subtraction is a technique in the fields of image processing and computer vision wherein an image's foreground is extracted for further processing, comparing pixel by pixel (x, y) of the both frames where a pixel at location (x, y) in the current image f (x, y) is marked as foreground if

I

[(x,y) - b(x,y)1

LICENSE PLATE LOCATION

>

g(x,y) Ga(x,y) =

G(m,n) is given by :

Ga(x,y)

=

Threshold

l_ _ e V21[(52

*

[

[(x,y) x2+ y2

]

-----zo:z-

2. Compute gradient of g(x,y): Threshold is a predefmed parameter. The background image B is updated by Infinite impulse response (TTR) filter. It is marked as the foreground frame:

Bt +

1

=

aIt +

(1

+

M(x,y) ()(X,y)

a)Bt

-

-

172

ii

=

tan

-1

(x,y) gJ, (x,y) X,Y)] [ggy(x,y x( ) +

Downloaded from http://iranpaper.ir

3. Peak detection (non-maximum suppression along edge normal) removes pixels that are not considered to be part of an edge. 4. Hysteresis threshold along edges, canny does use two thresholds (upper and lower): if ( pixel gradient> upper threshold) The pixel is accepted as an edge Else if ( pixel gradient