Beruflich Dokumente
Kultur Dokumente
(STSCS)
Session 2017-2019
Date: 16 September 2019 Name of Group Leader: Shafqat Mahmood Shah Signature: _________________
i|P a g e
Abstract
We propose a system for controlling the traffic light by image processing. The automobiles
are detected by the system through images. A camera will be placed alongside the traffic
light. It will capture image orders. Image Processing is a better technique to control the state
variation of the traffic light. It shows that it can decrease the traffic jamming and avoids the
time being wasted by a green light on a bare road.
ii | P a g e
Acknowledgement
We are thankful our Creator Allah Subhana-Watala who gave us an opportunity to
use best of our knowledge and encouraged us to carry out this work. Without his
guidance we wouldn’t have achieved this accomplishment. Whosoever helped us
throughout the course of our project, whether our parents or any other individual was
his will, so indeed none be worthy of praise but him.
We are thankful for our parents for her prayers and blessings. Her wishes to see us
achieve greater heights in our education and career has motivated us throughout our
life.
Our heartily thanks to our supervisor Mr. Mateen Ahmed Abbasi for great kind of
guidance and giving us a great kind of supervision. We owe our deepest gratitude to
our project supervisor for his patient guidance, motivation and appreciation throughout
this work. Our deep gratitude goes to him for showing endless faith in us. We much
esteemed to have worked under his supervision.
We also highly obliged and grateful to our project committee members for their
valuable feedback in our project. We express our gratitude to him for actively
encouraging and for all the support they had provided during the course of this study.
Additionally, we would like to express our gratitude towards everyone who provided
us assistance in any stage of this project.
iii | P a g e
Table of Contents
iv | P a g e
3.3 ADVANTAGES OF PROPOSED SYSTEM......................................................................... 11
3.4 SCOPE OF PROPOSED SYSTEM .................................................................................... 11
4 SOFTWARE DESIGN AND MODEL ............................................................................ 13
4.1 SOFTWARE PROCESS MODEL...................................................................................... 13
4.2 SOFTWARE REQUIREMENT ANALYSIS ........................................................................ 14
4.2.1 Functional requirements.......................................................................................... 14
4.2.2 Non Functional requirements .................................................................................. 14
4.3 BENEFITS OF SELECTED MODEL ................................................................................. 15
4.4 LIMITATIONS OF SELECTED MODEL ............................................................................ 15
4.5 USE CASE DIAGRAM .................................................................................................. 15
4.6 SEQUENCE DIAGRAM ................................................................................................. 17
5 IMPLEMENTATION ...................................................................................................... 18
5.1 IMPLEMENTATION ...................................................................................................... 18
5.2 ALGORITHMS ............................................................................................................. 18
5.3 CODE DETAILS ............................................................................................................ 18
v|P a g e
List of Figures
vi | P a g e
Chapter 1
1 Introduction
1.1 Introduction
Overpopulation is currently one of the biggest problems in the world. When speaking of
truths, population growth means more vehicles on the roads. As a result, traffic
management is a serious problem in many cities today. In many cities, there are many
problems with traffic lights, especially in ambulance vehicles. The lack of efficient traffic
control leads to the death of patients due to delayed ambulances if they get stuck in traffic
congestion. Traffic signal control systems are often used to control the flow of vehicles
through the intersection of many roads. Its objective is to make a smooth movement of
the vehicles on the transport routes. However, the synchronization of multiple traffic light
systems at adjacent intersections is a complicated problem given the various parameters
involved. Conventional systems do not process variable flows that approach
intersections. In addition, the mutual influence of adjacent traffic light systems, the
temporary inequality of automobiles, accidents, the passage of ambulances and
pedestrian crossing are not implemented in the existing traffic system. This leads to
congestion and congestion. The intelligent traffic signal control system (STCS) is based
on a simple principle. The principle is: "A car can only drive if there is space for it" and
"the signal remains green until the current cars are finished". The arrangement of the
camera at the traffic lights makes traffic very efficient. In addition, a portable control
device is designed to solve the problem of emergency vehicles that get stuck in crowded
streets.
We propose a new traffic Control System that will control the congestion problems of
traffic through traffic lights on the basis of current traffic density. The Current traffic
signal system is fixed. It has fixed time interval to pass the traffic from either side of the
road, which creates the cramming problem. Our Smart Traffic Signal Control System
solve this problem on real time basis. It will check the traffic condition on junction and
1|P a g e
then it will take decision that which side of junction is to open for certain period of time
and which one is for shorter time.
1.3 Objectives
Design a system which controls traffic light on the basis of traffic density using
image processing
Measurably improve traffic flow
Minimize the traveling time for vehicles and passengers that minimize pollution
Reduce environmental pollution caused by traffic
Minimize the vehicles safety by taking decisions
Maximize the traffic congestion as possible that save energy and reduction in
emergency response time
On certain junctions even if there is no traffic, people have to wait because the traffic
signal remains red, the people have to wait until the light switches to green. The solution
for this problem is to develop a smart traffic signal control system that control lights
using image processing.
2|P a g e
time for example Fixed Time. Under fixed time operation the traffic lights will display
green to each approach for the same time every cycle regardless of the traffic conditions.
This system is not much good if in some there is no traffic waiting. The system will
automatically decide that which traffic signal should be green for certain time defined by
density of traffic (Low, Medium, High). If density is low, then that side of signal will be
green for 10 seconds. If traffic density is medium, then that side of signal will be green
for 30 seconds. And for high traffic density it will be green for 40 to 50 seconds.
1.6 Advantages
Smart Traffic Control System helps movement and help conduct an orderly flow
by giving right of way to some cars and not others.
This system not only makes car traffic a lot safer but also pedestrian traffic.
It will help reduce the number of accidents and make collisions at intersections a
lot less frequent.
It increases the traffic handling capacity of a certain intersection.
Coordinated Timing helps minimize random start and stop, which helps traffic
flow and is less likely to create a traffic jam.
The system plays a crucial and vital role when it comes to safety in our everyday
lives.
1.7 Features
Some important features are given below.
Login
Validation of valid user
Splash screen
Image acquisition
Image preparing
Image enhancement
Counting things in image
Storing in data base
Time allocation
3|P a g e
Chapter 2
2 Existing Systems
2.1 Existing Systems
2.1.1 Manual Controlling
It requires man power to control the traffic. Depending on the countries and states the
traffic polices are allotted for a required area or city to control traffic. The traffic polices
will carry sign board, sign light and whistle to control the traffic. They will be instructed
to wear specific uniforms in order to control the traffic. In the manual controlling system,
we need more man power. As we have poor strength of traffic police we cannot control
traffic manually in all area of a city or town. So we need a better solution to control the
traffic.
4|P a g e
2.2.1 Heavy Traffic Jam
We propose a system for controlling the traffic light by image processing. The vehicles
are detected by the system through images. A camera will be placed alongside the traffic
light. It will capture image sequences. Image processing is a better technique to control
the state change of the traffic light. It shows that it can decrease the traffic congestion
and avoids the time being wasted by a green light on an empty road. It is also more
reliable in estimating vehicle presence because it uses actual traffic images. It visualizes
5|P a g e
the practicality, so it functions much better than those systems that rely on the detection
of the vehicles’ metal content
While fixed time traffic signal control and actuated time traffic signal control are best to
control traffic in crowded cities. But they still need improvements. Because the fixed
timing system uses the same current time intervals, which do not change depending on
the traffic. And The actuated timing uses a detector that can adapt to the different traffic
volumes. But over smart traffic signal control system helps to minimize start up and stop
traffic signal randomly, promoting traffic flow and causing less traffic jams.
The "smart traffic signal control system" proposed by us overcomes all limitations of the
existing (used) traffic control techniques. The use of timers for traffic control has the
disadvantage that the time is wasted by green light on the empty road. This technique
avoids this problem. The project will show that image processing is a much better
technique than traditional methods. A great advantage is the variation of the signal time,
which controls a suitable traffic density using image processing. The proposed system
will control the traffic light according to density using image processing. If a particular
lane is very dense, more traffic flow is given, otherwise less time is given.
6|P a g e
A smart control button or icon will switch traffic signal to dynamically change
according to traffic density.
Now user select functions in menu bar one by one and result will display at the
provide window.
A static control button or icon will switch traffic signal to static behaviour in
which timing for every side of road will be fixed.
So these are the functional requirements that is required from users that what kind of
Interface they want or what type of the front end is look like.
This is shown below in Use case for interface Figure 2.7.3 and 2.7.4
2.7.2 Use case for admin interface
2.7.3 Admin
Figure
Figure
Figure 2.7.3
1 use
2.7.3 use
case
case
admin
foradmin
admin
7|P a g e
2.7.4 System
Performance
While we are talking about the performance of a system so there are many aspects of
this is considered discussed below that what is response time of the system a system we
ask good to them if it have maximum response time and other aspects like,
Response Time
While we talk about the response time this is the time that whatever operation is selected
and an operation response to user so it is desired as maximum for better performance.
Availability
The performance of the system that will be running and able to deliver the required
output to user that he wants.
Security
System will be secure by different checks and security tools.
Maintainability
System will be maintained by strong constraints applied by the admin any crash or issue
will be solved as per situation.
8|P a g e
Portability
Our whole application code will be stored online professional site so we can access
whole application just by installing the basic software anywhere in the world.
9|P a g e
Chapter 3
3 Proposed System
10 | P a g e
3.2 Features of Proposed System
Some important features of proposed system are given below
Login
Validation of valid user
Splash screen
Image acquisition
Image preparing
Image enhancement
Counting things in image
Storing in data base
Time allocation
Smart Traffic Control System helps movement and help conduct an orderly flow by
giving right of way to some cars and not others.
This system not only makes car traffic a lot safer but also pedestrian traffic.
It will help reduce the number of accidents and make collisions at intersections a lot less
frequent.
It increases the traffic handling capacity of a certain intersection.
Coordinated Timing helps minimize random start and stop, which helps traffic flow and
is less likely to create a traffic jam.
The system plays a crucial and vital role when it comes to safety in our everyday lives.
Smart Traffic Signal Control System is a desktop system which will help to control traffic
congestion using image processing. As compare to other system that are working this
time for example Fixed Time. Under fixed time operation the traffic lights will display
green to each approach for the same time every cycle regardless of the traffic conditions.
This system is not much good if in some there is no traffic waiting. The system will
automatically decide that which traffic signal should be green for certain time defined by
density of traffic (Low, Medium, High). If density is low, then that side of signal will be
11 | P a g e
green for 10 seconds. If traffic density is medium, then that side of signal will be green
for 30 seconds. And for high traffic density it will be green for 40 to 50 seconds.
12 | P a g e
Chapter 4
13 | P a g e
4.2 Software Requirement Analysis
In this section we are describe the requirements that what kind of requirements of users
are being make part in the system so these are following.
4.2.1 Functional requirements
An overview of the Voice Recognition System is discussed below as user point of view:
User will login into application through a login prompt by using id and password
If password is invalid a prompt display to re-enter.
If password is valid then user will be in profile/ main menu window.
Main menu consists a bar in which main function are written with name or icons
User can click and switch between smart and static traffic control.
A smart control button or icon will switch traffic signal to dynamically change
according to traffic density.
Now user select functions in menu bar one by one and result will display at the
provide window.
A static control button or icon will switch traffic signal to static behaviour in
which timing for every side of road will be fixed.
So these are the functional requirements that is required from users that what kind of
Interface they want or what type of the front end is look like.
4.2.2 Non Functional requirements
The Non Functional Requirements of the System are discussed below.
Performance
While we are talking about the performance of a system so there are many aspects of
this is considered discussed below that what is response time of the system a system we
ask good to them if it have maximum response time and other aspects like.
Response Time
While we talk about the response time this is the time that whatever operation is selected
and an operation response to user so it is desired as maximum for better performance.
14 | P a g e
Availability
The performance of the system that will be running and able to deliver the required
output to user that he wants.
Security
System will be secure by different checks and security tools.
Maintainability
System will be maintained by strong constraints applied by the admin any crash or issue
will be solved as per situation.
Portability
Our whole application code will be stored online professional site so we can access
whole application just by installing the basic software anywhere in the world.
This use case is based upon the most important functionality of the system which is
dynamically control the variations in traffic. There are two modes for the admin to switch
between them. These control will help in controlling traffic according to traffic
conditions. The helps in movement and help conduct an orderly flow by giving right of
way to some cars and not others.
15 | P a g e
Figure 2 use case for admin and system
16 | P a g e
4.6 Sequence Diagram
17 | P a g e
Chapter 5
5 Implementation
5.1 Implementation
5.2 Algorithms
18 | P a g e