This document describes a mini project on a density based smart traffic control system using Canny edge detection algorithm. The system aims to control green signal time allocation based on detected traffic congestion levels. It involves uploading traffic images and using Canny edge detection to extract edges and count non-zero white pixels to determine traffic density. Higher density would mean longer green signal times. The document outlines the existing system limitations, proposed system advantages, software and hardware requirements, algorithms, system architecture and screenshots from their implementation in Python. It also discusses limitations, future scope and concludes the system can help improve traffic flow by dynamically allocating signal times.
Heart Disease Prediction using machine learning.pptx
B-12 Presentation.pptx
1. Department of Computer Science & Engineering
Mini Project
On
DENSITY BASED SMART TRAFFIC CONTROL SYSTEM USING CANNY
EDGE DETECTION ALGORITHM FOR CONGREGATING TRAFFIC
INFORMATION
Internal Guide:-
Ms.D.Navanitha,
Assistant Professor,
Dept. of CSE.
By
Preethi Vishwakarma (188R1A0543)
Sravya Ramagiri (188R1A0544)
V.Lakshmi Prasanna (188R1A0556)
Vivek Kumar (188R1A0557)
2. Table of Contents
1. Abstract
2. Introduction
3. Literature Survey
4. System Analysis
5. System Configuration
6. Software Environment
7. UML Diagrams
8. Algorithm used
9. System Architecture
10. Screen Captures
11. Limitations
12. Scope for future work
13. Conclusion
14. References
2
3. Abstract
We are describing a concept to control or automate green traffic signal
allotment time based on congestion available at the roadside using Canny
Edge Detection Algorithm. To implement this technique we are uploading the
current traffic image to the application and application will extract edges from
images and if there is more traffic then there will be more number of edges
with white color and if uploaded image contains less traffic then it will have
less number of white color edges. Empty edges will have black color with
value 0. By counting the number of non-zeroes white pixels we will have a
complete idea of available traffic and based on that we will allocate time to the
green signal. If less traffic is there then green signal time will be less
otherwise green signal allocation time will be more.
3
4. Introduction
Traffic congestion is one of the major modern-day crises in every big city in
the world. Recent study by the World Bank has shown that average vehicle
speed has been reduced from 21 km to 7 km per hour in the last 10 years in
Dhaka. As more and more vehicles are commissioning in an already congested
traffic system, there is an urgent need for a whole new traffic control system
using advanced technologies to utilize the already existing infrastructures to its
full extent. Since building new roads, flyovers, elevated expressways etc. needs
extensive planning, huge capital and lots of time; focus should be directed upon
availing existing infrastructures more efficiently and diligently. Some of them
count the total number of pixels, some of the work calculates the number of
vehicles. These methods have shown promising results in collecting traffic
data.
5. “
5
Literature Survey
Md.Munir Hasan,Gobinda Saha,Aminual Hoque and Md.Badruddoja
Majumder,"Smart Traffic Control System with Application of Image Processing
Techniques,"in 3rd internation Electronics & Vision, Dhaka,May 2014.
Traffic congestion is a condition in transport that is characterized by slower
speeds, longer trip times, and increased vehicular queuing. Traffic
congestion on urban road networks has increased substantially, since the
1950s. When traffic demand is great enough that the interaction between
vehicles slows the speed of the traffic stream, this results in some
congestion. While congestion is a possibility for any mode of transportation,
this article will focus on automobile congestion on public roads.
Traffic congestion occurs when a volume of traffic or modal split generates
demand for space greater than the available street capacity; this point is
commonly termed saturation. There are a number of specific circumstances
which cause or aggravate congestion; most of them reduce the capacity of a
road at a given point or over a certain length, or increase the number of
vehicles required for a given volume of people or goods.
6. In terms of traffic operation, rainfall reduces traffic capacity and operating
speeds, there by resulting in greater congestion and road network productivity
loss.Traffic research still cannot fully predict under which conditions a
"traffic jam" (as opposed to heavy, but smoothly flowing traffic) may
suddenly occur.
M.Sweet ,”Traffic Congestion’s Economic Impacts: Evidence from US Metropolitan
Regions,” urban studies,vol.51,no.10,pp.2088-2110,Oct.2013
In this paper we propose a method for describing traffic congestion on roads
using image processing techniques and a model for controlling traffic signals
based on information received from images from roads takes by the video
camera. We extract traffic density which corresponds to total area occupied
by vehicles on the roads in terms of total amount of pixels in a video frame
instead of calculating number of vehicles.
6
7. 1.Edge detection technique is imperative to extract the required traffic
information from the CCTV footage. It can be used to isolate the required
information from the rest of the image. There are several edge detection
techniques available. They have distinct characteristics in terms of noise
reduction, detection sensitivity, accuracy etc.
2.To implement this technique we are uploading the current traffic image to
the application ,application will extract edges from images and if there is
more traffic then there will be more number of edges with white color and if
uploaded image contains less traffic then it will have less number of white
color edges.
System Analysis
7
Existing System
8. Limitations of Existing System
In the manual controlling Framework, we require greater hard work. As we
have destitute visitors police we cannot control activity bodily in all areas of
the town. So we require better association to control the traffic activity.It
isn’t continuously conceivable for the traffic police to control the traffic in all
the weather conditions so this can be the main issue. On the other side
Programmed traffic light employs a timer for each conditional state. The use
of a digital sensor is some other manner with a purpose to pick out the
vehicle and create a sign that this method is being squandered by means of an
inexperienced mild on a purge street.
8
9. Proposed System
1.In this paper, a system in which density of traffic is measured by comparing
captured images with real time traffic information against the image of the empty
road as a reference image is proposed.
2.Each lane will have a minimum amount of green signal duration allocated.
According to the percentage of matching allocated traffic light duration can be
controlled. The matching is achieved by comparing the number of white points
between two images. The entire image processing before edge detection i.e.
image acquisition, image resizing, RGB to gray conversion and noise reduction
is explained in section II. At section III, canny edge detection operation and
white point count are depicted. Canny edge detector operator is selected because
of its greater overall performance
9
10. Advantages of Proposed System
1.This technique helps in improving the traffic problems and reduces the
waiting time.
2.And it also helps in managing the vehicles in order to reduce the traffic
problems.
3.So here by calculating the similarity percentage the green signal is allocated
for all the vehicle
4.And here in the project it does not contain any hardware implementation.
10
13. MAPS
our office
13
Software Environment
Python:
Python is a popular programming language. It was created by Guido van
Rossum, and released in 1991. It is used for:
1.web development (server-side),
2.software development,
3.mathematics
What can Python do?
1.Python can be used on a server to create web applications.
2.Python can be used alongside software to create workflows.
3.Python can connect to database systems. It can also read and modify files.
4.Python can be used to handle big data and perform complex mathematics.
5.Python can be used for rapid prototyping, or for production-ready software
development.
Machine Learning Using Python
14. 14
Why Python?
1.Python works on different platforms(Windows, Mac, Linux, Raspberry Pi, etc).
2.Python has a simple syntax similar to the English language.
3.Python has syntax that allows developers to write programs with fewer lines than
some other programming languages.
4.Python runs on an interpreter system, meaning that code can be executed as soon as
it is written.
5.Python can be treated in a procedural way, an object-oriented way or a functional
way.
6.The most recent major version of Python is Python 3, which we shall be using.
7.However, Python 2, although not being updated with anything other than security
updates, is still quite popular.
8.It is possible to write Python in an Integrated Development Environment, such as
Thonny, Pycharm, Netbeans or Eclipse which are particularly useful when managing
large collections of Python files.
.
16. Machine Learning:
16
Machine learning (ML) is the study of computer algorithms that can improve
automatically through experience and by the use of data. It is seen as a part of
artificial intelligence. Machine learning algorithms build a model based on sample
data, known as training data, in order to make predictions or decisions without
being explicitly programmed to do so. Machine learning algorithms are used in a
wide variety of applications, such as in medicine, email filtering, speech
recognition, and computer vision, where it is difficult or unfeasible to develop
conventional algorithms to perform the needed tasks.
A subset of machine learning is closely related to computational statistics, which
focuses on making predictions using computers; but not all machine learning is
statistical learning. The study of mathematical optimization delivers methods,
theory and application domains to the field of machine learning. Data mining is a
related field of study, focusing on exploratory data analysis through unsupervised
learning. Some implementations of machine learning use data and neural
networks in a way that mimics the working of a biological brain. In its application
across business problems, machine learning is also referred to as predictive
analytics.
19. .
19
UML Diagrams
A use case diagram is a graphical depiction of
user’s possible interactions with a system. A
use case diagram shows various use cases and
different types of users the system has. The
use cases are represented by either circles or
ellipses. The actors are often shown as stick
figures.
Use case Diagram
20. 20
Class diagram
In software engineering, a class diagram in the
Unified Modeling Language (UML) is a type of
static structure diagram that describes the structure
of a system by showing the system's classes, their
attributes, operations (or methods), and the
relationships among objects.
The class diagram is the main building block of
object-oriented modeling. It is used for general
conceptual modeling of the structure of the
application, and for detailed modeling, translating
the models into programming code. Class diagrams
can also be used for data modeling. The classes in a
class diagram represent both the main elements,
interactions in the application, and the classes to be
programmed.
21. 21
Activity Diagram
Activity diagrams are graphical representations of
workflow of stepwise activities and actions with
support for choice, iteration and concurrency. In
the Unified Modeling Language, activity diagrams
are intended to model both computational and
organizational processes (i.e., workflows), as well
as the data flows intersecting with the related
activities.
22. Algorithm Used
In this algorithm there is an edge detection operator that uses a multi-stage
algorithm to detect a wide range of edges in images. It was developed by John F.
Canny in 1986. Canny also produced a computational theory of edge detection
explaining why the technique works. A lot of people consider the Canny Edge
Detector the ultimate edge detector. You get clean, thin edges that are well
connected to nearby edges. If you use some image processing package, you
probably get a function that does everything. Here, I'll go into exactly how they
work. The canny edge detector is a multistage edge detection algorithm. The two
key parameters of the algorithm are – an upper threshold and a lower threshold.
The upper threshold is used to mark edges that are definitely edges. The lower
threshold is to find faint pixels that are actually a part of an edge.
▫ Canny Edge Detection Algorithm
22
23. The general criteria for edge detection include is detection of edge with low
error rate, which means that the detection should accurately catch as many
edges
23
31. Limitations
1.This is a complex system which needs approval of government authorities to
be used in the real world. Various security measures are to be taken into
consideration to allow this type of system to be used in the real world.
2.The efficiency of the system developed is around 95% which is not great
considering the threats it can cause in the real world.
31
32. Scope for future work
The GUI application can be converted into a real time application that captures
different scenarios on the road and acts accordingly. This can be done by using
different sensors, IOT technology, cloud computing, computer vision. The
system can be integrated in CCTVs installed along with traffic lights in
acquiring real time traffic information.
32
33. Conclusion
A smart traffic control system availing image processing as an instrument for
measuring the density has been proposed. Besides explaining the limitations
of the current near obsolete traffic control system, the advantages of the
proposed traffic control system have been demonstrated. For this purpose,
four sample images of different traffic scenarios have been attained. Upon
completion of edge detection, the similarity between sample images with the
reference image has been calculated. Using this similarity, time allocation has
been carried out for each individual image in accordance with the time
allocation algorithm. In addition, similarity in percentage and time allocation
have been illustrated for each of the four sample images using Python
programming language. Besides presenting the schematics for the proposed
smart traffic control system, all the necessary results have been verified by
hardware implementation.
33
34. References
1.Ashwini D. Bharade, Surabhi S. Gaopande, Robust and Adaptive Traffic
Surveillance System for Urban Intersections on Embedded Platform, 2014
Annual IEEE India Conference (INDICON).
2. Cyrel O.Manlises, Jesus M. Martinez Jr. , Jackson L. Belenzo,Czarleine K.
Perez,Maria Khristina Theresa A. Postrero, Real-Time Integrated CCTV
Using Face and Pedestrian Detection Image Processing Algorithm For
Automatic Traffic Light Transitions, 8thIEEE International Conference
Humanoid, Nanotechnology, Information Technology Communication and
Control, Environment and Management (HNICEM) The Institute of Electrical
andElectronics Engineers Inc. (IEEE) Philippine Section.
34