International Journal of Scientific & Engineering Research, Volume 6, Issue 1, January-2015 1461

ISSN 2229-5518

Design and Development of an Image Processing Based Traffic Control System with GSM and GPS Interface

Jagtap Varsha Suresh

Shree Ramchandra College of Engineering, Lonikand ,Pune.

Electronics and Telecommunication Department

Abstract - W ith the increasing number of vehicles on the road, it has become difficult to properly control the flow of traffic especially in large cities like Pune, Aurangabad, Mumbai etc. The proposed system uses a digital camera mounted on a stepper motor to sense the traffic on the road. The decision to open the lane is done after monitoring the traffic load. The heavily loaded side is turned on for a longer time. Thus the system is intelligent because it is not using the fixed time frame. The system is also integrated with GSM and GPS, thus the signals can also be controlled with the help of mobile in case of an emergency. MATLAB programming environment has been used in simulating and developing the system. Thus the system is smart because it can manage the traffic problems in smooth and efficient way and also it can handle the emergency cases like ambulance by using GSM and GPS.

Index Terms - Traffic Congestion, Digital Camera, Image Processing, Traffic Control System, Global System for Mobile Communication (GSM), Global

Positioning system (GPS), Stepper motor, controller, emergency mode, Adaptive Traffic control System (ATCS).

—————————— ——————————

1. Introduction -

Ineffective traffic light control systems in major cities of developing countries especially India has resulted in traffic congestion problems. Today’s traffic light system use fixed time signals. These fixed timing signals are not desirable because they do not take into account the actual road conditions thereby producing the traffic jam problems. The delays introduced by these signals are adversely affecting the quality of life as well as environment. People lose time, miss opportunities and get frustrated. In addition, these traffic congestion problems are having a deep impact on companies’ production which has lead to economic crises in the country. One solution to overcome these problems is to construct new roads, under-passes, fly- overs; enhance the public transport and introduce intercity train. But the availability of free space impose a serious problem in making new infrastructure and also the environmental damage due to these developments have to be considered.
For this reason, there is a need to improve existing
traffic light system in order to manage the traffic flow in
smooth and efficient way. This leads to the development of an adaptive traffic control system which can monitor traffic conditions and adjust the timing of traffic lights according to the actual road conditions. Various techniques have been presented in literature for adding intelligence to traditional traffic control system. Inductive loops and infrared object sensors are most common detection systems to measure traffic flow on roads [1-3]. LAN and RFID based systems, though present a better solution [2, 3], are costly to deploy
and maintain. These sensor based approaches does not offer optimized solution for handling the traffic flow in
saturated conditions. In order to overcome these deficiencies, many researchers have applied image processing and computer vision technique for making the traffic system fully adaptive and dynamic.
This lead to a relatively new research area called Adaptive Traffic Control System which is basically concerned with the application of information and communication technologies to the planning and operation of transportation system. Traffic observation, control a real time management is one of the major components within future Adaptive Traffic Control System. This involves, for instances design and development of image processing based traffic control system. It is widely accepted by the transportation community that Adaptive Traffic control system makes exiting transportation facilities efficient, minimizing the need to build more infrastructure. Adaptive Traffic Control System, advanced electronics, communications, and computer systems that increase the efficiency and safety of urban and highway transportation. The Adaptive Traffic Control System that had been developed presents several advantages. Since the waiting time of the vehicles for the lights to change is optimal, the emission of carbon monoxide from the vehicles is reduced. This will give a positive effect to the green house effect towards the environment. The Adaptive Traffic Control System will also save the motorists’ time and reduces their frustration while waiting for the lights to change since it helps reducing congestion in the traffic intersections.

IJSER © 2015 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 6, Issue 1, January-2015 1462

ISSN 2229-5518

Another advantage is that there is no Interference between the sensor rays and there is no redundant signal triggering. By being able to interface with the software, the traffic system will easily accept feedback. Therefore there can be communication between the software and the hardware.
In this paper, I have presented an algorithm based on image processing for monitoring the traffic flow on roads. The entire system is interfaced with GSM (Global System for Mobile Communication) and GPS (Global Positioning system) for controlling the signals and executes an emergency.

2. Experimental Setup -

ATCS (Adaptive Traffic Control System) consists of five important components: a camera mounted on a stepper motor and installed at each intersection, a PC with MATLAB for image processing tasks, a GSM engine and ARM 7 microcontroller for controlling stepper motor and traffic light signals and GPS. After the images have been

Motor driver

Microcontroller

Traffic Signal

Interference

PC

Parallel

Port

Serial

Port

USB Port

GSM Engine

captured and processed by PC, on time is assigned to each signal according to its traffic density. Transmitter GSM engine is installed in an ambulance to send emergency message while receiver GSM engine is installed at each intersection and assigned the highest priority in order to handle an emergency situation. Each intersection is assigned a unique code which can turn the signal green. The intersection with designated nomenclature of roads is shown in Fig. 1. The block diagram of ATCS is shown in Fig. 2 while experimental setup is shown in Fig. 3.

1. Control strategy and algorithm


Two traffic control techniques, cyclic and acyclic, are widely used. In ATCS, time is distributed cyclically to each road of the intersection. The roads on each intersection are assigned names as Road A, Road B, Road C and Road D as shown in Fig. 1. Each road has a standard set of signals namely red, yellow and green.

Fig 1. Intersection with Designated Roads

Fig 2 Block diagram of ATCS

Fig 3. Experimental setup

During initialization the camera is rotated by 90 degrees after every 2 seconds to take the pictures of all roads on intersection. All the signals on intersection are turned red at this moment. After the images have been processed, time is assigned to each road according to its traffic density as Time A, Time B, Time C and Time D.
The green signals are turned on in sequence
starting from Road C to Road D to Road A to Road B and back to Road C. Camera position is adjusted in such a way so that it is always two steps ahead from the road signal which has been turned green. For example, if green signal of Road C is turned on, then camera will be pointing towards Road A. The camera will capture Road A conditions after the time “Time C- Snap Time” is elapsed and moved to next position, Road B. Snap Time is fixed at 3 seconds. After the calculated time for Road C is passed, its green signal is turned off and green signal of Road D is turned on. The state of the signal is changed with a delay of
1 second in between [1].
a) Image Analysis [5]

IJSER © 2015 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 6, Issue 1, January-2015 1463

ISSN 2229-5518

The acquired image from the camera is processed to calculate the total covered area of vehicles on the road. The greater the number of vehicles in region of interest on the road, the greater will be the covered area and more will be the time assigned to that road. The main steps of image processing are described below:

1. Region of Interest (ROI) Selection:

The main objective for selecting a region of interest (ROI) is to filter out undesired information present on roads. First of all, pictures of all empty roads of intersection are captured and saved. Since the image is a matrix, so some desired rows and columns are deleted from these images and these are then saved as region of interest images. This process of selecting a portion of the original image is also known as cropping of image. MATLAB® function ‘roipoly(x)’ is used for selecting ROI in an empty road image [5].
H = ROI (f(x, y)) ε f(x, y) (1)

2. Conversion to Grayscale:

The acquired image of actual road condition is converted into grey scale image with histogram equalization process for improving the image contrast [5].
discontinuities in object edges making the boundaries continuous [5].
I = (SӨA) ΘB (9)
Where, A = {z | z = Disk with radius = 1}
B = {w | w = Line with length = 5, degree = 75} (10)
MATLAB® function ‘strel(shape, parameters)’ is utilized
for implementing morphological image operations.

7. Road Time Calculation:

White pixels in image ‘I’ are then counted for allocating the time to signals of all roads at intersection. More white pixels will correspond to denser road and hence more time will be assigned.
Time-X= k*Σ(White Pixels)/Σ Pixels (11)
The constant ‘k’ is evaluated experimentally using denser road white pixel values as reference. The ROI of Road A, actual image of Road A, its binary image and image with edges are shown in Fig.4,5, 6, and 7 respectively [5].

4. Emergency Mode -

ATCS is made wireless with the help of GSM to handle emergency situations. GSM network is selected because it has wide spread coverage making the whole

k

Sk = Trk = �

j=0

nj�n
k=0,1,….L-1 (2)
system available for almost all the time. Also GSM network
has high security infrastructure which makes sure that
MATLAB® functions ‘rgb2gray(x)’ and ‘adapthisteq(x)’
are utilized for this purpose

3.Conversion to Binary:

The grayscale image is converted into binary format with a threshold value of 0.3 [5].
g(x, y) = T [ ƒ(x, y) ] (3)
Where
T(r) = 1 r ≥m
= 0 r<m (4)
MATLAB® function ‘im2bw(x,0.3)’ is used for image

4. Applying ROI:

The converted binary image is ANDed with ROI image on pixel by pixel basis to remove the undesired area [5]
information sent or received cannot be monitored. To explain the concept of emergency mode, each ambulance carries a wireless card. This wireless card contains a GSM engine, a 28C512 EEPROM, a 4x4 keypad and 16x4 LCD; all interfaced to ARM7 microcontroller. All the numbers of GSM engines installed at intersections are stored in EEPROM. The operator can enter a code assigned to a particular intersection with the help of a keypad.

M N

𝑘(𝑥, 𝑦) = � � g(x, y)h(x, y)
( 5)

x=0

y=0

5. Edge Detection:

The edges are then found in the resulting image using the SOBEL edge detection method with the following operators [5].
Gx = (Z7 + 2GZ8 + Z9 ) – (Z1 + 2Z2 + Z3) (6)
Gy = (Z3 + 2Z6 + Za ) – (Z1 + 2Z4 +Z7 ) (7)
It returns edges at those points where the gradient of image
is maximum.
S = SOBEL (K) (8)

6. Morphological Operations:

The resulting image with edges is first eroded using disk as structuring element to remove noise. It is then dilated with line as structuring element to remove the

Fig 4 Road A without vehicles

Fig 5 Road A with vehicles

IJSER © 2015 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 6, Issue 1, January-2015 1464

ISSN 2229-5518

GSM

Engine

EEPORM

GPS

ARM 7 Microcontroller

Fig 6 Binary image for Road A

4 x 4 keypad

16 x 4 LCD

Fig 7 Image with edges for Time calculation of Road A

The microcontroller uses this code as an index to EEPROM locations, retrieves the desired number and sends the information in the form of SMS (Short Message Service) message by using appropriate AT command through GSM engine to receiving end i.e., intersection. The receiving section also contains a GSM engine controlled by a PC. PC has a database of authorized mobile numbers. Whenever a message is received, an interrupt is generated. The PC scans the database for this received number, processes the message after confirmation and turns the required green signal on. After the ambulance has crossed the intersection, the operator can send the normal command to restore the operation of signals at that intersection. GPS is also used in the ambulance to continuously track the ambulance and before ambulance is at the intersection operator at the intersection knows the position of ambulance to make the traffic signal decision and handle the situation very smoothly and accurately.

Fig 8 Block Diagram of Emergency Mode

Fig. 9 GUI for ATCS

Table 1 : Emergency mode operation for specified route

6. Advantages of this system

IJSER © 2015 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 6, Issue 1, January-2015 1465

ISSN 2229-5518


1. Adaptive Traffic Control Systems (ATCSs) adjust, in real
time, signal timings based on the current traffic conditions, demand, and system capacity.
2. Systematic, well-designed research provides the most effective approach to the solution of many problems facing to traffic
3. Maximize traffic capacity of the intersection
4. The system has a high degree of versatile any intersection can be controlled by simply connecting input and output to the ARM

7. Conclusion –

This system discusses the design and implementation of an intelligent traffic control system based on image processing. The single camera system works by measuring the density of vehicles on the roads at an intersection in a round robin fashion and adjusts the signal time accordingly. A wireless interface using GSM engine and GPS is provided for handling emergency situations. The system is tested using software under various crowd conditions and found to be efficient as compared to other sensor based systems.

8. References –

1.“Design and Development of an Image Processing Based

Adaptive Traffic Control System with GSM Interface”, Umar Farooq, Hafiz Muhammad Atiq, Muhammad Usman Asad, Asim Iqbal Department of Electrical Engineering University of The Punjab Lahore-54590 Pakistan

Start

Clear LCD

Enter Intersection & road no.

Enter Key

Pressed?

Retrieve GSM engine no from EEPROM

Send SMS to intersection

GSM engine

Normal key pressed

Send SMS for restoring the

operation

Fig 10 Flow chart of Emergency Mode

2. Shwe Yi Aye, “Design and construction of LAN based car traffic control system,” in Proc. WASET, 2008.

3. Khalid A. S. Al-Khateeb, Jaiz A. Y. Johari, Wajdi F. Al- Khateeb,“Dynamic traffic light sequence algorithm using RFID,” Journal of Computer Science, 4(7): pp.517-524, 2008.
4. Image processing toolbox help, MATLAB® [Online]. Available: http://www.mathworks.com/
5. Rafel C. Gonzalez and Richard E. Woods, Digital Image
Processing, Pearson Education, 2004

IJSER © 2015 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 6, Issue 1, January-2015 1466

ISSN 2229-5518

IJSER © 2015 http://www.ijser.org