Вы находитесь на странице: 1из 63

License Plate recognition with surveillance using matlab GUI

CHAPTER 1
INTRODUCTION

1
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

1.INTRODUCTION
1.1 MOTIVATION

The increase of millions of vehicles from the past few centuries led to the
development of license plate detection methods for various transportation applications to reduce
the usage of man power. Many detection methods were developed in various countries which were
successfully implemented from the year 1975. But due to increase in the technology many methods
took its root in developing more accurate detection. Among those number recognition using
adaptive thresholding and connected component analysis is one of the latest one which is specially
developed for detecting Indian License Plates.

Car License Plate Recognition System (CLPRS) is an image processing


technology which is used to identify the vehicles by capturing their license plates. Image
Processing refers to processing of images by means of a digital computer. The car license plate
recognition technology is also known as automatic vehicle identification, automatic number-plate
recognition, optical character recognition for cars. The License Plate number is used to extract
more information about the vehicle and its owner which is used for further processing.

1.2 PROBLEM DEFINITION

The car license plate detection method had become an important area of research
due to wide variety of applications like payment of parking fee, toll fee collection, crime
prevention, traffic data collection and monitoring [12]. Car License Plate Detection Method mainly
consists of three parts:

1) License Plate Detection

2) Character Segmentation

3) Character Recognition

LPD (License Plate detection) involves capturing the images of license plates and processed by
the series of algorithms which result in the alpha numeric conversion of captured images into text
entry. Character Segmentation involves identification of individual characters of license plates

2
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
from the captured images. Character Recognition refers to the process by which computer
recognizes letters, numbers, symbols etc., and converts into a digital form that the computer can
understand. Among these three parts, LPD is most important step because it affects system
accuracy [23].

Fast CLPDS resolves many issues like poor image quality, plate sizes and designs, processing
time, background details and complexity. The identification of car details is increasing for many
reasons such as vehicle access control, prevention of crime and border control. Features such as
License Plate number, model and color [26], [4], [9] are used to identify the car features.

1.3 OBJECTIVE OF PROJECT

The main objective of this project is to extract the License Plate details
from an image provided by the mobile camera in real time and show the details of the vehicle
owner and timing details. For this purpose we created a new graphical user interface and website.
In tracking vehicles, cameras are installed in front of the police car’s to identify the vehicles. There
are numerous vehicle tracking systems and many of these tracking systems use high sophisticated
web cameras [14] for capturing images. This resulted in the cost increment of both hardware and
software equipment. Many of these tracking systems were developed for transportation system
applications. But, Car License Plate recognition system is usually based on obtained 640 × 480
resolution image [29].

An enhancement in the Car License plate Detection Method such as reduced


computation time, less complexity and detecting License Plate region more accurately with less
cost systems will make it a more real time detection system than before. In our proposed License
Plate Detection Method, a mobile camera with 1280 × 960 resolution is used instead of more
sophisticated web camera’s to capture the LP images an online streaming process is performed to
transmit the video and detect the plate details. The major advantage of the proposed method is that
it can process even high-quality images with reduced computation time.

Recognition of license number in various illumination conditions is one of


important requirements hence we are using local adaptive thresholding on the acquired image to
process even in low and high contrast images . Adaptive thresholding is an important process in

3
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
this method because it affects system accuracy and reduces the computation time and it highlights
the desired details easily. Therefore, a new method based on connected component analysis and
adaptive thersolding is proposed

The major steps involved in this proposed method are adaptive thresholding, connected
component analysis, size filtering and finally selecting the true plate regions by maximum row size
magnitude and extracting it to text file. All these steps are performed using MATLAB software.
MATLAB is the best software tool for many image processing applications as it contains the rich
library functions. So, MATLAB is the better choice for implementing License Plate Detection And
Recognition System and for detecting the errors efficiently before the proposed method is actually
implemented on the real time hardware. And we are using VISUAL STUDIO for creation of dot
net website to automatically display the details of vehicle.

1.4 ORGANIZATION OF THE REPORT:

Our documentation has been organized as mentioned in the following lines. Firstly it deals
with the Literature Survey in which the Existing system, Disadvantages of existing system and
proposed system are stated. Then the next part deals with the analysis in which Software
requirement specification, User requirement, software requirement, hardware requirement, and
content diagram of project, algorithms and flowcharts are noted precisely. Later on the design .i.e.,
Module design and organization are explained to elevate the functioning of this integrated
approach. The next part deals with Implementation Results in which the explanation of key
functions, method of implementation, forms, output screens, result analysis are specified. At last
we move on to Testing and Validation .i.e., Design of test cases and scenarios, Validation are
included in brief. However in each section the introduction and conclusions are documented.

4
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

CHAPTER 2

DIGITAL IMAGE PROCESSING

5
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

2. DIGITAL IMAGE PROCESSING

2.1 INTRODUCTION

This chapter explains the fundamentals of Digital Image Processing and their explanation. It also
includes the wide area applications of Digital Image Processing and importance of it in the
proposed Car License Plate Detection Method.

2.2 WHAT IS DIGITAL IMAGE PROCESSING

An image can be defined as a function of two dimensional spatial co-ordinates 𝑥 and 𝑦 i.e., 𝑓(𝑥, 𝑦)
and amplitude of 𝑓at any point (𝑥, 𝑦) is called intensity or gray level of image at that point. An
image can be called as Digital Image if values of 𝑥 and𝑦 and amplitude values of 𝑓 are all finite
and discrete in nature. Digital Image is composed of finite number of elements and each has a
particular location and a value. These elements are called as picture elements, image elements and
pixels. Generally, the term pixel is most widely used to represent the elements of Digital Image.

The processing of digital images by means of digital computer is called Digital Image Processing.
The need for extensive experimental work and for establishing the viability of proposed solutions
to a given problem resulted in developing Digital Image Processing. With the availability of fast
computers and signal processors in 2000’s, Digital Image Processing not only became the most
common form of image processing but also the cheapest and versatile method. The complex
algorithms can be performed well using Digital Image Processing and hence results in better
implementation in the real time environment with better performance.

Two principal application areas created interest in Digital Image Processing.


Those two areas are improving in pictorial information for human interpretation and processing of
image data for the purpose of storage, transmission and representation. Digital Image Processing

6
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
has wide area of applications which include medical field, industrial field, intelligent transportation
applications, commercial applications like mineral and oil exploration and in marine field etc.,

2.3 FUNDAMENTAL STEPS

The objective of the fundamental steps in Digital image Processing is to give


a brief idea of all the methodologies that can be applied on the images for different purposes and
each methodology has its own objective. The fundamental steps involved in Digital Image
Processing are discussed below:

1. IMAGE ACQUISITION:

Image Acquisition is the first stage which involves pre-processing such as


scaling. It is nothing but acquiring the image from the physical scene which is already in the digital
form. One of the examples for Image Acquisition is generating a diagnostic X-ray film when X-
rays are passed through the patient body.

2. IMAGE ENHANCEMENT:

It is the simplest area in Digital Image Processing. Image Enhancement


highlights the region of interest in an image or brings out the desired details in an image. In simple
words image enhancement is defined as increasing the contrast of the image so that it looks better.

3. IMAGE RESTORATION:

Image Restoration refers to the improving the appearance of an image. This


technique is based on mathematical or probabilistic models of image degradation. Image
Restoration takes the noisy or corrupted image and estimates the clean image from the corrupted
one.

4. COLOR IMAGE PROCESSING:

The processing of color image by means of a digital computer is called Color Image Processing.
This area is gaining more importance because of significant increase in the digital images over the

7
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
internet. Full color and pseudo color processing are the two major areas of Color Image Processing.
It has wide range of applications including publishing, visualization and over the internet.

5. WAVELETS:

These are used for representing images in various degrees of resolution using wavelet transforms.
Wavelet transforms are based on the small waves called wavelets which are of varying frequency
and limited duration. This varying frequency allows the wavelets to provide equivalent musical
score of image.

6. COMPRESSION:

It deals with the techniques for reducing the storage required for saving an image or the bandwidth
required for transmitting it. It is most familiar in the form of image file extensions for most users
of the computers. One of the image compression standard used in computers is jpg file extension.

7. MORPHOLOGICAL PROCESSING:

Morphological Processing deals with the tools which are useful for
extracting the image components. It also deals with representation and description of the shape.
This area has wide applications in intelligent transportation applications.

8. SEGMENTATION:

Segmentation is defined as the process of identifying the objects individually. It is one of the most
difficult tasks in Digital Image Processing. The successful segmentation results in successful
recognition.

9. REPRESENTATION AND DESCRIPTION:

This is the next stage of segmentation and almost follows the output of
segmentation step i.e., a raw pixel data containing either the boundaries of a region or all the points
in the region itself. The data should be converted into computer understandable language in both
the cases. There is a confusion regarding representation of data as a boundary or as a complete
region i.e., which should be represented first.

8
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
The data should be represented as a boundary when the focus is on external
shape characteristics i.e., corners and inflections. The data is represented as complete region when
the focus is on internal shape characteristics such as texture, skeletal shape etc. In some
applications both the representations are complement to each other. Choosing representation is
useful for transforming raw data into a suitable form that the computer can understand and is
suitable for processing. In order to highlight the features of interest, a method should be specified
for representing the data.

Description is also referred as Feature Selection which deals with extracting


the desired attributes that result in saving some quantitative information of the interest.
Representation and Description are the important areas in Digital Image Processing because these
highlight the features or the region of interest which is important in any application of Digital
Image Processing.

10. RECOGNITION:

Segmentation does the process of segmenting the object into individual characters. Recognition is
a process which identifies the individual characters from the segmented image. It plays a major
role in applications of Digital Image Processing especially in intelligent transportation applications
such as recognizing the characters of number plates etc.,

The above listed fundamental steps play a major role in the proposed method. Image Acquisition
helps in obtaining digital image from a physical scene. The proposed method is the enhancement
method which helps in highlighting certain features of interest from the image. Image restoration
technique helps in improving the appearance of the image with the help of some statistical
methods. Color Image Processing helps in processing the color number plate images. The proposed
method supports all the image compression standards. Morphological Processing helps in
extracting the image components. Segmentation plays a major role because segmentation of
individual characters helps in recognition each character. Representation and Description are used
for extracting feature of interest.

9
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

CHAPTER 3

LITERATURE SURVEY

10
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

3.1 INTRODUCTION

This chapter describes the brief study of the conventional methods which have been
using since many years and their disadvantages which resulted in developing new vertical edge
detection algorithm. The problem of License Plate Detection has been studied since 1990’s. The
approach was based on characterizing the boundary lines. The input image is processed first to
preserve the boundary lines by some algorithms like gradient filter which resulted in edging image.
Then the image was binarized and processed to detect the plate details.

This chapter introduces the existing adaptive thresholding methods and the License
Plate Detection methods based on edge detection.

3.1.1 THRESHOLDING TECHNIQUES

Previously, global thresholding was used which is faster than adaptive thresholding.
But, in terms of output quality global thresholding performance was poor when compared to
adaptive thresholding. Thus, many researches concentrated on developing adaptive thresholding
performance to save processing time.

1) A new method adaptive image binarization was proposed and implemented. It is a hybrid
method which uses both global and local information to decide the pixel label. The performance
was accurate and robust for image illumination but more attention is required in terms of reduced
computation time to operate it in real time environment.

2) A connected component analysis with size filtering is used which produced the same quality
image output. The algorithm computation time was closer to the global thresholding methods. This
algorithm is a combination of statistical computations as in and integral images.

11
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
3) A technique for real time adaptive thresholding was proposed and implemented. In this
algorithm, integral will be computed for the input image. This method is more robust to the
illumination changes than the previous algorithms. The main advantage of this technique is that, it
is simple and easy to implement in real time environment and the computation time will also be
saved.

3.2 EXISTING METHODS

Many License Plate Detection Techniques have been proposed. Though there are
many techniques still detecting License Plate is a challenging task. License plate Detection
concentrates on the input image to identify regions containing plate details. Since the plate can
exist anywhere in the captured image, it would be infeasible to detect every pixel in the image in
order to identify the plate details. In order to extract some important features from the images, it
is preferable to focus only on those pixels characterized by the License Plate. Traditional License
Plate detection Techniques are classified into three types based on the involved features. They are:
color based, edge based and texture based. Color based approach involves detecting of License
Plate based on the color since different countries use different colors for License Plates.

Several License Plate Detection methods have been used before, such as
morphological operations [15], [30], [16], edge extraction [17], [8], [13], [27] combination of
gradient features [18], salience features, a neural network for color [4], gray scale classification
and vector quantization [11].

Due to various factors like ambient lighting conditions, interference of characters


and other problems, it became difficult to detect License Plates in complex conditions. Some of
the previous methods were restricted to work under certain conditions like fixed background [22]
and known color [6], [19], [20].Previously, some researchers have been working on License Plate
Detection in complex conditions. Their contributions in detecting license plate under complex
conditions are listed below:

1) Kim et al [18] proposed a detection algorithm using statistical features and License Plate(LP)
templates. The statistical features were used to select the Regions Of Interest (ROIs) and LP

12
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
templates were applied to match the ROI. General LP templates are very difficult to construct in
many cases. Kim et al used the concept of colors and neural networks in extracting the plate details.
The major disadvantage is that the algorithm works on a fixed scale. Hence, application of this
algorithm is restricted in many cases.

2) Matas and Zimmermann proposed an algorithm which is used to detect License Plates under
various conditions. This algorithm used character regions as basic units of License Plates which
make the algorithm quite robust to view point and illumination. However, this algorithm hardly
recognizes characters overlapping from the true License Plates.

3) In previous years [28], an LPD algorithm has been proposed using color edge and fuzzy
disciplines. However, this algorithm can be used only with certain colors which is the major
disadvantage of this algorithm. The steps involved in the algorithm based on fuzzy logic are
segmentation, extracting features and recognizing the extracted feature [25]. Depending on the
category of extracted feature, the output will be transferred to recognition systems such as fuzzy
logic or template based approach. Fuzzy logic system is preferred for standard plates because it
has high accuracy and speed which meets the requirement of real time systems. Template based
approach provides high recognition accuracy but the disadvantage in this approach is it requires
more memory area for storing the information.

3.2.1 EDGE DETECTION TECHNIQUES:

4) Many Edge detection Algorithms were developed in extracting the License Plate details. Edge
Detection refers to the filtering out the useless information. Edge detection is important step in
extracting License Plate details because it highlights the desired details. Edge detection identifies
and locates the discontinuities in the image. Here, the discontinuities in an image refer to the abrupt
changes in the intensity values of the pixels which characterize the boundaries of object in the
image. Edge Detection contains smoothing and Differentiation of an image.

Edge detection methods contain convolving of image with an operator for


example 2D filter which is sensitive to the large inclination changes in the image. Large number
of edge detector operators are used which are limited to only certain edges. Each of the edge

13
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
detector operators has its own advantages and disadvantages. The variables which distinguish the
selection of edge detector operators are orientation of edges, noisy environment and structure of
edge. Most of the operators are developed based on horizontal detection, vertical detection and
diagonal edges detection. It is difficult to operate noisy images using edge detection techniques
since both noise and edges contain high frequency which might be misused in detecting true plate
details. So, the operator should be chosen in such a way that it should work better with noisy
images and should save the computation time.

Edge detection is performed in many ways but majority of the methods are
grouped under two categories. They are:

a) Gradient based Edge Detection Method

b) Laplacian based Edge Detection Method

In Gradient based Edge Detection Method, he edges are detected using first
order derivatives in an image. The second order derivatives are obtained using Laplacian based
Edge Detection Method. In the Laplacian detection technique, the edges are identified from zero
crossings in the second order derivative of an image. Finding of derivative highlights the location.
Another method proposed for Edge Detection is Short Response Hilbert Transform (SRHLT). This
method is a combination of differentiation method and Hilbert Transform method. The different
Edge Detecting Operators are discussed below:

3.2.1.1 ROBERT’S CROSS OPERATOR:

Robert’s cross operator is one of the first edge detector operators which was
proposed by Lawrence Robert’s in the year 1963. It is used for digital image processing and
computer vision especially within edge Detection algorithms. This operator is simple, easy and
quick in computation, a 2D gradient measurement on the image. It is one of the differential operator
and the idea behind working of this operator is that the Gradient of the image is approximated
through differentiation [2].

According to Robert’s, an edge detector should have some of the properties


such as obtained edges must be well defined, the background should contain little noise. Robert’s
cross operator contains a pair of 2 × 2 convolution kernels. The one kernel is simply the rotation

14
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
of other kernel by 900 . This operator is similar to Sobel operator. These kernels are applied
separately to the image which produces separate gradient component. These separate gradient
components are combined to form the magnitude of Gradient at each point. This operator will
highlight the changes in intensity in diagonal direction.The major advantage using this operator is
its simplicity because the kernel used will be small and contains only integers but it is more
sensitive to noise.

3.2.1.2 SOBEL OPERATOR:

Sobel Operator is also called Sobel Filter which was named after Irwin Sobel
in the year 1968. It is used for digital image processing and computer vision within the edge
detection techniques. It uses first derivative of the intensity information. The Sobel Operator uses
a pair of 3 × 3 kernels [1]. These are convolved with the original image in order to calculate the
derivatives, one for the horizontal and the other for vertical changes. It contains smoothing and
differentiation of the image. The image obtained after applying Sobel operator contains vertical
edges of same thickness which increases the computation time and the other drawback is lack of
perfect rotational symmetry [42].

3.2.1.3 PREWITT OPERATOR:

Prewitt operator was named after Judith M.S.Prewitt. It is used particularly


within Edge Detection algorithms for Digital Image Processing and computer vision. It is one of
the differential operators containing a pair of 3 × 3 convolution kernels. It is similar to Sobel
Operator and is used for identifying both horizontal and vertical edges in the images. Prewitt
operator involves convolving the image with pair of kernels in both horizontal and vertical
directions which produces separate Gradient components. The combination of separate Gradient
components results in magnitude of Gradient at each point because magnitude calculation is more
reliable.In simple words, Prewitt operator calculates the Gradient of image intensity at each point
in the image.

3.2.1.4CANNY EDGE DETECTION ALGORITHM:

Canny edge detection algorithm is multi-stage algorithm used to detect


the edges from the images. It was named after John F. Canny and it was developed in the year

15
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
1986. Canny edge Operator is used for identifying the edges.Canny aimed to develop optimal Edge
Detection Algorithm.

Canny mainly concentrated on the improvement of the current edge detection methods. For
achieving optimal edge detection, he followed a list of criteria. They are:

 Good Detection - The algorithm should identify as many as possible real edges in the
image i.e., correct edges should be detected.
 Good Localization - The edges should be marked correctly and it should be close to the
edges of the real images.
 Minimal Noise - The detection algorithm should be implemented in such way that
the frequency of the noise should be as low as possible.

Based on the above requirements, the steps involved in this algorithm are:
Smoothening of the image by Canny Edge Detector in order to eliminate unwanted lines and the
noise, highlighting the regions by finding Gradient of image with high spatial derivatives, tracking
of the regions to suppress the pixel which is not at the maximum and reducing Gradient array by
Hysteresis. Hysteresis tracks the remaining pixels that aren’t suppressed. In order to do this,
Hysteresis uses two thresholds. If the magnitude is less than the first threshold, it is set to zero and
is declared as non-edge. If the magnitude is above the second threshold, it is declared as true edge.
If the magnitude is in between these two thresholds, it is set to zero unless the path exists from
current pixel to the pixel with a gradient greater than second threshold.

It is a very good edge detection operator that uses a multistage algorithm to detect a
wide range of edges in images. Canny proposed a computational edge detection algorithm
explaining why the technique works. It has good detection, good localization and minimal
response. To satisfy these requirements canny used the calculus of variations. An edge in an image
may be a point in a variety of directions, so canny algorithm uses four filters to detect horizontal,
vertical, diagonal edges in the blurred image. When compared to previously described operators,
Canny Detector is less sensitive to noise and produces better localization and detection. The
comparison of the different operators is shown in table 1.

16
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

Vertical edge extraction is one of the most important step in CLPD because it
affects system accuracy i.e., it influences the whole system to correctly detect the License Plate
[30] and reduces the computation time and even the cost.

 Usage of Edge map technique has vastly reduced complexity and retains the important
structure present in the original image [5]. Hence, a vertical edge map has been used for
License Plate Detection for many years [23], [13], [22], [6]. The given algorithm used one
directional Sobel Operator to extract the vertical edges. The disadvantage of this algorithm
is that some of the undesired details such as horizontal edges are still present which reduces
the system accuracy and increase the processing time.
 Another method called Short Response Hilbert Transform was proposed for Edge
Detection. It was developed based on Canny’s criteria i.e., better detection, better
localization and less sensitive to noise. It is a combination of Hilbert Transform and
Differentiation operation. Hence, it adds the advantages of both Hilbert Transform and
Differentiation for better Edge detection. This method produces good performance in edge
detection when the Canny’s Criterion is satisfied.

5) Some algorithms used image enhancement and Sobel Operator to extract vertical edges of the
car image in [12], [27], [10]. The proposed algorithm eliminates most of the background and noisy
edges. Finally the plate region is searched by a rectangular window in the residual edge image.

6) In recent years, Abolghasemi and Ahmadyfard have improved the method proposed in [27] by
enhancing the low quality input image and later extracting the vertical edges. Then, morphological
filtering was used by them to identify some regions as License Plate regions.

7) Zhang et al proposed a new vertical gradient map to extract statistical features. The authors
developed two cascade classifiers based on Haar and statistical features to reduce the complexity

17
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
of system and to improve the detection rate. However, much processing time is required for this
method even with low quality images.

8) Bai et al [22], proposed an algorithm for highway ticketing system using License Plate
Detection. A linear filter was used to smoothen the image and to reduce the influence of light. In
addition to this, vertical edge detection was used to reduce the horizontal noise and other unwanted
noise which interfere with the License Plate region. Next, the edge density was measured and is
compared with the density of true plate region. Even though the high noise is removed, some
narrow horizontal lines will be present. To remove these narrow horizontal lines, a non-linear filter
is used. Finally, to show and locate the correct plate region features, a connected component
algorithm was applied. But, this algorithm works better with fixed background and a stationary
camera.

3.3 DISADVANTAGES OF EXISTING METHODS

Due to various factors like ambient lighting conditions, interference of characters


and other problems, it became difficult to detect License Plates in complex conditions. Some of
the previous methods were restricted to work under certain conditions like fixed background [22]
and known color [6], [19], [20].Previously, some researchers have been working on License Plate
Detection in complex conditions. It is very sensitive to noise and in accurate algorithms.

3.4 PROPOSED METHOD

Our proposed method mainly has three contributions were used to describe the
complete method. They are: local adaptive thresholding method is proposed for detecting in
various illuminations; The proposed CLPD (Car License Plate Detection) method processes the
high-quality images obtained from the mobile camera whose resolution is of 1280× 960 with 30fps
(frames per second); The computation time of proposed CLPD method is less than several
methods. The flowchart of proposed CLPD method is shown in figure(1). The desired plate details
are highlighted by creating region of interest for maximum magnitude row in image based on the
pixel value using output. Next, some of the statistical and logical operations are used to extract
the candidate region and to detect true candidate region. Finally, true candidate region is detected
from the original image. Next, some of the statistical and logical operations are used to extract the

18
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
candidate region and to detect true candidate region. Finally, true candidate region is detected from
the original image. Firstly, obtained color image is converted into gray scale image and then LAT
(Local Adaptive Thresholding) is performed to obtain the binarized image. Next, CCA (Connected
component analysis ) is applied to extract the connected regions and for enhancement of the image.
After that, size filtering is applied to remove unwanted regions and noise .

CHAPTER 4

PROPOSED METHOD

19
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

4. ANALYSIS

4.1 INTRODUCTION

Detecting license text and at the same time distinguishing it from similar patterns based
on the geometrical relationship between the symbols constituting the license numbers is the
selected approach in this research. Consequently, a new technique is introduced in this project
which detects LP symbols without using any information associated with the plate’s outer shape
or internal colors to allow for the detection of the license numbers in case of shape or color
distortion either physically or due to capturing conditions such as poor lighting, shadows and
camera position and orientation. To search for the candidate objects and to allow for tolerance in the
localization process size filtering and number extraction using template matching is used.

An enhancement in the Car License plate Detection Method such as reduced computation time,
less complexity and detecting License Plate region more accurately with less cost systems will
make it a more real time detection system than before. In our proposed License Plate Detection
Method, a mobile camera with 1280 × 960 resolution is used instead of more sophisticated web
camera’s to capture the LP images and an online process is performed to detect the plate details.
The major advantage of the proposed method is that it can process even high-quality images with
reduced computation time.

4.2 SOFTWARE REQUIREMENT SPECIFICATIONS

After converting input color image into grayscale image, local adaptive
thresholding is performed to obtain binarized image. Recently a real-time AT is proposed by
Bradley and Roth using the mean of local window. The local mean is computed using an integral
image. The method proposed is used to obtain a good adaptive threshold.

20
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
4.2.1 USER REQUIREMENT

The AT technique used here is a simple extension of Bradley and Roth’s and Wellner’s method
[3].In Wellner’s algorithm, the pixel is compared with the average of neighbouring pixels. While
traversing the image specifically an approximate moving average of the last S pixels are calculated.
If the current pixel value is T percent lower than the average, then it is set to black. Otherwise the
pixel value is set to white. This technique is useful than the other methods because comparing the
pixel to the average of neighbouring pixels results in hard contrast lines and soft gradient changes
are ignored. The advantage of using this technique is that, only a single pass through the image is
required.

According to Wellner’s, one eighth of the image width gives value for S i.e.,
S=image width/8 and T value depends on the images used. For the proposed CLPD method, the
range is 0.1 < 𝑇 < 0.2. Wellner’s algorithm depends on scanning order of pixels. The moving
average process developed by Wellner does not produce good representation of neighbouring
pixels since the neighbourhood samples are not evenly distributed in all directions. Hence usage
of the concept integral image in has solved this problem.

This chapter describes the implementation of license plate recognition using MATLAB GUI in
MATLAB 2014 version. MATLAB is very powerful software tool used for implementing the tasks
that require extensive computation. MATLAB is quicker and faster in terms of implementation of
computed tasks when compared with C and C++. The key feature in MATLAB is that it contains
rich library functions for data analysis and image processing. This feature makes MATLAB an
ideal tool for faster implementation of algorithms and verification of any algorithm before it is
actually implemented on real hardware. The uses of MATLAB include:

 Math and computation


 Development of Algorithm
 Data acquisition
 Modeling, Simulation, and prototyping
 Data analysis, visualization and exploration
 Scientific and engineering graphics
 Development of Application including graphical user interface building.

21
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
Basically, MATLAB stands for Matrix Laboratory which was
originally written for the purpose of easy accessing of matrix software. MATLAB has been serving
many users over a period of years. In universities, it is standard instruction tool for advanced
courses in mathematics, engineering and science. In industries, it is a standard tool of high
productivity, development and research and data analysis. MATLAB contain tool boxes which
allow the users to learn and apply various technologies. Tool boxes help in solving particular
classes of problems. The available areas in which tool boxes are included are signal processing,
control systems, neural networks, fuzzy logic, wavelets, simulation, and many others. MATLAB
has the advantage of languages conversion i.e., code written in C Language can be converted into
MATLAB code and vice-versa which proves that MATLAB is an interactive developer.

4.2.2 SOFTWARE REQUIREMENT

4.2.2.1 MATLAB SYSTEM

The MATLAB system consists of 6 parts. They are discussed as follows:

a. DEVELOPMENT ENVIRONMENT:

These are the set of MATLAB tools and facilities that help one to use
MATLAB files and the functions. Many of these tools are graphical user interfaces. The
Development environment include the MATLAB desktop, Command Window, Command history,
an editor and debugger, and browsers for viewing help, the workspace, files, and the search path.

b.MATLAB MATHEMATICAL FUNCTIONS:

The MATLAB mathematical functions contains a vast collection of


computational algorithms starting from elementary functions like sum, sine, cosine, and complex
arithmetic functions, to a more sophisticated functions like inverse of a matrix, matrix Eigen
values, Bessel functions, and fast Fourier transforms functions.

22
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
c. MATLAB LANGUAGE:

The MATLAB language is a high-level matrix or array language with


control flow statements, functions, data structures, input or output and object-oriented
programming features. It allows programming in the small to rapidly create quick programs and
programming in the large to create large and complex application programs.

d. GRAPHICS:

MATLAB supports displaying of vectors and matrices as graphs, as well as printing of


these graphs. It contains high-level functions that are useful for two-dimensional representation
and three-dimensional representation, image processing, animation, and presentation graphics. It
also contains low-level functions that allow one to customize the appearance of graphics and to
build complete graphical user interfaces on MATLAB applications to the fullest.

e. MATLAB APPLICATION PROGRAM INTERFACE (API):

The MATLABApplication Program Interface is a library that allows one to write C and
FORTRAN programs that interact with the MATLAB. It supports calling routines from MATLAB
(dynamic linking), calling MATLAB as a computational engine, and for reading and writing the
MAT-files.

f. GRAPHICAL USER INTERFACE DEVELOPMENT ENVIRONMNET (GUIDE):

MATLAB provides graphical user interface development environment layout editor to create
customised GUI for our processing. GUI is customised such that each link buttons in the GUI will
have call back functions linked to be processing matlab code to display the final output

4.3 HARDWARE REQUIREMENTS:

In our project for real time image acquisition we are using android smart mobile phone installed
with IPWEBCAM application. Using this app we can transmit the real time video from source to
destination and both mobile phone and computer should be connected in the same network.

23
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
4.4 BLOCK DIAGRAMS

The proposed system consists of two phases like 1: Image processing stage and 2.details display
stage. Where image processing stage involves gray scale conversion, adaptive thersholding, and
morphological operations, connected component analysis, size filtering. Details display stage has
a website connected to server database to display the details of recognised number autiomatically.

IMAGE ACQUSITION

(USING MOBILE CAMERA)

COLOR IMAGE

PRE-PROCESSING

GRAY SCALE ADAPTIVE


COCONVERSION THERSHOLDING

MORPHOLOGICAL
OPERATIONS

CONNECTED COMPONENT ANALYSIS

SIZE FILTERING

TEMPLATE MATCHING AND STORING

DISPLAY DETAILS IN WEBSITE

Figure 1: Flow Chart of the proposed method

24
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
4.4 CONCLUSION

From analysis point of view it is an very good license plate extraction algorithm AND
plays a crucial role in this process and it clear can extract its details.

25
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

CHAPTER 5

DESIGN

26
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

5. DESIGN

5.1 INTRODUCTION

Firstly, obtained color image is converted into gray scale image and then LAT
(Local Adaptive Thresholding) is performed to obtain the binarized image. Next, Morphological
operations is applied to extract the lost information due to noise and for enhancement of the image.
After that size filtering is applied to remove all unwanted and noise information in the binary
image. The next step is to detect the License Plate; connected component analysis is applied to
fing all pixel connected components and license number area is extracted by creating a region of
interest of maximum row size magnitude. Based on the relative widths and heights of the extracted
region objects the license numbers are identified and template matching is performed to identify
the numbers.

5.2 PROJECT PROCEDURE

5.2.1 INTRODUCTION

Using a matlab customised GUI application which is linked to callback functions of matlab code
to process the acquired image all the processing steps like gray scale conversion, adaptive
thersholding, and morphological operations, connected component analysis, size filtering are
performed and template matching is done to recognise the number in the image and the recognised
number is stored in the text file. This text file details are directly read by the dot net website created
in visual studio and performs query operations to display the details of the number in the website
automatically.

5.2 IMAGE ACQUISITION

Image acquisition of our project is the major advantage of it. For image acquisition we
are using android smart phone mobile camera of photo resolution 1280x960 and video resolution
of 720x480.The mobile camera transmits the live video stream from the remote location or from
where surveillance is required using a android application called IPWEBCAM. The advantage of

27
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
this type of image acquisition instead of using is reduction in cost where real IP camera which
would cost around 15000. The major requirement of this type of video transmission is both
computer and mobile should be in same network. Same network can be obtained by using mobile
hotspot of the mobile and connecting to the created network of mobile from computer so that both
are in same network. Both can be in same network otherwise also by joining in any private network
such that both mobile and computer are connected in the same network. After connecting to the
network the IP webcam will be streaming the mobile camera video directly using the IP allocated
to it. From the computer when this IP is called it displays the live video stream in the browser of
the computer from where we can control the image acquisition and take photos directly from the
MATLAB GUI.The IPWEBCAM app is as shown in below figure

Figure10.IPWEBCAM APP LAYOUT

28
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

Figure11.sample video stream screen shot.

5.2 IMPLEMENTATION OF MATLAB GUI

All the processing and controlling operations of the license plate recognition and image
acquisition with displaying the number details are controlled from by using customised MATLAB
GUI created for our project applications .The GUI has mainly six link buttons to control the
operations of the system they are preview and capture buttons to access the laptop inbuilt camera.
The preview buttons previews the image in the GUI axes and capture button captures the image
and stores it in matlab directory. open cam buttons is used to access and open the mobile camera
video in the browser. Take photo button is used to take the photo of vehicle directly from live
video stream and store it in the matlab directory. The process button is used to perform all image
processing techniques used in our project and to extract the number. Where all matlab files are
included in the call back functions of the buttons .In database button opens the website showing
the details of the owner. The customised GUI created for our project is as shown below.

29
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

FIGURE9.MY GUI LAYOUT

Figure11.sample video stream in the browser from mobile

30
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
5.2.2 ADAPTIVE THRESHOLDING FORMULATIONS:

Thresholding is used to segment an image by setting all pixels whose intensity values are above a
Threshold to a foreground value and all the remaining pixels to a background value. Adaptive
Thresholding changes the threshold dynamically over the image. This more sophisticated version
of thresholding can accommodate changing lighting conditions in the image, e.g. those occurring
as a result of a strong illumination gradient or shadows.
Local threshold is to statistically examine the intensity values of the local neighbourhood of
each pixel. The statistic which is most appropriate depends largely on the input image. Simple and
fast functions include the mean of the local intensity distribution.

the median value,

or the mean of the minimum and maximum values,

The size of the neighbourhood has to be large enough to cover sufficient foreground and
background pixels, otherwise a poor threshold is chosen. On the other hand, choosing regions
which are too large can violate the assumption of approximately uniform illumination. This
method is less computationally intensive than the other approaches and produces good results for
some applications.
Local adaptive thresholding, on the other hand, selects an individual threshold for each pixel
based on the range of intensity values in its local neighbourhood. This allows for thresholding of
an image whose global intensity histogram doesn't contain distinctive peaks. The situation can be
improved if the threshold employed is not the mean, but (mean-C), where C is a constant. Using
this statistic, all pixels which exist in a uniform neighbourhood (e.g. along the margins) are set to
background.

31
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
5.2.3 EFFECT OF WINDOW SIZE AND C ON ADAPTIVE THRESHOLD TECHNIQUE:

Window size and constant value C can affect the enhancement of the binarized image.
If window size is less then it results in poor thresholding and if window size is more then it is more
adversely affected by the illumination gradient. Hence a intermediate value is selected as window
size as this window size acts as neighbourhood of each pixel to check mean or median of the region
and assigns the value to the pixel. If the threshold is found greater than it is made as background
and if it is found less than the threshold then it is made as foreground. The operation of whether it
is C-median or C-mean varies on application and image enhancement qualities required by the
output image. For our project we selected a 50x50 window and opted for mean filter having
constant value C as zero and applied results to the input image and input image are shown below

(a) (b)

Figure 2: Image Binarization (a) Input Image (b) Thresholded Image

From the above figure we can observe how the input image is converted into white and black pixels
using AT formulations.

5.3 MORPHOLOGICAL OPERATIONS

Morphological operations such as dilation and erosion are important processes needed
for most pattern recognition systems to eliminate noisy objects and retain only objects expected
32
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
to represent the targeted patterns. In LP detection, closing operation (dilation followed by
erosion) is performed to fill noisy holes inside candidate objects and to connect broken symbols.
On the other hand, opening (erosion followed by dilation) is applied to remove objects that are
thinner than the LP symbols. In our system, closing is applied to fill spaces that break the bodies
of symbols using a 1-pixel-disk element in the first experiment. This process is very important
especially for the LP layout . This watermark becomes white after the binarization process and
breaks down most of the bodies of the LP symbols. Removal of thin objects is performed in the
size filtering stage. The effect of morphological operations can be shown below where an input
image before applying and after applying of operations is shown below

Figure(a):input image (b) Image after morphological operation

5.4 Connected Component Analysis (CCA):

CCA is a well-known technique in image processing that scans an image and groups
pixels in labelled components based on pixel connectivity [30]. An 8-point CCA stage is performed
to locate all the objects inside the binary image produced from the previous stage. The output of
this stage is an array of N objects. All the objects that are connected are labelled and indexed. Each
object in the image is compared and indexed and by using region properties bounding boxes for
the connected objects in image is drawn .An example output of the CCA stage is shown below

33
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

Figure4(a)input image

Figure4(b)output of CCA stage

5.5 SIZE FILTERING

The objects extracted from the CCA stage are filtered on the basis of their widths Wobj
and heights Hobj such that the dimensions of the LP symbols lie between their respective
thresholds as follows:

Wmin ≤ Wobj ≤Wmax and Hmin ≤Hobj ≤ Hmax (2)

34
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
Where Hmin and Wmin are the values below which a symbol cannot be recognized (8 pixels for
example) and Wmax can be set to the image width divided by the number of symbols in the
license number. Hmax is calculated as Wmax divided by the aspect ratio of the used font. The
ranges of these values can be narrowed in the case of a mounted camera to speed up the process
of detection but for a moving camera, the ranges depend on the required object to camera
distance range. The output of this stage is an array of M objects. In our project we filtered images
having width less than 100 pixels and greater than 8 pixels, similarly heights greater than 8
pixels and less than 100pixels An example for the output of this stage is given in below figure

Figure5.output of size filtering stage

35
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

5.5 TEXT REGION EXTRACTION

The success of license plate recognition on applying segmentation to the image so for this
purpose we have to separate the text region of license number from the entire image. The filtered
image is scanned row wise from top to bottom and magnitude of the binary image in each row is
stored in variables. The row having maximum magnitude will be having the license number
region so that region is cropped. The output of the cropped image is as shown

Figure6.cropped text image

5.6 TEMPLATE MATCHING

Template matching is one of the most famous character recognition techniques present to
identify the characters present in the image. A predefined set of alphabets and characters are
collected and stored in the database. Each image template are created in the matlab space and
stored as variables. After creation of templates the objects obtained from previous stages are co-
related with the templates and the co-related values are stored in the variables. The characters for
which maximum co-relation occurs is assigned that variable. The recognised numbers are stored
in the text file for further applications. Some of the templates used Are shown below

36
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

The output recognised in the form of text file is opened automatically by the matlab and stored in
the matlab directory. This text file is directly accessed by the website to read the customer
license number.it as shown in the below figure

Figure7.displayed text file with recognised number

5.6 CREATING A WEBSITE

The license number details has to be displayed for the surveillance purpose, hence a simple
website is created using C# and DOT NET. For this purpose we have taken development
environment VISUAL STUDIO 2012 ULTIMATE.

VISUAL STUDIO is a integrated development environment (IDE) from Microsoft .It is used
develop computer programs for Microsoft windows as well as websites, web applications and
web services. Visual studio includes a website editor and designer that allows web pages to be
authored by dragging and dropping widgets.it is used for developing ASP.NET applications and
supports HTML, CSS and Java script.

37
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
A SQL database file is created in the VISUAL STUDIO with all collected database
details of the vehicle license numbers and the details of the vehicle number owner details with in
time is stored in the SQL database file .This database file is linked and configured to the website
created using DOT NET and C# .This website automatically displays the details of the number
and timing details.

5.7 DISPLAYING DETAILS

The text file from the matlab with recognised number details are automatically read
by the website and performs query operations with the database file linked to the website. The
number with details which is already stored in the database is displayed in the grid view of the
website .This all operations are controlled by the matlab GUI. This website has to be uploaded in
to the local system server to display the in time details and to enter the details of the vehicles in
to database so that vehicles numbers which are not present in the database are directly updated
from the website .The timer clock is connected and updated to server so that the time displayed
by the server at the processing and calling of the website are directly called and displayed in the
website as In time of the vehicle in the website. The displayed details and the website layout is as
shown below figure .

38
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

CHAPTER 6

IMPLEMENTATION AND RESULTS

39
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

6. IMPLEMENTATION AND RESULTS

6.1 INTRODUCTION :

This chapter describes the implementation of License Plate Recognition System using
MATLAB 2014 version. MATLAB is very powerful software tool used for implementing the tasks
that require extensive computation. MATLAB is quicker and faster in terms of implementation of
computed tasks when compared with C and C++. The key feature in MATLAB is that it contains
rich library functions for data analysis and image processing. This feature makes MATLAB an
ideal tool for faster implementation of algorithms and verification of any algorithm before it is
actually implemented on real hardware. The uses of MATLAB include:

 Math and computation


 Development of Algorithm
 Data acquisition
 Modeling, Simulation, and prototyping
 Data analysis, visualization and exploration
 Scientific and engineering graphics
 Development of Application including graphical user interface building.

40
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
Basically,MATLAB stands for Matrix Laboratory which was
originally written for the purpose of easy accessing of matrix software. MATLAB has been serving
many users over a period of years. In universities, it is standard instruction tool for advanced
courses in mathematics, engineering and science. In industries, it is a standard tool of high
productivity, development and research and data analysis. MATLAB contain tool boxes which
allow the users to learn and apply various technologies. Tool boxes help in solving particular
classes of problems. The available areas in which tool boxes are included are signal processing,
control systems, neural networks, fuzzy logic, wavelets, simulation, and many others. MATLAB
has the advantage of languages conversion i.e., code written in C Language can be converted into
MATLAB code and vice-versa which proves that MATLAB is an interactive developer.

6.2 EXPLANATION OF KEY FUNCTIONS

6.2.1 MATLAB DESKTOP:

It is the main MATLAB application window. The MATLAB desktop includes


five sub windows, the command window, the workspace browser, the current directory window,
the command history window and more than one figure windows which are displayed only when
the user species the information about that particular figure.

The command window helps the user to type the MATLAB commands and expressions at the
prompt and displays the output of those commands written. The workspace in MATLAB is defined
as a set of variables that the user can create in the work session. The workspace browser displays
these variables and provides some information about them. By giving a double click on a variable
in the workspace browser launches the Array Editor, which is useful for obtaining the
informationregarding certain properties of the variable.

The current Directory window which is above the workspace browser displays the
contents of the current directory used and the current directory is shown in the current directory
window. For example, consider a path in windows operating system as follows:
C:\MATLAB\Work, which indicates that directory “work”, is a subdirectory of the main directory
“MATLAB”, which is installed in drive C. By clicking on the arrow in the current directory

41
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
window displays a list of recently used paths. The current directory can be changed by clicking on
the button to the right of the window.

MATLAB uses a search path to find M-files and other MATLAB related files, which are organize
in directories in the computer file system. In order to run any file in MATLAB,the file must reside
in the current directory or in a directory that is on the search path because by default, the files
supplied with MATLAB and math works toolboxes are included in the search path. It is good
practice to add the commonly used directories in the MATLAB to the search path to avoid repeated
changing of the current directory.

The Command History Window contains a history of the commands that a user has entered in the
command window, including both the current and previous MATLAB sessions. By giving right
click on a command or sequence of commands in the command window history, the previously
entered MATLAB commands can be selected and re-executed.

6.2.2 MATLAB EDITOR TO CREATE M-FILES:

The MATLAB editor contains both the text editor used for creating M-files and a graphical
MATLAB debugger. The editor can appear as a window by itself, or it can be a sub-window in the
desktop. M-files are saved with the extension .m, such as file.m. The MATLAB editor has large
number of pull-down menus for performing tasks such as saving, viewing, and debugging files.
The MATLAB text editor is recommended as the tool of choice for writing and editing M-
functions because it performs some simple checks and also uses color to differentiate various
elements of code. In order to open the editor, typing edit at the prompt opens the M-file filename.m
in an editor window which is ready for editing. Note that the file must be present in the current
directory or in a directory residing in the search path.

6.2.3 HELP OPTION:

In order to get help online one can use the MATLAB help browser, which will be opened as a
separate window either by clicking on the question mark symbol (?) on the desktop toolbar, or by
typing help browser at the prompt in the command window. The help Browser is a web browser
which is integrated the MATLAB desktop. It displays a Hypertext Markup Language(HTML)
documents. The Help Browser includes two panes, one the help navigator pane used to gather the
information, and the other is display pane which used to view the information.

42
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

6.2.4 DATA CLASSES:

Though we work with integers coordinates, the values of pixels might also be
integers in MATLAB. Table 2 shown below lists various data classes supported by MATLAB for
representing pixels values. The first eight classes in the table are referred as numeric data classes.
The ninth one is the char class and is referred to as logical data class. All the numeric computations
in MATLAB are done using double quantities. Hence, this frequent data class can be used in image
processing applications. Class unit 8 also is used frequently, especially when reading any data
from the storages devices. The data class double uses 8 bytes to represent a number and Uint8,
Int8 use one byte each. Uint16 and int16 use 2bytes.

NAME DESCRIPTION

Double Double _ precision, floating_ point numbers the Approximate.

Uint8 Unsigned 8_bit integers in the range [0,255] (1byte per Element).

Unit16 Unsigned 16_bit integers in the range [0, 65535] (2byte per element).

Unit 32 Unsigned 32_bit integers in the range [0, 4294967295](4 bytes per element).

Int8 Signed 8_bit integers in the range [-128,127] (1 byte per element)

Int16 Signed 16_byte integers in the range [32768, 32767] (2 bytes per element).

Int32 Signed 32_byte integers in the range [-2147483648, 21474833647] (4 byte per

Element

Single Single _precision floating _point numbers with values in the approximate range (4
bytes per elements)

Char Characters (2 bytes per elements).

Logical Values are 0 to 1 (1byte per element).

43
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
Table 1: Data Classes

6.3 METHODS OF IMPLEMENTATION


The commands which are helpful for writing code for the proposed method are listed below:

6.3.1 FORMS

A. IMAGE PROCESSING COMMANDS

1. imread: Reading the image from graphics file

Syntax:

B = imread(filename, fmt)
[X, map] = imread(...)
[...] = imread(filename)
[...] = imread(URL,...)

Description:

B = imread (filename, fmt) reads a gray image or color image from the file. Note
that the file and the image to be read should be in the current folder. ‘FMT’ refers to image format
and different formats are listed in table 3.

RECOGNIZED
FORMAT NAME DESCRIPTION
EXTENSION

TIFF Tagged Image File Format .tif, .tiff

JPEG Joint Photograph Experts Group .jpg, .jpeg

GIF Graphics Interchange Format .gif

BMP Windows Bitmap .bmp

PNG Portable Network Graphics .png

XWD X Window Dump .xwd

44
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
Table 2: List of different formats

2. imwrite: Used for writing image to graphics file

Syntax:

imwrite (B,filename,fmt)
imwrite(X,map,filename,fmt)

Description:

imwrite(B,filename,fmt) writes the image B to the file specified by filename in the


specifiedformat.

3. imshow: Used to display the image

Syntax:

imshow(I)
image = imshow(...)

Description:

imshow (I) displays the gray image I.

B. COMMANDS RELATED TO GEOMETRIC TRANSFORMATION:

1. Imresize :Resize image to desired size

Syntax:

B = imresize(A, scale)
B = imresize(A, [numrows numcols])
[Y newmap] = imresize(X, map, scale)

Description:

B = imresize (A, scale) shows image B that is scale times the size of A. The input image A can be
gray, RGB, or binary image. If scale is between 0 and 1.0 thenB is smaller than A otherwise larger
than A.

45
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
C. COMMANDS FOR TYPE 2 TYPE CONVERSION

1.rgb2gray: Converts RGB image or color image to gray image

Syntax:

A = rgb2gray (RGB)
newmap = rgb2gray(map)

Description:

A= rgb2gray(RGB) converts RGBimage to the gray image A by eliminating the


hue and saturation information while retaining the luminance.

2. ind2gray: Converts the indexed image to gray image

Syntax:

A = ind2gray(X, map)

Description:

A = ind2gray(X,map) converts the image X with color map to a gray image A by


removes the hue and saturation information from the input image while retaining the luminance

3.im2double:Converts the image to double precision.

Syntax:

I2 = im2double(I)
RGB2 = im2double(RGB)
I = im2double(BW)
X2 = im2double(X,'indexed')

Description:

I2=im2double(I) converts the image into double precision and


RGB2=im2double(RGB) converts the RGB image into double precision.

The above listed are only some of the commands used for the proposed method
but there are large number of commands in MATLAB which can be used for different purposes.

46
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

4.bwlabel: Label connected components in 2-D binary image

L = bwlabel(BW, n) returns a matrix L, of the same size as BW, containing labels for the
connected objects in BW. The variable n can have a value of either 4 or 8, where 4 specifies 4-
connected objects and 8 specifies 8-connected objects. If the argument is omitted, it defaults to 8.

The condition statements are used for representing the conditions used in Adaptive Thresholding
Method, Unwanted Line Elimination Algorithm, Vertical edge Algorithm and in Candidate Region
Extraction. Using those conditional statements like if, case etc., the process can be understood in
an easier way. Different images are read to MATLAB using imread command and those images
can be seen using imshow command. By using these some of the commands the code has been
written for the proposed method and executed with the help of MATLAB.

5. regionprops:

STATS = regionprops (BW, properties) measures a set of properties for each connected component
(object) in the binary image, BW. The image BW is a logical array; it can have any dimension. If
called with a grayscale image, regionprops also returns the pixel value measurements, listed
in Pixel Value Measurements. If properties is not specified or if it is the
string 'basic', regionprops computes only the 'Area', 'Centroid', and 'BoundingBox' measurements.
You can calculate the following properties on N-D
inputs: 'Area', 'BoundingBox', 'Centroid', 'FilledArea', 'FilledImage', 'Image', 'PixelIdxList', 'Pixel
List', and'SubarrayIdx'.

Region props in our project is used to create bounding box to the labelled connected
components. This bounding box will give contain the information about the edges dimensions of
the connected components where and the X,Y co-ordinates of the objects recognised after the
labelled and connected component analysis process.

6.3.2 OUTPUT FORMS

47
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
The entire images from input to output images for processing is as shown

Figure a input image

48
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

Figure image after adaptive thersholding

Figure image after morphological operation

Figure image after size filtering

49
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

Figure connected component analysis output

Figure text region extraction

6.3.3 RESULT ANALYSIS

The success of license plate recognition on applying segmentation to the image so for this purpose
we have to separate the text region of license number from the entire image. The filtered image is
scanned row wise from top to bottom and magnitude of the binary image in each row is stored in
variables. The row having maximum magnitude will be having the license number region so that
region is cropped. The output recognised in the form of text file is opened automatically by the

50
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
matlab and stored in the matlab directory. This text file is directly accessed by the website to read
the customer license number. The text file from the matlab with recognised number details are
automatically read by the website and performs query operations with the database file linked to
the website. The number with details which is already stored in the database is displayed in the
grid view of the website .This all operations are controlled by the matlab GUI.

CHAPTER 7
TESTING AND VALIDATION

51
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

7.TESTING AND VALIDATION

7.1 INTRODUCTION

In this proposed method the adaptivethresholding and connected component analysis


is used to detect a certain boundaries of a vehicle license plate detection based on image
processing. Existing methods like prewitt sobel and Robert are detected total back image of the
vehicle, which consumes more time complexity and more difficult to implement it. To avoid these
things we have designed a new algorithm.

7.2 VALIDATION

This proposed method has also some advantages and restrictions also. This is applicable for
all plate of vehicles irrespective of considering their colours and sizes. This algorithm is valid up
to 5-6 feets of distance between the camera and license plate. It depends on solar energy, it process
only low and high resolution images .It works mainly on illumination of the plate. It’s efficiency
is low during rainy seasons, this algorithm depends on camera position it should aligned to certain
angle only.

Table no 3 :Environmental conditions

52
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
Environment Outside
Weather Rainy,shady,sunny days
Capturing time 8am-6pm
Total no of plates 90 images
Camera aperture 2.8
Camera distance to lp 5-6 feets

Focal length 3.5 mm


Camera placement Pan+/- 20degrees,tilt 20 degrees
Image size 1280x960
Image background Complex
License plate sizes Different
License plate designs Different
Color of vehicles Various

7.2.1ADVANTAGES

The proposed method has many advantages which resulted in better performance than
the existing methods. Some of the major advantages are listed below:

1. The CLPD method processes the high quality images.

2. Tolerant to different lightening conditions, varied sizes and different designs of License Plates.

3. Processes the images with complex background.

4. Easy to implement.

5. Faster computation.

6. Use of less complexity algorithm

7. More accuracy

8. Low cost

53
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
9. High detection rate and better localization of license area by labeling

10. Identifies vehicles containing different colors of License Plates.

11. Meets the requirement of operating in real time environment.

The above listed advantages helped to use this proposed method in


various applications like Highway Toll fees collection, Traffic data collection and Traffic
monitoring, Prevention of crimes, Payment of parking fees, Automated Parking System, Vehicle
Access control, border control etc.,

AUTHOR OPERATOR YEAR ADVANTAGES DISADVANTAGES ACCURACY

Simplicity,
Lawrence Detection of Sensitive to noise 89%
Robert’s 1963
Robert edges and their and inaccurate
orientations.
Detection of More computation
Irwin
Sobel 1968 Edges and their time and sensitive to 93%
Sobel
orientations noise
Detection of
Judith More sensitive to
both Horizontal 90%
M.S. Prewitt 1970 noise, size of the
and Vertical
Prewitt kernel filter is fixed
edges

54
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
Better
More complexity,
Localization and
requires more
John F. Detection
Canny 1986 computation time
Canny specially in 91.4%
because of complex
noisy
computations
environment
Easy, quick in Simple to
computation, implement, less time
Vertical
2013 more accurate, complexity, very 97.6%
Edge
less complexity clear in results, high
performance ability

Table 4: validation of different Edge Detection Operators

7.2.3 DISADVANTAGES:

Like every conventional method, the proposed CLPD Method also has disadvantages but less
when compared to those conventional methods. The disadvantages of the proposed method are
listed below:

1. The capturing time is between 8 AM to 6 PM only which is the major drawback of this proposed
method.

2. High complexity.

3. The camera captures the License Plate image only at a distance of 5 to 6 feet.

4.Need a person to do surveillance 24 hours

The above listed disadvantages show effect on the proposed method but
not to a greater extent. Still it is suitable to operate in real time environment and yield better

55
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
performance because of new Algorithm which increases the system accuracy and results in faster
computation time. So, the proposed LPD method is generally preferred in transportation
applications.

7.2.3 APPLICATIONS:

The proposed method has wide area of applications in Intelligent Transportation Applications.
Some of the applications of proposed method are collecting traffic data and traffic monitoring,
Automated parking System, Payment of parking fees, Crime Prevention and in Vehicle Tracking
applications etc., the explanation of some of the applications are shown below:

1. PAYMENT OF PARKING FEES:

The proposed method is used for payment of parking fees by capturing the number plate image of
the vehicle. The camera captures the image of the vehicle during entry and also during exit and the
captured image is processed for extracting the candidate details. Based on the duration of parking,
the candidate will be charged. Here, the parking fees will be directly debited from the candidate’s
account. The candidate can increase parking time through mobile phone. Using the proposed
method, the parking fee is collected at different parking lanes and in automated parking garages.
Almost all the developed countries are implementing this technique for collecting parking fees.

2. HIGHWAY TOOL FEES:

Toll fees are collected in order to retain the capital of toll gate construction
and other factors. Using LPD methods, toll fees are collected without stopping the vehicles near
the toll gates. The web camera captures the image of the vehicle when it enters the toll gate and
the amount to be paid will be debited from the candidate’s account. The advantage here is that
there is no need of stopping the vehicle for the purpose of toll fee.

3. TRAFFIC DATA COLLECTION:

56
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
Due to increase of numerous vehicles, the traffic has been increasing day by day especially in the
cities. Hence, with the use of proposed method traffic can be cleared to greater extent. The
proposed method can be used for collecting traffic data in particular area and also for the purpose
of traffic monitoring. The traffic density can be found from the captured images and based on that
the traffic can be cleared in traffic jammed places.

4. CRIME PREVENTION:

With the increase of vehicles, the accidents have also increased. In order to prevent crimes, the
proposed method can be one of the choices. This proposed can be helpful in finding some clues in
the accident zones because the monitoring camera has the capability of storing the images. And
also, the unregistered license plates can also be detected.

Hence, License plate detection algorithm can be one of the best choices
among different license plate algorithms when compared to the previous existing methods because
of more accuracy, reduced computation time, less complexity and much faster algorithm which
can be implemented in real time environment.

57
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

CHAPTER 8

CONCLUSION

8.CONCLUSION AND FUTURE SCOPE

58
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
We have proposed a new and fast algorithm for license number detection, in
which its performance is faster than the performance of sobel by five to nine times depending on
image resolution. When we compare with the previous methods like prewitt, cannan,robert
methods this plays a main role in edge detection algorithm. Existing methods takes only one pixel
for reference but our method takes all surrounding pixels of image while calculating adaptive
thresholding and integral image. This contributes to make the whole proposed LPD method faster.
We have proposed a LPD method in which data set was captured by using a mobile camera. We
employed 92 images taken from various scenes and under different conditions. Only one LP is
considered in each sample for the whole experiments. In the experiment, the rate of correctly
detected LPs is 91.4%.In addition the computation time of the CLPD method is 47.7ms, which
meets the real-time requirements. Finally the method based and Sobel based LPD are compared
and the findings show that our method based LPD is better in terms of the computation time and
the detection rate.

59
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI

CHAPTER 9

REFERENCES

9. REFERRENCES:

[1] “A Survey of edge detection techniques” By L.S.Davis . in (1975).

[2] “Computer Methods in image analysis” By J.K.Aggarwal ,R.O.Duda And

A.Rosenfeld In (1977).

[3] “Adaptive Thresholding for Digital Desk” By P.D.Wellner In ( 1993).

[4] “Atomatic Recognition of a car license plate using color image processing “ By
60
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
E.R.Lee , K.K.pyeoung, And J.K.Hang In (1994).

[5] “Gradient based edge detection using nonlinear edge Enhancing perfilters” By
.. R.C.Hardie And C.G.Boncelct In (1995).

[6] “A Recognition of Vehicle license plate using a genetic algoritham based segmentation”

By S.K.Kim, D.W.Kim And H.J.Kim In (1996) .

[7] “An approach to license plate Reognition” By J.R.parker, and P.Federi In (1997).

[8] “Automatic car registration using Fast Hough transform” By S.Gendy ,C.L.Smith

And S.Lachowicz In (1997).

[9]“Car plate Recognition by Neural networks and image processing” By R.Parisi,

E.D.Diclaudi In (1998).

[10] “ Extraction of Car license plate using motor vehicle regulation and character

pattern Recognition “ By S.Thanongsak, C.Kosin In (1998).

[11] ”License plate Localization by using vector quantization” By S.Rovetta ,

And R.Zunino In (1999) .

[12] “The recognition of car license plate for automatic parking system” By

S.Thanongsak and C.kosin In (1999) .

[13] “An approach to Karen license plate Recognition” By M.Yu And Y.D.Kim

In (2000).

[14] “Robust license-plate Recognition Method for passing Vehicles under outside

61
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
Environment” By T.Natio, T.Tsukada, K.Yamada, K.Kozuka And

And S.Yamamoto In (2000).

[15] “Morphology based license plate detection from complex scenes” By S.H.Yu

J.W.Hsich And Y.S.Chen In (2002).

[16] “Multi national Integrated car license plate recognition system using geometrical features

And Hybrid patternVector” By S.H.Le ,Y.S.Seok And E.J.Lee In (2002).

[17] ”A Robust license plate extraction Method under complex image conditions” By S.Kim

D.Kim,Y.Ryu, And G.Kim In (2002) .

[18] “A Real time Vehicle license plate Recognition (LPR) System” By B.H.Ron And

J.Erez In(2002).

[19] “Real time license plate Recognition in a video movie” By O.Shahaf And J.Erez In (2002).

[20] “Feature Extraction and Image processing” By M.S.Nixon And A.S.Aguado In (2002).

[21] “A Fast license plate extraction method on complex background” By HBai, J.Zhu And

C.Liu In (2003) .

[22] “ A Hybrid license plate extraction method based on edge statics and morphology” By

H.Bai And C.Liu In (2004).

[23] “A projek CARPET , car license plate extraction and recognition Technology”

{Presented at the national innovation summit, Kuala lumpur}

By C.C.Ming In (2004).

[24] “ Automatic license plate recognition” By J.Matas And K.Zimmerman In (2004).

62
DEPT OF ECE, MITS
License Plate recognition with surveillance using matlab GUI
[25] “ Neural network based threshold determination for Malaysia license plate charecter

Recognition” By M.Fukumi, Y.Takeuchi, H.Fukumoto,Y.Mitsura

And M. Khiladi In (2005).

[26] “An efficient method of license plate location” By D.Zheng, Y.Zhao And

J.Wang In (2005).

[27] “Unconstrained license plate and text localization and recognition” by

J. Matas and K. Zimmermann in (2005).

[28] “License plate extraction in low resolution video” By H.H.P.W; H.H. chen,

R.J.Wu and D.F SHEN in (2006).

[29] “Vehicle license plate detection using local fractor dimension and morphological analysis”

By A.A.Lensky ,J.Kang-hyul and V.VGubarev in(2006)

[30] “Fast construction of covariance matrices for orbirtary size image windows”

By F.Poriki and O.Tuzel in (2006)

63
DEPT OF ECE, MITS