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 Mathematics & Software · Entry S1408

Resources

Related projects

Closest projects by meaning, across every fair and year in the corpus.

Browse more like this

Source: California Science & Engineering Fair public projects

Save projects to your library

Sign in with Google to keep track of projects you find interesting, organized into folders. An account also raises your daily allowance for “Has this been done?”, and lets you create a key for the MCP server with a much higher limit than anonymous use. Browsing stays public.

Continue with Google