robust license plate detection

Upload: soporific

Post on 08-Apr-2018

251 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 Robust License Plate Detection

    1/8

    MITSUBISHI ELECTRIC RESEARCH LABORATORIEShttp://www.merl.com

    Robust License Plate Detection UsingCovariance Descriptor in a Neural Network

    Framework

    Fatih Porikli, Tekin Kocak

    TR2006-040 November 2006

    Abstract

    We present a license plate detection algorithm that employs a novel image descriptor. Instead of using conventional gradient lters and intensity histograms, we compute a covariance matrix of low-level pixel-wise features within a given image window. Unlike the existing approaches, thismatrix effectively captures both statistical and spatial properties within the window. We normal-ize the covariance matrix using local variance scores and restructure the unique coefcients intoa feature vector form. Then, we feed these coefcients into a multi-layer neural network. Sinceno explicit similarity or distance computation is required in this framework, we are able to keepthe computational load of the detection process low. To further accelerate the covariance matrixextraction process, we adapt an integral image based data propagation technique. Our extensiveanalysis shows that the detection process is robust against noise, illumination distortions, androtation. In addition, the presented method does not require careful ne tuning of the decisionboundaries.

    IEEE International Conference on Advanced Video and Signal Based Surveillance (AVSS 2006)

    This work may not be copied or reproduced in whole or in part for any commercial purpose. Permission to copy in whole or in partwithout payment of fee is granted for nonprot educational and research purposes provided that all such whole or partial copies includethe following: a notice that such copying is by permission of Mitsubishi Electric Research Laboratories, Inc.; an acknowledgment of the authors and individual contributions to the work; and all applicable portions of the copyright notice. Copying, reproduction, orrepublishing for any other purpose shall require a license with payment of fee to Mitsubishi Electric Research Laboratories, Inc. Allrights reserved.

    Copyright c Mitsubishi Electric Research Laboratories, Inc., 2006201 Broadway, Cambridge, Massachusetts 02139

  • 8/7/2019 Robust License Plate Detection

    2/8

    MERLCoverPageSide2

  • 8/7/2019 Robust License Plate Detection

    3/8

    Robust License Plate Detection Using Covariance Descriptor in a NeuralNetwork Framework

    Fatih PorikliMitsubishi Electric Research Labs

    Tekin Kocak Polytechnic University

    Abstract

    We present a license plate detection algorithm that em-ploys a novel image descriptor. Instead of using conven-tional gradient lters and intensity histograms, we computea covariance matrix of low-level pixel-wise features withina given image window. Unlike the existing approaches, thismatrix effectively captures both statistical and spatial prop-erties within the window. We normalize the covariance ma-trix using local variance scores and restructure the uniquecoefcients into a feature vector form. Then, we feed thesecoefcients into a multi-layer neural network. Since no ex-plicit similarity or distance computation is required in thisframework, we are able to keep the computational load of the detection process low. To further accelerate the covari-ance matrix extraction process, we adapt an integral imagebased data propagation technique. Our extensive analysisshows that the detection process is robust against noise, il-lumination distortions, and rotation. In addition, the pre-sented method does not require careful ne tuning of thedecision boundaries.

    1 Introduction

    Even though license plate detection systems startedemerging in late 80s [9], only recently it became a main-stream computer vision application by gaining popularity insecurity and trafc monitoring systems. Often the extractedinformation is used for enforcement, access-control, andow management, e.g. to keep a time record for automaticpayment calculations or to ght against crime. Still, ro-

    bust detection of different types of license plates in varyingposes, changing lighting conditions and corrupting imagenoise without using an external illumination source presentsa challenge.

    Existing approaches diversify from rule based determin-istic methods [ 5]-[4] to more elegant training based classi-ers [6]-[2]. A simple approach is based on the detection of the license plate boundaries [ 5]. The input image is rst pro-cessed to amplify the edge information using a customized

    gradient lter. Then, Hough transformation is applied to de-tect parallel line segments. Coupled parallel lines are con-sidered as license plate candidates. Another approach usesgray level morphology [ 4]. This approach focuses on lo-cal appearance properties of license plate regions such asbrightness, symmetry, orientation, etc. Candidate regionsare compared with a given license plate image based on thesimilarity of these properties.

    Classier based methods learns different representationsof the license plates. In a color texture based approach [ 6],a license plate region is assumed to have discriminatory tex-ture properties, and a support vector machine (SVM) clas-sier is used to determine whether a candidate region cor-responds to a license plate or not. Only the template of aregion is fed directly to the SVM to decrease the dimension-ality of the representation. Next, LP regions are identiedby applying a continuously adaptive mean-shift algorithmto the results of the color texture analysis. A recent algo-rithm [ 2] imposes the detection task as boosting problem.

    Over several iterations, the AdaBoost classier selects thebest performing weak classier from a set of weak ones,each acting on a single feature, and, once trained, combinestheir respective votes in a weighted manner. This strongclassier is then applied to sub-regions of an image beingscanned for likely license plate locations. An optimizationbased on a cascade of classiers, each specically designedusing the false positive and false negative rates, helps to ac-celerate the scanning process. In addition to single framedetection techniques, there exists methods that take advan-tage of video data [8] by processing multiple frames at thesame time.

    One main drawback of all the above methods is that their

    performance highly depend on the strong assumptions theymade on the appearance of the license plates. Most meth-ods cannot handle in-plane and out-plane rotations, and in-capable of compensating imaging noise and illuminationchanges. Enlarging the training dataset with rotated trainingsamples often deteriorates performance and increases falsepositive rate.

    Many different image representations, from aggregatedstatistics to textons to appearance models, have been used

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/7/2019 Robust License Plate Detection

    4/8

    Figure 1. Covariance matrix generated for 7 features.

    for license plate detection. As a general rule, a regiondescriptor should be invariant to geometric and radiomet-ric distortions but competent enough to distinguish licenseplates from the background clutter under uncontrolled con-ditions. Histograms are popular representations of imagestatistics. They are easy to compute, however, they disre-gard the spatial arrangement of feature values and do notscale efciently to higher dimensions. Appearance modelsprovide spatial discrimination, but they are highly sensitiveto the pose, scale and shape variations. Texture representa-tions are often computationally expensive and scale depen-dent.

    We developed a feature covariance matrix descriptor thatcaptures not only the appearance but also the statisticalproperties of image regions. This descriptor has low dimen-sionality in comparison to many other approaches and it isinvariant to in-plane rotations. In general, a single covari-ance matrix extracted from a region is sufcient to matchthe region in different views and poses. Covariance matrixof any region has the same size, thus it enables comparingany regions without being restricted to a constant windowsize.

    In the following sections, we explain how we constructthe covariance matrix and train the neural network classier.Then, we give several examples of license plate detection,

    present performance graphs and comparison results with astate-of-art weighted orientation histogram approach.

    2 Covariance Descriptor

    We denote one dimensional, unit normalized intensityimage as I . The method can also be generalized to othertype of images, e.g. multi-spectral. Let F be the M N ddimensional feature image extracted from I as

    F (x, y ) = ( I ,x ,y ) (1)

    where the function can be any pixel-wise mapping such ascolor, image gradients I x , I xx , .. , edge magnitude, edge ori-entation, lter responses, etc. This list can be extended byincluding higher order derivatives, texture scores, radial dis-tances, angles and temporal frame differences in case videodata is available.

    For a given rectangular window W F , let {f k }k =1 ..nbe the d-dimensional feature vectors inside W . Each fea-ture vector f k represents a pixel (x, y ) within that window.Since we will extract the mutual covariance of the features,

    the windows can actually be any shape not necessarily rect-angles. Basically, covariance is the measure of how muchtwo variables vary together. We represent each window W with a d d covariance matrix of the features

    C W =cW (1, 1) cW (1, d)

    .... . .

    cW (d, 1) cW (d, d )(2)

    =1

    n 1

    n

    k =1

    (f k )( f k )T

    where is the mean vector of all features. The diagonalcoefcients represent the variance of the corresponding fea-tures. For example, the i th diagonal element represents thevariance for the i th feature we measure. The off-diagonalelements represent the covariance between two differentfeatures. Fig. 1 shows a sample covariance matrix for a

    given image.We construct the feature vector f k using two types of

    mappings; spatial features that are the functions of the pixelcoordinates, and appearance attributes, i.e., color, gradient,etc., that are obtained from the pixel color values. As spatialfeatures, the coordinates may be directly associated with theappearance features;

    f k = [x y I (x, y ) I x (x, y ) ... ] (3)

    or using polar coordinates

    f k = [ r (x , y ) (x , y ) I (x, y ) I x (x, y ) ... ] (4)

    where(x , y ) = ( x x 0 , y y0) (5)

    are the relative coordinates with respect to window center(x 0 , y0), and

    r (x , y ) = ( x 2 + y 2)12 (6)

    is the distance from the (x 0 , y0) and

    (x , y ) = arctanyx

    (7)

    is the orientation of the pixel location.Note that, using Euclidean coordinates makes the covari-

    ance descriptor strictly rotation variant. Even though usingthe distance r from the window center as the coordinate fea-ture provide rotation invariance, it destroys the connectivityalong the lines passing through the origin. In other words,polar coordinates is blind towards the pattern modicationsin case such modications are on the same radial circle asillustrated in Fig. 2.

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/7/2019 Robust License Plate Detection

    5/8

    Figure 2. Top : rotation, bottom distortion (only outerrim is rotated).

    To make covariance representation rotation invariant, weuse a frequency transform function g of coordinates as

    f k = [g(x , y ) r (x , y ) I (x, y ) I x (x, y ) ... ] (8)

    We dene the frequency transform function g as

    g(x , y ) = e i

    2 r ( x ,y )r max

    + (x ,y )

    (9)

    where r max is a normalizing constant corresponding to themaximum radius of the window W . Since the frequencytransform feature gives complex covariances, we take themagnitude of the covariance coefcients when we constructthe covariance matrix.

    We computed the covariance distances for the rotatedand distorted images in Fig. 2 where the top row corre-sponds to rotated images and the bottom row shows theimages that only the pixels at the same radial distance arerotated. The top row in Fig. 2 shows the distances of the ro-

    tated covariance matrices constructed using the frequencytransform and the bottom row corresponds to polar coordi-nates. As visible, the radially symmetric feature r generatesalmost identical results for the rotated and distorted images,In other words, it fails to differentiate the distortion fromrotation even though it is rotation invariant. On the otherhand, the covariance responses of the frequency transformfeature changes according to the amount of the distortion.In addition, it is rotation invariant.

    3 Detection Algorithm

    We impose the license plate detection as a classierbased binary recognition problem. We adapt an off-linetrained neural network to determine whether a given imageregion corresponds to a license plate or not.

    In training phase, we compute pixel-wise image fea-tures including spatial gradients and moments. We modeleach positive (license plate) and negative (non-licenseplate) training image via a covariance descriptor introducedin [10] and feed this information into a neural network with

    Figure 3. Top : rotation, bottom distortion.

    +1,-1 labels respectively. We employ a feed-forward back-propagation type of neural network with three internal lay-ers. Neural networks are made of nodes that their state canbe described by activation values. Each node generates anoutput signal based on its activation. Nodes are connectedto each other very specically, each connection having anindividual weight. Each node sends its output value to allother nodes to which they have an outgoing connection. Thenode receiving the connections calculates its activation bytaking a weighted sum of the input signals. In other words,each node acts as a single perceptron that has a linear de-cision surface. The output is determined by the activationfunction based on this activation. Networks learn by chang-ing the weights of the connections. We use a three layernetwork to impose nonlinear decision boundaries while pre-venting from overtting to the training data. The number of inputs is same as the number of unique coefcients. Eachlayer has a weight matrix, a bias vector, and an output vec-tor. A graph of this network is shown in Fig. 4.

    In detection phase, we scan the image at different scalesand test each scanning window whether it corresponds to alicense plate or not. Normally, such an exhaustive searchwould be slow. Thus, we adapt an integral image basedfast covariance matrix extraction method [ 7] to achieve thesearch in linear time. We restructure the unique coefcientsof the covariance matrix into a vector form and send thisvector to the trained neural network to compute the activa-

    Figure 4. A three-layer, 28-input feed-forward back-propagation neural network used for all features.

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/7/2019 Robust License Plate Detection

    6/8

    Figure 5. Sample detection result by scanning windows.

    tion function score. For example, for a 7 7 covariancevector, there are 28 unique coefcients. The sign of thescore indicates the estimated class, e.g. positive for licenseplates and negative for non-license plates. The network usesa non-linear sigmoid transfer function, which calculates itsoutput as

    tansig (z ) =2

    1 + e 2z 1 (10)

    to make sure that the output remains within a speciedrange, which is [ 1, 1]. A sample detection result is givenin Fig. 5. This detection is done by scanning each imageusing a xed size window. For unknown license plate size,the scanning can be executed in multiple image resolutionskeeping the minimum detection window constant.

    We want to emphasize that the covariance matrices donot lie in Euclidean space, thus, their distance can not becomputed by simple matrix subtraction. Instead, it is re-quired to nd the generalized eigenvalues of two matri-ces [3]. The proposed neural network based framework successfully eliminates this costly operation by convert-ing problem into comparison of separate covariance valuesstructures into a feature vector form.

    4 Experiments

    We used only a sparse set of positive examples, 300 li-cense plate samples, and 3000 non-license plate samplesto train the neural network. We assessed the performanceusing non-overlapping datasets consist of 300 positive and3000 negative images. We aimed to reect the real-lifecondition that the database is unbalanced. Sample positivetraining images are shown in Fig. 6.

    We tested different feature combinations for the covari-ance descriptor as given in Table 1. To make a fair eval-uation, we compared our results with the weighed orienta-tion histogram descriptor that is proven to outperform otherfeatures in human detection [1]. This descriptor computesan orientation histogram using pixels gradient orientations.The bin value is incremented by the gradient magnitude.The histogram is then assigned as the feature vector. In ad-dition, we collected the gradient responses to each image in

    Figure 6. Positive samples (gray level images are used).

    several bins, and ltered out the desired information in re-spective bins to focus mainly on the vertical and horizontalfeatures using a set of positive samples.

    In all cases, we used the same dimensionality, i.e. 28unique coefcients in covariance descriptors and 28 bins fororientation histograms. We computed feature vectors foreach sample and feed these features into the same neuralnetwork to nd out which method is more efcient for the

    same set of samples.The training and test data consist of manually extracted

    105 32 license plate images captured from a cameramounted on a street lamp pole overlooking a stop sign. Weobserved that with the higher resolution data the perfor-mance of the orientation histogram method remains same.Whereas, its performance severely degrades as the resolu-tion of the samples becomes smaller. Thus, histogram ap-proach is not suitable for low-resolution data.

    Figure 7 shows the performances of the covariance de-scriptors and orientation histogram. These ROC curves ob-tained from the test data by applying thresholds in the range[ 0.9, 0.9] to the likelihood score computed by the neuralnetwork. As visible, the covariance features with the samedimensionality produce much better detection results thanthe orientation histogram method. Even though its dimen-sion is almost half i.e. 15 vs. 28, the feature vector obtainedfrom 5 5 covariance descriptor gives as similar results asthe orientation histogram. Moreover, orientation histogrammethod is highly sensitive to the selected likelihood thresh-old value of the neural network; the range of the true posi-tive and true negatives varies signicantly as the thresholdchanges. As shown, all of the tested covariance descrip-tors provided comparably more consistent results indicatingthey are less sensitive to the selected threshold value.

    Table 1. List of Features

    Features Numberg,r,I , |I x |, |I y |, |I xx |, |I yy | C 1x,y, I , |I x |, |I y |, |I xx |, |I yy | C 2x,y, I , |I x |, |I y | C 5 5histogram H

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/7/2019 Robust License Plate Detection

    7/8

    Figure 7. Performance graphs under controlled lightingand noise free conditions for accurately aligned images.

    Figure 8. ROC curves for added noise N (0, 0.04) .

    In another simulation, we contaminated the training andtest data with Gaussian noise N (0, 0.04), i.e. zero-mean,0.04 variance, which is a severe contamination. The ROCcurves are given in Fig. 8. As seen, the true positive ratesare signicantly decreased for all descriptors, however, co-variance descriptors still provided more accurate results.

    We tested the sensitivity for in-plane rotations in Fig. 9.We randomly rotated both training and tested images withinthe [ 20, 20] degrees and retrained the neural network. Weobserved degradation of the performance for the orienta-

    tion histogram H p hi and frequency transform covariancedescriptor C 2 . Persistently, the covariance descriptor us-ing Euclidean coordinates C 1 gave identical results by out-performing the other methods. One possible explanation isthat the license plates are composed of characters and therotation of the training data, in a way, corresponds to theshufing of these characters around the window centers bykeeping the covariance response of C 1 almost intact.

    To analyze the robustness against the illumination

    Figure 9. ROC curves for random rotation in the rangeof [ 20, 20] degrees around the window center. In otherwords, the training and test images are not aligned.

    Figure 10. Intensity values of the test images are dis-torted.

    changes, we distorted the intensity values of the test sam-ples and applied them to the original neural networks thatwere trained by the original data. By doing this, we wantedto simulate the real-life conditions where the intensity of the acquired images may vary due to the external lightingconditions. Even though we compensate for the illumina-tion changes when we construct the orientation histogram,it still failed to achieve its performance when it was tested

    with the undistorted data as shown in Fig. 10. Yet, the co-variance descriptor is proven to less sensitive towards theillumination changes due to its intrinsic property that it doenot use the intensity mean but the intensity variance. Thisenables the covariance descriptor to automatically normal-ize for the varying illumination conditions. To provide acomprehensive comparison, we also show the above resultsin the Fig. 11 .

    As a nal test, we tested the performance of the covari-

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/7/2019 Robust License Plate Detection

    8/8

    Figure 11. ROC curves of various cases are shown alto-gether.

    Figure 12. Comparison of C 1 and C 2 .

    ance descriptors C 1 and C 2 that contains the Euclidean co-ordinate an frequency transform features respectively. Werandomly rotated only the test images and applied these im-ages to the original neural networks of trained for these de-scriptors. As shown in Fig. 12, the frequency transform fea-ture provided much better results. This indicates that thefrequency transform is a more competent representation incases that the amount of the rotation is not embedded in thetraining data, which is what generally happens in actual ap-

    plications.The detection time of each frame depends on the number

    of candidate windows scanned and tested. Our current im-plementation runs at 100,000 windows per second, which issuitable for most real-time detection applications. Further-more, the integral image based covariance construction [ 7]signicantly accelerates the extraction process. Computa-tion of all 7 7 covariance matrices takes only 20msec fora 640 480 image.

    5 Conclusions

    We presented a license plate detection method based on anovel descriptor. The covariance descriptor effectively cap-tures both spatial and statistical properties of target patterns.The covariance representation is robust against in plane ro-

    tations of license plates, and severe image noise. Since themean is ltered, it is almost invariant to severe illumina-tion changes. Our tests show that the neural network frame-work provides adaptability to out plane rotations as well.Once the training is done, the detection process is very fast.We compared our algorithm with a state-of-art detectionmethod based on the weighted histograms of orientation.Our results show that the proposed method outperforms thisapproaches in all cases.

    References

    [1] N. Dalal and B. Triggs. Histograms of oriented gradients forhuman detection. In Proc. IEEE Conf. on Computer Visionand Pattern Recognition, San Diego, CA, 2005. 4

    [2] L. Dlagnekov. Car license plate, make, and model recogni-tion. In Proc. IEEE Conf. on Computer Vision and PatternRecognition, San Diego, CA, 2005. 1

    [3] W. F orstner and B. Moonen. A metric for covariance matri-ces. Technical report, Dept. of Geodesy and Geoinformatics,Stuttgart University, 1999. 4

    [4] J. Hsieh, S. Yu, and Y. Chen. Morphology based license platedetection from complex scenes. 2002. 1

    [5] V. Kamat and S. Ganesan. An efcient implementation of the hough transform for detecting vehicle license plates us-ing dsp. In Proceedings of Real-Time Technology and Appli-

    cations , pages 5859, 1995. 1[6] K. Kim, K. Jung, and J. Kim. Color texture-based object de-

    tection: an application to license plate localization. In Lec-ture Notes in Computer Science, Springer , pages 293309,2002. 1

    [7] F. Porikli and O. Tuzel. Fast extraction of covariance matri-ces using integral images. In Proceedings of Intl Conferenceon Image Processing, ICIP , 2006. 3, 6

    [8] C. Rahman, W. Badawy, and A. Radmanesh. A real timevehicle license plate recognition system. In Proceedings of the IEEE on Advanced Video and Signal Based Surveillance,AVSS03 , 2003. 1

    [9] V. Sgurev, G. Gluhchev, and D. Mutafov. Recognition of carregistration numbers. In Problems of Engineering Cybernet-ics and Robotics , volume 27, pages 7985, 1987. 1

    [10] O. Tuzel, F. Porikli, and P. Meer. Region covariance: A fastdescriptor for detection and classication. In Proc. 9th Eu-ropean Conf. on Computer Vision, Graz, Austria, volume 2,pages 589600, 2006. 3

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-