Term 1 - UWC Computer Science - University of the Western Cape

advertisement
NUMBER PLATE RECOGNITION
SYSTEM
By
KJ Tsiri
A thesis submitted in partial fulfillment of
the requirements for the degree of
Bsc (Hons) Computer Science
University of the Western Cape
2013
Date:
February 8, 2016
University of the Western Cape
Abstract
NUMBER PLATE RECOGNITION
SYSTEM TO GRANT ACCESS
By KJ Tsiri
Supervisory:
Adiel Ismail
Department of Computer Science
Abstract
South African automatic number plate recognition (ANPR) system using
artificial neural network. The system of recognition contains of three main
major parts- number plate detection, plate character segmentation and
South African character recognition. They are several processes that have to
be done in the process of number plate detection. The are many problems
and complications that arise under the number plate detection such as
vehicle in motion, complex background, distance changes, unclearness of
the number plate, during day and night etc. For solving this kind of the
problem we will apply edge analysis method. By the use of Horizontal and
Vertical projections, the number plate segments will be able to be identified
fully. South African Number plate contains of letters and numbers and
number plates are segmented into characters. The feature extraction
method is applied to extract the necessary characters needed for the
number plate to be recognized successfully and after this method the
characters are recognized.
TABLE OF CONTENTS
Table of Contents ------------------------------------------------------------------------------------------------------- i
List of figures ------------------------------------------------------------------------------------------------------------ ii
Acknowledgments --------------------------------------------------------------------------------------------------- iii
Glossary------------------------------------------------------------------------------------------------------------------ iv
Introduction -----------------------------------------------------------------------------------------------------------iv
Chapter 1 --------------------------------------------------------------------------------------------------------- 3
USER REQUIREMENT DOCUMENT------------------------------------------------------------------------------------- 3
Background ------------------------------------------------------------------------------------------------------------ 3
User’s view of the problem ---------------------------------------------------------------------------------------- 3
What is expected from the software? -------------------------------------------------------------------------- 4
What is not expected from the software solution? --------------------------------------------------------- 4
Chapter Summary ---------------------------------------------------------------------------------------------------- 4
Chapter 2 --------------------------------------------------------------------------------------------------------- 5
REQUIREMENTS ANALYSIS DOCUMENT ------------------------------------------------------------------------------- 5
Introduction ----------------------------------------------------------------------------------------------------------- 5
Designer’s interpretation of the user’s requirements ------------------------------------------------------ 5
Breaking down the problem into high level constituent parts ------------------------------------------- 6
Capture Image ---------------------------------------------------------------------------------------------------- 6
Gray Scale Conversion ------------------------------------------------------------------------------------------ 7
Preprocessing ----------------------------------------------------------------------------------------------------- 7
Binarization -------------------------------------------------------------------------------------------------------- 8
Number plate Detection (Find plate region)-------------------------------------------------------------- 8
Number Plate Extraction --------------------------------------------------------------------------------------- 9
Character Segmentation --------------------------------------------------------------------------------------- 9
Feature Extraction ----------------------------------------------------------------------------------------------10
Artificial Neural Network (Recognition of Characters) ------------------------------------------------10
Output ------------------------------------------------------------------------------------------------------------------11
Requirements for the system ------------------------------------------------------------------------------------11
System Requirements -----------------------------------------------------------------------------------------11
Identify existing solutions -----------------------------------------------------------------------------------------11
Devise ways to test the solution---------------------------------------------------------------------------------12
Chapter summary ---------------------------------------------------------------------------------------------------12
Appendices ------------------------------------------------------------------------------------------------------------ 13
bibliography ----------------------------------------------------------------------------------------------------------- 14
LIST OF FIGURES
Number
[Click and insert List of Figures]
Page
ii
ACKNOWLEDGMENTS
Firstly I would like to thank God for giving me the chance to still live and see
many years. I want to thank all the guidance that I got from Mr. Ismail; your
help into this project is noted. Everyone who played good role into this
project just wants to say thank you.
iii
GLOSSARY
Segmentation: This is the process were characters are being segmented or
divided into more manageable task that could easily be worked on better
that the full image.
Grayscale: This the process were the 24bit image color is being reduced or
converted to 8bit color that could be used and accepted by the number plate
system.
Image Enhancement: This is the process of increasing the contrast on the
image, if the image is unclear this method can be used to increase or make it
better to read or be able to see the image with better quality.
Introduction
Number plate recognition is a process where vehicles are identified or
recognized using their license plate or number plate. This system involves few
processes or steps in the process of identifying the vehicles using their
number plate.
The first thing that will take place will be the sensor or vehicle detector that
will be so helpful in activating the digital camera so that it can start taking the
image of the vehicle for recognition purposes. After the image of the vehicle
has been taken, the first process is finding the number plate region on the
image captured.
Find the plate region involves looking or detecting the plate region on the
image been captured and the method that follows is plate extraction that
simply means the plate that have been identified is now been extracted out
of the image and from this point we only going to start focusing on the plate
image that has been extracted. Character segmentation follows were simply
slicing of the plate image is taking place, this simply means the image plate
will be divided into smaller manageable images and from this point will be
focusing on the single image of each character.
Feature extraction follows were characters will be extracted from the single
images from character segmentation method. After this method comes
iv
character recognition were characters will be clearly recognized from this
method and after this method the vehicle will be recognized or identified
using its license or number plate and as for uwc university the system at this
point will grant or deny access into the university.
v
Chapter 1
USER REQUIREMENT DOCUMENT
Background
Traffic management is struggling to identify vehicles whose owners have
violated traffic laws e.g. speed limit on the road is one of them. The other
problem that’s faced is the problem of stolen vehicles and also the problem
of computing the parking cost or fee. Uwc as our main focus is failing to keep
track of cars or vehicles entering and living uwc premises, their main concern
being students can easily steal one another’s vehicle and they won’t be able
to realize in time or the current system they using would not alert them in
time. They use the student card system.
User’s view of the problem
In order for me to get to know how user’s feel or how they view the problem,
I managed to interview few people around that owns or drives cars and also
the people that are affected by the problem all the time or most of the time, I
found out that most of them have equal or similar view. I also used a
questionnaire in my interview in order for me to get accurate results. Firstly
users have a problem when they lost their vehicles or their vehicles are
stolen, they complaining that the procedure to follow up for helping the
traffic management is time consuming and at the end of the day they end up
not getting the vehicle back. The other one is faced by traffic management
where they have to identify vehicles that their owners have violated traffic
laws; speed limit is on road is also a problem faced. The other problem is
computing the packing fee after the users has used the parking lot.
3
What is expected from the software?
The system is expected to detect vehicles or cars approaching and compare
the number plate with the stolen ones including checking if the car is in good
condition like has not being given many fines lately. From the parking lot side
the system is expected to keep track of the times the vehicle entering and
living the environment, the system will get the amount of hours spend by the
user using the packing so the system could calculate proper fee. This system
will only start processing after the sensor detected that the vehicle
approached or need attention and after that the digital camera will be
activated as to start capturing images. For uwc university the system has to
check if the vehicle have being registered with uwc that is being driven by the
student, for checking it will require the database of where the student’s
information is stored and if all correct it will grant access to the university else
will deny access meaning the particular student would not be allowed to
enter the uwc environment.
What is not expected from the software solution?
The system is not allowed to recognize two vehicles at the same time; it
should deal with one car at a time. Again cannot detect a vehicle 10m away
and if the car that’s being detected does not contain the front number plate
or if the number plate is not detected at all from the vehicle image and if the
number plate is broken the system would not identify that particular vehicle.
Chapter Summary
In this chapter a problem with the existing system is being identified and
analyzed in a way that users gave their own requirements that they think are
good for the system. . In the next chapter the user’s requirements are
analyzed in terms of what is possible with the technologies available and the
time allocated for the project.
4
Chapter 2
REQUIREMENTS ANALYSIS DOCUMENT
Introduction
In the previous chapter the user’s requirements and the problems of how the
number plate recognition could be used to change a lot of things, were
identified. In this chapter the requirements will be analyzed and solutions to
the problems will be posed.
Designer’s interpretation of the user’s requirements
In the previous chapter the problem and the user’s requirements for the
system was briefly described. The requirements are now being revisited and
possible solutions are for each problem provided.
Requirements
 Stolen vehicles.
 Compute parking cost.
 Granting access to uwc primacies.
 Identify owner violated traffic laws.
o Speed limit on road
Solutions
A solution to all of the problems or requirements listed above will be by using
the Number plate recognition system. Number plate recognition system can
also play a good role or can be helpful on stolen cars by matching the current
license plate to the one that’s stolen, by doing so if they match then you
found the stolen car or vehicle. For computing the parking cost, number plate
recognition system can be useful here as well since it will recognize the
vehicle entering and living the environment and they will calculate the
difference in between for calculating the hours or total cost. This system can
5
be helpful in finding the vehicles that violates traffic laws for example vehicles
that go over limit, this number plate system can be used as to identify the
vehicle so they can apply fines to it. This system can be helpful for traffic
management as to identify the vehicle easily. This system could be very
useful to the Uwc University in granting access, it will not be manipulated like
their current system being used where it only accept the student card and
does not even check if the person trying to grant access is the right person or
is a student, all it does if student card is placed it grand access. The carelessly
of this system could lead to problem of student stealing each other’s vehicles
and still it will not be able to identify automatically all what will happen the
vehicle will be repotted and securities have to deal with the matter
themselves. But the proposed system that is number plate recognition will
help solve all the problems listed about uwc. This system number plate
recognition for uwc will identify the vehicle fully before granting access and
will make sure know one lives uwc with someone’s vehicle.
Breaking down the problem into high level constituent parts
Capture Image
Here the digital camera is been used to capture the image. The image been
taken is then passed to the processes for identification or recognition
purposes. The sensor or vehicle detector is been used as to detect a vehicle
approaching and activate the digital camera as to stand ready or stay ready to
capture the image.
6
Gray Scale Conversion
From the 24-bit color value of each pixel (I, j) the R, G and B components are
separated and the 8-bit gray value is provided. This reduces the color from
the original image to gray. And the image is shown on figure 1.
Gray scale image
Figure 1 gray scale image.
Preprocessing
The major cause of failure in detecting the number plate from the vehicle is
low quality of image. The preprocessing algorithm helps in improving the
quality of the image or the plate image being inputted to the system.
7
This involves:
 Resize
o This involves resizing the image that is been taken for
optimization purposes.
 Grayscale
Thresholding
This the quick way to convert the grayscale image into binary image. Here the
grayscale image pixels are being separated or arranged. The grayscale image
contains of pixels 0 to 255. So 0-127 is being initialized to 1 and 128-255 to 0
and at the end that’s why we say it is the quickest way to convert the image
to binary image using the grayscale.
Binarization
It is difficult to work on an image that contains different kind of colors. It is
simple to work with an image that contains two colors. Here the grayscale
image is been converted into black and white (1 and 0) were black is for
background and white is for text. Black is initialized to 1 and white to 0.
Number plate Detection (Find plate region)
This simply means that the number plate region needs to be identified or
localized from the image been capture. After the image have been binarized
then would be very easy in detecting the plate region since we only focusing
on two colors black and white. The number plate would be easily identified
from this point.
Here is another approach in detecting plate region and we use the Sobel
operator to get edge information for the plate detection. In order to detect
number plate from enhanced image we use a match filter method that will
be able to remove most of the clutter part in image from the region of
interest at the first stage. To be able to detect number plate or its place of
8
region we first have to consider calculating the edge density and after that
Gaussian kernel is being used for smoothing.
Match filter
This is the mixture of Gaussian functions emphasizes the constancy of
intensity values within plate region along horizontal directions. Expected
edge density along vertical directions at the middle of region are maxima
and it decreases when approaching to plane borders. This function properly
models the low edge densities above and below the car plate.
Number Plate Extraction
This is the process of extracting the plate from the image/ vehicle image and
we going to use the morphological operation method in order to be able to
extract the boundary of the number plate. This refers to a broad set of
image processing operations that process images based on shapes. To find
the boundary of the number plate region morphological closing is applied
on edge image and a rectangular structuring element (SE) with 3×10 pixels is
used. Morphological operation is used only to the candidate region to find
plate boundary and to detect true region from the modified
Candidates, simple geometrical features such as shape, aspect ratio and size
of region are used.
Character Segmentation
In license plate recognition or number plate recognition, when all license
plate images are extracted from an image, one has to find all characters in
the license plate and recognize them. Character segmentation is applied to
the license plate in order to outline the individual characters. It affects
greatly the accuracy of the recognition. If the contours of the characters are
inaccurate, it might lead to errors in the recognition stage or even to failed
recognition stage. This method use prior knowledge to help in character
segmentation and prior knowledge includes information such as the size of
the license plate or number plate, the size of the characters, the size of the
interval between the characters and lastly the number of all characters
within a license plate.
9
Character segmentation is based on projection method vertical and
horizontal projection. Vertical and horizontal projections are used to
perform the vertical and horizontal segmentation. Horizontal segmentation
eliminates the unnecessary top and bottom parts of the license plate image.
Vertical segmentation helps in dividing each character on the license plate
image.
Feature Extraction
This plays an important role in the recognition system and effectively
reduces the number of computations, this faster the recognition process.
This uses the projection analysis method that is used to locate the features
that have been analyzed from the vertical and horizontal segmentation. This
also involves extracting the characters from the segmented images and this
character are our features the main features that we wanted to extract out
of the number plate in the first place. From this method on will be focusing
on single character images that will be easily used for the recognition
purposes.
Artificial Neural Network (Recognition of Characters)
The final and the most important stage of number plate recognition is
character recognition. This involves recognizing the character images that
have been extracted from the license plate image. There are many methods
involved on character recognition but will be using neural network to
recognize the characters on the plate image. Neural network contains of
pattern mapping. Pattern mapping is a traditional method and before
recognizing characters patterns need to be created. There are several types
of patterns: images of each character, different sizes, different angles and
projections of each character. Neural networks involve taking input
computing calculations and giving the output. This used the segmented
images as its input and it checks the output or valid output by training the
network with different characters. Since South Africa contains only of
numbers 0-9 and letters A-Z and all in all is 36 characters so the network will
be trained through 36 characters in checking the errors and recognizing the
characters.
10
Output
Here finally the vehicle would be or not be identified using its number plate
and for uwc this is where the system decide to grant or deny access.
Requirements for the system
System Requirements
Sensor
Digital Camera
Programming languages
Database
This is used as the vehicle detector
that will be used to detect when the
vehicle is approaching and activates
the digital camera as to keep it ready
to capture the image.
This will be used to capture the
image of the vehicle that is needed
for the process.
This would be used in designing the
whole enter system, all the methods
required for the system to function
well.
This will be used to store the details
that will be used lately for
confirmation as whether to identify
the vehicle or not.
Identify existing solutions
To my knowledge they still struggling in getting the problems solved. The
Number Plate Recognition System is the solution to the stolen of vehicles,
computing of packing costs and speed limit on the road problem. The existing
system will be uwc and they currently using the student card system.
11
Devise ways to test the solution
This project will be tested at uwc if it is of good quality and is able to function
exactly according to the plan.
Chapter summary
This chapter gives a brief description of designer’s view of the problem, the
possible solutions to the problem; ways in which the system will be tested and
Breaking down the problem into high level constituent parts
12
APPENDICES
13
BIBLIOGRAPHY
 [1] Vahid Abolghasemi, Alireza Ahmadyfard, “An edge-based coloraided method for license plate detection”, Elsevier, Image and Vision
Computing , 27 (2009) 1134–1142.
 [2] Nicole Ketelaars Italy. (2001). “Automated License Plate
Recognition”. AIMe Magazine 2002/1, pp. 9-12
 [3] Pei Li “Number plate Recognition ”
 [4] J. Matas and K. Zimmermann. Unconstrained licence plate and
text localization and recognition. In IEEE Proceeding on Intelligent T
ransportation Systems, pp. 225 – 230, 2005.
 [5] Christos Nikolaos E. Anagnostopoulos, Ioannis E.
Anagnostopoulos, Vassili Loumos and Eleftherios Kayafas, “A License
Plate-Recognition Algorithm for Intelligent Transportation System
 [6] P. Wu, H.-H. Chen, R.-J. Wu, and D.-F. Shen. License plate
extraction in low resolution video. In 18th International Conference
on Pattern Recognition, 2006.
14
Download