You are on page 1of 53

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

Jnana Sangama, Belgaum-18, Karnataka, India

A Project Report
on
AUTOMATED TOLL SYSTEM USING IMAGE PROCESSING
Submitted in partial fulfillment of the requirement for the award of the degree of

Bachelor of Engineering
In

Telecommunication Engineering
Submitted by
GOPI KRISHNAN.N
(1DS10TE032)

KARTHIK PADIYAR

NAKUL V SHET

(1DS10TE041)

(1DS10TE058)

Under The guidance of


Internal Guide

H.O.D

Mr. SANDEEP K V

Dr. A R ASWATHA

Assistant Professor,
Dept. of Telecommunication Engg.,
DSCE, Bangalore

Professor and Head,


Dept. of Telecommunication Engg.,
DSCE, Bangalore

2013-14

DEPARTMENT OF TELECOMMUNICATION ENGINEERING


DAYANANDA SAGAR COLLEGE OF ENGINEERING
BANGALORE-560 078

DAYANANDA SAGAR COLLEGE OF ENGINEERING


Shavige Malleshwara Hills, Kumaraswamy Layout, Bengaluru-560078.

DEPARTMENT OF TELECOMMUNICATION ENGINEERING

CERTIFICATE

2013-14

Certified that the project work entitled "AUTOMATED TOLL SYSTEM USING IMAGE
PROCESSING" carried out by Mr.GOPI KRISHNAN N (1DS10TE032), Mr.KARTHIK
PADIYAR (1DS10TE041), Mr.NAKUL V SHET (1DS10TE058) are bonafide students of
Dayananda Sagar College of Engineering in partial fulfillment for the award of degree in
Bachelor of Engineering in Telecommunication Engineering of the Visvesvaraya
Technological University, Belgaum during the year 2013-14. It is certified that all
corrections/suggestions indicated for internal assessment have been incorporated in the report
deposited in the departmental library. The project report has been approved as it satisfies the
academic requirements in respect of project work prescribed for the said Degree.

Signature of the Guide

Signature of the HOD

Signature of Principal

(Mr.SANDEEP K V)

(Dr.A.R ASWATHA)

(Dr. ANN MURTHY)

EXTERNAL VIVA
Name of the Examiner
1.
2.

Signature with date

ACKNOWLEDGEMENT

We take this opportunity to convey our gratitude to all those who have been kind enough to
offer their advice and provide assistance when needed which has led to the successful
completion of the project.
We would like to express our immense gratitude to our Principal, Dr. A.N.N MURTHY,
DSCE, Bangalore and Dr. ASWATHA A. R, Professor and Head, Department of
Telecommunication Engineering, Dayananda Sagar College of Engineering, Bangalore for
their constant support and motivation that has encouraged us to come up with this project and
also providing the right ambience for carrying out the work and the facilities provided to us.
We express our warm thanks to our internal guide Mr. SANDEEP K V, Assistant Professor,
Dept. of Telecommunication Engineering, Dayananda Sagar College of Engineering,
Bangalore for his skillful guidance, patience, concerned nature, constant supervision, timely
suggestion and constructive criticism in successful completion of our project in time.
We are grateful and thankful to all our friends, classmates who supported us in all stages in
making this seminar wonderful and successful.
Finally, we thank all the staff members of Telecommunication Engineering Department who
have rendered their valuable time and whole hearted support at all times for the successful
completion of this project.

GOPI KRISHNAN N
(1DS10TE032)

KARTHIK PADIYAR
(1DS10TE041)

NAKUL V SHET
(1DS10TE058)

ABSTRACT

In the past few years, the vehicular density has increased drastically. With this increase, it is
becoming difficult to keep track of each vehicle for purpose of law enforcement and traffic
management. Automatic Number Plate Recognition (ANPR) is used increasingly now a days
for automatic toll collection, maintaining traffic activities and law enforcement. Many
techniques have been proposed for plate detection, each having its own advantages and
disadvantages. The proposed project suggests an automated way of highway toll collection
based on the number plate of the vehicles when they pass through a toll collection booth. This
project deals in the field of Artificial Intelligence, Image Processing and Neural Networks in
the construction of an Automatic Number Plate Recognition System (ANPR).There will be
collection of the toll from the associated card and amount will be deducted. A corresponding
message will be sent to vehicle owners mobile number using GSM module. In case of theft,
the particular blacklisted vehicle will not be allowed to pass through toll gate. A corresponding
message will be sent to the owners mobile and Highway patrol. This project enhances the
performance of the system up to the maximum extent possible with less efforts and use of
computational resources.

CONTENTS
CERTIFICATE
ACKNOWLEDGEMENT
ABSTRACT

Title

Page no.

1. INTRODUCTION ...................................................................................................... 1
1.1. AUTOMATED NUMBER PLATE RECOGNITION........................................... 1
2. LITERATURE SURVEY ........................................................................................... 4
3. EXISTING SYSTEM.................................................................................................. 6
4. PROPOSED SYSTEM................................................................................................ 7
4.1. IMAGE ACQUISITION ...................................................................................... 8
4.2. PRE-PROCESSING............................................................................................. 8
4.3. EDGE DETECTION............................................................................................ 9
4.3.1 CANNY ALGORITHM INTRODCUTION ............................................. 9
4.3.2 CANNY EDGE DETECTION................................................................ 10
4.3.3 SMOOTHING ........................................................................................ 11
4.3.4 IMAGE GRADIENT .............................................................................. 12
4.3.5 FINDING EDGE DETECTION ............................................................. 12
4.3.6 NON MAXIMAL SUPPREISSION ....................................................... 13
4.3.7 DOUBLE THRESHOLDING ................................................................. 14
4.3.8 EDGE TRACKING BY HYSTERISIS ................................................... 14
4.4 MORPHOLOGICAL IMAGE .......................................................................... 15
4.5 EROSION ........................................................................................................ 17

4.6 NUMBER PLATE RECOGNITION ................................................................ 21


4.7 CHARACTER SEGMENTATION ................................................................... 21
4.7.1 NEURAL NETWORKS ......................................................................... 22
4.8 MATCHING WITH VEHICLE NUMBER DATABASE ................................. 24
5. IMPLEMENTATION OF LICENSE PLATE DETECTION ON H/W ...................... 25
5.1. PIC18F13K50 MICROCONTROLLER ............................................................. 26
5.1.1. FEATURES OF PIC18F13K50 ................................................................ 26
5.1.2 PIN DIAGRAM OF PIC18F13K50 ........................................................... 28
5.2. GSM 300 ........................................................................................................... 28
5.2.1 FEATURES OF GSM 300 ........................................................................ 29
5.2.2 APPLICATIONS OF GSM 300................................................................. 30
5.3. MAX232 IC ....................................................................................................... 30
5.3.1 APPLICATIONS OF MAX 232 ................................................................ 31
5.4. RS-232 ............................................................................................................... 32
5.4.1 DB9 CONNECTOR .................................................................................. 32
5.4.2 PIN OUT ................................................................................................... 33
5.5. VOLTAGE REGULATOR-LM7805 ................................................................. 34
5.5.1 ADVANTAGES OF LM7805 ................................................................... 35
6. SOFTWARE DESCRIPTION ................................................................................... 36
6.1. MATLAB R2013a ............................................................................................. 36
6.2. MPLAB IDE V8.30 ........................................................................................... 37
7. APPLICATIONS ...................................................................................................... 38
8. ADVANTAGES AND DISADVANTAGES ............................................................ 39
9. RESULTS AND CONCLUSION .............................................................................. 40
9.1. MATLAB SIMULATION RESULT .................................................................. 40

9.2. FINAL RESULT ................................................................................................ 40


9.3. CONCLUSION .................................................................................................. 41
REFERENCES ............................................................................................................... 42
APPENDIX
PAPER PROCEEDINGS COPY AND CERTIFICATE

LIST OF FIGURES
Fig. no.

Page no.

3.1 FLOWCHART FOR EXISITING SYSTEM ............................................................... 6


3.2 TOLL COLLECTION CENTRE IN INDIA ................................................................ 6
4.1 FLOWCHART FOR PROPOSED SYSTEM .............................................................. 7
4.2 ORIGINAL IMAGE ................................................................................................... 8
4.3 PRE-PROCESSED IMAGE ........................................................................................ 9
4.4 BLOCK DIAGRAM OF CANNY EDGE ALGORITHM ......................................... 11
4.5 POSSIBLE DIRECTION TO FIND GRADIENT ..................................................... 13
4.6 EDGE DETECTED IMAGE ..................................................................................... 14
4.7 PROBING OF AN IMAGE WITH A STRUCTURING ELEMENT ......................... 15
4.8 EXAMPLES OF SIMPLE STRUCTURING ELEMENTS ........................................ 16
4.9 FITIING AND HITTING OF A BINARY IMAGE ................................................... 16
4.10 REDUCED MORPHOLOGICAL IMAGE ............................................................. 17
4.11 3X3 SQUARE STRUCTURING ELEMENT .......................................................... 18
4.12 EFFECT OF EROSION USING 3X3 SQUARE STRUCTURING ELEMENT ....... 19
4.13 GRAYLEVEL EROSION USING A DISK SHAPED ELEMENT.......................... 20
4.14 ERODED IMAGE .................................................................................................. 20
4.15 REGION OF INTEREST ........................................................................................ 21
4.16 BINARY IMAGE ................................................................................................... 21
4.17 SEGMENTED CHARACTERS .............................................................................. 22

4.18 LETTERS ............................................................................................................... 22


4.19 NUMBERS ............................................................................................................. 22
4.20 CHARACTER DATABASE ................................................................................... 23
5.1 SCHEMATIC FOR HARDWARE IMPLEMENTATION ........................................ 25
5.2 PIN DIAGRAM OF PIC18F13K50 ........................................................................... 28
5.3 GSM MODULE ........................................................................................................ 30
5.4 PIN DIAGRAM OF MAX232 .................................................................................. 31
5.5 DB9 CONNECTOR.................................................................................................. 34
5.6 VOLTAGE REGULATOR PIN DIAGRAM ............................................................ 35
5.7 SCHEMATIC OF VOLTAGE REGULATOR .......................................................... 35
9.1 MATLAB OUTPUT FOR BLACKLISTED VEHCILE NUMBER........................... 40
9.2 MATLAB OUTPUT FOR OWNED VEHICLE NUMBER ...................................... 40
9.3 MESSAGE RECEIVER BY THE OWNER OR THE VEHICLE .............................. 41

LIST OF TABLES
Table no.

Page no.

1. EXAMPLE OF VEHICLE DATABASE .................................................................... 24


2. I/O MAX232 SIGNALS ............................................................................................. 33

Automated Toll System Using Image Processing

2013-14

CHAPTER 1

INTRODUCTION
With increasing number of vehicles on roads, it is getting difficult to manually
enforce laws and traffic rules for smooth traffic flow. Toll-booths are constructed on
freeways and parking structures, where the car has to stop to pay the toll or parking fees.
Also, Traffic Management systems are installed on freeways to check for vehicles moving
at speeds not permitted by law. All these processes have a scope of improvement. In the
centre of all these systems lies a vehicle. In order to automate these processes and make
them more effective, a system is required to easily identify a vehicle. The important
question here is how to identify a particular vehicle? The obvious answer to this question
is by using the vehicles number plate.

Vehicles in each country have a unique license number, which is written on its
license plate. This number distinguishes one vehicle from the other, which is useful
especially when both are of same make and model. An automated system can be
implemented to identify the license plate of a vehicle and extract the characters from the
region containing a license plate. The license plate number can be used to retrieve more
information about the vehicle and its owner, which can be used for further processing. Such
an automated system should be small in size, portable and be able to process data at
sufficient rate.

1.1 Automated Number Plate Recognition (ANPR)


Various license plate detection algorithms have been developed in past few years.
Each of these algorithms has their own advantages and disadvantages. Automated Number
plate Recognition or (ANPR) refers to a mass surveillance system which uses optical
character recognition software package on images to read the number plates of vehicles.
The work being developed is an image processing based work for Automatic Recognition
of Number plate from the image of the vehicle taken into consideration which allows one
to recognize unique number plate of the vehicle for an intelligent traffic or vehicle
management system.

Dept. of TCE, DSCE

Page 1

Automated Toll System Using Image Processing

2013-14

With the rapid development of highway and the wide use of vehicle, people have
started to pay more and more attention on the advanced, efficient and accurate intelligent
transportation systems (ITSs).

The automated number plate recognition (ANPR) task is quite challenging from
vehicle images due to the view point changes, when vehicle bodies and license plate have
similar colour, multi-style plate formats, and the non-uniform outdoor illumination
conditions during image acquisition. The ANPR is used widely for detecting speeding cars,
security control in restricted areas, unattended parking zones, traffic law enforcement, and
electronic toll collection, etc. The major steps to accomplish the proposed work can be
given as
1. Image acquisition
2. Pre-Processing
3. Edge Detection
4. Character Segmentation
5. Character Recognition and matching with database

The proposed system is to deal with the problem in toll collection in highways. The
human intervention makes the system very much prone to mistakes and inefficient thats
why we propose the system which will automatically capture the vehicles image and also
pre-process it by removing the effect of noise and blur with the help of image preprocessing activities. This pre-processed image which is the partial output is given to next
process i.e. for finding the region of interest which is our number plate. This process will
detect the number plate from the image taken. This partially processed image which is the
output of the previous step will be given to the next step which is of sharpening of the edges
of number plate. This sharpening is done with the help of Canny Edge detection algorithm
which along with sharpening of edges also enhances the quality of image using Gaussian
kernel as its filtering part. The sharpened image is than inputted to segmentation algorithm
which separates out individual characters from the output of previous step. From that we
will find out individual characters that are present in the number plate and we will match
them individually with the help of Artificial Neural Networking agents which will be
already trained with thousands of sample images.

Dept. of TCE, DSCE

Page 2

Automated Toll System Using Image Processing

2013-14

The final output of the system will be the digitalized form of the numbers of the
number plate of vehicle and ultimately the toll amount is deducted automatically from the
prepaid card assigned to each vehicle.

After the toll amount is deducted a corresponding message will be sent to the mobile
number of vehicle owner which will be present in the database.

To ensure security, if the vehicle number is found to have cases registered against
it (Blacklisted) then it is not allowed to pass the toll booth and a message is sent to the
owner and the police simultaneously.

The messages will be sent using GSM Module. The contents of message will be as follows:

1. Vehicle Number.
2. Status of the vehicle.
3. Balance Amount in prepaid card.
4. Amount Deducted.

Dept. of TCE, DSCE

Page 3

Automated Toll System Using Image Processing

2013-14

CHAPTER 2

LITERATURE SURVEY
This section includes the work already done on this system by various researchers
using different methodologies and algorithms. Following is the brief description of some
of them:
1. Car Plate Recognition Using the Template Matching Method is proposed by
M.I.Khalil

Generally, LPR system consists of 4 modules: Image acquisition, licensed

plate extraction, segmentation & recognition of individual character. But template


matching method does not need the "segmentation" process of input image. After the
license plate extraction phase, INFORMATION RECOGNITION PHASE (IPR) is
applied. For this phase "moving window technique" is used.

2. An Efficient Method of Vehicle License Plate Recognition Based on Sliding


Concentric Windows and Artificial Neural Network is proposed by Kaushik Deba, Md.
Ibrahim Khana, Anik Sahaa, and Kang-Hyun Job. In this system they are using
segmentation technique named as Sliding Concentric Windows(SCW).This method
helps is analyse road images which are often contain vehicles and extract license plate
from natural properties by finding vertical and horizontal edges from vehicle region.

3. SVM Based License Plate Recognition System proposed by Kumar Parasuraman.


SVM is a supervised learning technique, which takes Statistical Learning Theory (SLT)
as its theoretical foundation, and the structural risk minimization as its optimal object
to realize the best generalization. Two main approaches have been suggested for
applying SVMs for multiclass classification. A number plate region is located by using
mean shift method and extracted; the histogram projection method in horizontal
direction is applied for a simple segmentation only.
From this survey it has been observed that there are certain limitations about proposed
algorithms like:
1. Poor image resolution
2. Less Accuracy
3. Poor lighting and low contrast
4. Higher Computational Cost

Dept. of TCE, DSCE

Page 4

Automated Toll System Using Image Processing

2013-14

5. Lack of standards of the plate of the vehicles


6. Improperly segmented characters will result in misrecognized characters.

4. Electronic toll collection using passive RFID is proposed by KHADIJAH


KAMARULAZIZI.
The proposed RFID system uses tags that are mounted on the windshields of vehicles,
through which information embedded on the tags are read by RFID readers. The amount
will then automatically deduct from the bank account.
The major disadvantages of a passive RFID tag are:

The tag can be read only at very short distances, typically a few feet at most. This
greatly limits the device for certain applications.

The tag is typically more expensive, often costing Rs.1500/- or more each

5. Vehicle License Plate Detection Method Based on Sliding Concentric Windows and
Histogram is proposed by Kaushik Deb,ETAL: A new method is adopted in this paper to
analyse road images which often contain vehicles and extract LP from natural properties
by finding vertical and horizontal edges from vehicle region.

6. Vertical Edges-based Car License Plate Detection Method is proposed by Abbas M. AlGhaili,ETAL.This method proposes a fast method for Car License Plate Detection (CLPD)
which presents three main contributions. The first one is that we propose a fast Vertical
Edge Detection Algorithm (VEDA) based on the contrast between the gray scale values,
which enhances the speed of CLPD method. The second contribution is that our proposed
CLPD method processes very low-resolution images taken by a web-camera.
7. Vehicles RC Plate Tracking based on Image Processing Applications is proposed by
Amina Khatra. This method describes a real time technique for identifying vehicle licenseplate and interpretation of the registration code from a captured image. The proposed
algorithm is divided into three stages: extraction of vehicle license plate from captured
vehicle image, segmentation of license plate characters and recognition of the license plate
characters for interpretation of vehicle registration code. Finally, a control algorithm is also
developed to choose between the recognition processes and reconstruct the registration
code from recognized characters.
Dept. of TCE, DSCE

Page 5

Automated Toll System Using Image Processing

2013-14

CHAPTER 3

EXISTING SYSTEM
Vehicle enters the Toll
Booth

Operator inputs
Vehicle number

Toll is collected
through cash

Gate is opened and


vehicle passes

Fig 3.1: Flowchart for existing system

At present, toll payment system in India is manual and drivers are using pay by cash
method to cross the toll booth. The flowchart for existing system is shown above.
The disadvantages of the system are as follows:

It is time consuming and drivers have to wait for long time for crossing the booth.

Fuel of the vehicles is unnecessarily consumed.

This process is prone to human errors.

Fig 3.2: Toll collection Centre in India

Dept. of TCE, DSCE

Page 6

Automated Toll System Using Image Processing

2013-14

CHAPTER 4

PROPOSED SYSTEM
INPUT IMAGE FROM
CAMERA

IS THE VEHICLE NUMBER


BLACK LISTED?
NO

PRE-PROCESSING

EDGE DETECTION

DEDUCT AMOUNT

SEND MESSAGE TO THE


OWNERS MOBILE

Yes

DO NOT OPEN
TOLL BOOTH
GATE

SEND A MESSAGE
TO OWNER AND
HIGHWAY PATROL

CHARACTER
SEGMENTATION

PRE-RECOGNITION
CHARACTER
ENHANCEMENT

CHARACTER
RECOGNITION AND
MATCHING WITH
CHARACTER
DATABASE

OUTPUT VEHICLE
NUMBER

MATCHING WITH
VEHICLE DATABASE

Fig4.1: Flow Chart for Proposed Toll Collection System

Dept. of TCE, DSCE

Page 7

Automated Toll System Using Image Processing

2013-14

4.1 IMAGE ACQUISITION


Refers to the original image that is acquired from a high resolution camera. The
image shown below is the input image we have used in our project.

Fig 4.2 Original Image

4.2 PRE-PROCESSING
Pre-processing has to be performed by taking into account the background
illumination conditions and the number plate localization algorithms. It is important to
eliminate as much background noise as possible, contrast enhancement and de-blurring in
the pre-processing step itself to optimize the localization algorithm and also save the
processing time. For pre-processing we are going to use some MATLAB function which
will help in pre-processing of the image [1].
The algorithm described here is independent of the type of colours in image and
relies mainly on the gray level of an image for processing and extracting the required
information. Colour components like Red, Green and Blue value are not used throughout
this algorithm. So, if the input image is a coloured image represented by 3-dimensional
array in MATLAB, it is converted to a 2-dimensional gray image before further processing.
The Pre-processed image is shown below:

Dept. of TCE, DSCE

Page 8

Automated Toll System Using Image Processing

2013-14

Fig 4.3 Pre-Processed Image

4.3 EGDE DETECTION


The process of sharpening and enhancing the edges of an image is called edge
detection technique. We have used canny edge detector in our project to find the edges of
number plate.

4.3.1 THE CANNY ALGORITHM


In many applications it is necessary to find boundaries of objects that appear in
images. Edges characterize boundaries and are therefore a problem of fundamental
importance in image processing. Edges typically occur on the boundary between two
different regions in an image. Edges are significant local changes of intensity in an image.
Edges in images are areas with strong intensity contrasts which mean a jump in intensity
from one pixel to the next. Edge detecting an image significantly reduces the amount of
data and filters out useless information, while preserving the important structural properties
in an age. The purpose of edge detection in general is to significantly reduce the amount of
data an image, while preserving the structural properties to be used for further image
processing. Several algorithms exist, and this worksheet focuses on a particular one
developed by John F. Canny in 1986.

Dept. of TCE, DSCE

Page 9

Automated Toll System Using Image Processing

2013-14

The aim is to develop an algorithm that is optimal with regards to the following criteria:

Detection: The probability of detecting real edge points should be maximized while
the probability of falsely detecting non-edge points should be minimized. This
corresponds to maximizing the signal-to-noise ratio.

Localization: The detected edges should be as close as possible to the real edges.

Number of responses: One real edge should not result in more than one detected
edge (one argue that this is implicitly included in the first requirement).

Edge detection consists of creating a binary image from a gray scale image where
non -background pixel values correspond to object boundaries. Edges can be detected with
the help of gradient/derivative type operators. As such they tend to be sensitive to noise so
an effective edge detection method depends on the nature of the image and the
characteristics of the noise [3].

4.3.2 THE CANNY EDGE DETECTION ALGORITHM


The algorithm runs in 5 separate steps [:
Smoothing: Blurring of the image to remove noise.
Finding gradients: The edges should be marked where the gradients of the image has large
magnitudes,
Finding edge direction: Edge direction should be known once the gradients are known
Non-maximum suppression: Only local maxima should be marked as edges.
Double thresholding: Potential edges are determined by thresholding.
Edge tracking by hysteresis: Final edges are determined by suppressing all edges that are
not connected to a very certain (strong) edge.
The block diagram for Canny algorithm is as demonstrated below:

Dept. of TCE, DSCE

Page 10

Automated Toll System Using Image Processing

2013-14

Input
Image

Fig 4.4 Block Diagram of Canny Edge Algorithm

4.3.3 SMOOTHING
In order to implement the canny edge detector algorithm, a series of steps must be
followed. The first step is to filter out any noise in the original image before trying to locate
and detect any edges. And because the Gaussian filter can be computed using a simple
mask, it is used exclusively in the Canny algorithm. Once a suitable mask has been
calculated, the Gaussian smoothing can be performed using standard convolution methods.
A convolution mask is usually much smaller than the actual image. As a result, the mask is
slid over the image, manipulating a square of pixels at a time. The larger the width of the
Gaussian mask, the lower is the detector's sensitivity to noise. The localization error in the
detected edges also increases slightly as the Gaussian width is increased. The Gaussian
mask used in implementation is shown below.

Dept. of TCE, DSCE

Page 11

Automated Toll System Using Image Processing

2013-14

4.3.4 FINDING GRADIENT


After smoothing the image and eliminating the noise, the next step is to find the
edge strength by taking the gradient of the image. The Sobel operator performs a 2-D spatial
gradient measurement on an image. Then, the approximate absolute gradient magnitude
(edge strength) at each point can be found. The Sobel operator uses a pair of 3x3
convolution masks, one estimating the gradient in the x-direction (columns) and the other
estimating the gradient in the y-direction (rows). They are shown below:

The magnitude, or edge strength, of the gradient is then approximated using the formula:
|G|= |Gx| + |Gy|

4.3.5 FINDING EDGE DIRECTION


Finding the edge direction is trivial once the gradient in the x and y directions are
known. However, you will generate an error whenever sum(x) is equal to zero. So in the
code there has to be a restriction set whenever this takes place. Whenever the gradient in
the x direction is equal to zero, the edge direction has to be equal to 90 degrees or 0 degrees,
depending on what the value of the gradient in the y-direction is equal to. If GY has a value
of zero, the edge direction will equal 0 degrees. Otherwise the edge direction will equal 90
degrees. The formula for finding the edge direction is just:
Theta = tan-1 (Gy / Gx)

Dept. of TCE, DSCE

Page 12

Automated Toll System Using Image Processing

2013-14

4.3.6 NON-MAXIMAL SUPPRESSION


Once the edge direction is known, the next step is to relate the edge direction to a
direction that can be traced in an image. So if the pixels of a 5x5 image are aligned as
follows:

Then, it can be seen by looking at pixel a, there are only four possible directions
when describing the surrounding pixels 0 degrees (in the horizontal direction), 45 degrees
(along the positive diagonal), 90 degrees (in the vertical direction), or 135 degrees (along
the negative diagonal). So now the edge orientation has to be resolved into one of these
four directions depending on which direction it is closest to (e.g. if the orientation angle is
found be 3 degrees, make it zero degrees). Think of this as taking a semicircle and dividing
it into 5 regions.

Fig 4.5 Possible direction to find gradient

Dept. of TCE, DSCE

Page 13

Automated Toll System Using Image Processing

2013-14

4.3.7 DOUBLE THRESHOLDING


After the edge directions are known, non-maximum suppression now has to be
applied. Non-maximum suppression is used to trace along the edge in the edge direction
and suppress any pixel value (sets it equal to 0) that is not considered to be an edge. This
will give a thin line in the output image.

4.3.8 EDGE TRACKING BY HYSTERESIS


Finally, hysteresis is used as a means of eliminating streaking. Streaking is the
breaking up of an edge contour caused by the operator output fluctuating above and below
the threshold. If a single threshold, Tl is applied to an image, and an edge has an average
strength equal to T l, then due to noise, there will be instances where the edge dips below
the threshold. Equally it will also extend above the threshold making an edge look like a
dashed line. To avoid this, hysteresis uses 2 thresholds, a high and a low. Any pixel in the
image that has a value greater than Tl is presumed to be an edge pixel, and is marked as
such immediately. Then, any pixels that are connected to this edge pixel and that have a
value greater than T2 are also selected as edge pixels.

Fig 4.6 Edge detected image

Dept. of TCE, DSCE

Page 14

Automated Toll System Using Image Processing

2013-14

4.4 MORPHOLOGICAL IMAGE


Morphological image processing is a collection of non-linear operations related to
the shape or morphology of features in an image. Morphological operations rely only on
the relative ordering of pixel values, not on their numerical values, and therefore are
especially suited to the processing of binary images. Morphological operations can also be
applied to greyscale images such that their light transfer functions are unknown and
therefore their absolute pixel values are of no or minor interest [4].
Morphological techniques probe an image with a small shape or template called
a structuring element. The structuring element is positioned at all possible locations in the
image and it is compared with the corresponding neighbourhood of pixels. Some operations
test whether the element "fits" within the neighbourhood, while others test whether it "hits"
or intersects the neighbourhood:

Fig 4.7 Probing of an image with a structuring element

A morphological operation on a binary image creates a new binary image in


which the pixel has a non-zero value only if the test is successful at that location in the
input image.
The structuring element is a small binary image, i.e. a small matrix of pixels, each with a
value of zero or one:

The matrix dimensions specify the size of the structuring element.

The pattern of ones and zeros specifies the shape of the structuring element.

An origin of the structuring element is usually one of its pixels, although generally
the origin can be outside the structuring element.

Dept. of TCE, DSCE

Page 15

Automated Toll System Using Image Processing

2013-14

Fig 4.8 Examples of simple structuring elements.

A common practice is to have odd dimensions of the structuring matrix and the
origin defined as the centre of the matrix. Structuring elements play in morphological image
processing the same role as convolution kernels in linear image filtering.

When a structuring element is placed in a binary image, each of its pixels is


associated with the corresponding pixel of the neighbourhood under the structuring
element. The structuring element is said to fit the image if, for each of its pixels set to 1,
the corresponding image pixel is also 1. Similarly, a structuring element is said to hit, or
intersect, an image if, at least for one of its pixels set to 1 the corresponding image pixel is
also 1.
.

Fig 4.9 Fitting and hitting of a binary image with structuring elements s 1 and s2.

Dept. of TCE, DSCE

Page 16

Automated Toll System Using Image Processing

2013-14

Zero-valued pixels of the structuring element are ignored, i.e. indicate points where the
corresponding image value is irrelevant.

Fig 4.10 Reduced Morphological image

4.5 EROSION
Erosion is one of the two basic operators in the area of mathematical morphology,
the other being dilation. It is typically applied to binary images, but there are versions that
work on grayscale images. The basic effect of the operator on a binary image is to erode
away the boundaries of regions of foreground pixels (i.e. white pixels, typically). Thus
areas of foreground pixels shrink in size, and holes within those areas become larger.
The erosion operator takes two pieces of data as inputs. The first is the image which
is to be eroded. The second is a (usually small) set of coordinate points known as
a structuring element (also known as a kernel). [5]
It is this structuring element that determines the precise effect of the erosion on the
input image. The mathematical definition of erosion for binary images is as follows:

Suppose that X is the set of Euclidean coordinates corresponding to the input binary
image, and that K is the set of coordinates for the structuring element.

Let Kx denote the translation of K so that its origin is at x.

Dept. of TCE, DSCE

Page 17

Automated Toll System Using Image Processing

2013-14

Then the erosion of X by K is simply the set of all points x such that Kx is a subset
of X.

The mathematical definition for grayscale erosion is identical except in the way in
which the set of coordinates associated with the input image is derived. In addition, these
coordinates are 3-D rather than 2-D.
As an example of binary erosion, suppose that the structuring element is a 33
square, with the origin at its center as shown in Figure 1. Note that in this and subsequent
diagrams, foreground pixels are represented by 1's and background pixels by 0's.

Fig 4.11 33 square structuring element


To compute the erosion of a binary input image by this structuring element, we
consider each of the foreground pixels in the input image in turn. For each foreground pixel
(which we will call the input pixel) we superimpose the structuring element on top of the
input image so that the origin of the structuring element coincides with the input pixel
coordinates. If for every pixel in the structuring element, the corresponding pixel in the
image underneath is a foreground pixel, then the input pixel is left as it is. If any of the
corresponding pixels in the image are background, however, the input pixel is also set to
background value.
For our example 33 structuring element, the effect of this operation is to remove
any foreground pixel that is not completely surrounded by other white pixels (assuming 8connectedness). Such pixels must lie at the edges of white regions, and so the practical
upshot is that foreground regions shrink (and holes inside a region grow).
Erosion is the dual of dilation, i.e. eroding foreground pixels is equivalent to dilating
the background pixels.
Dept. of TCE, DSCE

Page 18

Automated Toll System Using Image Processing

2013-14

Most implementations of this operator will expect the input image to be binary,
usually with foreground pixels at intensity value 255, and background pixels at intensity
value 0. Such an image can often be produced from a grayscale image using thresholding.
It is important to check that the polarity of the input image is set up correctly for the erosion
implementation being used.
The structuring element may have to be supplied as a small binary image, or in a
special matrix format, or it may simply be hardwired into the implementation, and not
require specifying at all. In this latter case, a 33 square structuring element is normally
assumed which gives the shrinking effect described above. The effect of an erosion using
this structuring element on a binary image is shown in Figure 2.

Fig 4.12 Effect of erosion using a 33 square structuring element


The 33 square is probably the most common structuring element used in erosion
operations, but others can be used. A larger structuring element produces a more extreme
erosion effect, although usually very similar effects can be achieved by repeated erosions
using a smaller similarly shaped structuring element. With larger structuring elements, it is
quite common to use an approximately disk shaped structuring element, as opposed to a
square one. The image is the result of eroding four times with a disk shaped structuring
element 11 pixels in diameter. It shows that the hole in the middle of the image increases
in size as the border shrinks. Note that the shape of the region has been quite well preserved
due to the use of a disk shaped structuring element. In general, erosion using a disk shaped
structuring element will tend to round concave boundaries, but will preserve the shape of
convex boundaries.

Dept. of TCE, DSCE

Page 19

Automated Toll System Using Image Processing

2013-14

Erosions can be made directional by using less symmetrical structuring elements.


For example, a structuring element that is 10 pixels wide and 1 pixel high will erode in a
horizontal direction only. Similarly, a 33 square structuring element with the origin in the
middle of the top row rather than the center, will erode the bottom of a region more severely
than the top.
Grayscale erosion with a flat disk shaped structuring element will generally darken
the image. Bright regions surrounded by dark regions shrink in size, and dark regions
surrounded by bright regions grow in size. Small bright spots in images will disappear as
they are eroded away down to the surrounding intensity value, and small dark spots will
become larger spots. The effect is most marked at places in the image where the intensity
changes rapidly, and regions of fairly uniform intensity will be left more or less unchanged
except at their edges. Figure 3 shows a vertical cross-section through a graylevel image and
the effect of erosion using a disk shaped structuring element. Note that the flat disk shaped
kernel causes small peaks in the image to disappear and valleys to become wider.

Fig 4.13 The graphs show a vertical cross-section through a graylevel image.

Fig 4.14 Eroded Image


Dept. of TCE, DSCE

Page 20

Automated Toll System Using Image Processing

2013-14

4.6 NUMBER PLATE RECOGNITION


Recognizing the number plate from the image of the vehicle taken in previous step
using appropriate algorithm is term as number plate localization or simply finding out ROI
i.e. Region of1 Interest. This step recognizes the location of number plate in captured image
so that it will be easier to recognize the number by using only that part of the captured
image. The output after localizing the number plate is than inputted to the edge detection
algorithm which improvises the edges of characters in the image. By the previous step gives
more sharp and clear edges in the image by applying algorithms the edges are classified so
that the given set of edges will help to recognize the character. [7]

Fig 4.15 Region of interest (ROI)

4.7 CHARACTER SEGMENTATION


Effective character segmentation is performed using line scanning technique.
Usually scanning done from left to right of the license plate. The process involves several
steps, first the gray scale image is converted into binary image. In order to partition the text
on the license plate into lines Lines function which uses clip function is used. Usually
this Clip function crops black letter with white background. And then resizing is done.
At the end same procedure is repeated on the cropped image till all the characters are
segmented. [7]

Fig 4.16 Binary image

Dept. of TCE, DSCE

Page 21

Automated Toll System Using Image Processing

2013-14

Fig4.17 Segmented Characters

4.7.1 NEURAL NETWORKS (CHARACTER MATCHING WITH


DATABASE)
In order to assign each digit signature to its corresponding ASCII representation,
two feed forward back propagation neural networks (NNET) were designed, the one
assigned to letters and the other two numbers. The networks consist of one hidden and one
output layer with Log-Sigmoid transfer functions, as shown in figures shown below:

Fig 4.18 Letters

Fig 4.19 Numbers

Dept. of TCE, DSCE

Page 22

Automated Toll System Using Image Processing

2013-14

The letters NNET receives a 130x1 vector in the form of figures. It passes through
the first log sigmoid hidden layer which contains 17 neurons and finally it enters the output
log-sigmoid layer which contains 14 neurons, leading to the vector a2. The output 14x1
vector values correspond to the sequence of letters (, , , , , , , , , , , , ,
) and are between 0 and 1 (due to the log-sigmoid function). [7]

It can be said that each value represents the probability that the input signature is
classified to a specific number. The final result is provided through a competitive transfer
function which returns the index with the optimum value. The numbers NNET works
identically to the letters network, except that it uses 22 neurons in the hidden layer and 10
neurons in the output layer, corresponding to the sequence of numbers (1, 2, 3, 4, 5, 6, 7, 8,
9, and 0). Both NNETs were initially trained with the Gradient descent method using
adaptive learning and a single set of letters and signatures.

Then, the learning was continued by applying artificial (random) noise to the
signatures, in order to increase the ability of the system to recognize disturbed digits.
Finally, in order to preserve the networks ability to classify the standard (initial) signatures,
it was further trained using the initial signatures set.

Fig 4.20 Character Database

Dept. of TCE, DSCE

Page 23

Automated Toll System Using Image Processing

2013-14

4.8 MATCHING WITH VEHICLE NUMBER DATABASE


The characters thus obtained are mapped with the database so as to find licensed
user of that number plate and result is displayed.

Table 1: Example of Vehicle Database

The output of this section will contain vehicle number in digitized form which will
form the input to hardware section.

Dept. of TCE, DSCE

Page 24

Automated Toll System Using Image Processing

2013-14

CHAPTER 5

IMPLEMENTATION OF LICENSE PLATE


DETECTION ON HARDWARE
In this chapter, we describes the hardware components to implement the License
Plate Detection algorithm on a PIC18F13K50 hardware kit containing GSM MODULE
The main Hardware components used for sending a message to a particular number are:

PIC18F13K50 Microcontroller

GSM MODULE- SIM 300

MAX232

CONNECTOR DB9

VOLTAGE REGULATOR- LM7805

The schematic for hardware implementation is shown below:

Fig 5.1 Schematic for Hardware Implementation

Dept. of TCE, DSCE

Page 25

Automated Toll System Using Image Processing

2013-14

5.1 PIC18F13K50 Microcontroller


A microcontroller (sometimes abbreviated C, uC or MCU) is a small computer on
a

single

integrated

circuit

containing

processor

core,

memory,

and

programmable input/output peripherals. Program memory in the form of NOR flash or OTP
ROM is also often included on chip, as well as a typically small amount of RAM.
Microcontrollers are designed for embedded applications, in contrast to the
microprocessors used in personal computers or other general purpose applications.
Microcontrollers are used in automatically controlled products and devices, such as
automobile engine control systems, implantable medical devices, remote controls, office
machines, appliances, power tools, toys and other embedded systems. By reducing the size
and cost compared to a design that uses a separate microprocessor, memory, and
input/output devices, microcontrollers make it economical to digitally control even more
devices and processes. Mixed signal microcontrollers are common, integrating analog
components needed to control non-digital electronic systems. We have used PIC18F13K50
microcontroller for interfacing the GSM Module in order to send the message to vehicle
owners as the pass the toll booth. The features of the PIC18FK50 microcontroller is given
below which makes it efficient to use for our project.

5.1.1 FEATURES OF PIC18F13K50


High Performance PIC18 Core

C Compiler optimized architecture

Self-programmable under software control

Support for Interrupt Priority Levels

8x8 Single-Cycle Hardware Multiplier

Enhanced Watchdog Timer with a programmable period


Full Speed Universal Serial Bus Interface

USB v2.0 compliant interface

Supports both Low Speed and Full Speed operation

Supports Control, Interrupt, Isochronous and Bulk transfer

Up to 16 Endpoints (or up to 8 bidirectional)

Dept. of TCE, DSCE

Page 26

Automated Toll System Using Image Processing

Automatic detection of physical connection to USB host

256-byte Dual Access RAM

2013-14

Flexible Clocking Options

Can be internally clocked up to 48MHz

Fully tuneable Internal Oscillator

Supplies frequencies from 31KHz to 16MHz

Can be user-adjusted for frequency drift

Internal 4x Phase Lock Loop (PLL)

Can be used with External or Internal Oscillators

Fail-safe Clock Monitor

Allows for safe shutdown during oscillator failure


Advanced PIC Microcontroller Peripherals

Dual Capture/Compare/PWM interfaces

Up to 5 PWM Outputs

Programmable dead time, auto shutdown/restart

Master I2C/SPI Interface

Supports all modes of 3-wire SPI

I2CCompatible Master and Slave modes with address masking

Enhanced Addressable USART Module

Supports RS-485, RS-232, and LIN 2.0

10-bit, 9-channel ADC Module

Can acquire & convert samples automatically

Can operate in sleep mode

mTouch(TM) compatible Analog Comparators w/ SR Latch

Rail to Rail operation

Independent input multiplexing

Robust GPIO with 25mA sink/source current

Programmable On-chip Voltage Reference

Can be used with Comparators or ADC

Dept. of TCE, DSCE

Page 27

Automated Toll System Using Image Processing

2013-14

Operating Environment Versatility

1.8 to 5.6V Operating Range

Software Programmable Brown-out Reset feature

Four power-managed operating modes

Two-speed clock startup option

5.1.2 PIN Diagram of PIC18F1XK50

Fig 5.2 Pin diagram of PIC18F1XK50

5.2 GSM-300
GSM stands for Global System for Mobile Communications. It is a standard set
developed by the European Telecommunications Standards Institute (ETSI) to describe
protocols for second generation (2G) digital cellular networks used by mobile phones.
A Modem is a device which modulates and demodulates signals as required to meet
the communication requirements. It modulates an analog carrier signal to encode digital
information, and also demodulates such a carrier signal to decode the transmitted
information. A GSM Modem is a device that modulates and demodulates the GSM signals
and in this particular case 2G signals. The modem we are using is SIMCOM SIM300.

Dept. of TCE, DSCE

Page 28

Automated Toll System Using Image Processing

2013-14

It is a Tri-band GSM/GPRS Modem as it can detect and operate at three frequencies


(EGSM 900 MHz, DCS 1800 MHz and PCS1900 MHz). Default operating frequencies are
EGSM 900MHz and DCS 1800MHz.
Sim300 is a widely used in many projects and hence many variants of development
boards for this have been developed. These development boards are equipped with various
features to make it easy to communicate with the SIM300 module. Some boards provide
only TTL interface while some boards include an RS232 interface and some others include
an USB interface. If your PC has a serial port (DB9) you can buy a GSM Modem that has
both TTL and RS232 interfacings in economy.
Sim300 GSM module used here, consists of a TTL interface and an RS232
interface. The TTL interface allows us to directly interface with a microcontroller while the
RS232 interface includes a MAX232 IC to enable communication with the PC. It also
consists of a buzzer, antenna and SIM slot. Sim300 in this application is used as a DCE
(Data Circuit-terminating Equipment) and PC as a DTE (Data Terminal Equipment).
This GSM Modem can accept any GSM network operator SIM card and act just
like a mobile phone with its own unique phone number. Advantage of using this modem
will be that you can use its RS232 port to communicate and develop embedded applications.
The modem can either be connected to PC serial port directly or to any microcontroller. It
can be used to send and receive SMS or make/receive voice calls. It can also be used in
GPRS mode to connect to internet and do many applications for data logging and control.
In GPRS mode you can also connect to any remote FTP server and upload files for data
logging. This GSM modem is a highly flexible plug and play quad band GSM modem for
direct and easy integration to RS232 applications.

5.2.1 FEATURES OF GSM 300

Highly Reliable for 24x7 operation with Matched Antenna

Status of Modem Indicated by LED

Simple to Use & Low Cost

Quad Band Modem supports all GSM operator SIM cards

Dept. of TCE, DSCE

Page 29

Automated Toll System Using Image Processing

2013-14

5.2.2 APPLICATIONS OF GSM 300

SMS based Remote Control & Alerts

Security Applications

Sensor Monitoring

GPRS Mode Remote Data Logging

Fig 5.3 GSM 300 Module

5.3 MAX232 IC
The MAX232 is an IC, first created in 1987 by Maxim Integrated Products, that
converts signals from an RS-232 serial port to signals suitable for use in TTL compatible
digital logic circuits. The MAX232 is a dual driver/receiver and typically converts the RX,
TX, CTS and RTS signals.
The drivers provide RS-232 voltage level outputs (approx. 7.5 V) from a single
+ 5 V supply via on-chip charge pumps and external capacitors. This makes it useful for
implementing RS-232 in devices that otherwise do not need any voltages outside the 0 V
to + 5 V range, as power supply design does not need to be made more complicated just for
driving the RS-232 in this case.

Dept. of TCE, DSCE

Page 30

Automated Toll System Using Image Processing

2013-14

The receivers reduce RS-232 inputs (which may be as high as 25 V), to standard
5 V TTL levels. These receivers have a typical threshold of 1.3 V, and a typical hysteresis of
0.5 V.

5.3.1 APPLICATIONS OF MAX 232


The MAX232 (A) has two receivers (converts from RS-232 to TTL voltage levels),
and two drivers (converts from TTL logic to RS-232 voltage levels). This means only two
of the RS-232 signals can be converted in each direction. Typically, a pair of a
driver/receiver of the MAX232 is used for TX and RX signals, and the second one for CTS
and RTS signals.
There are not enough drivers/receivers in the MAX232 to also connect the DTR,
DSR, and DCD signals. Usually these signals can be omitted when e.g. communicating
with a PCs serial interface. If the DTE really requires these signals, either a second
MAX232 is needed, or some other IC from the MAX232 family can be used. Also, it is
possible to directly wire DTR (DB9 pin #4) to DSR (DB9 pin #6) without going through
any circuitry. This gives automatic (brain dead) DSR acknowledgment of an incoming DTR
signal.

Fig 5.4 Pin diagram of MAX 232

Dept. of TCE, DSCE

Page 31

Automated Toll System Using Image Processing

2013-14

5.4 RS-232
In telecommunications, RS-232 is a standard for serial communication transmission
of data. It formally defines the signals connecting between a DTE (data terminal equipment)
such as a computer terminal, and a DCE (data circuit-terminating equipment, originally
defined as data communication equipment), such as a modem. The RS-232 standard is
commonly used in computer serial ports. The standard defines the electrical characteristics
and timing of signals, the meaning of signals, and the physical size and pinout of
connectors. The current version of the standard is TIA-232-F Interface between Data
Terminal Equipment and Data Circuit-Terminating Equipment Employing Serial Binary
Data Interchange, issued in 1997.

An RS-232 serial port was once a standard feature of a personal computer, used for
connections to modems, printers, mice, data storage, uninterruptible power supplies, and
other peripheral devices. However, RS-232 is hampered by low transmission speed, large
voltage swing, and large standard connectors. In modern personal computers, USB has
displaced RS-232 from most of its peripheral interface roles. Many computers do not come
equipped with RS-232 ports and must use either an external USB-to-RS-232 converter or
an internal expansion card with one or more serial ports to connect to RS-232 peripherals.
RS-232 devices are still found, especially in industrial machines, networking equipment,
and scientific instruments.

5.4.1 DB9 CONNECTOR


The term "DB9" refers to a common connector type, one of the D-Subminiature or
D-Sub types of connectors. DB9 has the smallest "footprint" of the D-Subminiature
connectors, and houses 9 pins (for the male connector) or 9 holes (for the female connector).
DB9 connectors were once very common on PCs and servers. DB9 connectors are
designed to work with the EIA/TIA 232 serial interface standard, which determined the
function of all nine pins as a standard, so that multiple companies could design them into
their products.
Dept. of TCE, DSCE

Page 32

Automated Toll System Using Image Processing

2013-14

DB9 connectors were commonly used for serial peripheral devices like keyboards,
mice, joysticks, etc. Also they are used on DB9 cable assemblies for data connectivity.
Today, the DB9 has mostly been replaced by more modern interfaces such as USB,
PS/2, Fire wire, and others. However, there are still many legacy devices that use the DB9
interface for serial communication.

5.4.2 PIN OUT AND DIAGRAM OF DE9 CONNECTOR (DB9


CONNECTOR), COMMONLY USED FOR SERIAL PORTS (RS-232).
Pin

SIG.

Signal Name

DTE (PC)

DCD

Data Carrier Detect

in

RXD

Receive Data

in

TXD

Transmit Data

out

DTR

Data Terminal Ready

out

GND

Signal Ground

DSR

Data Set Ready

in

RTS

Request to Send

out

CTS

Clear to Send

in

RI

Ring Indicator

in

Table 2 I/O Max 232 Signals

Dept. of TCE, DSCE

Page 33

Automated Toll System Using Image Processing

2013-14

Fig 5.5 The DTE (PC) has the male connector (shown below), and the DCE
(peripheral) has the female.

5.5 VOLTAGE REGULATOR- LM7805


The 7805 is a self-contained fixed linear voltage regulator integrated circuits. The
7805 is commonly used in electronic circuits requiring a regulated power supply due to
their ease-of-use and low cost. For ICs within the family, the xx is replaced with two digits,
indicating the output voltage (for example, the 7805 has a 5 volt output, while the 7812
produces 12 volts). The 78xx line are positive voltage regulators: they produce a voltage
that is positive relative to a common ground. There is a related line of 79xx devices which
are complementary negative voltage regulators. 78xx and 79xx ICs can be used in
combination to provide positive and negative supply voltages in the same circuit.
7805 ICs have three terminals and are commonly found in the TO220 form factor,
although smaller surface-mount and larger TO3 packages are available. These devices
support an input voltage anywhere from a few volts over the intended output voltage, up to
a maximum of 35 to 40 volts depending on the make, and typically provide 1 or
1.5 amperes of current (though smaller or larger packages may have a lower or higher
current rating).
Dept. of TCE, DSCE

Page 34

Automated Toll System Using Image Processing

2013-14

Fig 5.6 Voltage Regulator PIN diagram

Fig 5.7 Schematic of Voltage Regulator

5.5.1 ADVANTAGES OF LM7805

78xx series ICs do not require additional components to provide a constant, regulated
source of power, making them easy to use, as well as economical and efficient uses of
space. Other voltage regulators may require additional components to set the output
voltage level, or to assist in the regulation process. Some other designs (such as
aswitched-mode power supply) may need substantial engineering expertise to
implement.

78xx series ICs have built-in protection against a circuit drawing too much power. They
have protection against overheating and short-circuits, making them quite robust in
most applications. In some cases, the current-limiting features of the 78xx devices can
provide protection not only for the 78xx itself, but also for other parts of the circuit.

Dept. of TCE, DSCE

Page 35

Automated Toll System Using Image Processing

2013-14

CHAPTER 6

SOFTWARE DESCRIPTION
6.1 MATLAB R2013a
MATLAB is a high-level language and interactive environment for numerical
computation, visualization, and programming. Using MATLAB, you can analyse data,
develop algorithms, and create models and applications. The language, tools, and built-in
math functions enable you to explore multiple approaches and reach a solution faster than
with spreadsheets or traditional programming languages, such as C/C++ or Java. You can
use MATLAB for a range of applications, including signal processing and communications,
image and video processing, control systems, test and measurement, computational finance,
and computational biology. More than a million engineers and scientists in industry and
academia use MATLAB, the language of technical computing.

Key Features

High-level language for numerical computation, visualization, and application


development

Interactive environment for iterative exploration, design, and problem solving

Mathematical functions for linear algebra, statistics, Fourier analysis, filtering,


optimization, numerical integration, and solving ordinary differential equations

Built-in graphics for visualizing data and tools for creating custom plots

Development tools for improving code quality and maintainability and maximizing
performance

Tools for building applications with custom graphical interfaces

Functions for integrating MATLAB based algorithms with external applications


and languages such as C, Java, .NET, and Microsoft Excel

Dept. of TCE, DSCE

Page 36

Automated Toll System Using Image Processing

2013-14

6.2 MPLAB IDE V8.30


MPLAB IDE is a software program that runs on a PC, to develop applications for
Microchip microcontrollers and digital signal controllers. It is called an Integrated
Development Environment (IDE), because it provides a single integrated environment to
develop code for embedded microcontrollers.
MPLAB Integrated Development Environment brings many changes to the PIC
microcontroller development tool chain. Unlike previous versions of MPLAB which were
developed completely in-house, MPLAB is based on the open source NetBeans IDE from
Oracle.

Key Features

Provides a new Call Graph for navigating complex code

Supports Multiple Configurations within your projects

Supports Multiple Versions of the same compiler

Support for multiple Debug Tools of the same type

Supports Live Parsing

Import existing MPLAB v8 projects and use either IDE for the same source

Supports hyperlinks for fast navigation to declarations and includes

Supports Live Code Templates

Supports the ability to enter File Code Templates with license headers or template
code

MPLAB can Track Changes within your own system using local history

Within MPLAB, a user can configure their own Code Format Style

Dept. of TCE, DSCE

Page 37

Automated Toll System Using Image Processing

2013-14

CHAPTER 7

APPLICATIONS

Automatic Number Plate Recognition systems are valuable tools for meeting
several policing aims including reducing terrorism and criminal offense,
reducing targeted visitors casualties and for making better use of safety
resources.

Complete monitoring of car parks areas, logistic centres, border crossing and
airports.

Automatic Number Plate Recognition solutions utilise standard Personal


Computer equipment; negating the need for any expensive specialised
equipment.

The ability to automatically identify vehicles by their recognition numbers can


be beneficial for several reasons:
Provide access control for your car park
Effectively control unauthorised commuter parking
Increase gatehouse efficiency
Realistic means of logging all vehicles entering and / or leaving a specific
location (with an image if desired)
Automatic visual and audible warning to staff of any vehicle previously
entered into the database
Allow easy and fast database searching
Valuable information source for customer profiling and consumer
demographics
Security tool to retrieve vehicle information
Output messages to LED signs
Car park auditing / ticketing / management

Dept. of TCE, DSCE

Page 38

Automated Toll System Using Image Processing

2013-14

CHAPTER 8

ADVANTAGES AND DISADVANTAGES


8.1 ADVANTAGES

This project can be implemented with already existing system.

With this process accuracy is increased by reducing human errors.

Drivers need not wait for a longer period.

More importantly, its fast & efficient.

Eco-friendly.

8.2 DISADVANTAGES

Applicable mostly for Standardised Plates.

Vehicle Plates cannot be detected accurately if found damaged.

Vehicle Plates cannot be detected if dust is accumulated on it.

Dept. of TCE, DSCE

Page 39

Automated Toll System Using Image Processing

2013-14

CHAPTER 9

RESULTS AND CONCLUSION


9.1 MATLAB SIMULATION RESULT

Fig 9.1 MATLAB output for Blacklisted Vehicle Number


The above image is the output of image processing which is carried out by using
MATLAB shows the vehicle number is blacklisted, Toll amount collected, and balance
amount in the owners prepaid card. In this case a message will be sent simultaneously to
both Highway Patrol and the owner of the respective vehicle.

Fig 9.1 MATLAB output for Owned Vehicle Number


The above image is the output of image processing which is carried out through
MATLAB shows the vehicle number is owned, Toll amount collected, and balance amount
in the owners prepaid card. In this case a message will be sent only to the owner of the
vehicle.

In both cases, the status of the vehicle, the balance amount in the prepaid card and the
vehicle owners number is found out by comparing the vehicle number with a database.

Dept. of TCE, DSCE

Page 40

Automated Toll System Using Image Processing

2013-14

9.2 FINAL RESULT


The below shown figures are the messages received by the vehicle owner after toll is
collected.

Fig 9.3 Message received by the owner of the vehicle.

9.3 CONCLUSION
In this report, we have discussed about the processing of vehicle image acquired from the
camera and extracting the region of interest from which the final number, in alpha numeric
form, is obtained. This number is compared with the database and the toll is deducted from
the prepaid card account. A corresponding message is sent to the mobile of the owner. In
case of theft, the vehicle number would be blacklisted and if the respective vehicle
approaches toll collection booth it can be found out and the vehicle can be withheld. With
this we have added a security feature to our system. This method is efficient if the vehicle
number plates are standardized and also subjected to proper lighting. This method is cost
effective and can be integrated with the existing system in India without much changes.
This method also reduces the waiting time and hence avoids long queues of vehicles piled
up at the toll collection centre. Hence we have proposed a technique to enhance the toll
collection system with limited resources.

Dept. of TCE, DSCE

Page 41

Automated Toll System Using Image Processing

2013-14

REFERENCES
[1] Amina Khatra, Vehicles RC Plate Tracking based on Image Processing
Applications, International Journal of Scientific Engineering and Research (IJSER)
Volume 1 Issue 4, December 2013

[2] Pranoti Salunke, ETAL, Automated Toll Collection System Using RFID,IOSR
Journal of Computer Engineering (IOSR-JCE) e-ISSN: 2278-0661, p- ISSN: 22788727Volume 9, Issue 2 (Jan. - Feb. 2013)

[3] Rupali Kate, Dr. Chitode. J. S, Number Plate Recognition Using Segmentation,
International Journal of Engineering Research & Technology (IJERT) Vol. 1 Issue 9,
November- 2012 ISSN: 2278-0181

[4] Asif Ali Laghari, ETAL, RFID Based Toll Deduction System, .J. Information
Technology and Computer Science, 2012, 4, 40-46, Published Online April 2012 in MECS

[5] Abbas M. Al-Ghaili, ETAL, Vertical Edges-based Car License Plate Detection
Method, 2012, IEEE. Manuscript received January 25, 2012.

[6] Md. Farhad Ismail, M.A.R. Sarkar, Development of a Model for Electronic Toll
Collection System I.J. Intelligent Systems and Applications, 2012, 1, 39-45

[7] M.I.Khalil,Car Plate Recognition Using the Template

Matching Method,

International Journal of Computer Theory and Engineering, Vol.2, No. 5, October,


20101793-8201

[8] Kumar Parasuraman, SVM Based License Plate Recognition System, 2010 IEEE
International Conference on Computational Intelligence and Computing Research

Dept. of TCE, DSCE

Page 42

Automated Toll System Using Image Processing

2013-14

[9] Kaushik Deb, ETAL, Vehicle License Plate Detection Method Based on Sliding
Concentric Windows and Histogram, JOURNAL OF COMPUTERS, VOL. 4, NO. 8,
AUGUST 2009

[10] Nicole Ketelaars,Automated License Plate Recognition AIMe Magazine 2002

[11] Mrs. J. V. Bagade, ETAL, Automatic Number Plate Recognition System: Machine
Learning Approach

IOSR Journal of Computer Engineering (IOSR-JCE) ISSN:

2278-0661, ISBN: 2278-8727

[12] Yu-fai Fung, ETAL, Image Processing Application in Toll Collection, IAENG
International Journal of Computer Science, 32:4, IJCS_32_4_15

Dept. of TCE, DSCE

Page 43

You might also like