RABI’ATUL_ADAWIYAH_BINTI_MUSTAFA
description
Transcript of RABI’ATUL_ADAWIYAH_BINTI_MUSTAFA
AUTOMATIC CAR LICENSE PLATE RECOGNITION SYSTEM (CLPR)
RABI’ATUL ADAWIYAH BINTI MUSTAFA
This thesis is submitted as partial fulfillment of the requirements for the award of the
Bachelor of Electrical Engineering (Hons.) (Electronics)
Faculty of Electrical & Electronics Engineering
Universiti Malaysia Pahang
OCTOBER,2008
“All the trademark and copyrights use herein are property of their respective owner.
References of information from other sources are quoted accordingly; otherwise the
information presented in this report is solely work of the author.”
Signature : ____________________________
Author : RABI’ATUL ADAWIYAH BINTI MUSTAFA
Date : 28 OCTOBER 2008
“I hereby acknowledge that the scope and quality of this thesis is qualified for the award
of the Bachelor Degree of Electrical Engineering (Electronics)”
Signature : ______________________________________________
Name : REZA EZUAN BIN SAMIN Date : 20 APRIL 2008
To my belove mother and father,
Mr.Mustafa Bin Sulaiman Mrs. Selamah Binti Yaakob
Thank you for supporting me all the time
AKNOWLEDGEMENT
First of all I am grateful to ALLAH S.W.T for blessing and giving me
enough courage in completing my final year project (PSM).
Secondly I would like to thank my family for giving morale support and
encouragement in completing my project and also throughout my study in UMP as they
are my inspiration to success. Unforgettable, I want to give a special gratitude to my
supervisor En. Reza Ezuan Bin Samin for guiding and supervising my final year project
throughout these two semesters. He has been very helpful to me in finishing my project
and I appreciate every advice that he gave me in correcting my mistakes. I apologize to
my supervisor for any mistakes and things that I done wrong while finishing my project.
The credit also goes to all lecturers and everyone who willing to share their knowledge,
cooperation and guide that is related to my project.
Last but not lest I want to thank all my friends that have gave me advice and
encouragement in completing my project. Thank you very much to all and May ALLAH
bless you.
ABSTRACT
The growth of technologies requested higher performance tools in order to fulfill
human needs and market. This system is implemented to make human work easier
besides can reduce the uses of human power and because of its potential application. The
development of automatic car license plate recognition system will resulted greater
efficiency for vehicle monitoring system. Car plate recognition systems are used
commercially, both in overseas and locally. In Malaysia, however the usage of car plate
recognition system is restricted to the ordinary car plates. This means that the system is
unable to detect special types of car plates. Therefore, this system is aimed for
implementation of a recognition system for special Malaysian car plates. This system is
implementing by using MATLAB7.1 Image Processing Toolbox, which uses optical
character recognition on images to read the license plates on vehicles. The system is an
online system where the image will automatically extracted once after the image is
captured by webcam using image processing technique. First, the image is converted
into a binary image and then the chosen area will be cropped so that only the plate
number is left .Next, the image is compliment so that the black plate background
becomes white while the white plate number becomes black because the system can only
detect binary image where the background should be white while the plate number
should be black. One of the important step is the integration between image processing
and Graphical User Interface (GUI) where, the output of this project will displayed using
GUI.
ABSTRAK
Perkembangan teknologi yang pesat mendorong kepada keperluan peralatan
berpotensi tinggi bagi memenuhi permintaan manusia dan pasaran. Sistem ini
dibangunkan untuk kemudahan manusia disamping dapat mengurangkan kepada
penggunaan tenaga manusia memandangkan ia berpotensi untuk dipelbagaikan
aplikasinya. Dengan adanya sistem pengecaman plat kereta ini dapat meningkatkan
kecekapan system pengawasan kereta. Sistem ini digunakan secara komersial sama ada
di dalam mahupun diluar negara. Walaubagaimanpun, di Malaysia penggunaan sistem
ini terhad kepada pengecaman plat kereta biasa. Ini bermakna, sistem tersebut tidak
dapat menegcam plat kereta yang menggunakan perkataan khas. Pada dasarnya, sistem
ini dibangunkan khas untuk mengenal pasti nombor plat kereta Malaysia. Untuk
mengenalpasti nombor plat kereta, program pemprosesan imej dibuat dengan
menggunakan perisian MATLAB. Sistem ini merupakan sistem online dimana imej plat
kereta secara automatik akan diekstrak atau diproses sebaik sahaja gambar kereta
diambil. Pertama sekali, imej yang diambil tadi akan ditukar kepada imej binari
kemudian ia akan dipotong supaya hanya nombor plat kereta sahaja yang tinggal dan
akan melalui proses yang seterusnya. Kemudian warna imej tersebut akan
disongsangkan dimana warna hitam latar belakang plat kereta tersebut bertukar menjadi
warna putih manakala nombor plat kereta tersebut akan bertukar menjadi warna hitam.
Kaedah ini penting kerana proses mengenal pasti nombor plat kereta akan menjadi lebih
mudah dengan menggunakan imej binari. Nombor kereta yang telah dikenalpasti itu
akan dipaparkan di skrin khas yang dikenal sebagai GUI.
TABLE OF CONTENTS
CHAPTER TITLE PAGE
DECLARATION ii
DEDICATION iv
ACKNOWLEDGEMENT v
ABSTRACT vi
ABSTRAK vii
TABLE OF CONTENT viii
LIST OF TABLE xii
LIST OF FIGURE xiii
LIST OF APPENDICES xv
1 INTRODUCTION 1
1.1 Background 1 1.1.1 What is Digital Image Processing 1 1.1.2 What is Neural Network 2
1.2 Problem Statements 3 1.3 Project Objectives 4 1.4 Project Scopes 4 1.5 Thesis Outline 5
2 LITERATURE REVIEW 6 2.1 Introduction 6 2.2 MATLAB 7 2.3 Digital Image Processing 7 2.4 Neural Network Technology 8 2.4.1 Gathering Data for Neural Network 9 2.4.2 Multilayer Perceptron 10 2.4.3 Training Multilayer Perceptron 10 2.4.4 Neural Network Architecture 12 2.5 Graphical User Interface 13 2.6 Waterfall Methodology 14 2.6.1 Requirement 14 2.6.2 Design 15 2.6.3 Implementation 15 2.6.4 Verification 15 2.7 Optical Character Recognition 15 3 METHODOLOGY 18 3.1 Introduction 18 3.2 System Design 19 3.3 Image Acquisition System 23 3.3.1 License Plate Cropping 23 3.3.2 License Plate Quantization 24
3.3.3 Plate Deformation 24 3.3.4 Digit Filtering 24 3.3.5 Character Segmentation 25 3.3.6 Character Recognition 25 3.4 Image Processing Technique 25 3.4.1 Converting Image 26 3.4.2 Crop the Region Of Interest (ROI) 26 3.4.3 Morphology 27 3.4.4 Erosion Method 27 3.4.5 Dilation Method 27 3.4.6 Threshold 28 3.5 Software and Hardware Integration 28 3.5.1 Software Items 29 3.5.2 Hardware Items 29 3.6 Graphical User Interface 30 4 RESULT AND ANALYSIS 34 4.1 Introduction 34 4.2 Image Processing Technique 36 4.2.1 Result of Captured Image 36 4.2.2 Convert RGB Image 38
to Grayscale Image 4.2.3 Image Crop 39 4.2.4 Opening Function 40
4.2.5 Threshold Function 41 4.2.6 Imcomplement Function 42 4.3 Result of Optical Character Recognition 43 4.4 Graphical User interface (GUI) Representation 44 4.5 Training Result 45 4.6 Discussion 47 5 CONCLUSION AND RECOMMENDATIONS 49 5.1 Introduction 49 5.2 Future Recommendation 49 5.3 Conclusion 50 REFERENCES 51-52 Appendix A: Gantt chart PSM 1 Appendix B: Gantt chart PSM 11 Appendix C: CLPR system coding Appendix D: CLPR system with GUI coding
LIST OF TABLES
TABLE NO TITLE PAGE 2.1 OCR Software 17 3.1 Software Items 29 3.2 Hardware Items 29 4.1 Training Results 46
LIST OF FIGURES
FIGURE NO TITLE PAGE 2.1 Three layer feed Forward Neural Network 8 2.2 Neural Network training model 11 2.3 Square mean error (SME) training process 12 2.4 ADALINE network 13 2.5 Waterfall methodology 14 3.1 Block diagram of CLPR system 20 3.2 Flowchart of CLPR system 22 3.3 Image under lighting 23 3.4 MATLAB command window 30 3.5 Guide command window 31 3.6 GUI GUIDE quick start 31 3.7 GUI design screen 32 3.8 GUI with activation devices 33 4.1 Parking entry prototype 34 4.2 Car plate samples 35 4.3 Info for webcam 36 4.4 MATLAB function to capture image 37 4.5 Image captured using webcam 37
4.6 MATLAB function to convert RGB 38 image to grayscale image
4.7 The grayscale image 38 4.8 MATLAB function for crop image 39 4.9 Crop image 39 4.10 MATLAB opening function 40 4.11 Opening image 40 4.12 MATLAB threshold function 41 4.13 Thresholding image 41 4.14 Imcomplemen function 42 4.15 Imcomplement image 42 4.16 Alphabets scanned image 43 4.17 Graphical user interface 44 4.18 Exit option window 45
LIST OF APPENDICES
APPENDIX TITLE PAGE A Gantt Chart PSM 1 53 B Gantt Chart PSM 11 55 C CLPR System Coding 57 D CLPR System with GUI Coding 60
CHAPTER 1
INTRODUCTION
1.1 Background This chapter explains what is Image Processing and Neural network that is
used to develop the ‘Automatic Car Plate Recognition System Using Neural
Network’. Both elements can be found in MATLAB Toolbox. All this elements are
essential parts as a guide to develop the car plate recognition system. This chapter
also explains the problem statements of the system, objective of project, project
scope and thesis outline.
1.1.1 What is Digital Image Processing
An image can be defined as two-dimensional function f(x,y), where x and y are
spatial (plane) coordinates and the amplitude of f at any pair of coordinates (x,y) is
called the intensity or gray level of the image at that point. When x,y and the
amplitude values of f are all finite, discrete quantities, we call the image digital
image. An image is stored as a matrix using standard Matlab matrix conventions.
There are five basic types of images supported by Matlab; Indexed images, Intensity
images, Binary images, RGB images and 8-bit images The field of digital image
processing refers to processing digital images by means of a digital computer. A
digital image is composed of a finite number of elements, each of which has a
particular location and value. These elements are referred to as picture elements,
image elements and pixels. Pixels is the term most widely used to denote the
elements of a digital image.[1]
Digital image processing allows the use of much more complex algorithms for
image processing, and hence can offer both more sophisticated performance at
simple tasks, and the implementation of methods which would be impossible by
analog means. In particular, digital image processing is the only practical
technology for: [2]
· Classification
· Feature extraction
· Pattern recognition
· Projection
· Multi-scale signal analysis
Some techniques which are used in digital image processing include:
· Principal components analysis
· Independent component analysis
· Self-organizing maps
· Hidden Markov models
· Neural networks
1.1.2 What is Neural Network
Term neural network had been used to refer to a network or circuit of biological
neurons. In the other side, neural network refers to artificial neural networks, which
are composed of artificial neurons or nodes. Artificial neural networks are made up
of interconnecting artificial neurons (programming constructs that mimic the
properties of biological neurons). Artificial neural networks may either be used to
gain an understanding of biological neural networks, or for solving artificial
intelligence problems without necessarily creating a model of a real biological
system. An artificial neural network (ANN), is an interconnected group of artificial
neurons that uses a mathematical or computational model for information
processing based on a connection approach to computation.
In most cases an ANN is an adaptive system that changes its structure based on
external or internal information that flows through the network. In more practical
terms neural networks are non-linear statistical data modeling or decision making
tools. They can be used to model complex relationships between inputs and outputs
or to find patterns in data. An artificial neural network involves a network of simple
processing elements (artificial neurons) which can exhibit complex global behavior,
determined by the connections between the processing elements and element
parameters. In a neural network model simple nodes, which can be called variously
"neurons", are connected together to form a network of nodes — hence the term
"neural network". Its practical use comes with algorithms designed to alter the
strength (weights) of the connections in the network to produce a desired signal
flow.[3]
1.2 Problem Statement
Automatic car license plate recognition (CLPR) system is implemented to help the
human to automatically detect plate number without human supervision. Previously,
human is needed to observe and list the user car plate number manually. So this
project is developing to replace human to monitor the car and automatically
capture the image. Besides that, the system can automatically display the status of
the car which it will compare between the car plate numbers recognized with the
database from JPJ. So we can know either the car is in JPJ observation or not.
1.3 Project Objectives
1. Develop a car license plate recognition system using Image Processing
Toolbox and Neural Network Toolbox
2. Integrate between Image Processing and Neural Network
1.4 Project Scopes
This project is to develop a car plate recognition system by using neural network
(CLPR).For implementing CLPR system we have use MATLAB Toolbox to
achieve the objectives of the project. Thus, the focuses of this project are as below
1. To implement the system in order to recognize the car license plate.
2. To integrate hardware and software.
3. Extract the data from the car plate image by using digital image processing
toolbox.
4. Recognize the image of the car license plate by using neural network
technique, using a feed-forward network with 3 layers.
1.5 Thesis Outline
Chapter 1 Explain the background of image processing and neural Network,
problem statement, objectives of the projects and project scopes all about.
Chapter 2 focuses on the project and literature review about the project that is used
as references that helps me in order to finishing my final year project.
Chapters 3 explain and discuss details about digital image processing process and
neural network process. In addition, this chapter discusses detail about the method
used for this project and some mathematical algorithm applied in the project.
Chapter 4 this chapter will discuss about all result obtained from the system and the
limitation of the project. All the discussions are concentrating on the results and
overall performance of Car Plate Recognition (CLPR) system.
Chapters 5 discuss the conclusion of development of the whole CLPR system. This
chapter also discusses the problem and the recommendation for this project and the
overall CLPR system for the future development or modification.
CHAPTER 2
LITERATURE REVIEW
2.1 Introduction
License plate identification/recognition (LPI/R) is one form of ITS
technology that not only recognizes and counts vehicles, but distinguishes each as
unique. For some applications, such as electronic toll collection and red-light
violation enforcement, LPI/R records a license plates alphanumeric so the vehicle
owner can be assessed the appropriate toll or fine. In others, like commercial
vehicle operations or secure-access control, a vehicle's license plate is checked
against a database of acceptable ones to determine whether a truck can bypass a
weigh station or a car can enter a gated community or parking lot. [4]
License plate recognition (LPR) is a new tool for automatic vehicle and
traffic monitoring by using digital image processing. For implementing LPR system
we have used digital image processing technique and artificial neural network.
The LPR system can be used to traffic control management for recognize
vehicles that commit traffic violation, such as entering restricted area without
permission ; occupying lanes reserved for public transport, crossing red light,
breaking speed limits ; etc.
The purpose for which this system is implemented real time applications,
this system is using advance and new techniques of digital image processing such as
pattern recognition for recognize characters of license plate and artificial neural
network to extract the data.[5]
2.2 MATLAB
MATLAB is a numerical computing environment and programming language.
Created by The MathWorks, MATLAB allows easy matrix manipulation, plotting
of functions and data, implementation of algorithms, creation of user interfaces, and
interfacing with programs in other languages. Although it is numeric only, an
optional toolbox interfaces with the Maple symbolic engine, allowing access to
computer algebra capabilities. [6]
MATLAB is built around the MATLAB language, sometimes called M-code or
simply M. The simplest way to execute M-code is to type it in at the prompt, >> , in
the Command Window, one of the elements of the MATLAB Desktop. In this way,
MATLAB can be used as an interactive mathematical shell. Sequences of
commands can be saved in a text file, typically using the MATLAB Editor, as a
script or encapsulated into a function, extending the commands available.
This project could be successfully implementing an initial program to
recognize car plate using MATLAB. Image Processing Toolbox and Neural
Network Toolbox are used to implement the system. [7]
2.3 Digital Image Processing
The paper represents the automatic plate localization component of a Car
License Plate Recognition system. The approach concerns stages of preprocessing,
edge detection, filtering, detection of the plate's position, slope evaluation, and
character segmentation and recognition. Single frame gray-level images are used as
the only source of information. [8]
There are four primary algorithms that the software requires for identifying a
license plate:
1. Plate localisation – responsible for finding and isolating the plate on the picture
2. Plate orientation and sizing – compensates for the skew of the plate and adjusts
the dimensions to the required size
3. Normalisation – adjusts the brightness and contrast of the image
4. Character segmentation – finds the individual characters on the plates
The complexity of each of these subsections of the program determines the
accuracy of the system. During the third phase (normalisation) some systems use
edge detection techniques to increase the picture difference between the letters and
the plate backing. A median filter may also be used to reduce the visual "noise" on
the image. [9]
2.4 Neural Network Technology
Figure 2.1: Three layer feed –forward Neural Network
Neural networks are data analysis methods and algorithms, indirectly based on the
nervous systems of humans and animals.
A typical feed forward network has neurons arranged in a distinct layered
topology. The input layer is not really neural at all: these units simply serve to
introduce the values of the input variables. The hidden and output layer neurons are
each connected to all of the units in the preceding layer. Again, it is possible to
define networks that are partially-connected to only some units in the preceding
layer; however, for most applications fully-connected networks are better.
When the network is executed (used), the input variable values are placed in
the input units, and then the hidden and output layer units are progressively
executed. Each of them calculates its activation value by taking the weighted sum
of the outputs of the units in the preceding layer, and subtracting the threshold. The
activation value is passed through the activation function to produce the output of
the neuron. When the entire network has been executed, the outputs of the output
layer act as the output of the entire network.[10]
2.4.1 Gathering Data for Neural Networks
Once we have decided on a problem to solve using neural networks, we will
need to gather data for training purposes. The training data set includes a number of
cases, each containing values for a range of input and output variables. The first
decisions you will need to make are: which variables to use, and how many (and
which) cases to gather.[11]
Neural networks process numeric data in a fairly limited range. This
presents a problem if data is in an unusual range, if there is missing data, or if data
is non-numeric. Fortunately, there are methods to deal with each of these problems.
Numeric data is scaled into an appropriate range for the network, and missing