Automatic car number plate detection using morphological ... - CiteSeerX

2 downloads 0 Views 227KB Size Report
filters based on it and top-hat operators. The method can be applied to access control systems supervising the car traffic in the restricted areas. Streszczenie.
Marcin IWANOWSKI Warsaw University of Technology, Institute of Control and Industrial Electronics EC Joint Research Centre, Institute of Environment and Sustainability

Automatic car number plate detection using morphological image processing Abstract. The paper describes a detection method of car number plates on digital images. The method inputs the graytone image of a car and extracts from it the characters on the number plate. The proposed method makes use of the morphological operators: morphological reconstruction, filters based on it and top-hat operators. The method can be applied to access control systems supervising the car traffic in the restricted areas. Streszczenie. Artykuł opisuje metod automatycznego wykrywania numerów rejestracyjnych samochodów na obrazach cyfrowych. Na wejciu podawany jest obraz samochodu w skali szaro ci, działanie zaproponowanego algorytmu polega na znalezieniu znaków numeru rejestracyjnego samochodu. Proponowana metoda wykorzystuje operatory morfologiczne: rekonstrukcj morfologiczn , bazuj ce na niej filtry oraz operatory cylindryczne. Metoda mo e by  stosowana w systemach kontroli dost pu nadzoruj cych ruch samochodów w obszarach chronionych.

Keywords: image processing, mathematical morphology, access control. Słowa kluczowe: przetwarzanie obrazów, morfologia matematyczna, kontrola dost pu.

1. Introduction A development of image acquisition techniques and equipment has resulted in efficient cameras and powerful computers at reasonable price. Due to that fact the image processing techniques become more and more popular and widespread. Nowadays image processing applications are solving growing number of technical tasks. The domain where the growth of applications is easily remarkable is a support for security and authentication. One of the most useful application areas is the access control of persons or objects. A kind of such systems - systems supervising car traffic in parkings, closed areas or even city centers are installed more and more often. This paper describes an image processing method which allows detecting a car number plate on the image presenting a car entering the supervised area. The method is intended to be a first part of the identification process which consists also of a second part - the recognition of detected characters. One of the possible approaches to the latter task was recently presented in [1]. In this paper automatic car number plates’ detection is performed by means of mathematical morphology. It makes use of an intelligent filtering of the input image based on a set of filters removing unnecessary image elements, but preserving the position and shape of characters of the car number plate. 2. Tools of mathematical morphology In its nearly 30-years history mathematical morphology proved to be a very efficient tool successfully applied to image processing. It is based on local minimum and maximum operators and consists of a huge number of various operators, methods and algorithms [2,3,4,6]. 2.1. Morphological filters Morphological filters [5] of opening and closing are based on a combination of morphological dilation and erosion [1,2,3,6] performed one after another: (1)

γ B( n ) ( f ) = δ B( nT) (ε B( n ) ( f )) ; ϕ B( n ) ( f ) = ε B( nT) (δ B( n ) ( f ))

where  represents the operator of opening and  – the operator of closing, B stands for structuring element,  and

represent erosion and dilation respectively. A structuring element defines a neighborhood pattern inside which the minimum (erosion) and maximum (dilation) operators are performed. Transposed structuring element is defined as: B T = {( −i,− j ) : (i, j ) ∈ B} .

Fig. 1 Eight-connected neighborhood (a), elementary (b), vertical (c) and horizontal (d) structuring elements.

Opening and closing remove from the image its elements (objects, noise) respectively lighter and darker then the background. The side-effect of these filters is however the disturbance of the shape of objects which are not removed. Contrary to linear filters (mean, Gaussian etc.) this disturbance is not blurring but a distortion of shape (contours) of objects on the image. Depending on the size of operation and on the shape of structuring element various filters can be obtained. The application of directional structuring elements consisting of neighbors in a particular direction allows removing the image objects with directional properties (like e.g. lines of given thickness or length). In the operators which the proposed method consists of, three kinds of structuring elements are used, all of them in the 8-connected grid of pixels (fig.1a): the elementary structuring element – containing the closest neighborhood (fig.1b) as well as vertical (fig.1c) and horizontal (fig. 1d) T ones. All of them are symmetric (i.e. B =B) 2.2 Top-hat operators Filters described above remove image objects or noise of certain kind. Sometimes, however, instead of removing, one needs to detect objects of particular characteristics. In order to do it top-hat operators has been defined as follows:

WTH ( n) ( f ) = f − γ ( n ) ( f ) , BTH ( n ) ( f ) = ϕ ( n) ( f ) − f

(2)

where WTH stands for white top-hat and BTH – for the white top-hat. The descriptions ‘white’ and ‘black’ indicates types of objects which are detected by a particular operator – lighter or darker than the background. The mentioned above, main property of top-hat operator can be applied to contrast enhancement. Indeed, by

combining the original image with images with detected objects, the contrast improves. This combination is performed by adding to the original image the result of white top-hat and by subtracting the result of a black top-hat: (3) g = f + WTH ( n ) ( f ) − BTH ( n) ( f ) = 3 f − γ ( n ) ( f ) − ϕ ( n) ( f ) 2.3. Morphological reconstruction The positive filtering effect of the above filters is reduced by an important disadvantage of change of shape distortion of the objects on the image. To eliminate this effect advanced morphological filters based on the morphological reconstruction – reconstruction filters - should be used. To define a morphological reconstruction one has to introduce first the geodesic version of erosion and dilation. The geodesic dilation and erosion of size 1 are defined as, respectively: (4)

δ g (1) ( f ) = δ

(5)

ε g (1) ( f ) = ε

(1)

(f )∧ g

(1)

( f )∨ g

where f represents an input image, g – a mask image, ∧ and ∨ stands for the minimum and maximum values among pixels of the same coordinates on both images computed for all pixels. The geodesic erosion and dilation of a given size n are defined as, respectively: (6)

ε g( n ) ( f ) = ε g(1) (ε g(1) ....ε g(1) ( f )...)) n −times

(7)

δ g ( n) ( f ) = δ g (1) (δ g (1) ....δ g (1) ( f )...)) n −times

The image created by successive erosions/dilations has an important and interesting property – for certain n (which depends on particular images) the resulting image stops to change – the idempotence is reached. Owing to that property, the reconstruction operators can be defined. The reconstruction by dilation (or just reconstruction) is defined as: (8) Rg ( f ) = δ (gi ) ( f ), The size i is defined as the lowest number such that: δ (gi ) ( f ) = δ (gi +1) ( f ). By duality, the reconstruction by erosion (or dual reconstruction) is defined as: (9) Rg∗ ( f ) = ε (gi ) ( f ), where i is the lowest number such that ε (gi ) ( f ) = ε (gi +1) ( f ). Image f in both above operators is usually called a marker image. 2.4. Fast reconstruction algorithm The reconstruction operator on which the reconstruction filters are based can be computed using the definition as indicated by the eq. 8 and 9. Unfortunately this approach is a time consuming one. There exist however faster algorithms based on a structure of queue of points [7]. The application of queue allows reducing the computational load of successive image scanning. The algorithm makes use of the initial image f, which is also the final, output one and of the mask image g. It also requires three principal operations on the FIFO queue: queue_push which adds an image pixel into the queue,

queue_pop, which takes it back, and a Boolean function queue_empty which returns true if there in no pixel in the queue, and false otherwise. Algorithm of fast hybrid grayscale reconstruction for i :=0 to x : for j := 0 to y: f(i,j):= min{g(i,j), max{f(i-1,j-1),f(i,j-1),f(i+1,j-1 ,f(i-1,j),f(i,j)} } for i :=x to 0 step -1 : for j := y to 0 step -1: f(i,j):= min{g(i,j), max{f(i+1,j),f(i-1,j+1),f(i,j+1) ,f(i+1,j+1),f(i,j)}} if exists [m,n] in {[1,0],[-1,1],[0,1],[1,1]} such that (f(i+m,j+n) < f(i,j)) and (f(i+m,j+n)

Suggest Documents