OpenCv based Traffic Light Control System using Python

8,500.00 Exc Tax

An Intelligent Traffic Light Management system

100 in stock

SKU: An Intelligent Traffic Light Management system Categories: ,



Traffic signals are essential to guarantee safe driving at road intersections. However, they disturb and reduce the traffic fluency due to the queue delay at each traffic flow. In this work, we introduce an Intelligent Traffic Light Controlling (ITLC) algorithm. This algorithm considers the real-time traffic characteristics of each traffic flow that intends to cross the road intersection of interest, whilst scheduling the time phases of each traffic light. The introduced algorithm aims at increasing the traffic fluency by decreasing the waiting time of traveling vehicles at the signalized road intersections. Moreover, it aims to increase the number of vehicles crossing the road intersection per second.


In modern life we have to face with many problems one of which is traffic congestion becoming more serious day after day. Traffic flow determination can play a principle role in gathering information about them. This data is used to establish censorious flow time periods such as the effect of large vehicle, specific part on vehicular traffic flow and providing a factual record of traffic volume trends. This recorded information also useful for process the better traffic in terms of periodic time of traffic lights. There are many routes to count the number of vehicles passed in a particular time, and can give judgment of traffic flow. Now a day’s camera-based systems are better choices for tracing the vehicles data. This project focuses on a firmware-based novel technique for vehicle detection. This approach detects the vehicles in the source image, and applies an existing identifier for each of the vehicle. Later it classifies each vehicle on its vehicle-type group and counts them all by individually. The developed approach was implemented in a firmware platform which results is better accuracy, high reliability and less errors. Traffic lights play a very significant role in traffic control and regulation on a daily basis. Using MATLAB the density of the roads is determined and the microcontroller changes the duration of green light given for each road as per the output after image processing.


The traffic lights used in India are basically pre-timed wherein the time of each lane to have a green signal is fixed. In a four lane traffic signal one lane is given a green signal at a time. Thus, the traffic light allows the vehicles of all lanes to pass in a sequence. So, the traffic can advance in either straight direction or turn by 90 degrees as shown in Fig.1. So even if the traffic density in a particular lane is the least, it has to wait unnecessarily for a long time and when it gets the green signal it unnecessarily makes other lanes wait for even longer durations.

An Intelligent Traffic Light Management system-1


In this system we are going to implement crowd based traffic light signal,lane will be get open on the basis of crowd at the desired lane.It is identified by the capturing the vehicle crowd images in the lane and identifying the number of vehicles in that desired lane.


An intelligent traffic light management system



Pre-processing is a common name for operations with images at the lowest level of abstraction — both input and output are intensity images.o The aim of pre-processing is an improvement of the image data that suppresses unwanted distortions or enhances some image features important for further processing.


Background subtraction, also known as foreground detection, is a technique in the fields of image processing and computer vision wherein an image’s foreground is extracted for further processing (object recognition etc.). Background subtraction is a widely used approach for detecting moving objects in videos from static cameras. The rationale in the approach is that of detecting the moving objects from the difference between the current frame and a reference frame, often called “background image”, or “background model”. Background subtraction is mostly done if the image in question is a part of a video stream. Background subtraction provides important cues for numerous applications in computer vision, for example surveillance tracking or human poses estimation. 


  • Python
  • Opencv
  • Numpy



In this modern era as the population is increased rapidly the usage of vehicles has also increased tremendously. The cause of it is heavy traffic. In order to avoid this problem it is better that we flow new communication methods such as image processing based intelligent traffic controlling and monitoring system using ARDUINO. By using this method we can get the details about information about vehicles in particular junctions through internet access. This is more beneficial for the emergency travelling. 


[1] Vikramaditya Dangi, Amol Parab, “Image Processing Based Intelligent Traffic Controller”, Undergraduate Academic Research Journal (UARJ), ISSN : 2278 – 1129, Volume-1, Issue-1, 2012.

[2] Raoul de Charette and Fawzi Nashashibi, “Traffic light recognition using Image processing Compared to Learning Processes”.

[3] Mriganka Panjwani, Nikhil Tyagi, Ms. D. Shalini, Prof. K Venkata Lakshmi Narayana, “Smart Traffic Control Using Image Processing”.

[4] Shiu Kumar”UBIQUITOUS SMART HOME SYSTEM USING ANDROID APPLICATION” International Journal of Computer Networks & Communications (IJCNC) Vol.6, No.1, January 2014

[5] M.Fathy,M.Y.Siyal,”An image detection technique based on morphological edge detection and background differencing for real time traffic analysis,” pattern recognition letters,vol-16,pp.1321-1330,1995.


There are no reviews yet.

Be the first to review “OpenCv based Traffic Light Control System using Python”

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.