Capta Sensor

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 07 Issue: 04 | Apr 2020 www.irjet.net p-ISSN: 2395-0072

Traffic management using Image Processing


Bharathi H1, Mohammed mueen ul Islam2, Rakshitha B N 3, Prof. Swetha B N 4

1,2,3Student, Department of TC Engineering, KSIT, Bangalore

4Assistant Professor, Department of TC Engineering, KSIT, Bangalore

-----------------------------------------------------------------------***--------------------------------------------------------------------------

Abstract— Conventional methods of traffic light I. INTRODUCTION


systems are unable to deal with the ongoing issues
surrounding congestion. The current traffic light models Gaza Strip is one of the most densely populated
are not suited to tackle problems such as traffic jams, ease regions in the whole world. More than two million
of access for emergency vehicles and prevention of people live in a small strip of land. Therefore, most
accidents. In order to counteract these issues, we propose
parts of Gaza city are badly affected by huge traffic
jam with increasing number of existing
the ‘Smart traffic light control system’. The adopted Traffic
vehicles.Aged traffic signaling systems, insufficient
Light Controllers (TLC) in Gaza, are based on police manpower, limited road spaces and bad
microcontroller and microprocessor. These TLCs have driving habits create pro-longed traffic congestions.
limitations because they use the pre-defined hardware, Traffic jam has a negative impact on economy,
which is functioning according to the program that does causes serious air pollution, and noise pollution and
not have the flexibility of modification on real time basis. thus worsens the overall environmental conditions.
Due to the fixed time intervals of green, orange and red To reduce traffic jam, a proper smart signaling
signals the waiting time is more and car uses more fuel. systems is critically needed to be developed and
The intended project will focus on two aspects of installed. Under ordinary conditions, the used
implementation. First and foremost, to make traffic light
conventional traffic control signals in Gaza mainly
have two defects whereby time slots are fixed and
controlling more efficient, image processing alongside
the controller is unable to detect emergency
with embedded system, will be used. This system will vehicles approaching.This project is a simple, low-
intelligently decide when to alternate signals based on the cost, and real time smart traffic light control (STLC)
total traffic on each road detected by cameras on each system which is based on AT mega (Atmel in the
lane which will increase road capacity and traffic flow. megaAVR family) microcontroller installed on
Secondly, the minor component consists of the ability to Arduino to control the various operations.
control the traffic signals by an android application
throughout the Bluetooth and wireless connection. This
will be controlled by the traffic warden or police officer.
The prototype of the system has been built and tested. The
model is better than the current system which is limited to
the Fixed Mode Traffic Light Controller. It is observed that
the proposed smart Traffic Light Controller is more
efficient than the conventional controller in respect of less
waiting time, more distance travelled by average vehicles
and efficient operation during emergency mode.

Keywords— smart traffic lights, embedded system,


Arduino applications, image processing. Fig. 1. Basic concept of smart traffic light.

Fig. 1 illustrates the basic concept of the


STLC where the time is set automatically
© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 4363
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 04 | Apr 2020 www.irjet.net p-ISSN: 2395-0072

according to the number of detected cars via techniques to reduce traffic jams. Then we will
processing captured images through the briefly look at previous research undertaken to
installed cameras. Furthermore, an android tackle the traffic jams. Next we will demonstrate
application communicates wirelessly with the how we implemented and built a prototype.
traffic controller where the warden can control Finally, a discussion about the results will be
the process semi-automatically in cases of viewed and summarized, with future
emergency or any other situations where the developments.
field police officer decides to interrupt the
process. There have been recent developments within
the smart traffic control field [1-3]. The intelligent
Fig. 2 demonstrates the system block diagram and traffic control system developed in [4] enables
its components, where the main controller more internal memory compared to old
combines all the system together. The Liquid microcontrollers with little flexibility to allow
Crystal Display (LCD) is an interface to select the modification in real-time. The new systems ensure
required mode for which the main controller will detection of traffic volumes using genetic
work on. The input data will be received according algorithm and the ability to detect vehicles such as
to the selected mode from either the laptop ambulances simply through the use of a wireless
digitally to describe the level of congestion or from network .
the android application according to the warden
choice. Another project conducted was the Prototype of
Virtual Traffic Lights on Android Based Systems
The output signals will be applied to two different [5]. This project used the proliferation of Wi-Fi
lanes modules, directly to a Direct current (DC) devices with the already available hardware
lane and the other way will be to an Alternating components. The Virtual Traffic Lights (VTL) again
current (AC) driver which will drive the AC lane. alleviates traffic with vehicle to vehicle
communication. Through the implementation of
The modern systems adopt DC LEDs while the old this, traffic was reduced by 60% .
ones use AC lamps. In our system we considered
both AC and DC lanes to prove compatibility with Digital wave radar technology the Wavetronix
old systems and scalability to the modern ones. smart sensor is used in [6] another method to
detect the vehicles presence speed with a detecting
range of 500 m. The sensor is mounted on a traffic
signal head mast arm. Manufacturer claims its
immunity to weather and changing temperature
and light conditions and little or no maintenance
requirements. One of its unique features is its auto-
configuration and operation software developed
for Pocket handheld devices and laptop
computers.Haimeng Zhao, Xifeng Zheng, and Weiya
Liu in [7] designed an intelligent traffic control
system using a DSP and Nios II. Their model
utilises dual-CPU with the logic control of FPGA
(Field Programmable Gate Array), enabling cross-
phase adjustment, the exchange of related
information, and allowing live human-computer
interaction. It is different from conventional traffic
signal controllers in that it works dynamically,
according to user demand as well as mode of
Fig. 2. Block diagram of the project. timing and multiple phase functionalities. Based on
the literature review, there are the two suitable
This paper will discuss the limitations of techniques for smart detection of vehicles. These
current conventional system and proposes two are the use of smart sensors and the image
© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 4364
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 04 | Apr 2020 www.irjet.net p-ISSN: 2395-0072

processing algorithms.In conclusion, we went for Mega type as the system primary controller. It
implementing the image processing code due to has been chosen because of its high
many reasons. Hardware components are very specifications. These include a 54-digital input-
hard to be imported to Gaza strip due to political output pins of which 14 can be used as PWM
reasons and become highly restricted after the (pulse width modulation), a 16 MHz crystal
siege has been imposed since 2008. Most oscillator, a USB (universal serial bus)
importantly availability, feasibility of local connection, and a power jack. Mega is
implementation and the ease of use. compatible with most shields designed for the
Arduino [9].
This paper is organized as follows. In Section II,
the description of the introduced system is The other module was Arduino Uno. It has been
provided. The Aim and Research objectives is used as a method to connect the wireless and
introduced in Section III. Section IV demonstrates Bluetooth modules in order to get the collected data
all the materials that have been used through which is going to be processed by the primary
building the prototype with the specification of controller. The Uno has 14 digital input- output pins
each components Finally, the methodology and of which 6 can be used as PWM outputs. analogue
steps that have been taken to reach the final results inputs, a 16 MHz quartz crystal, a USB connection,
are reported in Section V, and the conclusions are and finally a power jack [10].
given in Section VI.
Moreover an AC (Alternating Current) driver
II. AIM AND RESEARCH OBJECTIVES. have been designed for the purpose of controlling
the AC lane as shown in Fig. 3.
The final aim of our research is to implement our
prototype project in real-life scenarios. This can
improve the movement on pedestrian roads, and it
will reduce the traffic jam. Moreover, it can be easily
fitted with the ambitious aim of building a
centralized station where through it can control the
Gaza traffic process.

Our current objectives as follows: the first


thing is to show how the prototype will reduce
the amount of cars waiting time. Furthermore,
we aim to enable an easy passage for
Fig. 3. AC voltage driver.
emergency purposes and to help the police
officer to focus on other tasks other than
A Bluetooth module with HC-05 model was
changing the lanes direction.
selected in which it will obtain a wireless
III. MATERIALS. connection and transfer the data from and to the
microcontroller, the module has 3 Mbps Modulation
STLC is a combination between codes, with complete 2.4 GHz radio transceiver and
electronic modules and electronic circuits in baseband. It uses CSR Blue core 04-External single
order to obtain improvements on the chip Bluetooth system with CMOS technology and
conventional traffic lights. The core of the with AFH (Adaptive Frequency Hopping Feature). It
prototype is the Arduino which is a universal has a small size as small as 12.7 mm × 27 mm.
open source electronic board primarily The module sensitivity typically -80 dBm and the
developed for educational purposes. In simple radio frequency transmit power is up to +4 dBm.
terms, you can control and build anything with Moreover, it operates with a low power ranges from
Arduino [8]. 1.8 to 3.6 V(DC) with an integrated antenna [11].
Two modules have been used, an Arduino
© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 4365
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 04 | Apr 2020 www.irjet.net p-ISSN: 2395-0072

Finally, an LCD (liquid crystal display) Keypad the time interval for each lane. The decision is
shield was built to monitor and change the system based mainly on the number of cars
status and settings. Moreover there were minor approaching the junction. An image processing
components such as leds resistors, LCD, push code with installed cameras on the junction are
buttons, wires, and power supplies. needed for this approach. The cameras will
detect all the cars on the lanes and the code on
I. METHEDOLOGY laptop will read the number of cars on each
road. As a result, the controller decides a time
In this part, we discuss all the steps of project that proportional to the number of waiting cars
design and implementation, including the software to pass.
and hardware design. The details of each object will
be demonstrated and discussed.

The design process went through many steps,


which are divided into two main routes: software
design and hardware implementation. The software
design started by drawing the program flow chart
and writing the code that suits it. The next step was
designing the circuit diagram and building it on a
simulator. The last step was testing and measuring
the input and output functionality and efficiency. On
the other hand, the hardware design started by
designing and building the wood board, controller
system circuits and the traffic system lanes. The
final step was to paint the board and to place all the
components on it.

According to the requirements of the project


idea the software was divided into three main
programs. Each one of them was installed in a
different device and as a result the programs should
be compatible with each other. The first is the main Fig. 4: Car detection experiment.
program which processes all the data that is
collected from the other two programs and then to Throughout the implementation we have
set the output according the input data. used OpenCV library alongside with
C++environment. Intel introduced OpenCV
The program starts with the set point and all the library as a free and open source for the
traffic system lanes will be set to red. The next stage purposes of real time image processing
is the category selection which operates manually manipulation.
by using the LCD screen.It consists of four sub-
categories divided into conventional system, smart The library contains more than 2500
system, WiFi system, and standby system. algorithms such as face detection, identify
certain shapes and objects, detection of body
If the conventional system was chosen to movements and tracking purposes. The library
operate, its functionality will be the same as the supports many environments such as C++,
local current traffic light system. The red, Python, Java and MATLAB interfaces and
yellow, and green colors operate with fixed supports Windows, Linux, Android and Mac
time delay, and by sequential order. OS [12].
In comparison to the conventional mode, the As seen in Fig. 4, the C++ code was mainly used to
smart mode has more intelligent features detect the number of cars and then transfer the
among them. The mode decides automatically decision to the Arduino mega whereby the Arduino

© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 4366
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 04 | Apr 2020 www.irjet.net p-ISSN: 2395-0072

is responsible for setting the access time for each


lane. Throughout the testing, we have considered
three stages of congestion at each lane: low,
medium, and high. If the Arduino received a low
level of congestion signal from the laptop it then
sets the time for the greenlight to 10 seconds.
Whereas, if it detects medium it sets the time to 25
seconds and 50 seconds for high
congestion.Moreover, the Wi-Fi mode will function
manually by an android interface. This enables the
police man to choose which lane to open or close.
The interface simulates the lanes and by pressing on
any one of them a character will be sent to the
receiver. According to the type of character the
lanes will open and close as illustrated in Table-1 .

TABLE I.CHARACTER FUNCTION BOOK Fig. 5. Arduino Uno code.

Manual function The last category was the standby system which turns
off all the lanes and turns on the yellow blinking which
indicates that there is no traffic and no need to operate
Number Char Function
the system. The main controller program will be
acter installed in the Arduino Mega.
1 A Lane 1 Fig. 5 demonstrates a flowchart of a minor code
is on to detect the signal received from the Bluetooth
data and transfer the data into a digital signal. The
2 B Lane 2 digital signal will be sent to the main controller and
is on according to the signal a set of functions will be
applied as it was mentioned above in the Wi-Fi
mode. Fig. 6 is the Bluetooth Android application
3 C Lane 3
which was built and coded on the IMT APP
is on Inventor. The interface consists of Bluetooth status,
lanes status, and the cross road with lanes. The
4 D Lane 4 lanes are the buttons to send the needed data over
is on the Bluetooth. Each lane has a unique character and
according to its value, the lanes will be opened or
closed.

The connection between the mobile and the system


was established by interfacing the H-05 with the
Arduino. The control process is done by an android
application that have been programmed.

Fig. 6. Bluetooth Android application.


© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 4367
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 04 | Apr 2020 www.irjet.net p-ISSN: 2395-0072

In order to detect a number of standby cars, codes.


we built a code on visual studio by using the
image processing algorithm alongside with the
OpenCV. The code will run inside the PC and
the camera will detect the cars and according
to the number of cars the PC will send a serial
data to the Arduino. The Arduino will set the
time of green light according to the car
numbers. So as to implement this project, there
was a need to build a prototype which
simulates one of the most important junctions
in Gaza city which is known as Al-Saraya. The
prototype will enable us to test the codes and
to present the final results.
Fig. 8. lanes design.
The hardware design went through three
steps which are the wood board design, lanes II. PROJECT SCOPE AND CONCLUSION
design, placing all the components together.
The wood board in Fig. 7 went through many The STLC smart features implemented
fabrication processes to meet the requirements successfully such as the camera can detect the
of the design. First of all the design was drawn number of cars in each road and due to that, the
in Corel ID program and implemented on a timing of each lane is variable according to it. The
CNC machine to extract the unneeded parts. android app functionality were established and
The next step was polishing and painting the tested and the results were as designed. The final
wood board to get exactly the same look as a prototype is shown in Fig. 9.
real cross junction. Finally, the board was
decorated to make the same appearance as It is observed that the proposed smart Traffic
close as possible to reality. Light Controller is more efficient than the
conventional controller in respect of less waiting
time is, more distance travelled by average vehicles
and efficient operation during emergency mode as
shown in Table-2 and Table-3.

TABLE II. MAJOR DIFFERENCES BETWEEN


THE TWO SYSTEMS

Results

Feature STLC Conventio


nal TLC

Waiting Varia Fixed


Time ble
Fig. 7. wood board design.
Manual Flexi Fixed
We designed a traffic lane for the purpose of Control ble
presenting our project results as shown in Fig.
8. The design consists of a bread board, three Architcture Simp More
colored leds, and resistors. The three leds were le Complex
installed to represent the traffic lights from the

© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 4368
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 04 | Apr 2020 www.irjet.net p-ISSN: 2395-0072

Future Yes NO project include an ambitious of constructing a


Expansion centralized station to monitor and control the
traffic in Gaza which the STLC can be a part of it.
Emergency Yes NO Moreover, we will improve the image code to be not
just for detecting vehicles but for more purposes
Mode
like reading the plate number, writing bills on cars
passing through the red signal etc. Although we
developed a fully operating prototype, in order to
map this into a real life setting there would be
The test was implemented using a recorded certain challenges that we would need to overcome.
video of a traffic junction by presenting it in front of
the mounted cameras. The results are shown in Through the commercialization of
Table 3. technology and replacement of conventional
traffic lights, road safety would be enhanced
TABLE III. Test results. with reduced collisions. However, having said
La this there may be instances where accidents on
Roun No. of the road occur. As a result, negligence of the
ne
d cars Resul traffic light system may be blamed for being
num detected t the cause of the accident. This could jeopardize
ber future developments and adoption of the STLC.
This could be tackled by having regular
6 cars output time maintenance of the new system whereby faults
are detected and resolved as well as various
detecte green testing conducting on multiple areas. In the
L d by light=10 case of an accident, the situation will need to be
2 camera secs investigated and the due to vigorous testing
before the STLC is installed, liability will not lie
13 cars output time with us.
detected green
Round
1 L4 by light=25
camera secs

32 cars output time


detected green
by light=50
L2 camera secs

8 cars output time


detecte green
Round d by light=10
2 L4 camera secs

The efficient role to determine and evaluate a Fig. 9. Prototype final result
project is its ability to include future expansion. The
STLC has many technological features that enable
us to install any new development or upgrades.

The STLC is the building block for the future


developments. The future development of the
© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 4369
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 04 | Apr 2020 www.irjet.net p-ISSN: 2395-0072

I. CONCLUSION 16, 2015.

In conclusion, we observed that the [2] Kuzminvkh, "Development of traffic light


conventional traffic light systems were unable control algorithm in smart municipal network,"
to efficiently deal with the variable flows of
in Modern Problems of Radio
traffic. This often leads to a buildup of
congestion and accidents. Furthermore with Engineering. Telecommunications and
the increases in the population in Gaza, it is Computer Science (TCSET), 2016 13th
expected that the problems with the International Conference on, 2016: IEEE, pp.
conventional traffic lights will worsen. The new 896-898.
STLC system will cater for traffic flows in
various areas in Gaza and more specifically will [3] G. Pau, T. Campisi, A. Canale, A. Severino, M.
be able to detect the number of cars in each
Collotta, and G. Tesoriere, "Smart Pedestrian
lane and simultaneously respond to the
changes. Crossing Management at Traffic Light Junctions
through a Fuzzy-Based Approach," Future
Our prototype successfully operated using image Internet, vol. 10, no. 2, p. 15, 2018.
processing and embedded system. It was clear that
traffic congestion can be reduced and there will be [4] K. E. C. K. Bilal Ghazal, "Smart Traffic Light
less delays in real waiting time. Furthermore the
system is more consistent in detecting vehicle Control System," in Third International
presence because it used actual traffic images. It Conference on Electrical, Electronics, Computer
visualized the reality so it functioned much better Engineering and their Applications (EECEA),
than those systems that rely on the detection of the 2016.
vehicles’ metal content. The proposed system was
able manage traffic at a particular unction, [5] H. C. a. R. L. Dan Middleton, "Alternative Vehicle
dedicating longer periods for the green light where
Detection Technologies for Traffic Signal
there are more cars in one lane than the other.
Furthermore the system is complemented with the Systems," Texas Department of Transportation
android system whereby the policeman and Research and Technology Implementation
warden were able to effectively to monitor the Office, Texas, 2009.
traffic in lanes.
[6] P. S. K. Dinesh Rotake, "Intelligent Traffic Signal
For future development, further testing would
Control System Using Embedded System," vol.
need to be considered for various areas within the
city. The design can be promoted and improved 3, no 5., 2012.
through maintenance measures as well failure
modes. Data could be collected based on traffic [7] H. Z. a. X. Z. a. W. Liu, "Intelligent Traffic
flows and system performance. This data could Control System Based on DSP and Nios II,"
then be analyzed as to which areas require more International Asia Conference on Informatics in
attention than others such as which areas have the Control, Automation and Robotics, pp. 90-94,
heaviest congestion and accidents.
2009.

[8] Team, "ARDUINO MEGA 2560 REV3," [Online].


REFERENCE Available: https://store.arduino.cc/arduino-
mega- 2560-rev3. [Accessed 20 December
[1] V. Parthasarathi, M. Surya, B. Akshay, K. M. Siva,
2018].
and S. K. Vasudevan, "Smart control of traffic
signal system using image processing," Indian [9] eam, "ARDUINO UNO REV3," [Online].
Journal of Science and Technology, vol. 8, no. Available: https://store.arduino.cc/arduino-

© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 4370
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 07 Issue: 04 | Apr 2020 www.irjet.net p-ISSN: 2395-0072

uno- rev3. [Accessed 20 December 2018].

[10] team, "What is Arduino?," [Online]. Available:


https://www.arduino.cc/en/Guide/Introductio
n. [Accessed 20 December 2018].

© 2020, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page 4371

You might also like