This projects is a step-forward towards the problem of Traffic in our country.
The project is easy to set up. Just download the .xml files (you can use any one of them) and python file on your system. Download the required libraries
You will need only a single library of Python - OpenCV
- Make a classifier for 'Cars'.
- Define Vehicle Detection functions for the four junctions of Traffic Light.
- Check the count of the cars on each side of the junction.
- Then according to the count of the cars, estimate the time for the green light at every junction.
- This time is revised every time the green light of the particular junction goes off.
- You need to add an Rasberry pi and four pi cams for each side of the junction to take live pictures of the traffic (Obviously this is needed to be replaced with the CCTV cameras on the junction).
- The image processing can be improved using machine learning.
This helps in deciding the green light's on time and can really help in decreasing the traffic.