Traffic Light Detection and Tracking in Video for the Prevention of Automobile Accidents
CSEF · 2012 Mathematics & Software
Overview
Objectives/Goals This project aims to develop an algorithm to recognize and track traffic lights in order to warn distracted drivers of their presence. This algorithm hopes to achieve a 94% recall rate and 92% precision rate for red traffic lights and a 96% recall rate and 94% precision rate for green traffic lights. Methods/Materials The algorithm was written in C and used libraries from OpenCV. This algorithm first detected traffic lights within video frames by performing connected component analysis to isolate distinct regions within an image. These regions were then filtered by three criteria: size, aspect ratio, and circularity. The resulting regions are then tracked by opening a search area around their coordinates within the next frame to look for a region of similar characteristics. These regions were found with connected component analysis. The algorithm then draws a colored box over detected traffic lights and issues a beep to alert the distracted driver. This process is iterated for the frames within each video. This algorithm was run on a bank of test videos. After noting deficiencies, methods within the algorithm, thresholds, and other values were changed. Results The algorithm successfully detected and tracked 71 out of 76 total traffic lights in a total of 44 test videos. It incorrectly detected three objects as traffic lights and was unable to detect five traffic lights. The algorithm achieved a precision rate of 93.10% and a recall rate of 93.10% for red lights, and a precision rate of 97.78% and a recall rate of 93.62% for green lights. Conclusions/Discussion The developed algorithm achieved a very reasonable recall and precision rate. However, it did not achieve the recall goal because the algorithm was too strict and excluded traffic lights if conditions were less than perfect. The next steps from now would be to improve upon the algorithm itself by using different methods of detection with shape detectors and machine learning. Tracking can also be improved with LK-Optical Flow. We also hope to develop the algorithm to work in various driving conditions such as overcast, rainy, and nighttime. Most importantly, this algorithm will later be developed to work in real-time.
Summary statement
To develop an algorithm that recognizes and tracks traffic lights in daylight in order to warn inattentive drivers of their presence.
Help received
Dr. Serge Belongie and Dr. Brendan Morris provided valuable technical feedback and support; Mrs. Elaine Gillum and Mrs. Erin Schumacher provided valuable feedback on notebook and presentation.
Competition history
- CSEF 2012
Resources
Related projects
ISEF · 2020
Traffic Signal Color Detection Using the Pixy2 Camera
CSEF · 2009
To Go or Not to Go: That Is the Calculation
CSEF · 2011
Brake Time: A Smart Traffic Alert and Control System for Manually-Driven and Autonomous Vehicles
CSEF · 2017
Traffic Network Management: Novel Approach Using a Deep-Learning System Driven by Dynamic Data and an Adaptive Algorithm
ISEF · 2024
Using Computer Vision to Analyze Traffic
ISEF · 2019
Preventing Left Turn Road Accidents Using Photosensory Technologies and Computer Vision
CSEF · 2019
Stop, Slow, Go!
CSEF · 2012
Autonomous Navigation and Robust Object Detection through Edge-based Optical Flow
Closest projects by meaning, across every fair and year in the corpus.
Browse more like this
Source: California Science & Engineering Fair public projects