AUTOMATIC LICENSE PLATE RECOGNITION USING PYTHON

Similar documents
Implementation of License Plate Recognition System in ARM Cortex A8 Board

Keyword: Morphological operation, template matching, license plate localization, character recognition.

Automatics Vehicle License Plate Recognition using MATLAB

Automatic Licenses Plate Recognition System

Vehicle License Plate Recognition System Using LoG Operator for Edge Detection and Radon Transform for Slant Correction

Contrast adaptive binarization of low quality document images

An Improved Bernsen Algorithm Approaches For License Plate Recognition

An Evaluation of Automatic License Plate Recognition Vikas Kotagyale, Prof.S.D.Joshi

Malaysian Car Number Plate Detection System Based on Template Matching and Colour Information

Number Plate Recognition System using OCR for Automatic Toll Collection

Number Plate Recognition Using Segmentation

A Review of Optical Character Recognition System for Recognition of Printed Text

Automatic License Plate Recognition System using Histogram Graph Algorithm

Face Detection System on Ada boost Algorithm Using Haar Classifiers

A NOVEL APPROACH FOR CHARACTER RECOGNITION OF VEHICLE NUMBER PLATES USING CLASSIFICATION

License Plate Localisation based on Morphological Operations

INDIAN VEHICLE LICENSE PLATE EXTRACTION AND SEGMENTATION

FPGA based Real-time Automatic Number Plate Recognition System for Modern License Plates in Sri Lanka

Automated License Plate Recognition for Toll Booth Application

International Journal of Scientific & Engineering Research, Volume 5, Issue 5, May ISSN

MAV-ID card processing using camera images

A Method of Multi-License Plate Location in Road Bayonet Image

Vehicle Number Plate Recognition with Bilinear Interpolation and Plotting Horizontal and Vertical Edge Processing Histogram with Sound Signals

Real-Time License Plate Localisation on FPGA

Smart License Plate Recognition Using Optical Character Recognition Based on the Multicopter

License Plate Recognition Using Convolutional Neural Network

Preprocessing and Segregating Offline Gujarati Handwritten Datasheet for Character Recognition

Recognition Of Vehicle Number Plate Using MATLAB

COMPARATIVE PERFORMANCE ANALYSIS OF HAND GESTURE RECOGNITION TECHNIQUES

I. INTRODUCTION.

Detection of License Plates of Vehicles

Automated Number Plate Recognition System Using Machine learning algorithms (Kstar)

Real Time Word to Picture Translation for Chinese Restaurant Menus

CHARACTERS RECONGNIZATION OF AUTOMOBILE LICENSE PLATES ON THE DIGITAL IMAGE Rajasekhar Junjunuri* 1, Sandeep Kotta 1

AN EXPANDED-HAAR WAVELET TRANSFORM AND MORPHOLOGICAL DEAL BASED APPROACH FOR VEHICLE LICENSE PLATE LOCALIZATION IN INDIAN CONDITIONS

Matlab Based Vehicle Number Plate Recognition

Wheeler-Classified Vehicle Detection System using CCTV Cameras

World Journal of Engineering Research and Technology WJERT

ISSN No: International Journal & Magazine of Engineering, Technology, Management and Research

AUTOMATIC NUMBER PLATE DETECTION USING IMAGE PROCESSING AND PAYMENT AT TOLL PLAZA

Scrabble Board Automatic Detector for Third Party Applications

Efficient Car License Plate Detection and Recognition by Using Vertical Edge Based Method

Study and Analysis of various preprocessing approaches to enhance Offline Handwritten Gujarati Numerals for feature extraction

Nigerian Vehicle License Plate Recognition System using Artificial Neural Network

Volume 7, Issue 5, May 2017

Libyan Licenses Plate Recognition Using Template Matching Method

VEHICLE LICENSE PLATE DETECTION ALGORITHM BASED ON STATISTICAL CHARACTERISTICS IN HSI COLOR MODEL

A Chinese License Plate Recognition System

Detection and Verification of Missing Components in SMD using AOI Techniques

ROBOT VISION. Dr.M.Madhavi, MED, MVSREC

AUTOMATIC LICENSE PLATE RECOGNITION USING IMAGE PROCESSING AND NEURAL NETWORK

Image Extraction using Image Mining Technique

Extraction and Recognition of Text From Digital English Comic Image Using Median Filter

An Image Processing Method to Convert RGB Image into Binary

中国科技论文在线. An Efficient Method of License Plate Location in Natural-scene Image. Haiqi Huang 1, Ming Gu 2,Hongyang Chao 2

Method for Real Time Text Extraction of Digital Manga Comic

Colored Rubber Stamp Removal from Document Images

Text Extraction from Images

Morphological Image Processing Approach of Vehicle Detection for Real-Time Traffic Analysis

Line Segmentation and Orientation Algorithm for Automatic Bengali License Plate Localization and Recognition

Sri Shakthi Institute of Engg and Technology, Coimbatore, TN, India.

Computer Vision. Howie Choset Introduction to Robotics

Automatic Electricity Meter Reading Based on Image Processing

IJRASET 2015: All Rights are Reserved

Real Time ALPR for Vehicle Identification Using Neural Network

Modelling, Simulation and Computing Laboratory (msclab) School of Engineering and Information Technology, Universiti Malaysia Sabah, Malaysia

Real Time Vehicle License Plate Recognition Based on 2D Haar Discrete Wavelet Transform

Iraqi Car License Plate Recognition Using OCR

An Automatic System for Detecting the Vehicle Registration Plate from Video in Foggy and Rainy Environments using Restoration Technique

Automated Number Plate Verification System based on Video Analytics

Integrated Digital System for Yarn Surface Quality Evaluation using Computer Vision and Artificial Intelligence

Proposed Method for Off-line Signature Recognition and Verification using Neural Network

International Journal of Advance Engineering and Research Development

Number Plate Detection with a Multi-Convolutional Neural Network Approach with Optical Character Recognition for Mobile Devices

Open Access An Improved Character Recognition Algorithm for License Plate Based on BP Neural Network

International Conference on Computer, Communication, Control and Information Technology (C 3 IT 2009) Paper Code: DSIP-024

Combined Approach for Face Detection, Eye Region Detection and Eye State Analysis- Extended Paper

Automatic Car License Plate Detection System for Odd and Even Series

Image Processing Based Vehicle Detection And Tracking System

IMAGE TYPE WATER METER CHARACTER RECOGNITION BASED ON EMBEDDED DSP

Identification of Age Factor of Fruit (Tomato) using Matlab- Image Processing

OCR With Background Image Elimination-A Survey

Automated Car Number Plate Detection System to detect far number plates Jatinder Singh 1 Vinay Bhardwaj 2

An Efficient Method for Vehicle License Plate Detection in Complex Scenes

Compression Method for Handwritten Document Images in Devnagri Script

Images and Graphics. 4. Images and Graphics - Copyright Denis Hamelin - Ryerson University

Computing for Engineers in Python

A Real Time Automatic License Plate Recognition Using Optical Character Recognition

An Efficient Color Image Segmentation using Edge Detection and Thresholding Methods

AN EFFICIENT APPROACH FOR VISION INSPECTION OF IC CHIPS LIEW KOK WAH

Displacement Measurement of Burr Arch-Truss Under Dynamic Loading Based on Image Processing Technology

IJSRD - International Journal for Scientific Research & Development Vol. 4, Issue 05, 2016 ISSN (online):

[Mohindra, 2(7): July, 2013] ISSN: Impact Factor: 1.852

Detection of Defects in Glass Using Edge Detection with Adaptive Histogram Equalization

Brain Tumor Segmentation of MRI Images Using SVM Classifier Abstract: Keywords: INTRODUCTION RELATED WORK A UGC Recommended Journal

A Fast Algorithm of Extracting Rail Profile Base on the Structured Light

Eyedentify MMR SDK. Technical sheet. Version Eyedea Recognition, s.r.o.

PHASE PRESERVING DENOISING AND BINARIZATION OF ANCIENT DOCUMENT IMAGE

Linear Gaussian Method to Detect Blurry Digital Images using SIFT

Student Attendance Monitoring System Via Face Detection and Recognition System

Transcription:

AUTOMATIC LICENSE PLATE RECOGNITION USING PYTHON Gopalkrishna Hegde Department of of MCA Gogte Institute of Technology Belagavi Abstract Automatic License Plate Recognition system is a real time embedded system which automatically recognizes the license plate of vehicles. There are many applications ranging from complex security systems to common areas and from parking admission to urban traffic control. Automatic license plate recognition (ALPR) has complex characteristics due to diverse effects such as of light and speed. Most of the] ALPR systems are built using proprietary tools like Matlab. This paper presents an alternative method of implementing ALPR systems using Free Software including Python and the Open Computer Vision Library.[1] Keywords Licenseplate, Computer, Vision, Pattern, Recognition, Python, OCR I. INTRODUCTION The scientific world is deploying research in intelligent transportation systems which have a significant impact on peoples lives. Automatic License Plate Recognition (ALPR) is a computer vision technology to extract the license number of vehicles from images. It is an embedded system which has numerous applications and challenges. Typical ALPR systems are implemented using proprietary technologies and hence are costly. This closed approach also prevents further research and development of the system. With the rise of free and open source technologies the computing world is lifted to new heights. People from different communities interact in a multicultural environment to develop solutions for mans never ending problems. One of the notable contributions of the open source community to the scientific world is Python. Intel s researches in Computer Vision bore the fruit called Open Computer Vision (OpenCV) library, which can support computer vision development.[2] II. PROPOSED SYSTEM In India, basically, there are two kinds of license-plates, black characters in white plate and black characters in yellow plate. The former for private vehicles and latter for commercial, public service vehicles. The system tries to address these two categories of plates. The high-level block diagram of the proposed system is shown in Fig. 1. Prof.P.V Gajanan Department of of MCA Gogte Institute of Technology Belagavi A.Capture The image of the vehicle is captured using a high resolution photographic camera. A better choice is an Infrared (IR) camera. The camera may be rolled and pitched with respect to the license plates.in case of two-dimensional image is divided into four corners, upper left corner of the image, after a DWT transform, the original image, lower left corner of the vertical details, upper right corner of the horizontal details, lower right corner of the component of the original image detail (high frequency). You can then continue to the low frequency components of the same upper left corner of the 2nd, 3rd inferior wavelet transform. Fig. 2. Captured Image (Original image) B.Preprocess Preprocessing is the set algorithms applied on the image to enhance the quality. It is an important and common phase in any computer vision system. For the present system preprocessing involves two processes: Resize The image size from the camera might be large and can drive the system slow. It is to be resized to a feasible aspect ratio. Convert Colour Space Images captured using IR or photo-graphic cameras will be either in raw format or encoded into some 50

multimedia standards. Normally, these images will be in RGB mode, with three channels (viz. red, green and blue). candidate. Connected component analysis is performed to identify the characters in the image. Basic idea is to traverse through the image and find the connected pixels. Each of the connected components (blobs) are labeled and extracted. Fig.4 shows the filtered blobs. E. Segmentation Segmentation is the process of cropping out the labelled blobs. These blobs are expected to be the required portion of the license number. A special algorithm called ImageScissoring[3] is introduced here. In this algorithm, the licenseplate is vertically scanned and scissored at the row on whichthere is no white pixel and the scissored area is copiedinto anew matrix, as in Fig. 5. Fig. 3. Localization (Thresholded image) Number of channels defines the amount color information available on the image. The image has to be converted to gray scale. C. Localize Rear or front part of the vehicle is captured into an image. The image certainly contains other parts of the vehicle and the environment, which are of no requirement to the system. The area in the image that interests us is the license plate and needs to be localized from the noise. Localization is basically a process of binarizing the image. As shown in Fig. 3, the image is converted to black and white. There are two motivations for this operation 1. Highlighting characters and 2. Suppressing background. Localization is done by an image processing technique called Thresholding. The pixels of the image are truncated to two values depending upon the value of threshold. Threshold requires pre-image analysis for identifying the suitable threshold value. Adaptive thresholding technique determines a local optimal threshold value for each image pixel so as to avoid the problem originating from non-uniform illumination. A. Connected Component Analysis Fig. 5. Segmented blobs There are unwanted blobs even after segmentation. These are classified using special algorithms. F. Character Recognition Fig. 6. Classified Blobs Finally, the selected blobs are send to a Optical Character Recognition (OCR) Engine, which returns the ASCII of the license number. A. Python III. TOOLS Python is a remarkably powerful dynamic, object-oriented programming language that is used in a wide variety of application domains. It offers strong support for integration with other languages and tools, and comes with extensive standard libraries. Fig. 4. Connected Components (Blobs) In order to eliminate undesired image areas, a connected component algorithm is first applied to the binarized plate B. OpenCV OpenCV is a library of programming functions for real time computer vision originally developed by Intel and now 51

supported by Will garage. It is free for use under the open source BSD license. The library has more than five hundred optimized algorithms. It is used around the world, with forty thousand people in the user group. Uses range from interactive art, to mine inspection, and advanced robotics. The library is mainly written in C, which makes it portable to some specific platforms such as Digital Signal Processor. Wrappers for languages such as C, Python, Ruby and Java (using JavaCV) have been developed to encourage adoption by a wider audience. The recent releases have interfaces for C++. It focuses mainly on real-time image processing. OpenCV is a cross-platform library, which can run on Linux, Mac OS and Windows. To date, OpenCV is the best open source computer vision library that developers and researchers can think of. C. Tesseract Tesseract is a free software OCR engine that was developed at HP between 1984 and 1994. HP released it to the community in 2005. Tesseract was introduced at the 1995 UNLV Annual Test OCR Accuracy [2] and is currently developed by Google released under the Apache License. It can now recognize 6 languages, and is fully UTF8 capable. Developers can train Tesseract with their own fonts and character mapping to obtain perfect efficiency. IV. IMPLEMENTATION OpenCV with Python is a deadly combination for computer vision. We will now revisit each phase in the pipeline and see how they are implemented using the above tools. A. Capture Starting from point one of capturing the image, OpenCV library has highly optimized algorithms for all image processing operations. OpenCV provides interface for different camera models. The following code snippet explains how to interface an in-built web camera and capture a frame. from opencv import highgui as hg capture = hg.cvcreatecameracapture(0) hg.cvnamedwindow("snapshot") frame = hg.cvqueryframe(capture) hg.cvshowimage("snapshot", frame) B. Preprocess As seen before preprocessing involves resizing and changing color spaces of the source image like any other images processing toolkit opencv also provides fast and quick procedure. Resize original=cv.loadimagem("image.jpg")thumbnail= cv.createmat(original.rows / 10, original.cols / 10, original.type) cv.resize(original, thumbnail) Resize The original image is resized to the dimensions specified in the thumbnail object color spaces conversion. CvtColor(original,gray,CV_RGB2GRAY) The above line of the code converts the original image to gray. More image conversion codes are available at the opencv Wiki[3]. C. Localize Threshold operations is performed in this phase to retain the image quality, adaptive the threshold algorithm are to be used. Previous researches[4] have concluded that Otsu s[5] thresholding algorithm is the efficient way of binarizing the image. cv.threshold(image,binary_image,128,255,cv_thresh_ot SU) The above line of code returns a binary image which is adaptively threshold. The arguments follow the order: 1. Source image, 2. Destination image, 3. Threshold value, 4. Resultant value, and 5. Type of threshold. The type CV_THRESH_OTSU performs Otsu algorithm on the source image. D. Connected Component Analysis cvblobslib is a library to perform binary images connected component labeling. It also provides functions to manipulate filter and extract results from the extracted blobs. The library provides two basic functionalities: Extract 8-connected components in binary or grayscale images. Filter the obtained blobs to get the interest objects in the image. This is performed using the Filter method from CBlobResult. The library is a thread-safe if different object per thread are used myblobs = CBlobResult(binary_image, mask, 0, True) myblobs.filter_blobs(325,2000)blob_count=myblobs.getnum Blobs() The connected components are labeled using the above code snippet. Filter blobs method is used to filter out the blobs of required dimensions. 52

text = image_to_string(image) V. STATISTICS AND RESULTS The system has been put to test for various measurements of performance and accuracy. A. Accuracy Analysis Operation Sample Success Fail Success Ratio License plate localization 100 92 8 92% Character Separation 92 88 4 95.7% Character Recognition 88 83 5 94.3% Fig. 7. Aspect ratio based elimination E. Segmentation Image Scissoring is hard-coded in Python by scanning the image vertically and cropping out white portions. The algorithm is fast and efficient than compared to other predefined image cropping techniques. Segmentation phase also involves classification of the collected blobs and recording only the essential ones. Undesirable blobs occur even after segmentation. These are removed by two methods: B. Performance Analysis During the initial days, the system suffered severe performance faults. It took more than eighteen seconds for recognizing the license plate and extracting the number. Subsequent research on algorithm and code optimization drastically brought down the operation time to two seconds. One of the key factors that determined performance was the size of input image. The Fig. 8 indicates this relationship. 1) Aspect ratio based elimination. 2) Pixel coordinate based selection. Aspect ratio based elimination: The aspect ratio (row/column) of each blob is calculated and recorded. A binaries candidate is sure of containing more characters than unwanted blobs. The mean of the aspect ratios are calculated and compared to all the blobs in turn. The process is explained briefly in the flowchart Fig. 7. If any of them has a larger deviation that blob is removed from the candidate the algorithm was devised based on research experiment through out of the process. The dynamic nature of python is exploited in every step of this algorithm. Pixel coordinate based selection: This algorithm thrives on the fact that license numbers are occurring in the plate in a single set of rows. Effectively, we can detect the edge of the license plate, and select the blobs coming between the minimum and maximum row coordinates. This can reduce the amount of unwanted blobs and make the system more accurate. [2] E. Character Recognition Tesseract OCR engine has a python wrapper which make character recognition quick and easy tesseract. import image_to_string. image = open("blob.jpg") VI. CONCLUSION The message of this research is to show that free and open source technologies are matured enough for scientific computing domains. Python and OpenCV are good points of start for researchers and students of computer vision. The system works satisfactorily for wide variations in illumination conditions and different types of number plates commonly found in India. It is definitely a better alternative to the existing proprietary systems, even though there are known restrictions. [8] 53

VII. ACKNOWLEDGMENT Bunch of thanks to my Teacher Prof P.V Gajanan, Assistant Professor, Department of Masters of Computer Applications Gogte Institute Of Technology Belagavi Karnataka India for mentoring this research. VIII. REFERENCE [1] [2][8]K.M Sajid Automatic License Plate Recognition Using Python and OpenCV with Diagram Picture and Charts [3}rathamesh Kulkarni, Ashish Khatri, Prateek Banga, Kushal Shah, Automatic Number Plate Recognition (ANPR) System for Indian conditions [4] S.V. Rice, F.R. Jenkins, T.A. Nartker, The Fourth Annual Test of OCR Accuracy, Technical Report 95-03. Information Science Research Institute, University of Nevada, Las Vegas,(1995). [5] http://opencv.willowgarage.com/documentation/python/ [6] A.Conci, J. E. R. de Carvalho, T. W. Rauber, A Complete System for Vehicle Plate Localization, Segmentation and Recognition in Real Life Scene, IEEE LATIN AMERICA TRANSACTIONS, VOL. 7, NO. 5, SEPTEMBER 2009 [7] Nobuyuki Otsu (1979). A threshold selection method from gray-level histograms. IEEE Trans. Sys., Man., Cyber. 9: 62-66. [6]Chih-Hai Fana, Yu-Hang Peng, Vehicle License Plate Recognition System Design, Chung Hua Journal of Science and Engineering, Vol. 7, No. 2, pp. 47-52 (2009) 54