Simultaneous Traffic Management System

Download Full-Text PDF Cite this Publication

Text Only Version


Simultaneous Traffic Management System

Kamya Dhingra

Assistant Professor Department of ECE ADGITM

Hardik Gossian

Student Department of ECE ADGITM

Bhavya Sharma
Student Department of EEE ADGITM

Maninder Bir Singh
Student Department of ECE ADGITM

Abstract- With a sharp increase in the number of vehicles on road, the traffic around the world has become a major problem in metropolitan cities. The inadequacy of current systems to deal with this increased

traffic leads to unfruitful traffic management. To solve this, it is

necessary to use detection and tracking together in such a way that fulfills the requirements of operation in real-time. A low-cost camera- based algorithm to control traffic flow on a road. The algorithm is based on mainly three steps: vehicle detection, counting, and tracking. Background subtraction is used to isolate vehicles from their background, Kalman filter is used to track the vehicles and Hungarian algorithm is exploited for the association of labels to the tracked vehicles. This algorithm is implemented on both daytime and nighttime videos acquired from CCTV cameras and IR cameras. Experimental results show the efficacy of the algorithm

KeywordsTraffic Monitoring, Surveillance, Image Processing, OpenCV, Traffic Monitoring, Kalman Filters


    Nowadays people prefer to use their vehicle instead of public transport which results in huge traffic flux on roads. It leads to problems like traffic congestion, air, and noise pollution, road- rash etc. therefore a real-time traffic management system is important to alleviate such issues. With ubiquitously available cameras, vision-based systems are more suitable and lower cost solutions than loop detectors (which require massive hardware to automate the traffic flow) and they also minimize the number of traffic wardens [1]. Moreover, the cameras may also be used for surveillance purposes.

    Nowadays, vehicle traffic monitoring is an important civic application for road control, intelligent roads, traffic control, and incident detection and improving urban congestion. There are several techniques for monitoring traffic in the literature. Traffic monitoring includes various parameters such as vehicle count, vehicle classification, the distance between two vehicles, speed of a vehicle, range, etc. In this paper, we are focusing on various methods of vehicle counting that help in traffic monitoring. Currently, the most sophisticated vision-based approaches to traffic flow monitoring combine information from cameras with other technologies, such as tags mounted on vehicles, laser scanners, or globals that replicate the 3-D shape of the vehicle or

    Bhavya Sharma Student Department of EEE ADGITM

    Maninder Bir Singh

    Student Department of ECE ADGITM

    the Positioning System (GPS), to estimate the direction of the casted shadows [2]. A surveillance camera was only used to detect the speed of the vehicle and predict whether the driver was over speeding or not but Instead of limiting the usage of the camera for these purposes, the images from the camera can be analyzed by employing image processing technology. This paper suggests algorithms for Vehicle counting by using image processing.


    Fig. 1 Block diagram of the proposed system

    Jang Hyeok et al. in [2] employs Gaussian Mixture Background Model along with Pyramidal Lucas Kanade method to first extract the objects and then measure the displacement of an object in two consecutive frames of a video. The Lucas Kanade method is a differential method used for optical flow estimation. In this method, since one of the two frames is taken as a reference, the problems like aperture focusing and therefore correspondence issues arise which may yield results that are quite uncertain. In [3], for background subtraction and image segmentation, first frame in a video file is assumed to be a reference background. For the elimination of background, video input is first converted to frames and then the difference between the current frame and background is calculated. This difference is then used to eradicate the pixels having same values. This algorithm tracks every object that appears to be displaced in the next frame as a vehicle even if it is not a vehicle thus yielding uncertainty. In [4], frame differencing method for vehicle detection is discussed in which sub-features of a vehicle account for the detection of vehicle.

    A wavelet analysis is almost similar to Fourier analysis in that the target function is represented in terms of orthonormal bases thus providing a non-redundant representation of an input image. In wavelet pyramidal decomposition process discussed in [5], each frame of an input video, after passing through series of filters (high pass and low pass) and down sampling, is compressed. In this technique, the standard Extended Kalman filter implemented on traffic video sequences. The technique proposed is based on motion detection by background subtraction and mean- shift blob tracking. Firstly, the motion image is extracted from the video sequence. Then, the mean shift algorithm is used to track the blobs through the sequence.

    Fig. 2 Flowchart for vehicle counting

    Vehicle counting is done by Background subtraction and finding the centroid. A reference frame is initially used and considered as background information. While a new object enters into the frame, is detected by background subtraction. The foreground information and background information are

    identified using the reference frame as background model. [5]

    Gaussian mixture model which has an advantage of detecting more minor details in foreground extraction because this method basically computes the PDF corresponding to every pixel in a frame which means that it is more flexible in terms of cluster covariance. Although there are many other filters better than Kalman filter, the Kalman filter is employed for tracking in proposed system since it has an advantage over all other trackers that it can correct its assumptions based on prior and posterior knowledge.


    Fig. 3 Main Block Diagram

    This is a unique system which considers two inputs for calculating the output. Basically first input is taken from the drivers mobile application which uses the mobile location to send data to the server that, the car is present at a particular intersection. The density is such drivers are taken into consideration from this input. The second input is taken from the cameras fixed on the traffic lights. Using computer vision number of cars on the intersection can be calculated.

    The data from both the inputs is considered and after applying Kalman filter on it, an approximate value is predicted that is at last used for setting the timers of traffic lights to prevent traffic congestion.

    Fig. 4 Road Diversion



Python 3.6

Fig. 5 Server Block Diagram


The ATmega328P is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATmega329P/3290P achieves throughputs approaching 1MIPS per MHz allowing the system designer to optimize power consumption versus processing speed.

7 Segment

A seven-segment display (SSD), or seven- segment indicator, is a form of electronic display device for displaying decimal numerals that is an alternative to the more complex displays. Seven-segment displays are widely used in digital clocks, electronic meters, basic calculators, and other electronic devices that display numerical information.


Kalman Filter

Klman Filter is one of the most important and common estimation algorithms. The Kalman Filter produces estimates of hidden variables based on inaccurate and uncertain measurements. As well, the Kalman Filter provides a prediction of the future system state, based on the past estimations. The filter is named

Python is an interpreter, object-oriented, high- level programming language with dynamic semantics. Its high- level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python’s simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.

Atmel Studio

Studio 7 is the integrated development platform (IDP) for developing and debugging all AVR and SAM microcontroller applications. The Atmel Studio 7 IDP gives you a seamless and easy-to-use environment to write, build and debug your applications written in C/C+

+ or assembly code. It also connects seamlessly to the debuggers, programmers and development kits that support AVR and SAM devices.

Android Studio

Android Studio is the official Integrated Development Environment (IDE) for Googles Android Operating System, built on JetBrains IntelliJ IDEA software and designed specifically for Android Development. It is available for download on Windows, macOS and Linux based Operating Systems. It is a replacement for the Eclipse Android Development Tools (ADT) as the primary IDE for native Android application development.

after Rudolf E. Kalman (May 19, 1930 July 2, 2016). In 1960, Kalman published his famous paper describing a recursive solution to the discrete-data linear filtering problem.

Fig. 6 Kalman Filter Simulations

Image Processing (OpenCV)

OpenCV (Open Source Computer Vision Library) is an open source computer vision and machine learning software library. OpenCV was built to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in the commercial products. Being a BSD-licensed product, OpenCV makes it easy for businesses to utilize and modify the code.


Fig. 7 Android App

In the above Android Application screenshot, the user is allowed to use five major choices while accessing this application. First, the Traffic Update, when user clicks this button the traffic around the users real-time location gets updated and this make user ease to find its shortest along with less congested way to its journey, in short this gives the most appropriate way from the starting to destination point. Second, Stop Updating Location, by clicking on this button, user forcefully stops the real-time updation of the traffic. Third, Show Live Traffic, by sliding it to ON state, it gives the user live traffic status with respect to the users live location. Fourth and fifth are Activate Battery Saver and Activate Data Saver Mode, by using the later mode, it saves the battery of the system user and other mode deduces the usage of the internet, which hence allows the system to run in the long term and cuts the cost as well.


Through this research project we were able to develop a location and camera base system to avoid traffic congestion due to traffic lights which dont have any feedback mechanism to know amount traffic on each side at any

intersection. The data is received by the server from the camera and the mobile application. Both the inputs are given in the Kalman filter. The outputs from all the lanes are then compared. After comparison the calculated data is sent to the traffic light. The timers for the traffic light are set according to the received data.

Fig. 8 Real Time Video Processing using OpenCV

Fig. 9 Scanning and spotting the vehicles

Fig. 10 Showing the coordinates and number of vehicles REFERENCES







[7]. DeviceDoc/Atmel- 8021-AVR-ATmega329P- 3290P_Datasheet.pdf

[8]. Gupte, Surendra, et al. Detection and Classification of vehicles, ITS Institute of Minnesota, 2002.

[9]. Hadi Raad Ahmed, Sulong Ghazali, George Loay Edwar. Vehicle Detection and Tracking Techniques: A concise review, International Journal (SIPIJ), Vol. 5, No.1, (2014).

[10]. Wen Xuezhi, et al. Improved wavelet feature extraction methods based on HSV space for vehicle detection, IAPR conference on machine vision application, Tokyo (2007).

Leave a Reply

Your email address will not be published. Required fields are marked *