Number Plate recognition System

Similar documents
Vehicle Number Plate Recognition with Bilinear Interpolation and Plotting Horizontal and Vertical Edge Processing Histogram with Sound Signals

INDIAN VEHICLE LICENSE PLATE EXTRACTION AND SEGMENTATION

Interactive Tic Tac Toe

Performance Evaluation of Edge Detection Techniques for Square Pixel and Hexagon Pixel images

An Evaluation of Automatic License Plate Recognition Vikas Kotagyale, Prof.S.D.Joshi

VEHICLE LICENSE PLATE DETECTION ALGORITHM BASED ON STATISTICAL CHARACTERISTICS IN HSI COLOR MODEL

Libyan Licenses Plate Recognition Using Template Matching Method

An Improved Bernsen Algorithm Approaches For License Plate Recognition

An Efficient Color Image Segmentation using Edge Detection and Thresholding Methods

An Automatic System for Detecting the Vehicle Registration Plate from Video in Foggy and Rainy Environments using Restoration Technique

Detection of License Plates of Vehicles

An Efficient Method for Vehicle License Plate Detection in Complex Scenes

Automatic Licenses Plate Recognition System

Digital Image Processing

Analysis of Satellite Image Filter for RISAT: A Review

MAV-ID card processing using camera images

Carmen Alonso Montes 23rd-27th November 2015

International Journal of Advance Engineering and Research Development

PRACTICAL IMAGE AND VIDEO PROCESSING USING MATLAB

Live Hand Gesture Recognition using an Android Device

Institute of Technology, Carlow CW228. Project Report. Project Title: Number Plate f Recognition. Name: Dongfan Kuang f. Login ID: C f

NON UNIFORM BACKGROUND REMOVAL FOR PARTICLE ANALYSIS BASED ON MORPHOLOGICAL STRUCTURING ELEMENT:

CoE4TN4 Image Processing. Chapter 3: Intensity Transformation and Spatial Filtering

Keyword: Morphological operation, template matching, license plate localization, character recognition.

World Journal of Engineering Research and Technology WJERT

Detection of Defects in Glass Using Edge Detection with Adaptive Histogram Equalization

Number Plate Recognition System using OCR for Automatic Toll Collection

License Plate Localisation based on Morphological Operations

Implementation of License Plate Recognition System in ARM Cortex A8 Board

8.2 IMAGE PROCESSING VERSUS IMAGE ANALYSIS Image processing: The collection of routines and

Automatic License Plate Recognition System using Histogram Graph Algorithm

AUTOMATIC NUMBER PLATE DETECTION USING IMAGE PROCESSING AND PAYMENT AT TOLL PLAZA

A Novel Morphological Method for Detection and Recognition of Vehicle License Plates

Research on Application of Conjoint Neural Networks in Vehicle License Plate Recognition

An Artificial Intelligence System for Monitoring and Security for Vehicular Plate Number in Lyceum of the Philippines University Laguna

AUTOMATIC IRAQI CARS NUMBER PLATES EXTRACTION

SYLLABUS CHAPTER - 2 : INTENSITY TRANSFORMATIONS. Some Basic Intensity Transformation Functions, Histogram Processing.

COMPARATIVE PERFORMANCE ANALYSIS OF HAND GESTURE RECOGNITION TECHNIQUES

Vehicle License Plate Recognition System Using LoG Operator for Edge Detection and Radon Transform for Slant Correction

Finger print Recognization. By M R Rahul Raj K Muralidhar A Papi Reddy

RECOGNITION OF EMERGENCY AND NON-EMERGENCY LIGHT USING MATROX AND VB6 MOHD NAZERI BIN MUHAMMAD

(SJET) ISSN X

CS 4501: Introduction to Computer Vision. Filtering and Edge Detection

VARIOUS METHODS IN DIGITAL IMAGE PROCESSING. S.Selvaragini 1, E.Venkatesan 2. BIST, BIHER,Bharath University, Chennai-73

Traffic Sign Recognition Senior Project Final Report

AUTOMATIC LICENSE PLATE RECOGNITION USING IMAGE PROCESSING AND NEURAL NETWORK

Computing for Engineers in Python

BASIC OPERATIONS IN IMAGE PROCESSING USING MATLAB

Automated Number Plate Verification System based on Video Analytics

Implementation of Barcode Localization Technique using Morphological Operations

Automatic Electricity Meter Reading Based on Image Processing

The Classification of Gun s Type Using Image Recognition Theory

Mobile Based Application to Scan the Number Plate and To Verify the Owner Details

An Approach to Korean License Plate Recognition Based on Vertical Edge Matching

Table of contents. Vision industrielle 2002/2003. Local and semi-local smoothing. Linear noise filtering: example. Convolution: introduction

FPGA based Real-time Automatic Number Plate Recognition System for Modern License Plates in Sri Lanka

LAB MANUAL SUBJECT: IMAGE PROCESSING BE (COMPUTER) SEM VII

June 30 th, 2008 Lesson notes taken from professor Hongmei Zhu class.

A Solution for Identification of Bird s Nests on Transmission Lines with UAV Patrol. Qinghua Wang

Number Plate Detection with a Multi-Convolutional Neural Network Approach with Optical Character Recognition for Mobile Devices

Proposed Method for Off-line Signature Recognition and Verification using Neural Network

Removal of Gaussian noise on the image edges using the Prewitt operator and threshold function technical

On Fusion Algorithm of Infrared and Radar Target Detection and Recognition of Unmanned Surface Vehicle

Quality Control of PCB using Image Processing

Automated License Plate Recognition for Toll Booth Application

Vision Review: Image Processing. Course web page:

Malaysian Car Number Plate Detection System Based on Template Matching and Colour Information

Real-Time License Plate Localisation on FPGA

A Comparative Analysis of Different Edge Based Algorithms for Mobile/Camera Captured Images

IMAGE PROCESSING PAPER PRESENTATION ON IMAGE PROCESSING

Modelling, Simulation and Computing Laboratory (msclab) School of Engineering and Information Technology, Universiti Malaysia Sabah, Malaysia

OPEN CV BASED AUTONOMOUS RC-CAR

A Chinese License Plate Recognition System

Nigerian Vehicle License Plate Recognition System using Artificial Neural Network

Image Segmentation of Color Image using Threshold Based Edge Detection Algorithm in MatLab

Automated Parking Management System Using License Plate Recognition

Morphological Image Processing Approach of Vehicle Detection for Real-Time Traffic Analysis

Follower Robot Using Android Programming

Preprocessing and Segregating Offline Gujarati Handwritten Datasheet for Character Recognition

IMAGE TYPE WATER METER CHARACTER RECOGNITION BASED ON EMBEDDED DSP

International Conference on Computer, Communication, Control and Information Technology (C 3 IT 2009) Paper Code: DSIP-024

A NOVEL APPROACH FOR CHARACTER RECOGNITION OF VEHICLE NUMBER PLATES USING CLASSIFICATION

CHARACTERS RECONGNIZATION OF AUTOMOBILE LICENSE PLATES ON THE DIGITAL IMAGE Rajasekhar Junjunuri* 1, Sandeep Kotta 1

Automatic Vehicles Detection from High Resolution Satellite Imagery Using Morphological Neural Networks

[Mohindra, 2(7): July, 2013] ISSN: Impact Factor: 1.852

Feature Extraction of Human Lip Prints

A Real Time Automatic License Plate Recognition Using Optical Character Recognition

Image Filtering. Median Filtering

Exercise questions for Machine vision

SINCE2011 Singapore International NDT Conference & Exhibition, 3-4 November 2011

Image Processing and Particle Analysis for Road Traffic Detection

A Method of Multi-License Plate Location in Road Bayonet Image

International Journal of Scientific & Engineering Research, Volume 5, Issue 5, May ISSN

A Vehicle Speed Measurement System for Nighttime with Camera

A Review of Optical Character Recognition System for Recognition of Printed Text

EE 5359 MULTIMEDIA PROCESSING. Vehicle License Plate Detection Algorithm Based on Statistical Characteristics in HSI Color Model

Examples of image processing

Iraqi Car License Plate Recognition Using OCR

IMAGE PROCESSING PROJECT REPORT NUCLEUS CLASIFICATION

Chapter 17. Shape-Based Operations

Transcription:

Number Plate recognition System Khomotso Jeffrey Tsiri Thesis presented in fulfilment of the requirements for the degree of Bsc(Hons) Computer Science at the University of the Western Cape Supervisor: A Ismail Co-supervisor: December 2013

ii

Declaration I, Khomotso Jeffrey Tsiri, declare that this thesis Number Plate recognition System is my own work, that it has not been submitted before for any degree or assessment at any other university, and that all the sources I have used or quoted have been indicated and acknowledged by means of complete references. Signature:... Date:... Khomotso Jeffrey Tsiri. iii

iv

Abstract Number plate recognition system plays an important role in traffic management system, parking lots etc. This paper presents a novel approach to recognizing plate characters and the algorithm is presented based on neural networks. This project will only be limited on South African plates. This system contains of three main parts namely number plate detection, plate character segmentation and character recognition. Number plate detection is the first process that takes place and has been said to have a lot of complications due to vehicle in motion, complex background, distance changes and weather conditions etc. Images taken during day and night can also play a role in affecting the detection of the plate. The focus of number plate detection is to find the plate region on an image and all the other processes like recognition they all dependent on the detection e.g. if the plate is not detected then other processes or methods would not take place. Plate character segmentation involves slicing the image according to individual characters that exists on the image and finally character recognition take place. Character Recognition involves using neural network were each character extracted from the image need to be passed to the neural network that will be very helpful in recognizing it. v

vi

Acknowledgment Firstly would like to thank God for giving me the opportunity to still live in this world. I would like to thank all the help that got from Mr Ismail my supervisor. Lastly would like to thank any person even if I did not mention any person that played a role in helping me understand my project or have a clear view about my project. I just want to say Thank you and I rely appreciate. vii

viii

Contents Declaration................................. Abstract................................... Acknowledgment.............................. List of Tables................................ List of Figures............................... Glossary................................... iii v vii xi xiii xv 1. User Requirement Document................... 1 1.1 Introduction............................. 1 1.2 Users view of the problem..................... 1 1.3 Problem Domain.......................... 2 1.4 What is expected from the software?............... 2 1.5 What is not expected from the software solution?........ 2 1.6 Chapter Summary......................... 3 2. Requirements analysis document................. 5 2.1 Designers interpretation of the users requirements........ 5 2.1.1 Requirements............................ 5 2.1.2 Solutions.............................. 5 2.2 Proposed Methodology or Algorithm to recognize license plate. 6 2.2.1 Capture Image........................... 7 2.2.2 Gray Scale Conversion....................... 7 2.2.2.1 Why we should use grayscale for image processing........ 7 2.2.2.2 How to convert the image to gray scale.............. 7 2.2.3 Histogram equalization....................... 8 2.2.4 Preprocessing............................ 8 2.2.5 Thresholding............................ 9 2.2.6 Binarization............................. 9 2.2.6.1 Why is it important to binarize the grayscale image?...... 9 2.2.7 Edge Detection........................... 10 2.2.7.1 Why do we use edge detection?.................. 10 2.2.7.2 Algorithms for edge detection contain three steps:........ 11 2.2.7.3 Approaches of edge detection................... 11 2.2.7.4 Robert Edge Detector....................... 11 ix

2.2.7.5 Sobel Edge Detector........................ 14 2.2.7.6 Canny Edge Detector....................... 16 2.2.7.7 Prewitt Edge Detector....................... 16 2.2.7.8 Laplacian edge detector...................... 18 2.2.7.9 Comparison of the methods.................... 19 2.2.7.10Advantages............................. 21 2.2.7.11Sobel and Prewitt edge detector.................. 21 2.2.7.12Robert edge detector........................ 21 2.2.7.13Canny edge detector........................ 22 2.2.7.14Disadvantages............................ 22 2.2.7.15Sobel and Prewitt edge detector.................. 22 2.2.7.16Robert edge detector........................ 22 2.2.7.17Canny edge detector........................ 22 2.2.7.18Conclusion............................. 22 2.2.8 Morphology Functions....................... 23 2.2.9 Corner detection.......................... 24 2.2.10 Number plate Detection (Find plate region)........... 24 2.2.11 Number Plate Extraction..................... 24 2.2.12 Character Segmentation...................... 25 2.2.13 Feature Extraction......................... 25 2.2.14 Artificial Neural Network (Recognition of Characters)...... 25 2.2.15 Requirements for the system.................... 26 2.2.16 Identify existing solutions..................... 26 2.2.17 Devise ways to test the solution.................. 26 2.2.18 Conclusion............................. 26 2.2.19 Chapter summary......................... 27 3. User Interface Specification (UIS)................. 29 3.1 Description of the user interface.................. 29 3.2 How the user will interact with the system............ 29 4. High Level Design......................... 31 4.1 The Class Diagram and Use Case Diagram............ 31 5. Low Level Design.......................... 35 5.1 Pseudo Code............................ 35 Bibliography................................ 36 x

List of Tables 2.1 Gx.................................. 12 2.2 Gy.................................. 12 2.3 This mask is used to compute the gradient magnitude...... 13 2.4 Gx.................................. 14 2.5 Gy.................................. 14 2.6 This mask is used to compute the gradient magnitude...... 15 2.7 Gx.................................. 16 2.8 Gy.................................. 16 2.9 This mask is used to compute the gradient magnitude...... 17 xi

xii

List of Figures 2.1 methodology............................. 6 2.2 Gray scale image.......................... 8 2.3 equalized image........................... 8 2.4 Binary image............................. 10 2.5 Laplacian............................... 18 2.6 Laplacian............................... 18 2.7 Laplacian............................... 19 2.8 Canny................................ 19 2.9 Sobel................................. 20 2.10 Prewitt................................ 20 2.11 Robert................................ 21 2.12 laplacian............................... 21 2.13 erosion................................ 23 2.14 dilation................................ 24 3.1 The User Interface Specification.................. 30 4.1 Class Diagram............................ 32 4.2 Use Case Diagram.......................... 33 xiii

xiv

Glossary IEEE Trans. Pattern Anal. And Machine Intell., 19(1):27-40 [? ]. xv

xvi

Chapter 1 User Requirement Document 1.1 Introduction 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 is 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 anothers vehicle and they wont be able to realize in time or the current system they using would not alert them in time. They use the student card system. 1.2 Users view of the problem In order to finally manage to get accurate information on how users feel or how they view the problem, Interviewed vehicle owners who seem to be the most people affected by this problem and found out that most of them have equal or similar view towards the problems. To gather accurate information questionnaire were provided to each individual with questions to find out the problems. Most users experience a lot of problems when their vehicles have been stolen, they mention that processes involved at the police service or station is time consuming since they take time giving out the statement trying to make the experience situation make sense to whoever helping and at the end of the day not promising at all that they will ever get the vehicle back. The other problem is faced by traffic management where they have to identify vehicles that their owners have violated traffic laws; speed limit on road is also a problem faced. The other problem is faced by companies that want to charge users by using their facilities for example parking, the problem faced is computing the accurate parking fee with the relevant hours the user spend 1

2 using their service. The other problem faced by the University of the Western Cape is confirmation of making sure that whoever drives out of the campus is not driving other peoples cars or did not steal the vehicle then trying to go out with, the purpose is to make sure that everyone go out with their own vehicles. 1.3 Problem Domain The goal of this project is to help the University of the Western Cape (UWC) with the problem they experiencing. Identification of every vehicle will be required and registrations of the users will also be required that will be very helpful for the system to pick out people who stolen other peoples vehicles. 1.4 What is expected from the software? The software is expected to identify vehicles using their license plate. It is expected to read the characters lying on the license plate and recognize them. This software should cater for all conditions for example low resolution captured images etc and after the recognition process took place then this could be very helpful in solving the mentioned problems above. This should be able to solve problems like identifying stolen vehicles, computing parking fee. For parking lot this system is expected to keep track of the times the vehicle entering and living the environment then calculates the amount of hours spend by the user at the packing and compute proper fee. For UWC university the system has to check if the vehicle requesting access have being registered with UWC and for checking it will require the database that is used to store information of all students, 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. 1.5 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 vehicle at a time. Again cannot detect a vehicle 10m away and if the vehicle thats being detected does not contain the front number plate or

3 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. 1.6 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 users 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 In the previous chapter the user 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 provided. 2.1 Designers interpretation of the users requirements In the previous chapter the problem and the user requirements for the system was briefly described. The requirements are now being revisited and possible solutions for each problem are provided. 2.1.1 Requirements Stolen vehicles. Compute parking cost or fee. Granting access to uwc premises. Granting access to uwc premises. Identify owner violated traffic laws. Speed limit on road 2.1.2 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 vehicles by matching the current license plate to the one thats stolen, by doing so if they match then you found the stolen car or vehicle. For computing the parking cost, number 5

6 plate recognition system can be useful here as well since it will recognize the vehicle entering and living the environment and calculates the difference in between for calculating the hours or total cost. This system can 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 others vehicles and still it will not be able to identify automatically and all what will happen the vehicle will be reported 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 someones vehicle. 2.2 Proposed Methodology or Algorithm to recognize license plate Figure 2.1: methodology

7 2.2.1 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. 2.2.2 Gray Scale Conversion The color image contains a 24bit color so it is difficult to apply image manipulation to the image, to solve the problem we apply gray scale to the image where we basically reduce the color to 8bit that is more manageable to work with and as well we reduce the pixel values to 0-255 with 0 representing black and 255 to more lighter color or white. By applying this method the values Red, Green and Blue will be represented by the gray value and this method gray scaling helps a lot when comes to image manipulation since does not contain of so many pixel values to work with. And the image is shown on figure 1. 2.2.2.1 Why we should use grayscale for image processing It help us identify important edges and other features from the image that lately can be very useful when coming to finding the number plate on the image, extraction and recognition of characters from the image, all of the mentioned it is very difficult to perform with the color image. 2.2.2.2 How to convert the image to gray scale GrayConversion = 0.299R + 0.587G + 0.114B

8 Figure 2.2: Gray scale image 2.2.3 Histogram equalization Histogram equalization is a technique for adjusting image intensities to enhance contrast. This method is helpful in improving the image quality by increasing the contrast on an image. Figure 2.3: equalized image 2.2.4 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. This involves:

9 Resize This involves resizing the image that is been taken for optimization purposes. Resizing is helpful since image quality differs and in order to localize the number plate or be able to recognize the number plate on the image resizing will be very helpful. Grayscale 2.2.5 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 thats why we say it is the quickest way to convert the image to binary image using the grayscale. 2.2.6 Binarization After we have applied gray scaling to our image we now only want to work with two colors since it is difficult to differentiate or find the difference on many colors, so it will be simpler if we work with two and in this case we will be working with black and white color. This means that each pixel is stored as a single bit (0 and 1). So we apply binarization to our gray scaled image and what we get as our output will be 0 representing black and 1 representing white color. The process of finding the binary image we run through the array values and initialize 0 to all values less than 127 pixels and 255 to all values greater than 127. After we did the initialization then will get our binary values or image. 2.2.6.1 Why is it important to binarize the grayscale image? 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. So thats why at the end of the day the grayscale has to be binarized in order to only be able to work with two colors.

10 Figure 2.4: Binary image 2.2.7 Edge Detection This is the process of identifying the change occurrence between colours. This process is done by scanning the whole image and running through the array width andheight. An edgeisdetected by checking thepixel with itsneighbour and if determined that they differ then we have an edge but if the comparison is the same then we do not have an edge. The edge detection method would be applied to the binary images in this algorithm. Edge detection is simply a set of mathematical methods that aims only at determining the colour change occurrences that happens in the image. Again can say is a set of connected pixels that lie on the boundary between two regions. Sharp edges are thinner than blurred and vice versa. The use of detecting sharp changes on bright images is to gather or capture important events that occurred. Edge detection its very helpful since it can help filter out information that may be regarded as less relevant. First derivative can be used in detecting the presence of an edge at a point on an image while the second derivative can be used to determine if the pixel lie on the dark or light on an image. 2.2.7.1 Why do we use edge detection? Changes that occurs in an image can end up affecting the texture that is the most important primitive feature of an image since they often provide indication of the physical extent of objects within the image and this part is much more important when comes to number plate

11 because at the end of the day have to recognize the number plate. It contributes a lot when coming to the feature detecting on an image. 2.2.7.2 Algorithms for edge detection contain three steps: Filtering (removing): Filtering reduces noise. Enhancement: Enhancement emphasizes pixels where there is a significant change in local intensity values and is usually performed by computing the gradient magnitude. Detection: Many points in an image have a nonzero value for the gradient, but not all these points can be considered to be edges. Therefore, some method should be used to determine which points are edge points. Frequently, thresholding provides the criterion for detection. 2.2.7.3 Approaches of edge detection 2.2.7.4 Robert Edge Detector Description This is one of the edge detector methods used to detect edges on images and it was proposed by Lawrence Roberts in 1963. The idea behind the Robert edge detector is to approximate the gradient of an image and it is achieved by computing or calculating sum of squares. This can be applied to both the binary and gray scale images. How it works This edge detector operator consists of a pair of 2x2 masks that will be used to run through the whole image. This mask is shown in Table 2.1 andtheothermaskissimplyrotatingtheotherby90degrees. Thismask has been designed to respond maximally to edges running at 45 degrees to the pixel grid. The mask will be applied differently to different input images so as to separate measurements of the gradient component in each gradient value and the gradient values are Gx and Gy were Gx represent gradient value of x and Gy vice versa. Both these two gradient values (Gx and Gy) combined would be used to calculate the absolute gradient

12 of each point on the image. The gradient is computed by applying this formula: G = Gx 2 +Gy 2 This formula is proven not to be sufficient in finding the gradient of each point because by taking the root of each pixel might take time in computing so in a way the method would be very slow in finding the edge on an image. The gradient magnitude is computed by applying this formula: G = Gx + Gy This formula is proven to be more sufficient or faster in finding the gradient of each point. Using the mask at Table 2.3, the approximate magnitude is given by: G = z1 z4 + z2 z3-1 0 0 1 Table 2.1: Gx 0-1 1 0 Table 2.2: Gy

13 z1 z2 z3 z4 Table 2.3: This mask is used to compute the gradient magnitude

14 2.2.7.5 Sobel Edge Detector This edge detector operator consists of a pair of 3x3 masks that will be used to run through the whole image. This mask is shown in Table 2.4 andtheothermaskissimplyrotatingtheotherby90degrees. Thismask has been designed to respond maximally to edges running vertically and horizontally relative to the pixel grid. This operator is similar to the Robert operator so we will be applying the same gradients formula we applied there. Using the mask at Table 2.6, the approximate magnitude is given by: Gx = (z7+2z8+z9)(z1+2z2+z3) Gy = (z3+2z6+z9) (z1+2z4+z7) G = Gx + Gy -1-2 -1 0 0 0 1 2 1 Table 2.4: Gx -1 0 1-2 0 2-1 0 1 Table 2.5: Gy

15 z1 z2 z3 z4 z5 z6 z7 z8 z9 Table 2.6: This mask is used to compute the gradient magnitude

16 2.2.7.6 Canny Edge Detector This works in a multi-stage process. Firstly the image is smoothed by applying the Gaussian convolution. The first derivative operator (somewhat like the Robert Cross) is applied to the smoothed image as to highlight regions of the image with high first spatial derivatives. The algorithm then tracks along the top of these ridges and sets to zero all the pixels that are not actually on the ridge top so as to give a thin line in the output and this process is known as non-maximal suppression. 2.2.7.7 Prewitt Edge Detector This edge detector operator consists of a pair of 3x3 masks that will be used to run through the whole image. This mask is shown in Table 2.7 andtheothermaskissimplyrotatingtheotherby90degrees. Thismask has been designed to respond maximally to edges running vertically and horizontally relative to the pixel grid. This operator is similar to the Robert operator so we will be applying the same gradients formula we applied there. Using the mask at Table 2.9, the approximate magnitude is given by: Gx = (z7+z8+z9) (z1+z2+z3) Gy = (z3+z6+z9) (z1+z4+z7) G = Gx + Gy -1-1 -1 0 0 0 1 1 1 Table 2.7: Gx -1 0 1-1 0 1-1 0 1 Table 2.8: Gy

17 z1 z2 z3 z4 z5 z6 z7 z8 z9 Table 2.9: This mask is used to compute the gradient magnitude

18 2.2.7.8 Laplacian edge detector The Laplacian method approach searches for zero crossings in the second derivative of the image to find edges. Figure 2.5: Laplacian By taking the gradient of the first function we get this function. Figure 2.6: Laplacian When the first derivative is at a maximum, the second derivative is zero. By finding the location of an edge is to locate the zeros in the second derivative.

19 Figure 2.7: Laplacian 2.2.7.9 Comparison of the methods Figure 2.8: Canny

20 Figure 2.9: Sobel Figure 2.10: Prewitt

21 Figure 2.11: Robert Figure 2.12: laplacian 2.2.7.10 Advantages 2.2.7.11 Sobel and Prewitt edge detector This provides the simplest approximation to the gradient magnitude. Using this methods is much easier in detecting edges and much quicker without consuming much time. 2.2.7.12 Robert edge detector This also provides the simple approximation of the gradient magnitude like the Sobel and Prewitt.

22 2.2.7.13 Canny edge detector TheSmoothingconcept hasbeenappliedsoit ismuch moreeffective infinding errors. It uses probability to help find the errors. It is better detecting edges even on noise images. 2.2.7.14 Disadvantages 2.2.7.15 Sobel and Prewitt edge detector Bothofthesemethodsaresensitive tothenoise, inthedetectionoftheiredges. The problem of the noise on the image is the increase in the noise to the image that leads to degrading the magnitude of the edges. The main disadvantage of this method is the inaccuracy, meaning as the gradient magnitude of the edge decreases that lead to the accuracy also decreasing. 2.2.7.16 Robert edge detector This edge detector method is sensitive to noise and does not produce accurate results on noise images. 2.2.7.17 Canny edge detector The main disadvantage is that it takes time in computing and that could be a problem in the number plate system, since it will take time to process. 2.2.7.18 Conclusion Tocalculatetheedgesinthismethodisverysimpleandeasilytounderstand so in this case will use or apply the sobel edge detector in my project since it is better in handling noises compared to the prewitt. When brightness is reduced at low level and contrast remains in the contrast of image s capturing, the unwanted pixels at segmented image occurred because of the background and the object were changed when the brightness was changed.when contrast is increased at high level and brightness remains in normal condition, the Prewitt operator shows the unwanted pixels because there were no edges at segmented image and sobel operator shows us only the background.

23 2.2.8 Morphology Functions Noises or Interference happen on low resolution images and through using or applying mathematical morphology will help a lot in reducing those. There are four basic operations in mathematical morphology and namely are erosion, expansion, opening and closing operation. All this operations process differently when they are all applied on the binary images. Erosion is the process of eliminating isolated noise spots or basically the isolated points on an image and this can lead in reducing the image. Expansion can be used to increase or expand the image. We only going to be focused on only the two operations namely expansion and erosion. Figure 2.13: erosion

24 Figure 2.14: dilation 2.2.9 Corner detection Here the plate regions are located according to geometric features like shapes (box). The first thing that happens in this method is to scan through the whole image and detect were a shape lies in the image, shape like a box for example. After the shape is located then start putting points to the image since we know a box contain of four corners so every corner will be represented as a values or initial value like A-D and when all values are initialized. Then here the whole background will be initialized as white or vise vase but different to the focus point. After all is done the length and width of points initialized will be increased and after the image will be merged back with the original image to detect exactly where the plate lies. 2.2.10 Number plate Detection (Find plate region) After the corner detection method then we can be able to detect the plate region on an image. 2.2.11 Number Plate Extraction In this process the plate image will be extracted out of the original vehicle image. The processes helping in doing so is the morphological operators. Here Corner detection will be applied to the image as well as to detect the corners on the identified plate region on the image given.

25 2.2.12 Character Segmentation Firstly Thinning will be applied to the plate in order to get the single pixels of each character that lies in the plate image before slicing takes place. Character segmentation is basically slicing the extracted image according to individual characters that lie on the plate image. 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. 2.2.13 Feature Extraction This process plays an important role towards the recognition in this project and it helps 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 these characters are our features the main features that we want 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 process. 2.2.14 Artificial Neural Network (Recognition of Characters) This is the final process of the project and is the one that gives final decision on whether the character is recognized or not. In this stage we are working with segmented images meaning single character images. This single character images will be passed to the neural network system for recognition purposes. Neural network uses feed forward that contains of connected neurons to help recognize individual characters. In order for neural networks to confirm if they computed correctly they use back propagation method that will be used to recheck if everything went well. It involves taking input computing calculations and giving the output and in this case the output is the recognized character. Neural networks involve training the network with certain input and in this case will be trained with the input character images from the segmentation method. Since South Africa contains only of numbers 0-9 and

26 lettersa-zandall inall is36characters so thenetwork will betrainedthrough 36 characters in checking the errors and recognizing the characters. 2.2.15 Requirements for the system System Requirements Name Discription 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. 2.2.16 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. 2.2.17 Devise ways to test the solution This project will be tested at uwc if it is of goodquality and is able to function exactly according to the plan. 2.2.18 Conclusion After the recognition of characters took place then the vehicle can now be identified using its license plate. If recognition denied then it means the vehicle

27 would not be identified. If successfully recognized then the system could grant access or vice versa deny access. 2.2.19 Chapter summary This chapter gives a brief description of designers 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

28

Chapter 3 User Interface Specification (UIS) This chapter will show the design of this software, how it will look like and how the users will interact with it. The prototype is produced in this chapter were basically is showing the graphical user interface (GUI) of the software. The GUI produced contains of all the processes involved in this software with all the buttons that the user will be using. 3.1 Description of the user interface The user will only interact with the camera that will be used to capture the vehicles image and continue with the background processes to grand access for the user into the facility or environment. Since all the processes are hided to the users then decided for the prototype to produce basically what happens in the background. All the processes that happens behind that is hided to the user will be displayed. 3.2 How the user will interact with the system This project aims at recognizing a vehicle by using its license or number plate. Firstly the vehicle will approach a camera and there is a vehicle detector that is connected to the camera. The detector will then detect the vehicle that is approaching and activate the camera so it can stand ready to capture the image in order for the processes of recognizing to start. The only thing that the user will be interacting with is the camera and all other processes will be kept running in the background meaning that those processes are the ones that are not important to the user to see. The background processes are the ones that do most of the work since there are the ones that help in recognizing at the end of the day. The GUI in this case will be delivered or designed for the administrator use only; it is designed for the administrators in order to 29

30 give them the authority to take control if anything happens in the system. The login will be provided to keep the users login before they have access to the information. There is a form provided that will be used to register the first user or student into the system. There is a quick exit to the system provided to the user to exit the program at anytime they fill like doing so. The admin are also given privileges of viewing the database information stored. There are processes that are also kept away the admin since it is not important for them to see. In this case a quick view of the background processes are been displayed to the user as to keep them informed of what is happening in the background or making them understand how everything is done at the background. Buttons to check every process is provided like if the user wants to check how the greyscale looks can easily click the greyscale button and same applies for all the processes involved. Figure 3.1: The User Interface Specification

Chapter 4 High Level Design This chapter shows the relationship or interaction between classes in the software. The relationship is shown in terms of the class diagram and use case diagram. Use case diagram in this case is used as to show the interaction of all the processes that take place in recognition of the characters on the plate and finally the Class diagram is also provided as to show how each methods are joined together helping towards the recognition process. 4.1 The Class Diagram and Use Case Diagram The class diagram gives a clear picture of all the processes involved in the background in order to carry out the recognition process. It shows all the classes that happens in the background and as well gives a clear relationship on how they relates with one another to help recognize the characters in the plates at the end of the day. The class diagram contains of all the attributes involved in each class or method. It also gives a high clear idea towards the entire processing of the image, how the image is being processes to cater for recognizing the characters. 31

32 Figure 4.1: Class Diagram The use case diagram shows the whole view or picture of the entire system and firstly showing how the users will get to get access to use the system. They have to be registered in order to lately use the system. The system will only interact with the vehicle that will be driven by the student. Theuse caseisdesignedinordertogive aclear viewoftheentiresystem tothe user, making everything easy for them to understand the interaction involved. The use case below shows the whole entire design of the whole system.

Figure 4.2: Use Case Diagram 33

34

Chapter 5 Low Level Design This chapter presents the object oriented design of the whole entire system. It presents the analysis of the low level design and provides details for the object oriented analysis of the system. 5.1 Pseudo Code This algorithm provided gives a clear view on how to detect the number plate or license plate in the image captured. This method looks for the license plate intheimageanddetects itso lately itcanbeused intheprocesses to recognize the characters that are written on it. Detect Plate { Reduce Image Colour; //gray scaling Reduce Image Colour to two; // binarization Remove Noise in the Image; // histogram Detect Edges on Image; For i < height { //Run through the whole For j < width { // Image Check for Plate Region; } } } After this algorithm is applied to the image then the plate will be detected then the method or process that follows will be extracting the plate image out of the entire image. Segmentation will follow this process were it involves slicing the image according to individual characters that lie in the image then lastly followed by the recognition that will recognize the characters at the end of the day. 35

36 This document is compiled out of [3], [1], [2], [4]

Bibliography [1] Nicole Ketelaars Italy. Automated license plate recognition. pages 9 12, 2001. [2] Xiaodan Jia and Xinnian Wang. A novel algorithm for character segmentation of degraded license plate based on prior knowledge. pages 1 5, 2001. [3] Jian-yu Zhao Shu-jian Ma. A method of license plate location based on mathematical morphology and corner detection. pages 1 4, 2011. [4] Alireza Ahmadyfard Vahid Abolghasemi. An edge-based color-aided method for license plate detection. page 11341142, 2009. 37