Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

License Plate Extraction Using Adaptive Threshold and Line Grouping

A. Ravi Theja, Shashank Jain, Abhishek Aggarwal and V. Krishna Rao Kandanvli, Member, IEEE
Department of Electronics and Communication Engineering Motilal Nehru National Institute of Technology Allahabad, India aravitheja1988@gmail.com, shashank4189@gmail.com, abhiinnitald@gmail.com, krishnaraonit@yahoo.co.in The difficulties faced by real time recognition systems are poor image resolution caused by blur due to the distance between the camera and the car, poor lighting, low contrast due to overexposure, reflection or shadows and license plate obscured because of dirt etc. The robustness of any system depends on how well it is able to tackle these issues. Several approaches have been suggested to deal with the problems associated with license plate localization. These include vertical edge density methods [1]-[5], line grouping [4] and morphological operations [5]. Vertical edge density methods are reliable when the blur, due to the distance between the camera and plate, is low and consequently, the vertical edges in the license plate can be detected successfully by the edge detector. The shape of the license plate is a more reliable feature than the vertical edges, as it is more resistant to blurring. In [4], line grouping has been employed initially to detect the presence of license plate like shapes in the image and upon failure of line grouping, vertical edge density has been used. In line grouping, lines are fitted on the edge segments which are obtained by connecting the edge pixels detected from a canny edge detector [10]. These lines, prior to further processing, are filtered on the basis of their length such that the dimensions of the license plate lie between their respective thresholds (MinWidth length of plate MaxWidth and MinHeight Height of plate MaxHeight).

Abstract License plate recognition system is an essential tool for the Traffic Police Department and so, is widely being used for road traffic surveillance in many countries. This paper aims at locating the license plate in any given traffic surveillance image, by detecting the rectangle like shapes in that image. Line grouping algorithm extracts these shapes in the input image to locate the license plate. But its accuracy falls sharply for images where the license plate boundary suffers from occlusions leading to broken boundaries. The use of adaptive threshold and contours, instead of canny edge detector, to extract the line segments greatly increases the accuracy of line grouping algorithm, which is also verified by the results. Keywords-adaptive threshold; contours; license extraction; line extraction; line grouping; occlusion plate

I.

INTRODUCTION

The importance of automatic license plate recognition systems is greatly increasing due to the heavy accretion in the number of motor vehicles every year and such systems have already been installed in many countries including UK, US and Korea. UK has an extensive automatic number plate recognition (ANPR) CCTV network and the police are capable of tracking any car in the whole country using this network. The first step in any recognition system is to locate the license plate in the image or video, as the success of recognition is directly dependent on the success of the localization of the license plate.

(a)

(b)

Figure 1. Input Image with license plate suffering from occlusions and edge image with broken or discontinuous boundaries

The plate boundaries normally suffer from occlusions. When these boundaries are processed according to the above process, each of the boundary yields two or more than two shorter lines instead of a single boundary line (as shown Figure 1). The shorter lines are further filtered out due to their length and so the plate is not detected in the subsequent process. In general, there are two stages in the plate recognition process. In first stage, the color image is converted to a binary image. In second stage, in order to obtain the plate location, the binary image is processed via various techniques. The canny edge detector [4] relies on the pixel gradient at the boundaries of the plate region and its output is prone to occlusions and noise. Whereas adaptive thresholding [6] is not affected by occlusions in the boundary of the plate region as it relies on the contrast in pixel values rather than the pixel gradient. The advantage of using adaptive threshold is to eliminate unimportant regions in the image. This will reduce the number of lines extracted so that the next stage has lesser data to process. In [6], apart from adaptive thresholding, horizontal scanning and vertical projection methods have been used to extract the license plate. In this paper, we have used adaptive thresholding to extract the line segments. By line grouping algorithm [4], the line segments are grouped to locate the license plate. The results obtained are compared with [4] to illustrate the effectiveness of using adaptive thresholding for line extraction. This paper is organized as follows. In Section II, the line extraction and line grouping is explained. Section III gives the experiments and results and Section IV concludes this paper. II. LINE EXTRACTION AND GROUPING

conditions X1 to X11]). The thresholds have been set for each camera configuration. III. EXPERIMENTS AND RESULTS The presented adaptive threshold and line grouping algorithm is coded in C using Intels OpenCV library and it is tested on a 2.8 GHz Pentium D processor with 512Mb RAM. The method, described in [4], is also implemented in C and it will run on the same machine. While implementing [4], the line extraction process is altered by extracting contours from the binary image returned from canny edge detector [8]. The sides of the polygon are extracted by using the polygon approximation [9] of these contours. The extracted sides are then processed by applying the conditions in [4]. For comparing the presented method with [4], a set of 40 images are selected where the boundaries of the license plate suffered from occlusions or blurring. The results are shown in Table I. Table I
Method COMPARISON OF RESULTS Number of Images Tested Correct Rate Average number of Rectangle groups Detected in X11 11 Rejection Rate

Line grouping with Canny Line grouping with Adaptive Thresholding

40

37.5%

62.5%

40

87.5%

12.5%

A. Line Extraction The input color image is first converted to grayscale image by using the method described in [11]. The grayscale image is processed with adaptive thresholding process [7]. The mask size is such that it never fits inside the plate and always has a considerable portion outside the plate region in all positions. The threshold value used in adaptive thresholding is calculated as explained in [7]. The contours in the binary image are extracted using the method described in [8] and then they are approximated by polygons [9]. While approximating the contours with polygons, the parameter, specifying the distance of the most distant point from the accumulated approximation, is kept a fraction of the total length of the contour. The sides of the polygon are extracted and further processed in stage B. B. Line Grouping [4]
This stage extracts line segments and preserves only the ones satisfying the pre-specified conditions [4] (see [4,

It is observed that the thresholds for line grouping with canny edge detector are broader as compared to the thresholds with adaptive thresholding. The reason is that the lines extracted by canny, obtained from the broken boundaries of the plate, are shorter than the original boundaries of the license plate. Therefore, the thresholds MinWidth, MaxWidth, MinHeight and MaxHeight are set to be broader. Otherwise, the plate is not detected, as the lines making the boundary are filtered out in the initial stage due to condition X2 and X4 in [4]. Due to the broader thresholds set for the method in [4], the number of rectangle groups formed by condition X11 is more as compared to the presented method. IV. CONCLUSION

The accuracy of line grouping algorithm, reported in [4], is 98%, but it is reduced significantly when applied on occluded plate boundaries or blurred images. The reason for the loss in performance can be traced to the noncontiguous boundaries returned by canny and the broader thresholds set to compensate for the broken boundaries. The use of adaptive threshold and contour method improves the performance of the line grouping method as it gives

contiguous plate boundaries to process. Application of adaptive threshold on the input image in figure 1 results into an image shown in figure 5. With the help of presented algorithm, the license plate has been detected for images shown in Figures 2, 3 and 4.

REFERENCES
P. Rattanathammawat and T. H. Chalidabhongse, A Car Plate Detector using Edge Information, Proc. Int. Symp. Communications and Information Technologies (ISCIT06), IEEE Press, 2006, pp. 1039-1043, doi: 10.1109/ISCIT.2006.339936. [2] A. M. Al-Ghaili, S. Mashohor, A. Ismail, and A. R. Ramli, A New Vertical Edge Detection Algorithm and its Application, Proc. Int. Conf. Computer Engineering & Systems (ICCES08), IEEE Press, 2008, pp. 204-209, doi: 10.1109/ICCES.2008.4772997 [3] Jian-Feng Xu, Shao-Fa Li and Mian-Shui Yu, Car License Plate Extraction using Color and Edge, Proc. Int. Conf. Machine Learning and Cybernetics, IEEE Press, August 2004, vol. 6, pp. 3904 - 3907. [4] Gisu Heo, Minwoo Kim, Insook Jung, Duk-Ryong Lee and Il-Seok Oh, Extraction of Car License Plate Regions Using Line Grouping and Edge Density Methods, Proc. Int. Symp. Information Technology Convergence (ISITC07), IEEE Press, November 2007, pp. 37-42, doi: 10.1109/ISITC.2007. 79 [1]

[5] F. Faradji, A.H. Rezaie and M. Ziaratban, A Morphological-Based License Plate Location, Proc. Int. Conf. Image Processing (ICIP07), IEEE Press, SeptemberOctober 2007, vol. 1, pp. I-57-I-60, doi:10.1109/ ICIP.2007.4378890 [6] Liu Ying and Li Nannan, Design of License Plate Recognition System Based on the Adaptive Algorithm, Proc. Int. Conf. Automation and Logistics (ICAL08), IEEE Press, September 2008, pp. 2818-2821, doi: 10.1109/ICAL.2008.4636655 [7] A. Jain, Fundamentals of Digital Image Processing, Englewood Cliffs, NJ: Prentice-Hall, 1986. [8] S. Suzuki and K. Abe, Topological structural analysis of digital binary images by border following, ScienceDirect Computer Vision, Graphics and Image Processing, vol. 30, April 1985, pp. 32-46, doi: 10.1016/0734-189X(85)90016-7 . [9] D. Douglas and T. Peucker, Algorithms for the reduction of the number of points required to represent a digitized line or its caricature, Cartographica, December 1973, vol. 10, pp. 112122, doi:10.3138/ FM57-6770-U75U-7727. [10] J. Canny, A computational approach to edge detection, IEEE Trans. on Pattern Analysis and Machine Intelligence, November 1986, vol. 8, pp. 679698, doi: 10.1109/TPAMI.1986.4767851 [11] W. Wharton and D. Howorth, Principles of Television Reception, London: Pitman, 1971.

. (a) (b)

Figure 2. Input Image and its corresponding output

(a)

(b)

Figure 3. Input Image and its corresponding output

(a) Figure 4. Input Image and its corresponding output

(b)

(a)

(b)

Figure 5. Input Image in figure 1 on applying adaptive threshold and the contours extracted from the corresponding image

You might also like