You are on page 1of 59

License Plate Recognition By Unique Edge Detection Algorithm 2019-20

CHAPTER 1

INTRODUCTION
The exponential growth in the number of vehicles used in cities and towns is leading to
increase in various crimes such as theft of vehicles, violating traffic rules, hit and run accidents
and trespassing into unauthorized areas etc. Therefore adapting automatic license plate
recognition system is much necessary. Digital image processing techniques were used to
interpret digitized images in order to extract meaningful knowledge from it. These techniques
were broadly classified into four stages: Pre-processing of the captured vehicle license plate
image, detection and extraction of license plate region, segmentation of characters from the
extracted plate using morphological operations and character recognition. In earlier research, the
extraction of license plate region was either done through direct application of sobel edge
detector followed by linear dilation and filling connected components with holes or the image
was converted into a binary image by applying threshold at a certain value.

Fig 1.1: Number plate Recognition

These methods do not produce efficient results when captured license plate image is
subjected to high intensity of light or when the vehicle and license plate are of similar colors.
This problem also exists due to variable factors such as distance, weather and camera quality. In
this paper we discuss a novel algorithm to solve these issues to an extent. In the segmentation

Dept. of CSE, RIT Page 1


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

process morphological operations such as dilation and erosion are used which causes deformity
in the characters. The original font style and size are manipulated, which makes it hard for
character recognition. A unique algorithm is developed for the segmentation of characters
without morphological operations for efficient results in this paper.

The system collects the data and produce use full information. This information is passed
on to the cloud where it can be interpreted. The use of IoT technology has been increasing
exponentially in the recent years. Its drastic growth is due its ability to make things smart and
make it easier to collect and interpret large sets of data through cloud computing. Here the
camera acts as the embedded hardware which collects the data through digitized vehicle images
and spider software is used to process the image to obtain the license plate number, which is then
transferred to cloud through internet for further applications.

All surveillance cameras as well as traffic control cameras can be connected to a cloud
which consists of database of required vehicles. By doing this, all the cameras in an area act as a
single system where each camera acts as an ‘eye’ searching for the vehicles listed in the database
uploaded by the administrator. In this way a ‘universal eye’ could be created making it hard for
the accused to hide the vehicle and also saves time on searching for these vehicles.

The escalating increase of contemporary urban and national road networks over the last
three decades emerged the need of efficient monitoring and management of road traffic.
Conventional techniques for traffic measurements, such as inductive loops, sensors or EM
microwave detectors, suffer from serious shortcomings, expensive to install, they demand traffic
disruption during installation or maintenance, they are bulky and they are unable to detect slow
or temporary stop vehicles. On the contrary, systems that are based on video are easy to install,
use the existing infrastructure of traffic surveillance. Furthermore, they can be easily upgraded
and they offer the flexibility to redesign the system and its functionality by simply changing the
system algorithms. Those systems allow measurement of vehicle’s speed, counting the number
of vehicles, classification of vehicles, and the identification of traffic incidents (such as accidents

Dept. of CSE, RIT Page 2


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

or heavy congestion).There is a wide variety of systems based on video and image processing
employing different methodologies to detect vehicles and objects.

1.1 Traffic surveillance


Traffic surveillance system is an active research topic in computer vision that tries to
detect, recognize and track vehicles over a sequence of images and it also makes an attempt to
understand and describe object behavior, vehicle activity by replacing the aging old traditional
method of monitoring cameras by human operators. A computer vision system can monitor both
immediate unauthorized behavior and long term suspicious behavior, and hence alerts the human
operator for deeper investigation of the event. The video surveillance system can be manual,
semi-automatic, or fully-automatic depending on the human involvement. Human operator is
responsible for monitoring in manual video surveillance system. The entire task is done by him
by watching the visual information coming from the different cameras. It’s a tedious and arduous
job of an operator to watch the multiple screens and at the same time to be vigilant from any
unfortunate event. These systems are proving to be ineffective for busy large places as the
number of cameras exceeds the capability of human experts. Such systems are in widespread
across the world. The semi-automatic traffic surveillance system takes the help of both human
operator and computer vision. The object is being tracked by the computer vision algorithm and
the job of classification, personal identification, and activity recognition is done by the human
operator. Lower level of video processing is used in these systems, and much of the task is done
with the help of human operator intervention. In the fully-automatic system there is no human
intervention and the entire job is being done by the computer vision. These systems are
intelligent enough to automatically track, classify, and recognize the object. In addition, it
intelligently detects the suspicious behavior and does the activity recognition of the object. In
urban environment, monitoring congestion across the road, vehicle interaction and detection of
traffic rule violation can be done with visual surveillance systems. The Video surveillance
system can prevent serious accidents, so that precious lives can be saved. ANPR is a very
specialized well-researched application for video analytics. Toll stations of freeways have

Dept. of CSE, RIT Page 3


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

dedicated lanes with cameras, where registered users can slowly pass without stopping [2]. In
contrast, inner city congestion charge systems (e.g., Stockholm, Sweden; London, U.K., and
Singapore) have to be less intrusive and operate on the normal flow of passing traffic
For most traffic surveillance systems there are three major stages which are used for
estimation of desired traffic parameters i.e. vehicle detection, tracking, and classification. For
detection of vehicles, most of the methods assume that the camera is static and then desired
vehicles can be detected by image differencing. Tracking is a very important issue in computer
vision. Recently, there is a deep interest in surveillance applications. The main purpose of
tracking in computer vision is to recognize and locate a prototype in a series of sequential
frames. After that, several vehicle features like shape, length, width, texture, license number etc.

Every visual surveillance systems start with detecting moving object in video streams.
Many applications are based on tracking such as video processing, security, surveillance and
automatic procedures. Then, different tracking scheme are designed to track each vehicle.

In urban environment, monitoring congestion across the road, vehicle interaction and
detection of traffic rule violation can be done with visual surveillance systems. The Video
surveillance system can prevent serious accidents, so that precious lives can be saved. ANPR is a
very specialized well-researched application for video analytics.

1.2 Motivation
Traffic surveillance is the most active research topic in computer vision for humans and
vehicles. Our aim is to develop automatic License plate recognition in real time surveillance videos
and replacing the age old traditional method of monitoring by human operators. Now a day the
license plate recognition has been essential due to the rapidly growing number of cars. The
increasing number of automobiles has facilitated human life but it has also lead to various issues of
traffic congestions, parking problems, accidents etc. Our motivation in doing is to design a traffic
surveillance system for vehicle detection, tracking and license plate recognition in real time videos
using visual surveillance techniques.

Dept. of CSE, RIT Page 4


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

1.3 Introduction on Domain

1.3.1 Machine Learning


Machine learning (ML) is the study of computer algorithms that improve automatically
through experience. It is seen as a subset of artificial intelligence. Machine learning algorithms
build a mathematical model based on sample data, known as "training data", in order to make
predictions or decisions without being explicitly programmed to do so. [3] Machine learning
algorithms are used in a wide variety of applications, such as email filtering and computer vision,
where it is difficult or infeasible to develop conventional algorithms to perform the needed tasks.

Fig 1.2: Machine Learning

Machine learning is closely related to computational statistics, which focuses on making


predictions using computers. The study of mathematical optimization delivers methods, theory
and application domains to the field of machine learning. Data mining is a related field of study,
focusing on exploratory data analysis through unsupervised learning. In its application across
business problems, machine learning is also referred to as predictive analytics. Machine learning
involves computers discovering how they can perform tasks without being explicitly
programmed to do so. It involves computers learning from data provided so that they carry out
certain tasks. For simple tasks assigned to computers, it is possible to program algorithms telling
the machine how to execute all steps required to solve the problem at hand; on the computers

Dept. of CSE, RIT Page 5


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

part, no learning is needed. For more advanced tasks, it can be challenging for a human to
manually create the needed algorithms. In practice, it can turn out to be more effective to help
the machine develop its own algorithm, rather than have human programmers specify every
needed step. Machine learning, reorganized as a separate field, started to flourish in the 1990s.
The field changed its goal from achieving artificial intelligence to tackling solvable problems of
a practical nature. It shifted focus away from the symbolic approaches it had inherited from AI,
and toward methods and models borrowed from statistics and probability theory. As of 2019,
many sources continue to assert that machine learning remains a sub field of AI. Yet some
practitioners, for example Dr Daniel Hulme, who both teaches AI and runs a company operating
in the field, argue that machine learning and AI are separate.

1.3.2 Python
Machine learning is a type of artificial intelligence (AI) that provides computers with the
ability to learn without being explicitly programmed. Machine learning focuses on the
development of Computer Programs that can change when exposed to new data. In this article,
we’ll see basics of Machine Learning, and implementation of a simple machine learning
algorithm using python.

Fig 1.3: Python LOGO

Python community has developed many modules to help programmers implement


machine learning. Python is also usable as an extension language for applications written in other

Dept. of CSE, RIT Page 6


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

languages that need easy-to-use scripting or automation interfaces. It's often used as a “scripting
language” for web applications. This means that it can automate specific series of tasks, making
it more efficient. Consequently, Python (and languages like it) is often used in software
applications, pages within a web browser, the shells of operating systems and some games.
Python is a free, open-source programming language that is available for everyone to use.
Python is also usable as an extension language for applications written in other languages that
need easy-to-use scripting or automation interfaces. It's often used as a “scripting language” for
web applications. More Productive. First and foremost reason why Python is
much popular because it is highly productive as compared to other programming languages like
C++ and Java.

1.3.3 Cloud Computing

Fig 1.4: Cloud Computing

Cloud computing is the on-demand availability of computer system resources,


especially data storage and computing power, without direct active management by the user. The
term is generally used to describe data centres available to many users over the Internet. Large

Dept. of CSE, RIT Page 7


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

clouds, predominant today, often have functions distributed over multiple locations from central
servers. If the connection to the user is relatively close, it may be designated an server. Clouds
may be limited to a single organization or be available to many organizations (public cloud).

Advocates of public and hybrid clouds note that cloud computing allow companies to
avoid or minimize up-front IT infrastructure costs. Proponents also claim that cloud computing
allows enterprises to get their applications up and running faster, with improved manageability
and less maintenance, and that it enables IT teams to more rapidly adjust resources to meet
fluctuating and unpredictable demand. Clouds may be limited to a single organization or be
available to many organizations Cloud providers typically use a "pay-as-you-go" model, which
can lead to unexpected operating expenses if administrators are not familiarized with cloud-
pricing models.

1.4 Overview of the proposed model


A typical surveillance system consists of a traffic camera network, which processes
captured traffic video on-site and transmits the extracted parameters in real time. Here our focus
is on the study of algorithmic part of such a system.

In this thesis, we present full-featured vehicle detection, tracking and license plate
recognition system framework, particularly designed to work on video footage. This system
mainly having four modules:-

 Video Acquisition

 Vehicle detection and tracking

 License plate extraction

 Character recognition unit

This system is used to detect, recognize and track vehicle from incoming video frames in
dynamic scenes then extract the license plate from it. It has found numerous applications as wide
as possible such as: access control in security sensitive areas, securities for communities and

Dept. of CSE, RIT Page 8


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

important buildings, detection of military target areas, traffic surveillance in cities and highways,
detection of anomalies behavior, traffic control management for recognize vehicles that commit
traffic violation, such as occupying lanes reserved for public transport, breaking speed limits,
crossing red light, entering restricted area without permission; and among many other
applications.

The system is designed for real time videos where a camera is used for continuous recording
of videos. The view of camera or the area covered by camera is fixed between entry zone and
exist zone. Each frame is continuously processed to check the presence of a vehicle. A defined
connected component area is taken as threshold; if the detected area is above that threshold value
then it will be recognized as a vehicle and will be tracked. The view of camera or the area covered
by camera is fixed between entry zone and exist zone.

1.4.1 Block Diagram of the Proposed System

Fig 1.5: Block diagram of the system

Dept. of CSE, RIT Page 9


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

This Proposed System having mainly four modules:

o Video Acquisition – In this module videos are taken by the static camera situated at
traffic scenario. A camera network that has the ability to transmit images in real time to a
central operational centre. The processing of the images can be carried out on-site saving
valuable network bandwidth as it transmits only the outcome of the calculations. The
whole process can also be performed either in real time video streaming from an
operational centre or in already stored video material. The background subtraction
technique should overcome the problems of varying illumination condition, background
clutter, camouflage and shadow.

o Vehicle Detection And Tracking – In vehicle detection we have simulated various


background subtraction techniques available in the literature. The background subtraction
technique should overcome the problems of varying illumination condition, background
clutter, camouflage and shadow. Motion segmentation of foreground object has been
done in real time. It’s hard to get this entire problem solved in one background
subtraction technique. So the idea was to simulate and evaluate their performance on
various video data taken in different situations.

o License Plate Extraction - License plates are first located in current frame then they are
extracted using various available techniques in the literature based on Hough Transform
method, Template matching technique, Region growing algorithm, Histogram Approach
and Edge Detection Approach.

o Character Extraction – Images of the extracted plates are the input to this module. Here
first license plate image is cropped in lines, and then characters are segmented and
recognized.

Dept. of CSE, RIT Page 10


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

CHAPTER 2

LITERATURE SURVEY

The license Plate Recognition (LPR) was invented in 1976 at the Police Scientific Development
Branch in the UK.

1. Sang Kyoon Kim: A method using a distributed genetic algorithm to overcome


the difficulties dealing with degraded number plates (1996, September).
Camera can also focus on the face of the driver and save it for security reason. There are
difficulties for vehicle license plate recognition in which it will affect the efficiency and accuracy
of the system. It is essential and important to determine the facts which will be able to influence
the operations and recognition proficiency. Next, we also need to look into other facts of
variables that are not constant. Below are the non-constant variables which will affect the
accuracy of recognition: speed of the vehicle, weather condition, type of vehicle, distance
between vehicle license plate and the camera, type of plate (rectangular, bent type), vehicle
license plate orientation and type of vehicle font character. The proposed method is outline
below in Figure.

Fig 2.1: Steps used in vehicle license plate recognition system.


Dept. of CSE, RIT Page 11
License Plate Recognition By Unique Edge Detection Algorithm 2019-20

I complement will compute the complement image (IM). IM can intensity, binary or true
color image. For the complement binary image, black will becomes white and white will become
black; zeros will become ones or ones will become zeros.

2. Clemens Arth: A real-time license plate detection and recognition system


where image fragments are taken from real-time video and processed (2007,
June).
In this paper we investigate employing FPGA to implement a framework for computer
vision and specifically for automatic license plate recognition. The most common approaches
applied to detect the license plate within an image are the combination of edge detection and
binary morphology as explained. The detection rate with this method is highly affected by the
quality of the image. They are based on the assumption that car plates have strong edges that will
survive strong filtering. Unfortunately, this is not very effective for urban environment. License
plate detection and segmentation algorithm with histogram projection. Defining the threshold
value require a few steps of mathematical calculation and the process of finding the peak may
introduce some delay in the processing. A simpler approach that produces satisfactory result is
by using grayscale morphology that is already used. Optical character recognition (OCR), that is
normally used to translate images of handwritten text into machine encoded text, is applicable
for the recognition of license plate characters. The work divides a handwritten character into
several rectangular zones to obtain a 13-element feature vector. Each element represents the
number of foreground pixel in each defined zone. A similar method is used to divide a 32 x 32
pixel character image into 16 zones. The authors have proposed eight directional distribution
features which are calculated for each zone. Three different classification methods, which are
artificial neural networks (ANN), support vector machine (SVM) and k-nearest-neighbor (KNN)
are used to recognize the characters.

Some of the methods and algorithms described above can be combined and implemented on
embedded hardware platform. For example, license plate detection and recognition on an also a

Dept. of CSE, RIT Page 12


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

embedded DSP platform was introduced. The total processing time, beginning from image
acquisition until character classification requires 41.35ms. Another implementation of plate
localization on Xilinx Virtex-4 was described and is capable of processing one image in 3.8 ms
and it consumes less than 30% of the on-chip resources. No recognition stage was presented in
that work. A complete ANPR system is implemented on FPGA. The system utilizes 80 % of the
Xilinx Virtex-4 LX40 re70 sources and is capable of processing a standard definition image (640
x 480) in less than 10ms. Algorithms for license plate detection are also developed using Handel-
C and then translated into Verilog HDL with Celoxca’s DK4 to implement on Virtex II Pro.
Performance comparison between the software and the hardware implementation is stated at the
end of the paper. The resource utilization for their hardware implementation is about 2 to 3 times
more than the work and yet requires longer processing time for an input image with a smaller
resolution. However, their results show that the same algorithms execute 4 times faster with the
hardware than the software. In this paper we adopted some of the listed methods and algorithms
to design and implement a pipelined processing system for computer vision on a reconfigurable
hardware. The proposed work presents hardware modules for various morphology based filters,
along with connected component analysis and k-means classifier. These components are
arranged in a single pipeline for ANPR. These components are designed to be easily used in
various computer vision applications.

3. Ankush Roy: Method to overcome the difficult to correctly identify the non-
standard number plate characters, by using a pixel based segmentation
algorithm of the alphanumeric characters in the license plate (2011, March).
As it is not possible to judge which approach is better, different papers, which are
based on steps mentioned in Fig.1, are surveyed and categorized based on the methodologies in
each approach. For each approach whenever available parameters like speed, accuracy,
performance, image size and platform are reported. Commercial product survey is beyond the
scope of this paper as sometimes these products claims more accuracy than actual for

Dept. of CSE, RIT Page 13


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

promotional purposes. Remainder of this paper is divided as follows: Section 2 contains survey
of different techniques to detect number plate. Character segmentation methods are reviewed in
section 3 and section 4 contains discussion about character recognition methods. The paper
concludes with the discussion of what is not implemented and what kind of research is possible
in ANPR. License plate detection and recognition on an embedded DSP platform was
introduced. The total processing time, beginning from image acquisition until character
classification requires 41.35ms.

4. Arulmozhi, K., Perumal, S. A., Priyadarsini, C. T., & Nallaperumal, K. Image


refinement using skew angle detection and correction for Indian license plates (2012,
December).
Many researchers have proposed good number of methods to detect tilt in the number plate
of vehicles. Tilt is the angular rotation noticed in the number plate. These methods are designed
to detect the tilt which is less than 350. These approaches are based on Principle Component
Analysis, Fourier Transform, Hough Transform, Nearest neighbor connectors, Extreme points
and Moments. But most approaches fail to detect the orientations of 900 , 1800 and 2700 . In
literature sufficient quantum of works are reported on text skew detection in documents. The
work in proposed a modified approach of Hough transform for skew detection and correction of
document images, the algorithm is computationally less efficient. The work in proposed an
integrated skew detection and correction using Fourier transform and DCT which is also
computationally less efficient. Many different methodologies to detect skew in a given document
page were discussed. A traditional projection profile approach is proposed. In this approach
features are extracted from each projection profile to determine the skew angle and it is quite
cost effective. The improved nearest-neighbor based document skew detection method is
proposed to estimate skew in documents respective to skew angle limitation. Another approach
uses k-NN clustering of the connected components. This approach has a relatively high accuracy
but has a large computational cost, independent of the detection range. A skew detection method

Dept. of CSE, RIT Page 14


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

using the cross correlation between the text lines at a fixed distance is based on the fact that the
correlation between vertical lines in an image.
5. Kaur, A., Jindal, S., & Jindal, R. (2012). License Plate Recognition using
Support Vector Machine (SVM).
The Automatic Number Plate Recognition (ANPR) system was first invented in 1976 at
Police Scientific Development t Branch in the UK. In recent years Automatic Number Plate
Recognition systems (ANPR) have become a reliable and more securable. They are used by the
police for the enforcement of traffic rules or for crime detection. In other country ANPR-systems
are applied to register the vehicles entering the congestion charging zone. The ANPR system of
vehicle number plate consists of two main modules. First is a camera which detects the vehicle
passing on road and sends an image of that vehicle continuously to a computer. Second is the
software that recognizes number plate with characters on them and store into a database.
Recently ANPR systems have been implemented in many countries like Korea, Australia and
few others. In these countries there are strict and standard implementations of number plate is
helped to development of NPR system. The dimensions of plate, colour and font of characters,
border for the plate, etc. which are helping to locate the number plate easily and identify the
number plate of the vehicle.

6. Roy, S., Choudhury, A., & Mukherjee, J. (2013). An approach towards


detection of indian number plate from vehicle.
Much plate detection, segmentation algorithm has been proposed to implement VNPI
system. Number plate detection algorithm can mainly classify into three classes: edge-based,
color base and texture based. The most popular method used for license plate identification is
described by Dening Jiang, Tulu Muluneh, Tiruneh Embiale, Ashenafi Gebrehiwot in “Car Plate
Recognition System”. Hulli Hsan and Runping Han proposed a method to extract number plate
to location based on the edge detection and color information. Ch. Jaya Lakshmi, Dr. A. Jhansi
Rani, Dr K.Sri Ramakrishna, M. kanti Kiran and V.R Siddhartha proposed a novel approach for
Indian license plate recognition system. License plate location algorithm based on edge

Dept. of CSE, RIT Page 15


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

Detection and morphology are describe. To locate the number plate its first to identify whether
any noise added to the plate. This noise may be the part of outside environment. Seyed
Hamidreza Mohades Kasaei and Sayed mohammadreza Mohades Kasaei proposed a method to
extracting and recognize the vehicle number plate for passing under outside environment. An
efficient method of locating vehicle license plate is proposed by Zhigang Xu and Honglei Zhu.
Several segmentation and recognition method are used to number plate segmentation. More
correct and efficient segmentation of number plate will produce good and more efficient
recognition. Based on the above mentioned method, many number plate localization algorithms
have been developed. In this paper, an improved and efficient approach is identified with high
detection rate based on sobel edge detection and morphological operation. License plate location
algorithm based on edge Detection and morphology are describe. To locate the number plate its
first to identify whether any noise added to the plate. This noise may be the part of outside
environment.
7. Du, S., Ibrahim, M., Shehata, M., & Badawy, W. Automatic license plate
recognition (ALPR) - 2013
Automatic license plate recognition (ALPR) plays an important role in numerous real-life
applications, such as automatic toll collection, traffic law enforcement, parking lot access
control, and road traffic monitoring. ALPR recognizes a vehicle’s license plate number from an
image or images taken by either a color, black and white, or infrared camera. It is fulfilled by the
combination of a lot of techniques, such as object detection, image processing, and pattern
recognition. ALPR is also known as automatic vehicle identification, car plate recognition,
automatic number plate recognition, and optical character recognition (OCR) for cars. The
variations of the plate types or environments cause challenges in the detection and recognition of
license plates. They are summarized as follows.

1) Plate variations:
a) Location: plates exist in different locations of an image;

b) Quantity: an image may contain no or many plates;

Dept. of CSE, RIT Page 16


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

c) Size: plates may have different sizes due to the camera distance and the zoom factor;

d) Color: plates may have various characters and background colors due to different plate
types or capturing devices;

e) Font: plates of different nations may be written in different fonts and language;

f) Standard versus vanity: for example, the standard license plate in Alberta, Canada, has
three and recently (in 2010) four letters to the left and three numbers to the right. Vanity
(or customized) license plates may have any number of characters without any
regulations.
g) Occlusion: plates may be obscured by dirt;
h) Inclination: plates may be tilted;
i) Other: in addition to characters, a plate may contain frames and screws.

2) Environment variations:
a) Illumination: input images may have different types of illumination, mainly due to
environmental lighting and vehicle headlights;
b) Background: the image background may contain patterns similar to plates, such as
numbers stamped on a vehicle, bumper with vertical patterns, and textured floors.

Dept. of CSE, RIT Page 17


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

CHAPTER 3
PROBLEM STATEMENT
To design and develop a real-time detection, tracking and license plate recognition
system that will work efficiently under the conditions of slow moving objects and the objects
that are merged into the background due to a temporary stop and becoming foreground again,
adaptive to different traffic environment conditions, robustness against progressive or sudden
illumination changes, Occlusions, identification time of the system should be as short as
possible. The system should detect all the types of vehicles, recognize all the license plates of the
country and should also be resistant to any kinds of disturbances, which may occur in images and
mechanical plate damages which may appear in reality.
The attributes of the License plates play important role in the recognition process. The
size, color of the license plate, its font face i.e. size, colour of each character, spacing between
characters, the number of lines in the license plate, script, characters’ height and width are
maintained very strictly in developed countries. There are several countries in the world who
have adapted this very method of standardizing the License plate.

Fig 3.1: Standard license plates used in developed countries

Dept. of CSE, RIT Page 18


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

A part from these conditions, the algorithms applied for the recognition also plays a vital
role. If the quality of the algorithm is good, then more varieties of images can be given as input to the
system, and this will also reduce the computation speed of the process. The most basic issues in the
real-time ALPR system is the accuracy and the recognition speed.

Fig 3.2: Indian license plates

The most basic issues in the real-time ALPR system is the accuracy and the recognition speed.

Every system should fulfill the following demands:


 The identification time of the system should be as short as possible.
 The system should detect all the types of vehicles.
 The system should recognize all the license plates of the country.
 The system should also be unaffected to any kinds of disturbances, which may occur in
images and mechanical plate damages which may appear in reality.

Other than this, there are several other parameters on which the quality of the recognition
depends. These limitations are
 High quality imaging – the quality of the captured image is high, so that it will be easy to
evaluate the attributes of the image.

Dept. of CSE, RIT Page 19


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

 Minimal skewing and rotation – the camera is fit such that the captured image or video
will not suffer much decent angle of skewing and rotation.

 Better Flash – as the License plate is retro-reflective in nature, so if high illumination will
be there, then the LP region will be much more brightened and the attributes of the
license plate will not be much clearer.

 In western countries like USA, lane marking system is enforced. Vehicles are allowed to
man oeuvre in specific rows in step with ordinance and vehicle sort, etc. however in
Bharat in most of the cases traffic system non lane is primarily based.

 Road conditions are a lot of varied and traffic is unstructured, there’s lack of discipline
and over laden vehicle movement is kind of natural.

 In India, vehicles are laid off times by the perimeters of the roads. There’s no separate
system for vehicle parking management.

 Roads do not seem to be solely occupied with Vehicles, such a large amount of obstacles
on roads produce disturbance to the traffic. Pedestrians don’t have separate ways in
which for his or her movement in most of the cases.

 Shapes of the vehicles have a key role in recognition, there’s high intra-class variance
among Indian vehicles. It creates the possibilities for miss recognition.

 Within same vehicle category there are giant varieties and models. This appearance
completely different in size and look. It’s typically ascertained in Indian vehicles like cars
and trucks.

Dept. of CSE, RIT Page 20


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

CHAPTER 4

OBJECTIVES
The main objective is to use different morphological operations in such a way that
the number plate of vehicle can be identified accurately. To develop a well-organized system in
the vehicle number plate detection. This is based on various operations such
as image enhancement, morphological transformation, edge detection and extraction of number
plate from vehicle image. To develop a well-organized system in the vehicle number plate
detection. The major techniques used in the implementation of the designs are gray scale
conversion, black and white image conversion, filling holes, border detection and image
segmentation. This is helpful to easily detect the license plate and identify the vehicle details.
This is implemented on the real images. The objectives of this system prototype are to develop a
prototype for the Optical Character Recognition (OCR) system and to implement the Template
Matching algorithm in developing the system prototype.

ANPR (Automatic Number Plate Recognition) is developed for these purposes.


Depending on the state/country we see different objectives. The number plate allows
categorization of vehicles, the identification of the driver, or the origin of the driver/car. The
fore, number plate recognition at a specific location can be useful. It is often used for statistics
and data mining.

Some Examples:

 ANPR is used by municipalities to keep track of incoming and outgoing traffic.


 Environmental Zones need categorization of traffic.
 Around airports the traffic is monitored to detect patterns as an anti-terrorism measure.
 Since a number plate is unique, it can be used for signaling suspect cars, (blacklist
matching) or regulating access to a private area (white list matching).
 A false number plate can in most cases be detected by car classification.

Dept. of CSE, RIT Page 21


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

CHAPTER 5

METHODOLOGY
The working of full NPR system can be divided in to two broad sections. The hardware
part and the software part. The working mechanism of all the parts is described in details below.
License plate recognition (LPR) is one form of ITS (Intelligent Transport System) technology
that not only recognizes and counts the number of vehicles but also differentiates them. A license
plate is the unique identification of a vehicle. The basic issues in real-time license plate recognition
are the accuracy and the recognition speed. For some applications, such as electronic toll collection
and red-light violation enforcement, LPR (License plate recognition) records license plates alpha
numerically so the vehicle owner can be assessed the appropriate amount of fine.
In others cases, like commercial vehicle operations or secure-access control, a vehicle's
license plate is compared against a database of acceptable ones to determine whether a truck can
bypass a weigh station or a car can enter a gated community or parking lot. License Plate
Recognition (LPR) has been applied in numerous applications such as automatically identifying
vehicles in parking lots, access control in a restricted area and detecting and verifying stolen vehicles.
Quality of algorithms used in a license plate detector determines the speed and accuracy of the
license plate detection. In the past, a number of techniques have been proposed for locating the plate
through visual image processing. In others cases, like commercial vehicle operations or secure-
access control, a vehicle's license plate is compared against a database of acceptable ones to
determine whether a truck can bypass a weigh station or a car can enter a gated community or
parking lot. License Plate Recognition (LPR) has been applied in numerous applications such as
automatically identifying vehicles in parking lots, access control in a restricted area and detecting and
verifying stolen vehicles. Quality of algorithms used in a license plate detector determines the speed
and accuracy of the license plate detection. In the past, a number of techniques have been proposed
for locating the plate through visual image processing.

Dept. of CSE, RIT Page 22


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

Input Image Send Alert message

Pre - Processing Compare number plate with


Cloud data

Helmet detection using


Character Detection and
cascade classifier
display

Remove noise from image


Character Recognition
using edge detection
algorithm

Plate extraction Character Segmentation

Fig 5.1: Flow chart of the proposed algorithm

Dept. of CSE, RIT Page 23


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

A license plate is the unique identification of a vehicle. The basic issues in real-time license
plate recognition are the accuracy and the recognition speed. For some applications, such as
electronic toll collection and red-light violation enforcement, LPR (License plate recognition)
records license plates alpha numerically so the vehicle owner can be assessed the appropriate
amount of fine. In others cases, like commercial vehicle operations or secure-access control, a
vehicle's license plate is compared against a database of acceptable ones to determine whether a
truck can bypass a weigh station or a car can enter a gated community or parking lot. License
Plate Recognition (LPR) has been applied in numerous applications such as automatically identifying
vehicles in parking lots, access control in a restricted area and detecting and verifying stolen vehicles.
Quality of algorithms used in a license plate detector determines the speed and accuracy of the
license plate detection. In the past, a number of techniques have been proposed for locating the plate
through visual image processing.

5.1 Workflow Process

5.1.1 Input Image


Image processing techniques are used to convert the raw data obtained by the cameras into
useful information. The first step is the capture of image. The image is captured by electronic
device. Digital Camera or Webcam. The image captured is stored in JPEG format. This
algorithm can be broadly classified into four stages which can be discussed as follows.

5.1.2 Pre-processing
The next step after capturing the image is the preprocessing of the image. When the
image is captured there is lot of disturbances and noises present in the image for which the image
can’t be used properly. The video or image of the vehicle is obtained from the camera, whose
vehicle number is to be identified. If it was a video, the video is converted into frames and these
frames are further used for vehicle number identification. This image or frame is then converted
from RGB scale to grey scale. A median filter is applied on the obtained grey scale image in
order to remove different kinds of noises present in the image. Intensity transformations are

Dept. of CSE, RIT Page 24


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

applied to enhance the quality of the image for further processing. The following transformations
are applied on the color JPEG image:

 Conversion of RGB image into a Gray-scale Intensity image.


 Conversion of Intensity image into a Binary image.
 Conversion of Gray-scale Image into an edge detected image.

5.1.2.1 Conversion of RGB image into a Gray-scale Intensity image


The image that is acquired from the camera can be an RGB color image or a Grayscale
Intensity image. The algorithm has to check for the RGB image and then has to convert it
into a Grayscale image, because all the further processing is done in Grayscale format.
Grayscale is chosen because of its simplicity in processing and for its two dimensional matrix
nature, and also it contains enough information needed for the actual recognition.

5.1.2.2 Conversion of Intensity image into a Binary image


This transformation, also known as Image Quantization, produces a binary image from
the intensity image by comparing pixel intensities with a threshold. This stage is very critical
for the separation of license plate from the acquired car image. The license plate is assumed
to have black characters on a white background and also it is assumed that all the license
plates for various cars have approximately the same uniform color. Taking the advantage of
its brighter background area, the license plate can be separated from the relatively darker car
image.

5.1.2.3 Conversion of Gray-scale Image into an edge detected image


The Gray scale image is converted into edge detected image. Edge supports six different
edge-finding methods as follows
 The Sobel method finds edges of an image using the Sobel approximation to the
derivative. It produces edges at those points where the gradient of an image is maximum.

Dept. of CSE, RIT Page 25


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

 The Prewitt method finds edges using the Prewitt approximation to the derivative. It
gives edges at those points where the gradient of an image is maximum.

 The Roberts method finds edges using the Roberts approximation to the derivative. It
produces edges at those points where the gradient of an image is maximum.

 The Laplacian of Gaussian method finds edges by looking for zero crossings after
filtering an image with a Laplacian of Gaussian filter.

 The zero-cross method produces edges by looking for zero crossings after filtering an
image with a filter you specify.

 The Canny method finds edges by looking for local maxima of the gradient of an image.
The gradient is calculated using the derivative of a Gaussian filter.

The threshold for binarization can be two types static or dynamic. In static general
threshold is taken 150 (in gray scale of 0-255). This value reasonably quantizes those pixels,
which represents the license plate and any other portions, which has a pixel-value more than the
selected threshold. The remaining portions, which have a pixel-value less than the threshold
value, are darkened.. In dynamic threshold, the threshold taken will be the average of low and
median gray scale values. Here our aim is to localize the position of the license plate region and
extract a sub-image plot with only the number plate for further analysis.
The image obtained after processing through a median filter is now processed through an
averaging filter with structuring element of size [20 x 20], which returns the centre part of the
correlation value without zero padding at the edges. As a result of which a blurred image is
obtained. Now, the blurred image is subtracted from the original grey scale image to obtain
intensity difference image. This is because, when an image is blurred by using an average filter
the high frequency pixels in the image tend to equalise their pixel value with their surroundings.
Thus surrounding pixels acquire a higher value. Out of all these, Sobel edge detection gives the
better results. The image obtained after processing through a median filter is now processed

Dept. of CSE, RIT Page 26


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

through an averaging filter with structuring element which returns the centre part of the
correlation value without zero padding at the edges.

Original Image /
Captured Image/
RGB Image/ Video

Gray scale Image

Median Filtering

Sobel Edge Detection

Dilated Image

Fig 5.2: Flow chart of Pre-Processing

When this blurred image is subtracted with original grey scale image, the extra acquired
values remain and others are deleted. Resulting in an image. Threshold this image at a very low
value, to create a binary image. For efficient results threshold at a value of 0.03, where all pixels
above this value tend to become unity and others tend to become zero. All the components
touching the boundary of the obtained binary image are then deleted.

Dept. of CSE, RIT Page 27


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

(a) (b)

(c)

Fig.5.3: (a) subtracted image, (b) sobel edge detected image


(c) License plate extracted image.

Sobel edge filter is applied on the obtained binary image in order to obtain accurate
boundaries of binary objects in the figure. Scan for all the connected components in the figure
and fill them with holes. Search for a rectangular area filled with holes in the image which is
probably in the size of the license plate. This rectangular region of the license plate is now
extracted into a sub image figure. Multiply the extracted license plate region with the initial grey
scale image, in order to isolate the license plate from the original image of the vehicle.

Threshold this obtained license plate at a low value such as 0.01 to convert the grey-scale
license plate image into a binary image The filled regions in the image are now labeled with
distinct indices and the bounding box of four sides is applied on the image to mark all the filled
regions of the image. Initially to remove the extra zero padded regions in the image, bounding

Dept. of CSE, RIT Page 28


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

box algorithm is applied to obtain the rectangle of maximum size. The license plate is extracted
in this step which is resized to a fixed size for easier character recognition in the further part.
Consider the fixed size to be [175x730]. The obtained license plate is now complemented and the
boundaries are cleared to erase the license plate border or unnecessary regions leaving only the
characters in the image. The regions with less than 1000 pixels and more than 8000 pixels is
deleted in order to remove the rusted part, screw holes or broken regions of the number plate (if
any) and results in an image with characters. The remaining characters in the image are now
individually extracted by applying bounding box algorithm again.

5.1.3 Helmet detection using cascade classifier


First, a classifier (namely a cascade of boosted classifiers working with haar-like
features) is trained with a few hundred sample views of a particular object (i.e., a face or a car),
called positive examples, that are scaled to the same size (say, 20x20), and negative examples -
arbitrary images of the same size. After a classifier is trained, it can be applied to a region of
interest (of the same size as used during the training) in an input image.

Fig 5.4: Helmet Detection

Dept. of CSE, RIT Page 29


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

The classifier outputs a “1” if the region is likely to show the object (i.e., face/car), and
“0” otherwise. To search for the object in the whole image one can move the search window
across the image and check every location using the classifier. The classifier is designed so that it
can be easily “resized” in order to be able to find the objects of interest at different sizes, which
is more efficient than resizing the image itself. So, to find an object of an unknown size in the
image the scan procedure should be done several times at different scales.
The word “cascade” in the classifier name means that the resultant classifier consists of
several simpler classifiers (stages) that are applied subsequently to a region of interest until at
some stage the candidate is rejected or all the stages are passed. It is a machine learning based
approach where a cascade function is trained from a lot of positive and negative images. It is
then used to detect objects in other images. The cascade classifier consists of stages, where each
stage is an ensemble of weak learners. The weak learners are simple classifiers called decision
stumps. Each stage is trained using a technique called boosting. If the label is positive,
the classifier passes the region to the next stage.
Cascade classifier means the resultant of several classifiers which is trained by samples
alike of the object that is to classified. It consists of several simpler stages that are applied
subsequently to a region of interest until at some stage the object is rejected or all the stages are
passed. The two major stages of the cascade are training and detection. LBP is used in training
the object. LBP is faster than the Haar classifier.

 Positive Samples:
Positive samples are the samples which containing object and created from a
single image for rigid object or from a collection of images that contains object. A large
set of positive samples is created from the given object by taking images from different
angles.

 Negative Samples:
Negative samples are taken from arbitrary images. These images must not contain
detected objects; also the number of negative samples should be more than the positive. It

Dept. of CSE, RIT Page 30


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

should be approximately double or more than that. Negative samples can contain anything
except the image of object that is going to be detected.
After the classifier is trained with positive and negative samples, the next step will be
detection of the helmet. The region of interest is given as input to the classifier which further
classifies whether the rider is wearing helmet or not. If the rider is wearing helmet, it is
classified as “helmet detected” and a round blob around helmet will be created otherwise it
is classified as “rider is not wearing helmet.”

5.1.4 Remove Noise from image using edge detection algorithm


Edge detection includes a variety of mathematical methods that aim at identifying points
in a digital image at which the image brightness changes sharply or, more formally, has
discontinuities. The points at which image brightness changes sharply are typically organized
into a set of curved line segments termed edges. The same problem of finding discontinuities in
one-dimensional signals is known as step detection and the problem of finding signal
discontinuities over time is known as change detection. Edge detection is a fundamental tool
in image processing, machine vision and computer vision, particularly in the areas of feature
detection and feature extraction.

(a) (b)

Fig 5.5: (a) Colored Image (b) Edge Image

Dept. of CSE, RIT Page 31


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

In this recognition, edge detection is crucial to image preprocessing. Edge is a significant


part in image; we can get some useful information’s form it. It refers to some pixels with gray
value suddenly changed and is collected of a figure of straight or bowed lines in image. The
vehicle image obtained from various environments, so that it may contain diverse informations,
such as passer, animal, grass, tree and so on. Although the setting of image is complex, the
inherent edge character in license plate is clear. The appearance of plate is a rectangular, the
height width ratio of it is a fixed value, and characters approved horizontally in the rectangular.
The size of license plate is 440cm × 140cm (length × width), and the tallness width ratio is about
3:1. There are 7 characters in the license plate, each character is 90cm×45cm, the spacing of
edge and character is 10cm, the spacing of each character is 12cm. Some gray values distorted in
the license plate and background, characters and plate, these rich characteristics of edge
represent a lot of high-frequency apparatus in the vehicle image. Rich edge information’s can be
taken to get the area of license plate from complex image with two steps: one is edge detection
for images; the other is segmentation for the plate with inbuilt edge information’s. There are
many algorithms on edge detection, such as classical operator, multi-scale method and adaptive
filtering process.

5.1.5 Character Segmentation


Segmentation is one of the most important processes in the number plate recognition,
because all further steps rely on it. If the segmentation fails, a character can be improperly
divided into two pieces, or two characters. The ultimate solution on this problem is to use
bounding box technique. The bounding box is used to measure the properties of the image
region. Once a bounding box created over each character and numbers presented on number
plate, each character & number is separate out for recognition of number plate.

The main concept behind extraction through template matching is, that by comparing each
portion of the investigated image to a template license plate, the actual license plate in the image
is found as the region bearing the most resemblance to the template. The way the template is
constructed plays a significant role in the success of template matching. There are no rules for

Dept. of CSE, RIT Page 32


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

template construction but the template must be constructed in such a way, that it has all the
characteristics of a license plate as it is presented in the source image.

5.1.6 Character recognition


The next step is identifying the information in the image and decoding it for further
interpretation. Each character from the license plate is extracted by applying bounding box
algorithm and these characters are compared against the alphanumeric database which uses
template matching. The extracted character is compared with the template images in all possible
positions.A large database of alpha numeric characters can be taken with each character having
several font styles and sizes. Neural logic’s can be applied to train the database in order to
identify different font styles.

In proposed model character recognition is done by template matching which is a classical


pattern recognition method. The outcome of the NPR module in terms of foreground segments is
to be recognized using template matching. In this method, pixel values of template characters (A-
Z, 0-9) are stored in vector such that vector location 1 stores value for character A, location 2 for
B and so on. Firstly, the sample is classified and then the recognized characters are normalized
by the template size in the character database. It will match with all templates and calculate their
similarity. Template matching techniques compare portions of images against one another. Each
data segment corresponding to each character is matched with all the 36 data templates in the
library. NPR module in terms of foreground segments is to be recognized using template
matching.

5.1.7 Display Output


Raw data is converted into information by the image processing techniques. This
information is interpreted using IoT technology. The information produced in the notepad file is
then transferred to the cloud for further use as illustrated. To interpret the uploaded information
we need an internet application. The database for this web application is phpMyAdmin and the
online transfer’s takes place using mySQL queries. The front end user interface part of the web
Dept. of CSE, RIT Page 33
License Plate Recognition By Unique Edge Detection Algorithm 2019-20

application in the website is coded using Hypertext Markup Language (HTML) and Cascading
Style Sheets (CSS). The back end database for the web application is phpMyAdmin and is
maintained using mySQL queries. The connection between front end and the back end of the
web application is coded using PHP.

The output from the software is written and stored in a notepad file. The information in the
notepad file is later read and transferred to the cloud using Auto File Transfer Protocol (FTP)
Manager once in every 10 seconds which is later used for interpretation. This information can be
accessed and interpreted using two different modules as discussed further. Firstly, the sample is
classified and then the recognized characters are normalized by the template size in the character
database

5.1.8 Compare Cloud Data


The main aim of search module is to know the vehicle number in interest of the
administrator and input the number from user interface of the website. This vehicle number is
then searched in the database and all its traces in different locations and time can be accessed by
the authorized administrator. In the server side we have two different tables for managing the
data taken from the front end of the database. Table - 1 contains the attributes such as vehicle
number, location (latitude and longitude), time and date. Table - 2 is used to manage the register
module.In case we could not trace a vehicle through search module immediately, then we could
use register module. Register module obtains data about the required vehicles through attributes
such as vehicle number, user email id, mobile number and the details of the required vehicle.
Through this module, the required vehicle number is compared with every input number
uploaded from the embedded system. If a match is found, an alert message is sent to the
registered phone number.

5.1.9 Register module


In case we could not trace a vehicle through search module immediately, then we could
use register module. Register module obtains data about the required vehicles through attributes

Dept. of CSE, RIT Page 34


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

such as vehicle number, user email id, mobile number and the details of the required vehicle.
Through this module, the required vehicle number is compared with every input number
uploaded from the embedded system. If a match is found, an alert email is sent to the registered
email id. Register module algorithm can be discussed in detail

5.1.10 Digital image processing


The input image is taken from an embedded camera and this image is processed through
digital image processing techniques. Unique edge detecting algorithm was used to improve the
efficiency of extracting the license plate region. A distinct algorithm for segmenting the
characters in the number plate was proposed in the paper which avoided producing deformity in
the characters.

It is observed that direct conversion of the input grey scale image to a binary image by
applying threshold at 127 pixel values in order to detect the edges of the license plate do not
produce efficient results when the light intensity is not uniform throughout the picture. The
intensity of light is more towards right side of the picture as compared to the left. The intensity
of light is non-uniform throughout the picture. The proposed algorithm improves the efficiency
in detecting and extracting license plate region for images that are subjected to non-uniform
intensity of light.

Applying sobel edge mask directly on input grey scale image in order to obtain the
license plate region does not produce efficient results when the input image is subjected to high
intensity of light, when the shadow of the vehicle is on the license plate or when the license plate
tends to reflect light. The proposed algorithm could extract the license plate region more
efficiently as compared to the existing method. The license plate is reflecting light, which
hinders efficient license plate detection and extraction.

The use of morphological operations such as dilation and erosion produces deformity in
the characters. This deformity further hinders the process of character recognition, where
characters such as ‘O’, ‘D’, ‘0’ and ‘B’ are falsely recognized among each other when filled with

Dept. of CSE, RIT Page 35


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

holes due to irregular dilation. This deformity can be eliminated by the use of distinct algorithm
proposed in this paper where bounding box method is used twice in order to segment the
characters. A distinct algorithm for segmenting the characters in the number plate was proposed
in the paper which avoided producing deformity in the characters.

5.1.11 Send Alert Message


Message sent automatically to rules violated person. After receiving message he should
pay penalty before given time duration. And also message received to police and vehicle owner
when the fraud detected by successful matching of output and Table 2 of data saved in the cloud.

Dept. of CSE, RIT Page 36


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

CHAPTER 6

APPLICATIONS
There are several applications where automatic license plate recognition can be used. The two
major values license plate recognition adds to systems are automation and security.

 An Intelligent Transportation System equipped with LPR can provide:

 Flexible and automatic highway toll collection systems

 Analysis of city traffic during peak periods

 Automation of weigh-in-motion systems

 Enhanced vehicle theft prevention

 Effective law enforcement

 Effective enforcement of traffic rules

 Highest efficiency for border control systems, etc.

Other possible applications include:

 Automation and simplicity of airport and harbour logistics

 Building a comprehensive database of traffic movement

 Security monitoring of roads, checkpoints, etc

 Vehicle surveillance

Dept. of CSE, RIT Page 37


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

CHAPTER 7

SYSTEM REQUIREMENTS

7.1 SOFTWARE REQUIREMENTS

 Editor : Spyder

 Language : python

 Version : 3.6

 Operating System : Windows 7 and above

 System Type : 64 bit

7.2 HARDWARE REQUIREMENTS

 Processor : Intel/AMD based 1.1GHz and above

 RAM : 4 GB and above

 Hard Disk : 1 TB

 Display : SVGA/LCD Based displays

 Devices : Standard Keyboard, Mouse, GPS

 Camera : Web Camera (Mobile/ Laptop)

Dept. of CSE, RIT Page 38


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

CHAPTER 8

SYSTEM DESIGN

8.1 Requirement Analysis


A requirement is any function, constraint, or property that the system must provide, meet,
or satisfy in order to fulfill its purpose. The goal of analysis is to produce essential requirements.
The main requirements of the system were obtained at the data collection stage. The major
stakeholders of the system were interviewed and observed as they performed their day to day
task in order for the researcher to fully understand the current process. The results that were
obtained from data collection mainly included the current vehicle entry registration processes
into car parks and some of its challenges.

Fig 8.1: ANPR system implementation in practical scenario

Dept. of CSE, RIT Page 39


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

A typical surveillance system consists of a traffic camera network, which processes


captured traffic video on-site and transmits the extracted parameters in real time. Here our focus
is on the study of algorithmic part of such a system.

In this thesis, we present full-featured vehicle detection, tracking and license plate
recognition system framework, particularly designed to work on video footage. This system
mainly having four modules:-

 Video Acquisition
 Vehicle detection and tracking
 License plate extraction
 Character recognition unit

Fig 8.2: Flow diagram of ANPR

Dept. of CSE, RIT Page 40


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

This system is used to detect, recognize and track vehicle from incoming video frames in
dynamic scenes then extract the license plate from it as shown in Figure 1.1. It has found
numerous applications as wide as possible such as: access control in security sensitive areas,
securities for communities and important buildings, detection of military target areas, traffic
surveillance in cities and highways, detection of anomalies behaviour, traffic control
management for recognize vehicles that commit traffic violation, such as occupying lanes
reserved for public transport, breaking speed limits, crossing red light, entering restricted area
without permission; and among many other applications.

The system is designed for real time videos where a camera is used for continuous
recording of videos. The view of camera or the area covered by camera is fixed between entry
zone and exist zone. Each frame is continuously processed to check the presence of a vehicle. A
defined connected component area is taken as threshold; if the detected areais above that
threshold value then it will be recognized as a vehicle and will be tracked. A distance is defined
between the vehicle and the camera and when the vehicle comes within that range i.e vehicle’s
connected component area is maximum, these frames of video are passed to license plate
recognition algorithm. After that recognition of character takes place and data is stored and
compare with data base. The flow chart of the system is shown in Figure

This information has been summarized in the steps that follow:

 Vehicle arrives at the entrance/gate with aim to gain entrance.


 The security guard first checks if the driver has a valid ID (i.e. staff or student
ID) and/or sticker.
 If the ID is valid the gate is opened.
 There is another security guard who hands out the ticket number while noting
down on an occurrence book the vehicle details. These details include vehicle
make, model and color, time of entry, as well as the ticket number issued to the
vehicle.

Dept. of CSE, RIT Page 41


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

 On vehicle exit, the ticket issued is returned back to the security guard at the gate
and the time of exit is recorded for that particular vehicle.

8.2 System Architecture


It is an architectural design for the Automatic Number Plate Capture and Vehicle
Registration System. This architecture can be broadly categorized into two:

 Client Application (Front-End)


 Server side (Back-End)

8.2.1 Client Application

The solution comprises the mobile application that has the Optical Character Recognition
functionality required in the scanning of vehicle number plate, as well as inputting other vehicle
description details. The mobile device also allows for additional services like capturing the
vehicle time in by using the mobile phones’ clock functionalities, as well as storage of the
vehicle information. The mobile application is communicating with the server side via wireless
local area network (WLAN).

8.2.2 Server Side


This consists of a server used for hosting the scripts that will be involved in the
transmitting and receiving of the vehicle information. There is also a database used for storage of
vehicle details as well an administrator’s portal that is used in viewing of the reports of the
vehicles that have been recorded. With regards to the architectural design of the Automatic
Number Plate Capture and Vehicle Registration System. The Security guards are the primary
users of the mobile application, while the Head of Security at the Institution will be a secondary
user whereby He will be receiving the information of the vehicles entering and exiting the
University’s premises from an online portal.

Dept. of CSE, RIT Page 42


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

Fig 8.3: System Architecture

Dept. of CSE, RIT Page 43


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

8.3. Use Case Diagram


A use case diagram at its simplest is a representation of a user's interaction with the system
and depicting the specifications of a use case. A use case diagram can portray the different types
of users of a system and the case and will often be accompanied by other types of diagrams as
well. Fig 4 shows a use case diagram describing the actors and the activities involved in the new
vehicle registration process.

Fig 8.4: Use Case Diagram for Automatic Number Plate Recognition System.

Dept. of CSE, RIT Page 44


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

8.4. Context Diagram

A Context Diagram is a single picture that has the system of interest at the center, with no
details of its interior structure or function, surrounded by those elements in its environment with
which it interacts. It is a Context Diagram for the Automatic Vehicle Entry Registration System
detailing the interactions with the users of the system that include the Security Guard and the
Head of Security Officer.

Fig 8.5: Context Diagram

Dept. of CSE, RIT Page 45


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

CHAPTER 9

IMPLIMENTATION
OpenCV (Open Source Computer Vision Library) is a library of programming
functions mainly aimed at real-time computer vision. Originally developed by Intel, it was later
supported by Willow Garage then Itseez (which was later acquired by Intel). The library is cross-
platform and free for use under the open-source BSD license. OpenCV is open source computer
vision library developed for Image processing and computer vision applications. There are lots of
tutorials available to learn OpenCV. You can start programming using OpenCV in C, C++ or
Python. OpenCV-Python is a library of Python bindings designed to solve computer vision
problems. ... OpenCV-Python makes use of Numpy, which is a highly optimized library for
numerical operations with a style syntax. All the OpenCV array structures are converted to and
from Numpy arrays.

Fig 9.1: Open CV logo

OpenCV-Python is a library of Python bindings designed to solve computer vision


problems.Python is a general purpose programming language started by Guido van Rossum that
became very popular very quickly, mainly because of its simplicity and code readability. It
enables the programmer to express ideas in fewer lines of code without reducing readability.

Dept. of CSE, RIT Page 46


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

Compared to languages like C/C++, Python is slower. That said, Python can be easily extended
with C/C++, which allows us to write computationally intensive code in C/C++ and create
Python wrappers that can be used as Python modules. This gives us two advantages: first, the
code is as fast as the original C/C++ code (since it is the actual C++ code working in
background) and second, it easier to code in Python than C/C++. OpenCV-Python is a Python
wrapper for the original OpenCV C++ implementation.

Fig 9.2: Pictorial Diagram

Dept. of CSE, RIT Page 47


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

9.1 Helmet detection using cascade classifier


First, a classifier (namely a cascade of boosted classifiers working with haar-like
features) is trained with a few hundred sample views of a particular object (i.e., a face or a car),
called positive examples, that are scaled to the same size (say, 20x20), and negative examples -
arbitrary images of the same size. After a classifier is trained, it can be applied to a region of
interest (of the same size as used during the training) in an input image.

Fig 9.3: Helmet Detection

The classifier outputs a “1” if the region is likely to show the object (i.e., face/car), and
“0” otherwise. To search for the object in the whole image one can move the search window
across the image and check every location using the classifier. The classifier is designed so that it
can be easily “resized” in order to be able to find the objects of interest at different sizes, which
is more efficient than resizing the image itself. So, to find an object of an unknown size in the
image the scan procedure should be done several times at different scales.
The word “cascade” in the classifier name means that the resultant classifier consists of
several simpler classifiers (stages) that are applied subsequently to a region of interest until at
some stage the candidate is rejected or all the stages are passed. It is a machine learning based
Dept. of CSE, RIT Page 48
License Plate Recognition By Unique Edge Detection Algorithm 2019-20

approach where a cascade function is trained from a lot of positive and negative images. It is
then used to detect objects in other images. The cascade classifier consists of stages, where each
stage is an ensemble of weak learners. The weak learners are simple classifiers called decision
stumps. Each stage is trained using a technique called boosting. If the label is positive,
the classifier passes the region to the next stage.
Cascade classifier means the resultant of several classifiers which is trained by samples
alike of the object that is to classified. It consists of several simpler stages that are applied
subsequently to a region of interest until at some stage the object is rejected or all the stages are
passed. The two major stages of the cascade are training and detection. LBP is used in training
the object. LBP is faster than the Haar classifier.

 Positive Samples:
Positive samples are the samples which containing object and created from a
single image for rigid object or from a collection of images that contains object. A large
set of positive samples is created from the given object by taking images from different
angles.

Fig 9.4: Positive Result

 Negative Samples:

Negative samples are taken from arbitrary images. These images must not contain
detected objects; also the number of negative samples should be more than the positive. It

Dept. of CSE, RIT Page 49


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

should be approximately double or more than that. Negative samples can contain anything
except the image of object that is going to be detected.

Fig 9.5: Negative Result

After the classifier is trained with positive and negative samples, the next step will be
detection of the helmet. The region of interest is given as input to the classifier which further
classifies whether the rider is wearing helmet or not. If the rider is wearing helmet, it is
classified as “helmet detected” and a round blob around helmet will be created otherwise it
is classified as “rider is not wearing helmet”.

9.2 Penalty Message when rules Voilated


System first identifies the vehicle and if it is car then no further process. If it is motor
cycle then it capture particular frame and from that it will take head portion of the frame. If the
LBP cascade algorithm detects the rigid object called helmet nothing will happen. If the LBP
cascade algorithm not detects the helmet or a person who does not wear a helmet while riding
vehicle like bike receives a penalty message for their cellphone to vehicle owner. And also theft
vehicle detected by the table T2 as shown in the Fig 9.2 which is saved in the Cloud. If the
output matches the theft vehicle detail then message sent to the police and also to vehicle owner.

Dept. of CSE, RIT Page 50


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

Fig 9.6: owner received penalty message

Fig 9.7: message also sent to police cellphone

Dept. of CSE, RIT Page 51


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

CHAPTER 10

SCREEN SHOTS

Fig 10.1: Front design of the project

Fig 10.2: Vehicle details successfully saved

Dept. of CSE, RIT Page 52


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

Fig 10.3: Fraud vehicle details successfully saved in the cloud

Fig 10.4: Two Tables in AWS cloud

Dept. of CSE, RIT Page 53


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

Fig 10.5: All vehicle details of table 1 saved in AWS cloud in excel format

Fig 10.6: List of Fraud Vehicle in Table 2 saved in AWS Cloud


Dept. of CSE, RIT Page 54
License Plate Recognition By Unique Edge Detection Algorithm 2019-20

Fig 10.7: This vehicle is theft

Fig 10.8: Recognized number displayed on screen

Dept. of CSE, RIT Page 55


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

Fig 10.9: Output is comparing to fraud (table 2) detail in console

Fig 10.10: This vehicle number from fraud list and message sent to police successfully

Dept. of CSE, RIT Page 56


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

Fig 10.11: Police received message

Fig 10.12: This person violated the rule by not wearing a helmet

Dept. of CSE, RIT Page 57


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

Fig 10.13: Recognized Vehicle number displayed on screen

Fig 10.14: Message sent successfully to mobile

Dept. of CSE, RIT Page 58


License Plate Recognition By Unique Edge Detection Algorithm 2019-20

Fig 10.15: Message to ploice Fig 10.16: Vehicle rider receives this penalty message

Dept. of CSE, RIT Page 59

You might also like