We propose a technique that can be used for traffic control using image processing. Traffic density of lanes is calculated using image processing which is done of images of lanes that are captured using digital camera. According to the traffic densities on all roads, our model will allocate smartly the time period of green light for each road. We have chosen image processing for calculation of traffic density as cameras are very much cheaper than other devises such as sensors.
- Raspberry Pi
- Web Camera
- GSM Module
- Thingspeak Account
- Python 3.4+
- OpenCV 3.2.0 compiled with Python3 support
- RaspberryPi GPIO Libraries for Python
Tested on Raspbian Jessie.
- Log onto your ThingSpeak account.
- Create a channel.
- Get the API write key for the channel.
- Paste the value in
sample.py - Add the
analysis.mfile to the channel. - Once the script is running on the Pi (directions below) the data can be seen on the ThingSpeak dashboard.
To run the script,
sshonto a Raspberry Pi and clone the repository.- Run
python3 sample.py