Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 32

Final Project Report

Vehicle number plate Recognition

Project Supervisor
Noor Rahman Mahsud

Submitted By

<<Project Group ID>>

<<Group Member Name>> <<VU ID>>

Software Projects & Research Section,


Department of Computer Sciences,
Virtual University of Pakistan
CERTIFICATE
This is to certify that <<First Member Name>> (<<VU ID>>)have worked on
and completed their Software Project at Software & Research Projects Section,
Department of Computer Sciences, Virtual University of Pakistan in partial
fulfillment of the requirement for the degree of BS in Computer Sciences under
my guidance and supervision.

In our opinion, it is satisfactory and up to the mark and therefore fulfills the
requirements of BS in Computer Sciences.

Supervisor / Internal Examiner

<<Project Supervisor Name>>


Supervisor,
Software Projects & Research Section,
Department of Computer Sciences
Virtual University of Pakistan

___________________
(Signature)

External Examiner/Subject Specialist


<<External Supervisor Name>>

___________________
(Signature)

Accepted By:

_____________
(For office use)

EXORDIUM
In the name of Allah, the Compassionate, the
Merciful.

Praise be to Allah, Lord of Creation,


The Compassionate, the Merciful,
King of Judgment-day!

You alone we worship, and to You alone we pray


for help,
Guide us to the straight path

The path of those who You have favored,

Not of those who have incurred Your wrath,


Nor of those who have gone astray.
DEDICATION

I dedicate this project to Allah Almighty my creator,


my strong pillar, my source of inspiration, wisdom,
knowledge and understanding. He has been the
source of my strength throughout this program and
on His wings only have I soared.

I also dedicate this work to my wonderful parents;


who has encouraged me all the way and whose
encouragement has made sure that I give it all it
takes to finish that which I have started. Thank you!

I also dedicate to my respected teachers and all those


who prayed for my success.
ACKNOWLEDGEMENT

Thanks to Almighty Allah for giving me knowledge, power


and strength to complete this project. I have learned a lot
during this project, and this will certainly help me in my
upcoming life. I’m really thankful to the help and support
of my project supervisor. His supervision helped me a lot
in every phase of this project.
In the end I’m thankful to my parents and all those who
encouraged and prayed for my success.
PREFACE

This project is providing Vehicle Number Plate System.


The main objective of Vehicle Number Plate System project
is to detect Vehicles Number Plate and saved into the
database.
TABLE OF CONTENTS

CHAPTER NO. 1
GATHERING & ANALYZING INFO...................................................10

1.1 INTRODUCTION

1.2 PURPOSE

1.3 SCOPE

1.4 DEFINITIONS, ACRONYMS AND ABBREVIATIONS

1.5 PROJECT REQUIREMENTS

1.5.1 Functional Requirements

1.5.2 Non-Functional Requirements

1.6 USE CASES AND USAGE SCENARIOS

1.6.1 Use Case Diagrams

1.6.2 Usage Scenarios

1.7 DEVELOPMENT METHODOLOGY

1.7.1 Chosen Methodology

1.7.2 Reasons for Chosen Methodology

1.7.2 Work Plan (Gantt Chart)

1.7.2 Project Schedule (Submission Calendar)


CHAPTER NO. 2
DESIGNING THE PROJECT............................................................12

2.1 INTRODUCTION

2.2 PURPOSE

2.3 SCOPE

2.4 DEFINITIONS, ACRONYMS AND ABBREVIATIONS

2.5 ARCHITECTURAL REPRESENTATION (ARCHITECTURE DIAGRAM)

2.6 DYNAMIC MODEL: SEQUENCE DIAGRAMS

2.7 OBJECT MODEL/LOGICAL MODEL: CLASS DIAGRAM

2.8 DATABASE MODEL (DATABASE DIAGRAM)

2.9 GRAPHICAL USER INTERFACES

CHAPTER NO.3
DEVELOPMENT.............................................................................13
3.1 DEVELOPMENT PLAN (ARCHITECTURE DIAGRAM)
CHAPTER 1
Gathering & Analyzing Info
1.1 INTRODUCTION

VEHICLE NUMBER PLATERECOGNITION (VNPR) IS A PART OF


DIGITAL IMAGE PROCESSING WHICH IS GENERALLY USED IN VEHICLE
TRANSPORTATION SYSTEM TO CATEGORIZE THE VEHICLE. NUMBER PLATE
RECOGNITION SYSTEMS ARE HAVING VARIETIES OF APPLICATION SUCH AS
TRAFFIC MAINTENANCES, TRACING STOLEN CARS, AUTOMATIC
ELECTRONIC TOLL COLLECTION SYSTEM ETC. BUT THE MAIN AIM IS TO
CONTROL THE TRAFFIC MANAGEMENT SYSTEM. THE TRAFFIC
MANAGEMENT SYSTEM IS DEVELOPING DAY BY DAY. THE YELLOW COLOR
PLATES WOULD BE ISSUED FOR COMMERCIAL VEHICLES, WHITE FOR
PRIVATE AND GREEN FOR GOVERNMENT VEHICLES. THE NUMBER PLATE
STARTS WITH TWO-DIGIT LETTER “STATE CODE” FOLLOWED BY DIGIT
NUMERAL.

WE HAVE IMPLEMENTED ALGORITHM FOR AUTOMATIC NUMBER PLATE


RECOGNITION SYSTEM USING MATLAB. THIS ALGORITHM INITIALLY
USED DIFFERENT INBUILT FUNCTIONS AND IMPLEMENTED SOME USER
DEFINED TECHNIQUES RELATED TO IMAGE PROCESSING.

1.2 PURPOSE

NUMBER PLATE IS A PATTERN WITH VERY HIGH DISPARITIES OF


CONTRAST. IF THE NUMBER PLATE IS VERY SIMILAR TO BACKGROUND IT’S
CHALLENGING TO IDENTIFY THE LOCATION. ILLUMINATION AND CONTRAST
ARE CHANGES AS LIGHT FALL CHANGES TO IT. THE MORPHOLOGICAL
OPERATIONS ARE USED TO ELIMINATE THE CONTRAST FEATURE WITHIN
THE PLATE.

THE WORK IS DISTRIBUTED INTO SEVERAL PARTS:


 INPUT RAW IMAGE
 IMAGE BINARIZATION
 REDUCE NOISE USING MID-FILTERING METHOD
 ENHANCE CONTRAST USING HISTOGRAM EQUALIZER
 PLATE LOCALIZATION
 CHARACTER SEGMENTATION

1.3 SCOPE

TRAFFICMAINTENANCE SYSTEMS ARE CONSTRUCTED ON FREEWAYS TO


ANALYZE FOR VEHICLES MOVING AT SPEEDS NOT ALLOWED BY LAW. ALL THESE
OPERATIONS HAVE A SCOPE OF IMPROVE DEVELOPMENT. IN THE CENTER OF ALL
THESE PROCESSES LIES A VEHICLE. THE VITAL QUESTION HERE IS HOW TO FIND
A PARTICULAR VEHICLE? THE OBVIOUS RESPONSE TO THIS QUESTION IS BY
USING THE VEHICLE’S NUMBER PLATE. THIS NUMBER DIFFERENTIATE ONE
VEHICLE FROM THE OTHER, WHICH IS EFFECTIVE ESPECIALLY WHEN BOTH ARE
OF SAME TYPE OF MAKE AND MODEL. AN AUTOMATED SYSTEM CAN BE
DEVELOPED TO FIND THE LICENSE PLATE OF A VEHICLE AND RECOGNIZE THE
CHARACTERS FROM THE REGION HAVING A LICENSE PLATE. THE VEHICLE
LICENSE PLATE NUMBER WHICH CAN BE UTILIZED TO FETCH FARTHER
INFORMATION DATA ABOUT THE VEHICLE AND ITS OWNER, WHICH CAN BE USED
FOR FURTHER PROCESSING.

1.4 DEFINITIONS, ACRONYMS AND ABBREVIATIONS

1.5 PROJECT REQUIREMENTS

1.5.1 Functional Requirements

System
 Input Image of Number Plate must be given to System
 System should have a template of alphanumeric values.
 The template should be consisting of all alphanumeric (A to Z, a to z
and 0 to 9) images.
 System should detect vehicle number plate.
 System should be able to read number plate characters from the detected
number plate
 Read number plate character must be stored in database
 System should be able to match detected number plate characters with
corresponding template characters
 System should be able to display the final detected number plate
characters from the input image in a notepad file
 System should keep record for all cars with corresponding time and date
 System will track record of each car from database.

1.5.2 Non-Functional Requirements

 Security:

One of very important non-functional requirement is security. The


application will be password protected. System will ensure that
user’s account and personal information is safe from any threats. It
will not allow unauthorized access to system.

 Performance Requirements:

Fast Response Time for User Login


The average response time for user login after entering user name
and password should be no more than 3 sec and the maximum
response time should be 10 seconds.
Fast Average Time for Rendering a Page
After clicking on any link, the result should be rendered within no
more than 1 second in average and it should not take more than 10
seconds in maximum.

 Accessibility Requirements:

It will be ensured that system is accessible all the time to its users.
This application will be available 24/7 and multiple users can access
this application at the same time.

 User friendly:

The application will be a user-friendly, so any noob user may use it


easily.

 Flexibility:

System will be flexible to allow entry of as much record as needed.

 Maintainability:

User will be able to maintain different aspects of the application.


The application will be designed in a maintainable manner.
 Adoptable:

This will be an adoptable application.

 Compatibility:

Application will compatible with all the standard phones or android


versions.

 Exception handling:

Exception handling would be implemented in the whole application.

 Data Security:

The damage of the hard drive is one of threat factors for data
security. A hard drive physical damage means loss of data. Loss
of equipment operation, storage media failure, in order to ensure
data security, redundant arrays of inexpensive disks (RAID),
1.6 USE CASES AND USAGE SCENARIOS

1.6.1 Use Case Diagrams

Read input img

template of alphanum
values

<<include>>

detect number consisting of all (A to Z, a


plate to z and 0 to 9)

<<extend>>

read number
plate characters

System Database

store in database

<<extend>>

match detected no
plate characters

display final detected


number plate
1.6.2 Usage Scenarios

Use Case Title System should read image as input


Use Case Id VNPR-001
Description:

In this use case diagram the system should read image of number plate as input from
webcam for further processing.
Pre-Conditions:
 Run the program

Task Sequence Exceptions


1. Take image using webcam
2. Read image as input

Post Conditions:
- Integrated Camera will execute to take picture
Authority:
User – System
Modification history: 1.0

Use Case Title System has a template of alphanumeric values


Use Case Id VNPR-002
Description:
In this use case diagram system should have a template of alphanumeric values. The template
should be consisting of all alphanumeric (A to Z, a to z and 0 to 9) images.
Pre-Conditions:
 Run the program
 System has templates
Task Sequence Exceptions
Incorrect/invalid
 System templates should have alphanumeric values
credentials prompt to
 Consisting all alphanumeric values (A to Z, a to z and 0 to user if username
9) or passwords do not
match.
Post Conditions:
 Templates save in the database
Authority:
User – System
Modification history: 1.0
Use Case Title System should detect vehicles number plate
Use Case Id VNPR-003
Description:

In this use case diagram System should be able to detect the number plate of vehicle
from the given input image.
Pre-Conditions:
1. Run the program
2. Give image of vehicle as input
Task Sequence Exceptions
1. System take image as input
2. Detect the number plate from the given image

Post Conditions:
1. Number plated detected successfully and ready for further processing.
Authority:
User – System
Modification history: 1.0
Use Case Title System should read number plate character
Use Case Id VNPR-004
Description:

In this use case System should be able to read vehicle number plate character from
detected number plate image.
Pre-Conditions:
 Run the program
 Detect the number plate
Task Sequence: Exceptions
1. Detect the number plate from the given input image
2. Read the character of detected number plate
3. Store in the database
Post Conditions:
1. Character stored in the database successfully

Authority:
User - System
Modification history: 1.0

Use Case Title Store in Database


Use Case Id VNPR-005
Description:
In this use case all the characters read from the detected number plate should be stored in the
database.
Pre-Conditions:
 Read all character from detected number plates.

Task Sequence: Exceptions


1. Save all the reading characters of the number plate in to the
database.
Post Conditions:
1. All the characters save successfully in to the database
Authority:
System, Database
Modification history: 1.0

Use Case Title Machining detected number plate characters


Use Case Id VNPR-006
Description:
In this use case diagram System should be able to match detected number plate characters
with corresponding template characters.
Pre-Conditions:
 Run the program
Task Sequence: Exceptions
1. Detect the number plate character
1. Match with the template character

Post Conditions:
1. The search result display.
Authority:
System
Modification history: 1.0

Use Case Title Display final detected number plate


Use Case Id VNPR-007
Description:
System should be able to display the final detect number plate characters from the input image
in a notepad file.
Pre-Conditions:
 Run the program.
Task Sequence: Exceptions
1. Detect the number plate character
1. Match the number plate character
2. Display the final result
Post Conditions:
1. Final result displayed to the end user.
Authority:
System
Modification history: 1.0
1.7 DEVELOPMENT METHODOLOGY

1.7.1 Chosen Methodology

Choosing a comprehensive process design is a blatant task for project


manager. Real projects rarely follow the sequential flow that the model proposes.
In general, these phases overlap and feed information to each other. Hence there
should be an element of iteration and feedback. A mistake caught at any stage
should be delivered to the source and all the subsequent stages need to be reviewed
and corresponding documents should be updated accordingly. Mostly, no single
model can meet the objectives of project manager. It may therefore be best to
devise a lifecycle model tuned to your own needs by creating a Mix-and-Match
process model.

Requirements
Specification s

System and Software


Design

Impleme nta t ion and


Te s ting

In te gra tions a n d Sys tem


Te s ting

Op eration a nd
Maintena n ce

Acceptance
1.7.2 Reasons for Chosen Methodology

Adopted methodology for our project is VU Process Model.

The reason for selecting this model is its hybrid nature. It is the
combination of waterfall and spiral model. As a VU study project our
activities will be sequential in nature waterfall model, and we analyze each
phase with regard to the end product. So, it will become an un- sequential
iteration. The VU Process Model is a documentation-driven model. It
therefore generates complete and comprehensive documentation and hence
makes the maintenance task much easier because the feedback of user must
fulfill on each phase of development. VU Process model diagram is
pictorially described below.

1.7.2 Work Plan (Gantt Chart)


1.7.2 Project Schedule (Submission Calendar)

1.6.1
Usability:  An interface should be easy to learn how to use and
easy to remember how to use. Users/Visitors should
not be required to consult a manual each time they
need to use the website.
 Usability Requirements for an interface design
should support "Efficiency of use", "Intuitiveness"
and "Low perceived workload" from the perspective
of its primary users.

1.6.2
Reliability:  The system is to be designed as a robust and
dependable operational system which is tolerant
to operator errors and which will recover cleanly
from power cuts or other disasters.
 The system must function reliably, with few or
no interruptions in its operation and fewer still
thereafter.
 The system must give stable and reproducible
results.

1.6.3
Supportability  The system must be maintainable and
extensible.
 The system must provide solutions/rules
regarding data encoding problems such as
supporting different character sets, name
truncation rules, name matching in case of
misspelling, etc.

1.6.4
System  Operating System: Windows 10 64bit
Requirements:  Browsers: Chrome
 MySQL Database
 Software: XAMPP Server version v3.2.4 and
Sublime
CHAPTER 2
Designing the Project
2.1 INTRODUCTION

This design document contains a detailed visible representation of various


stages of the Vehicle Number Plate Recognition. This record shows how the
components of this system interact with every other in addition to outside
entities. It may be recognized by using the developer as well as via the use of
the system. It clarifies what is going to be built on and links the functional
necessities to design.

2.2 PURPOSE

THE MAIN PURPOSE OF THE DESIGN DOCUMENT IS TO ANALYZE THE


OVERALL FUNCTIONALITY OF THE SYSTEM.

2.3 SCOPE

THIS DOCUMENT PRESENTS A BLUEPRINT FOR A DEVELOPER TO HELP IN


MAKING THE ASSIGNMENT. THE USER OF THE SYSTEM CAN RECOGNIZE
THE FUNCTIONING IN ADDITION TO THE DEVELOPER.

2.4 DEFINITIONS, ACRONYMS AND ABBREVIATIONS


2.5 ARCHITECTURAL REPRESENTATION (ARCHITECTURE DIAGRAM)

User

Presentation Layer Com m unication

M anagem ent

Security
Business Layer

Data Layer

Database
2.6 DYNAMIC MODEL: SEQUENCE DIAGRAMS
EXTRACT VEHICLE INFO

System Web cam Vehicle database

Start streaming()
Activated

Extract_info()

Alternative
Info extracted
If web cam working

Save_into_db()

Else
error

Check web cam

SYSTEM TEMPLATE AND VEHICLE NUMBER PLATE DETECTED

Take Img as Detect read number


System Database
input number plate plate character

Read Input image

Fetch img

input img returned

Input image returned Successfully

detecnum_plate()

detect num_Plate

detected

Number plate detected

Read number plate charcter

number plate char detect

detected

Save()

Saved()

Saved Successfully

detected character saved successfully

READ NUMBER PLATE CHARACTER AND SAVE IN DATABASE


Take Img as Detech read number
System Database
input number plate plate character

Read Input image

Fetch img

input img returned

Input image returned Successfully

detecnum_plate()

detect num_Plate

detected

Number plate detected

Read number plate charcter

number plate char detect

detected

Save()

Saved()

Saved Successfully

detected character saved successfully

MATCH NUMBER PLATE CHARACTER

read number Display final


System Templates Database
plate character Result

get read character

Fetch Number Plate character()

Return Number Plate Charater

return Number Plate charater

Match Number Plate Character()

fetch Alphanumeic values()

Return

Character Matched

display final result()

result save in db()

saved successfully

Saved in db
2.7 Object Model/Logical Model: Class Diagram
Manage Capture Image

system
Camra Vehicle
-System-ID
-Username -Camera_id -vechicle_id
-Password -Resolution -Vechile_brand
+Open_webcam() -Camera_size -Vechicle Number
+Read_inputimg() +Capture_image() -Vechicle Color
+detect_numberplate() +Save_into_db() -Vechile_model
+detect_numberPlate_char() +View_items()
+save_readcharacter() Take image as input +View_Category()
+get_template() +Make_Transaction()
+matchCharacter() +Search()
detect number plate
+DisplayFinal_Result()

has has
display

Template Number Plate image


Final Result
-template_Id -Number_Id -img_Id
-Result_Id
-template_name -Vehicle_no has -img_resolution
-Result_name
-Alpha_Numeric values -Vechicle_color -numberPlate_character
-Result_deatils
-City_code -City_code

Match character

2.8 DATABASE MODEL (DATABASE DIAGRAM)

System Web Cam Vehicle

PK System_id PK camera_id PK Vehicle_id

username resolution Vehiclei_no

password size Vehicle_name

Vehicle_model

vehicle_color

Template Number Plate

PK template_id PK NumberPlate_id
Image
template_name Vehicle_no
PK Image_id
Alphanumeric_values Vehicle_color
image_resolution
Final Result
City_code
numberPlate_Character
PK Result_id

City_code
Result_name

Result_details
2.9 GRAPHICAL USER INTERFACES
CHAPTER 3
Development
3.1 DEVELOPMENT PLAN (ARCHITECTURE DIAGRAM)

User

Presentation Layer
Com m unication

M anagem ent

Security
Business Layer

Data Layer

Database

REFERENCES
Handouts of CS403 Database Management Systems
Handouts of CS504 Software Engineering - I
Handouts of CS604 Operating Systems
Handouts of CS408 Human Computer Interaction
Handouts of CS506 Web Design and Development
Handouts of CS510 Software Requirements and Specifications
Handouts of CS605 Software Engineering -II
Handouts of CS603 Software Architecture and Design
Handouts of CS608 Software Verification and Validation
Handouts of CS615 Software Project Management
APPENDIX
Use case diagrams are visual
representations of written use case
Use Case Diagrams:
scenarios.

An architecture diagram is a graphical


representation of a set of concepts that
ARCHITECTURE DIAGRAM: are part of architecture, including their
principles, elements and components.

Sequence diagrams are a popular


dynamic modeling solution in UML
because they specifically focus on
lifelines, or the processes and objects
SEQUENCE DIAGRAMS: that live simultaneously, and the
messages exchanged between them to
perform a function before the lifeline
ends.

Class diagrams are one of the most useful


types of diagrams in UML as they clearly
map out the structure of a particular
OBJECT MODEL/LOGICAL MODEL: CLASS
system by modeling its classes,
DIAGRAM:
attributes, operations, and relationships
between objects.

A database model shows the logical


structure of a database, including the
relationships and constraints that
determine how data can be stored and
accessed. Individual database models are
DATABASE MODEL (DATABASE
designed based on the rules and
DIAGRAM):
concepts of whichever broader data
model the designers adopt. Most data
models can be represented by an
accompanying database diagram.
THE END
ALLAH HAFIZ

You might also like