LightDetect

A vision-based system that detects traffic light colors

LightDetect 1
LightDetect 2
LightDetect 3

Project Description

In this project, I developed a system to detect the colors of traffic lights. Using image processing techniques, I created a software capable of accurately detecting red, yellow, and green colors. The main goal of the system is to identify the traffic light in images and determine which color corresponds to the correct signal, i.e., red, yellow, or green. When these colors are clearly visible on the traffic light, the system detects each one and encloses it within a rectangle. This ensures that the correct light is detected. However, sometimes nearby objects with the same color as the traffic light can be mistakenly detected and enclosed within the rectangle.

As a result, the process of distinguishing colors and detecting the correct light was quite successful. The code I wrote is able to separate the colors in the traffic light accurately, thanks to the threshold values I set. However, in some images, similar colors around the light can cause errors in the results. Although this only leads to incorrect shape detection, the color detection part works flawlessly. The system correctly separates each color in the image and accurately encloses the relevant light within a rectangle. This project lays the foundation for a system that can accurately detect traffic lights.

Technologies Used

MATLAB
Image Processing
Color Masks
Bounding Boxes
Git
View Code