Skip to content

levabd/traffic-light-detector

Repository files navigation

Some experiment over traffic-light (Python 2.7 + OpenCV)

Some folders are separate projects

File and folder structure:

  1. detector.py + src -- base detector red, green and yellow detector

Extract some mp4 and run detector proceed <name> or detector init <name>

  1. cameras -- list of compressed camera with traffic lights
  2. docs -- some literature and image for this file
  3. motion-detector -- detect traffic light moving based on Lucas Kanade optical flow

Copy extracted tf2.mp4 to motion-detector and run main.py

  1. tracks -- visualise traffic light moving tracks based on SIFT

Copy extracted tf2.mp4 to tracks and run SIFT_track.py

  1. stabilize -- Stabilise traffic light moving based on Lucas Kanade optical flow and Affine transform

Copy extracted tf2.mp4 to stabilize and run lk_stabilize.py

  1. foreground-extract -- Foreground Extraction using GrabCut Algorithm

Copy extracted tf2.mp4 to stabilize and run foreground-extract.py

  1. template-matching -- Template matching Algorithm

Copy extracted tf2.mp4 to stabilize and run template-matching.py

  1. result -- result videos

You can see short experiments results on the video