Sie sind auf Seite 1von 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/329235731

Density Based Traffic Control System Using Image Processing

Conference Paper · November 2018


DOI: 10.1109/ICETIETR.2018.8529111

CITATIONS READS

0 88

3 authors, including:

Arun A. Balakrishnan
Cochin University of Science and Technology
15 PUBLICATIONS   31 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

machine learning, pattern recognition View project

All content following this page was uploaded by Arun A. Balakrishnan on 28 November 2018.

The user has requested enhancement of the downloaded file.


International conference on Emerging Trends and Innovations in Engineering and Technological Research (ICETIETR2k18)
ISBN No 978-1-5386-5743-0

Density Based Traffic Control System Using


Image Processing
Uthara E. Prakash1, Athira Thankappan2, Vishnupriya K. T.3, Arun A. Balakrishnan4
Department of Electronics
Cochin University of Science and Technology, India
1
uthara21@gmail.com, 2athiraquest@gmail.com, 3vishnupriyavalsan@gmail.com, 4arunab@cusat.ac.in

Abstract - In this paper, a novel real-time traffic control system using a timer (Seven Segment Display) and LEDs instead of
which can easily keep traffic in control using image processing real traffic lights.
techniques is presented. In this method, a webcam is used in each
stage of the traffic light in order to take pictures of the roads where II. EXISTING METHODS
traffic is bound to occur. Count of vehicles in these images is
calculated using image processing tools in Matlab and different
timings are allocated according to the count along with a green Many types of traffic control systems have been introduced in
signal for vehicles to pass. In the proposed prototype, the green and order to find the density of vehicles on road. A system in
red signals are represented using LEDs and the decrementing timer which the total size of the traffic can be calculated using
for the green signal is represented by a seven segment display.
image processing methods is discussed in [1]. Another similar
Keywords – Traffic light control, image processing, foreground system proposed controls traffic lights using image processing
detection, vehicle count, timer techniques which can be implemented in real time [2]. A web
camera is used at each stage of the traffic light to record
images of the traffic lane we have selected. These captured
I. INTRODUCTION
images are then compared to a reference image of the empty
road by image matching process. Canny edge detection
With the uncontrolled population growth, travelling has turned
out to be a really hectic task in today’s world. The increase in method is used to determine the boundaries of the images.
travelling people has caused a drastic growth in traffic at Here, the traffic is controlled depending on the percentage of
every nook and corner of the city. This, in turn, is contributing match between the images. There are many papers based on
to the wastage of precious fuel and time which leads to edge detection methods [3]. Another system uses a video
impatience and frustration of the people. Traffic congestion is camera to capture images of the road and make use of that
a common problem that has arisen due to the increased data to control traffic signals [4]. Instead of finding the total
number of vehicles on the road. In order to deal with this
number of vehicles, they determine the traffic density
problem, researchers have proposed many solutions. One of
the currently used models is the timer model. Traffic can be corresponding to the total area occupied by vehicles on the
controlled to a great extent by using timers at each phase of road with respect to the total amount of pixels in one video
the traffic. Another model used is with the help of electronic frame. In [5], a similar approach for traffic control system is
sensors which detects the presence of vehicles, and produce also proposed.
appropriate signals. The cause of traffic is dependent on many
factors like peak time, special days, season, bad weather, or Manual controlling refers to controlling traffic with the help
unexpected events like accidents, special events or of manpower. Traffic police are allotted to a specified area to
constructional activities. Once we get stuck in traffic, we may control traffic. Controlling traffic signals using timers and
have to wait for hours to get out of it. We can solve this electrical sensors is known as automatic controlling. In this
problem to a great extent by implementing this density based method, a constant numerical value is uploaded into the timer
traffic control system using image processing which at each phase of the traffic light. According to the changes in
continuously manages the traffic lights based on traffic. This the timer value, the traffic lights automatically becomes ON or
system uses image processing techniques such as background OFF. The electrical sensors check for the presence of vehicles
subtraction in order to find the count of vehicles present on on the road and provide appropriate signals at each phase,
the road (traffic density) which can be used to control the which controls the automatic switching off lights. The manual
traffic signal light. The image processing tools which are controlling system requires tremendous manpower for
present in Matlab can be used to program the code for finding implementation. Since the number of traffic police is limited
the count of vehicles in a lane. This idea can be represented and making them do this sort of work in the hot tropical areas

Toc H Institute of Science & Technology, Arakkunnam, Ernakulam , Kerala


International conference on Emerging Trends and Innovations in Engineering and Technological Research (ICETIETR2k18)
ISBN No 978-1-5386-5743-0

is cruel. We need to find a better method to control traffic in represented using 256 levels varying from 0 to 255. The
the cities. In automatic traffic controlling system, the traffic greyscale values are obtained as a weighted average of the
light is controlled by timers at every stage or by using individual R, G and B components as in (2).
electronic sensors to detect the presence of vehicles. But in
these methods, time could be wasted in showing a green .0.3R + 0.59G + 0.11B (2)
signal when there are no vehicles at all. We can get over these
limitations by controlling traffic lights with the help of image
processing techniques.
Our proposed system controls traffic lights using image
processing techniques. Here, the vehicles are detected by
considering the captured images instead of using timers or
electronic sensors which are placed on the pavement. A web
camera is placed at the traffic light which captures images of
the road through which the vehicle count is estimated and
traffic is controlled. Using image processing in traffic control
is found to be a better technique than the existing methods. It
helps decrease traffic congestion without any wastage of time
caused by showing green signal on an empty road without any
vehicles. It is a better way to determine the presence of
vehicles since it makes use of real-time images which makes it
better than systems depending on the vehicle’s metal content
only.

III. PROPOSED SYSTEM

The proposed system is implemented in Matlab with an


objective to reduce the traffic based on density. Four main Fig. 1 Block Diagram of Density Based Traffic Control System Using Image
steps are considered for the system: a) image acquisition b) Processing
RGB to grayscale transformation c) image enhancement and
C. Image Enhancement: Image enhancement is the process of
d) morphological operations. A camera is installed and used to
adjusting the pixel values of an image either in the spatial
capture video of the highway. The video is recorded
domain or in the frequency domain to improve the visual
continuously in consecutive frames and each frame is
perception of the captured image. Image enhancement tools in
compared to the initial captured image. The total number of
Matlab are used to obtain the grayscale version of the captured
cars present in the video is found out using image processing
image with proper contrast and better quality. Image
algorithms. If the total number of cars exceeds a predefined
enhancement techniques used in the proposed method include
threshold, heavy traffic status is displayed as a message. The
noise removal using Wiener filter, Blob analysis and dilation.
block diagram of our proposed model is shown in Fig. 1.
D. Thresholding
A. Image Acquisition Image thresholding is a simple and effective method to
The first step in the process of image processing is the differentiate an image into foreground and background. It’s a
acquisition of the image. Generally, an image is considered to segmentation process used to isolate objects from the
be a two-dimensional function 𝑓(𝒂, 𝒃) where a and b are background. If the histogram of the image is bimodal [7], a
spatial coordinates [6]. The value of the function at any point single global threshold can be used for segmentation.
is known as the intensity, also known as the grey level of the Automatic determination of the threshold value for each
image at that point. These a and b values must be converted to captured traffic image is done using Otsu’s algorithm as
finite discrete values in order to form a digital image which is discussed below.
necessary to process through a digital computer. Each digital
image is composed of pixels which are finite elements. A 1. Select an initial estimate for the global threshold
webcam is used for capturing video and frames are extracted value T.
to obtain images. The intensity values are proportional to the 2. Segment the image using threshold T. This will
radiated energy by a physical source. Hence pixel values must produce two groups of pixels, P1 consisting of all
be nonzero and finite. pixels with intensity values > T, and P2 consisting of
0 < 𝑓(𝒂, 𝒃) < ∞ (1) all pixels with values ≤ T.
3. Compute the average (mean) intensity values a1 and
B. RGB to Gray Conversion a2 for the pixels in P1 and P2 respectively.
The colour images are in RGB format. In grayscale images, 4. Compute a new threshold value:
1
each pixel is represented using 8 bits and pixel values are Tnew = (𝑎1 + 𝑎2 ) (3)
2

Toc H Institute of Science & Technology, Arakkunnam, Ernakulam , Kerala


International conference on Emerging Trends and Innovations in Engineering and Technological Research (ICETIETR2k18)
ISBN No 978-1-5386-5743-0

5. Repeat steps 2 to 4 until the difference between the Software Module: MATLAB version R2016a is used as the
two values of threshold in successive iterations is image processing software which comprises specialized
smaller than a predefined parameter ∆T. modules that perform specific tasks. Matlab coding is
completed using the reference and captured images.
E. Foreground Detection: The aim of foreground detection is
to detect changes occurring in the image sequences. Interfacing: A webcam is interfaced to the system and
Foreground detection is done to separate these changes taking Arduino is interfaced to Matlab using serial communication.
place in the foreground from the background. All detection
techniques are based on setting a reference background image The algorithm behind the block diagram consists of the
and detecting changes which occur in the other images with following steps.
respect to the reference image. Defining the background
becomes challenging when the image contains shapes, 1. Start program
shadows, and moving objects. A good foreground detection 2. Capture image of the blank road by the connected
system must be able to develop a good background model and camera module for reference
be robust to changes in lighting, repetitive movements (leaves, 3. Capture image with vehicles
waves, shadows), and long-term changes. Here the foreground 4. The images are converted from RGB to grey
is detected using the automatically generated threshold value 5. A threshold value is found using Otsu’s principle
found out using Otsu’s principle. 6. Find the difference between frames using threshold
7. Add Gaussian noise to the difference output
I. Vehicle Counting: There are many methods presently in use 8. Apply Weiner filter to it to filter the blobs
to detect vehicles on road such as motion detectors, 9. Convert to binary image
installation of lasers on both sides of the road, etc., which 10. Fill holes to the blobs
increases the hardware requirements. Our proposed system 11. Open all blobs having an area greater than 2000
makes use of Otsu’s Principle with image processing 12. Determine the number of cars
techniques to count the number of vehicles on road and hence 13. Display the output image
estimate the density. The count of vehicles found can be used 14. The count of vehicles is found and displayed.
for controlling the traffic signal. To count the numbers of 15. According to the number of vehicles, green light is
vehicles, two input images are given, one of the blank road allotted for different timings for each count displayed
and the other with the vehicles on the road. The input image is by a seven segment
then converted from RGB to greyscale. Now the two images
are compared and the difference is taken using background V. EXPERIMENTAL RESULTS
subtraction and the difference image is converted into binary
form. The blobs in the binary image are opened only when the
blob area is greater than 2000. Using Matlab, the exact
number of vehicles, are determined and the count is displayed
using a seven segment display.

J. Time Allocation: Once the number of vehicles is found out,


then time allocation is done based on the count. Time
allocation is indicated using LEDs which are connected to our
circuit. Also, a Seven Segment Display screen is attached to
display the time allotted. When the count of cars is greater
than 1 and less than 5, the timer shows 5 seconds and LED
blinks for 5 seconds. When the count of cars is greater than 5
and less than 10, then the timer shows 10 seconds and LED
blinks for 10 seconds.

IV. IMPLEMENTATION

The main parts required for this system are hardware,


interfacing and software module [8].

Hardware Module: A USB based web camera to capture


images of the traffic on road. The hardware module consists
of an Arduino board used to control LEDs representing the red Fig. 2. Implementation Results (a) Captured image (b)
Background image used as a reference (c) Foreground image (d)
and green lights. A timer module is used to display the Foreground image after enhancement techniques
remaining time.

Toc H Institute of Science & Technology, Arakkunnam, Ernakulam , Kerala


International conference on Emerging Trends and Innovations in Engineering and Technological Research (ICETIETR2k18)
ISBN No 978-1-5386-5743-0

Simulation results of the proposed system are shown in Fig. 2. REFERENCES


Fig. 2(a) shows the captured image of the road with two cars,
Fig. 2(b) indicates the road without vehicles, Fig. 2(c) [1] Pezhman Niksaz, Science &Research Branch, Azad University of Yazd,
represents the segmented image and output image after Iran, "Automatic Traffic Estimation Using Image Processing ",2012
International Conference on Image, Vision and Computing.
enhancement is shown in Fig. 2(d).
[2] Chandrasekhar. M, Saikrishna. C, Chakradhar. B, Phaneendra Kumar. P
& Sasanka. C. “Traffic Control Using Digital Image Processing”, IJAEEE,
ISSN (Print): 2278-8948, Vol-2, Issue-5, 2013.
VI. FUTURE WORKS
[3] Gundeep Kaur, Sonia Sharma,” Traffic Management Using Digital
The weather conditions are not taken into account which may Image Processing”, IJCST Vol. 8, ISSue 2, AprIl - June 2017.
affect the image quality when it becomes foggy or in heavy
[4] Md. Munir Hasan, Aminul Hoque, Gobinda Saha, and Md. Badruddoja
rains. More advancements can be made to the proposed Majumder. “Smart Traffic Control System with Application of Image
system to check identification of vehicles that pass through Processing Techniques”, 3rd International Conference on Informatics,
the system circle which could help in traffic surveillance. Electronics & Vision 2014.

VII. CONCLUSION [5] Anil Vishwasrao, Omkar Ramdas Gaikwad, Prof. Kanchan Pujari, Tejas
Talathi, “Image Processing Based Traffic Light Control”, International
Journal of Science, Engineering and Technology Research (IJSETR) Vol 3,
An efficient density based traffic control system is simulated Issue 4, April 2014.
and implemented which provides a good traffic control
mechanism without time wastage. It is also a much better way [6] K.M.M. Rao, “Overview of Image Processing”, Proceedings of a
of detecting the presence of vehicles on the road since it workshop on image processing and pattern recognition, IETE, Hyderabad,25-
26 September 2004.
makes use of image data. So it surely operates much better
than systems which rely on the metal content of the vehicles [7] Rafael C. Gonzalez, Richard E. Woods, Digital Image Processing, 3rd ed.
to detect their presence. Image processing techniques 2008.
overcome the limitations of the all the traditional methods of
[8] Vismay Pandit, Jinesh Doshi, Dhruv Mehta, Ashay Mhatre and Abhilash
traffic control. It eliminates the need for extra hardware and Janardhan, “Smart Traffic Control System Using Image Processing”,
sensors. The use of multiple cameras will help to analyze and International Journal of Emerging Trends & Technology in Computer Science
control traffic in a particular region. The proposed system (IJETTCS), Vol 3, Issue 1, January – February 2014.
outperforms the existing system in terms of accuracy and
simplicity.

Toc H Institute of Science & Technology, Arakkunnam, Ernakulam , Kerala

View publication stats

Das könnte Ihnen auch gefallen