/Traffic-Light-Signal-Detection

Traffic Light Signal Detection Using Python and OpenCV

Primary LanguagePython

Traffic-Light-Detection

Traffic Light Detection Using Python and OpenCV


Traffic light detection(TLD), it has simple python script to detect traffic light, red? green? or yellow ones.

I'm using macOS High Sierra, version 10.13.6

installed Anaconda and created env for python 3

installed opencv version '3.1.0'


I took reference from opencv official doc.

Draw circle

capture video through webcamera or file and write video HoughCircles

Files

code

video download from my google drive

How to run

Download code from my github. unzip downloaded file

Download videos from my google drive and put into videos folder.

Navigate to src directory and run below command

python traffic.py ../videos/NVR_01.mp4 or python traffic.py ../videos/NVR_02.mp4 for video file 01 and 02 respectively.