0% found this document useful (0 votes)
46 views5 pages

Automated Traffic Signal System Based On Traffic by Tracking Objects

This paper proposes an automated traffic signal system that adjusts signal timing based on detected traffic. The system first performs background subtraction to extract foreground objects (vehicles) from camera images. Snake algorithm is used to track the extracted objects. Tracked objects are compared to predefined templates to count vehicles. When the vehicle count reaches a threshold, the signal timing is adjusted. The camera also rotates to view traffic from the opposite direction and repeat the process. The system aims to reduce unnecessary waiting times at signals with low traffic by dynamically adjusting signal timing based on real-time vehicle counts.

Uploaded by

Syed Imad Ahmed
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views5 pages

Automated Traffic Signal System Based On Traffic by Tracking Objects

This paper proposes an automated traffic signal system that adjusts signal timing based on detected traffic. The system first performs background subtraction to extract foreground objects (vehicles) from camera images. Snake algorithm is used to track the extracted objects. Tracked objects are compared to predefined templates to count vehicles. When the vehicle count reaches a threshold, the signal timing is adjusted. The camera also rotates to view traffic from the opposite direction and repeat the process. The system aims to reduce unnecessary waiting times at signals with low traffic by dynamically adjusting signal timing based on real-time vehicle counts.

Uploaded by

Syed Imad Ahmed
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Automated Traffic Signal System based on Traffic by Tracking Objects

Baskaran R*, Dhavachelvan P**


Department of Computer Science and Engineering,
*
Anna University,Chennai
**
Pondicherry University, Puducherry.

Abstract of the image where the foreground objects are located.


This paper presents a dynamic signal counter, which set Active contours were first introduced by Kass. Et. Al.[2].
the traffic signal counter value depending on the traffic and were termed snakes by the nature of their movement.
rate in the road. Initially, the input image is background Active contours are an sophisticated approach to contour
subtracted to extract the foreground objects. The extraction and image representation. They are based on
foreground objects are tracked using snake algorithm. the idea of minimizing energy of continuous spline
The tracked objects are then compared with the contour subject to constraints on both its autonomous
predefined templates. The count of number of vehicle is shape and external forces derived from superimposed
incremented as it encounters a matched object. Based on images that pull the active contour towards image features
the count of vehicles, the value for the signal counter is such as lines and edges.
set. In the mean while, the camera is rotated to 180
degrees to view the other side of the road and the same Occlusion [8] is defined as masking a part of one object
procedure is repeated. by another object. The masked object is called occluded
object and masking foreground object is called occluding
Keywords: Background Subtraction, Snake Algorithm, object. Once the tracked image does not match with any
Occlusion, Object Tracking, Template Matching template, then it recognizes that occlusion is present in
that image. Then half of the length of that object is
tracked and matched with all the templates. If that image
1. Introduction matched with any of the template, then the occluding
object is identified and subtracted from the original
In the past few years, extensive research has been carried image. Then the occluded image is tracked and matched
out in the field of maintaining proper traffic scheme and with all templates. If there is a match, it will find out the
retrieval of images. For instance, traffic signal counter is occluded image also.
set for each road, which allows the vehicles to wait in the
traffic for some time and move. This signal counter is set 2. Literature survey
on all roads now days. But all vehicles must have to wait
for a pre defined counter value even if there is a less traffic 2.1 STEREO VISION BASED DENTIFICATION
rate. This will increase the unnecessary waiting time in the
traffic. A widely used approach for image retrieval is Stereo Vision based algorithm in [1] is used to extract the
Shape based image retrieval. In this method, Shape is one 3D features in the scene. These features are investigated
of the most important feature in characterization of image further in order to select the ones that belong to vertical
content. If a shape is used as a feature, edge detection objects only and not to the road or background. These 3-D
might be the first step to extract that feature. Latest vertical features are then used as a starting point for
approach in [4] uses the fourier based descriptor for the preceding vehicle detection; by using a symmetry
characterization of shapes for retrieval purposes. The operator, a match against a simplified model of a near
descriptor combines the benefits of the wavelet transform vehicle’s shape is performed using a monocular vision-
and fourier transform. The multi-scale fourier descriptor is based approach that allows the identification of a
formed by applying the complex wavelet transforms to the preceding vehicle.
boundary function of an object extracted from an image.
After that, the fourier transform is applied to the wavelet Within the framework of road obstacle detection, road
coefficients in multiple scales. features can be classified into two classes - Nonobstacle
and Obstacle. An obstacle is defined as something that
A widely used approach for extracting foreground objects obstructs or may obstruct the intelligent vehicle-driving
is background subtraction [6]. The foreground object is path. Vehicles, pedestrians, animals, security guardrails
extracted by subtracting the input image and the are examples of Obstacles. Lane markings, artifacts are
background reference image. The foreground objects are examples of Nonobstacles. A 3D sparse matrix is
retrieved using Snake Algorithm. This will find the pixels constructed on a specific area of the image.
2.2 VEHICLE DETECTION according to Poisson distributions every cycle. The split
Conventional approach used in [6] proposes an image in phase 1 becomes high as the arrival flow late on the
processing system to measure vehicular queues to main road increases, and the split becomes low as the late
approach lanes of an intersection. It identifies the decreases. This control method follows the optional split
vehicular queue length by detecting whether stopping every time for fluctuated inflow patterns.
vehicles exist in each unit area or not. This system also
proposes a signal control method to optimize the signal
split at a critical intersection using the data of vehicular 3.0 system architecture
queues obtained from the image processing system.
Input
The TV camera is installed at a high place such as on a Image
Background Snake
Subtraction
pedestrian bridge at the intersection and takes traffic Algorithm
images in approach lanes with a bird’s-eye view. 10
Database
images of the scene are taken continuously by TV camera VEHICLE Retrieval
and the gray-values of an input image are added to a 16- DETECTION (Template
matching)
bits array memory. The gray-values in the 16-bits
memory are averaged.

This averaging processing offers two advantages Incrementing


number of
• The random noises on images are reduced, Occlusion
Masking vehicles
• Moving vehicles are erased, and only the foreground
stopping vehicles can be extracted.
Displays total Total no. of
The Sobel edge operator is applied to obtained image to count vehicles
detect edge parts between stopping vehicles and road. In
Signal Timer
case of existence of vehicles, the standard deviation of the count Display Decrement Output
count counter (Green
gray-dues becomes high. On the other hand when there is classification
signal)
according to
no stopping vehicle in a unit area, the standard deviation vehicles
is low. This loop is processed and the queue length is
measured on the basis of the total length of the unit areas, Figure 1: Overall Architecture of the system
which are judged, as stopping vehicles exist.

2.3 LANE DETECTION 3.1 MODULES INVOLVED:


Lane detection [7] has generally been reduced to the
localization of specific features, such as lane markings The Architecture design gives an idea of the overall
painted on the road surface. Lane marking localization project design with a modular approach. This project is
can be performed and certain assumptions can aid broadly divided into the following subsystems.
detection and/or speed processing.
Instead of processing entire images, a computer vision SOFTWARE:
system can analyze specific regions (the “focus of
attention”) to identify and extract the features of interest. 1. Background Subtraction:
A system can exploit its knowledge of camera calibration The background in an image is subtracted leaving the
and the assumption of a precise 3D road model (for foreground objects in the frame.
example, a flat road without bumps) to more easily 2. Snake Algorithm:
localize features and simplify the mapping between image Snake is an energy minimizing spline, deforms to any
pixels and their corresponding world coordinates. objects boundary in the image. This is used to find the
pixels or position of objects in the image. A closed loop
2.4 SIGNAL CONTROL snake close to the image boundary is the initial position.
The snake will deform according to the specified
The microscopic signal control method, which adjusts the minimizing energy. We have to specify the number of
signal split at a critical intersection every signal cycle by iterations the snake has to deform, which is minimum
comparing the number of queuing vehicles in approach number of deformation with which the snake finds the
lanes. It measures queue lengths up to 300 m long if the object boundaries. The snake then starts deforming and
each unit area is taken longer and the visibility is good. moving towards the desired object boundary. In the end it
Since the unit area is about 30 m long in that case, the completely “shrink-wraps” around the object.
system measures macroscopically the queue lengths. The 3. Database Retrieval:
number of vehicles arriving in a fixed cycle is fluctuated
Template matching is a simple filtering method of disparity is validated and the pixel in the key image is
detecting a particular feature in an image with an operator assumed to belong to the background. Otherwise, it is
called a template. The template is a sub image that looks labeled as object. The foreground objects are detected as
just like the image of the object. A similarity measure, the difference between the current frame and an image of
which reflects how well the image data, matches the the scene’s static background:
template for each possible template location. The point of
maximal match can be selected as the location of the | Frame–background| > Th (1)
feature.
4. Incrementing: 4.3 ACTIVE CONTOUR MODEL
The count of vehicle is incremented.
5. Occlusion: Active contours were first introduced by Kass et al. [2],
Occlusion is defined as a concept that masks the and were termed snakes by the nature of their movement.
foreground objects to view the occluded object Deform active contours over a shape in an image and
(background object). The overlapping (front image) is measure the similarity between the two upon the degree
masked and the overlapped image is identified by of overlap and on how much energy the active contour
template matching. had to spend in the deformation.
6. Vehicle Detection:
The objects are detected as vehicles by comparing it with Active contours are defined as energy-minimizing splines
pre defined templates in database. under the influence of internal and external forces. The
7. Estimating Total number of Vehicles: internal forces of the active contour serve as a smoothness
The total count of all vehicles is calculated and the traffic constraint designed to hold the active contour together
rate is identified. The final result displays the count of the (elasticity forces) and to keep it from bending too much
vehicle. (bending forces). The external forces guide the active
8. Signal timer count classification: contour towards image features such as high intensity
The counter is set dynamically corresponding to the gradients. The optimal contour position is computed such
traffic rate. If there is less number of vehicles, the counter that the total energy is minimized. The contour can hence
timing is lesser. If there is more number of vehicles, the be viewed as a reasonable balance between geometrical
counter is incremented to wait for a long time. smoothness properties and local correspondence with the
intensity function of the reference image
HARDWARE:
1. Display count & Decrement counter: 4.4 SNAKE
The counter is displayed using LCD display. Timer is Snake is defined as the energy minimizing spline,
decremented to zero. deforms to fit the local minima. A snake is defined as an
2. Output: energy function. To find the best fit between a snake and
Timer is set corresponding to the dynamic counter and the an object's shape, we minimize the energy.
green LED is displayed. 1
Esnake = ∫E internal v(s) + Eimage v(s) + Econstraint v(s)ds (2)
4.implementation 0
Where the snake is parametrically defined as
4.1 INPUT SYSTEM v(s) = (x(s),y(s),z(s)) (3)
The input consists of a simple GUI that consists of a
simple window that contains a GUI button. The Einternal : Internal spline energy caused by
‘Continue’ button will display the output of the system for stretching and bending.
two sets of input.
Eimage : Measure of the attraction of image
The global variables and constants are initialized here. features such as contours.
The program uses many global variables and constants
both for general interface and the core system.
Econstraint : Measure of external constraints either from
4.2 BACKGROUND SUBTRACTION: higher-level shape information or user applied
Background subtraction algorithm is a useful technique energy.
for detecting all the foreground objects in a image and
correcting image defects that are associated with non 4.5 TEMPLATE MATCHING:
uniform brightness, uneven illumination. This is
performed by checking color intensity values at The template matching is used to find the category to
corresponding pixels, if the values match, the background which the tracked object belongs and to find its original
image. If the tracked object is car, the system will find it
only by matching it with pre defined templates.
In this paper, each object in the background-subtracted
image is tracked by finding the object boundaries. The
tracked object is matched with all predefined templates. If
the object matches with any of the template, the original
image of the vehicle is displayed and the count of vehicle
is incremented.

The occluded image will not match with any template


initially. So the pixel of the front portion of occluded
image is matched with pixel of front portion of all the
templates. If the pixel matches, the foreground-occluding
image will be displayed and subtracted from original
occluding image. Then the pixels of occluded image are
matched with corresponding pixels of all templates. If the
pixel value matches, the occluded image will also be
displayed.
Figure 2: Deformed Snake during Iteration
4.6 CONCLUSION: PERFORMANCE PARAMETERS
Occlusion is the situation in which one or more regions
hide from the camera view [5]. It is defined as a concept
that masks the foreground objects to view the occluded INPUT AVG AVG OVERALL
object (background object). TIME RETREIVAL EXECUTION TIME
(SOFTW TIME seconds
ARE) seconds
Occlusion has several advantages: Seconds
 The occluded (hidden) object can also be tracked
for detection INPUT
 Its easy to implement occlusion in two WITHOUT 60 0.01 60.01
dimensional objects. OCCLUSION

Occlusion is not without their drawbacks: INPUT WITH


OCCLUSION(2 65 0.01 65.01
VEHICLES)
The background object may get fully occluded by the
foreground object in this case occlusion concept may not
INPUT WITH
get the occluded image. The worst case is when a truck is OCCLUSION(3 75 0.01 75.01
occluding a car. This seems to be single vehicle to both VEHICLES)
computer vision and human vision too.
Also when the foreground objects camouflage with the
image background that is the object and background is in TABLE 1: Performance analysis
same color so that we are not able to detect the objects
boundary.
Occlusion must be removed in an image to get the clear 6. Conclusion and future work
picture of the object and to get correct results. For
example, here when two cars camouflage with each other, The shape feature is essential in Image Retrieval. It must
conventional approach with occlusion will recognize it as be accurate and compact and it should be invariant to
only one car. Only by removing the occlusion, we will scaling, rotation and certain geometric transformation.
find it as two cars. The snakes have the ability to fit into concavities in the
object. The Active contour model detects whether there is
4.7 HARDWARE an object. If there is an object, then it must be tracked and
A microcontroller 89C51, a 40-pin IC is used to get the checked if there is any occlusion. If occlusion is present,
counter as input and displays the traffic signal the occluding and occluded images must be tracked and
accordingly. displayed. The number of vehicles must be determined
and given to the hardware to set the signal counter value
5 results accordingly.
The figure represented below shows the screen shots of
the snake deformation at 40th iteration.
Future enhancements will be focused on extending this
model to a video frame and tracking the objects
simultaneously. This can also enhanced by applying it to
the Real- time traffic system that is by placing the camera
in middle of a busy or four way junction, monitoring the
vehicles, capturing the image/video, tracking objects and
setting the signal counter value accordingly. The time
consumed waiting for the signal will be decreased and the
traffic movement will be smooth.

7.0 REFERENCES
[1] Gwenaelle Touliminet, Massimo Bertozzi, Stephane
Mousset, Abdelaziz Bensrhair and Alberto Broggi,(2006),
“Vehicle Detection By Means of Stereo Vision – Based
Obstacles Features Extraction and Monocular Pattern
Analysis”,Proceedings of IEEE Transactions on Image
Processing,Vol.15, no.8,pp.2364-2375.

[2] Kass M, Witkin A, Terzopoulos D,(1987), “Snakes:


active contour models,” International Journal of
Computer Vision,Vol.1, pp.321-331.

[3] Chunming Li , Chenyang Xu , Changfeng Gui , and


Martin D. Fox, (2002), “Level Set Evolution Without Re-
initialization: A New Variational Formulation”,
Proceedings of IEEE, Computer Society Conference on
Computer Vision and Pattern Recognition.

[4] Jacinto C. Nascimento, Jorge S. Marques,(2006),


“Performance Evaluation of Object Detection Algorithms
for Video Surveillance,” Proceedings of
IEEE,Vol.8,no.4,pp.761-774.

[5] Yue Fu, A. Tanju Erdem and A. Murat


Tekalp,(2000),“Tracking Visible Boundary of Objects
Using Occlusion Adaptive Motion Snake,” Proceedings of
IEEE Transactions on Image Processing, Vol. 9,
no.12,pp.54-59.

[6] A. Bensrhair, M. Bertozzi, A. Broggi, A. Fascioli, S.


Mousset, and G. Toulminet,(2002), “Stereo vision-based
feature extraction for vehicle detection,” presented at the
IEEE Intelligent Vehicles Symposium, Vol.2,No.3,pp.56-
62.

[7] M. Bertozzi, A. Broggi, M. Cellario, A. Fascioli, P.


Lombardi, and M. Porta,(2002), “Artificial vision in road
vehicles,” Proceedings of IEEE Transactions on Image
Processing, vol. 90, no. 7,pp. 1258–1271.

[8] C. Lawrence Zitnick, Takeo Kanade,(1999),”A


Cooperative Algorithm for Stereo Matching and
Occlusion Detection,”, The Robotics Institute, Carnegie
Mellon University, Pittsburgh, Pennsylvania 15213.

You might also like