Monitor Traffic Data with WeCount Traffic Sensors based on Raspberry Pi

Monitor Traffic Data with WeCount Traffic Sensors based on Raspberry Pi

Traffic flow is one of the most important things that a city planner needs to understand while developing a city. It is important for a city planner to look for the data of the number of vehicles in the city to plan a better route and path for them. Most of the scientists and data analysts are working with the states to plan the cities as per the need of the people to make the process smoother in the nation. There are governments that are using some expensive technology to execute the planning of the city. In the case of the WeCount project, an affordable solution has been found and provided to the states that is based on Raspberry Pi. The MagPi Magazine has covered the interview of the creator of WeCount, Kris Vanherle, that made many people get attracted to the project.Monitor Traffic Data with WeCount Traffic Sensors based on Raspberry Pi

Isn’t it cool to have a cost saving and powerful technology in our hands to monitor the traffic in an efficient way. It would save a lot of money from the government that would be used for other things in the nation. Now let’s start understanding a bit more about the project!!!

About WeCount

In a nutshell, the project is based on counting vehicles like the game that we play during our travels. Rather than stand a person on the road to count every vehicle on the road, Kris Vanherle came on developing a solution WeCount to do this for making the traffic smoother. He took the help of the citizens to monitor the traffic by inviting the public to place a sensor in their home, peering out of the window.  “Data collection also becomes more affordable for local authorities and citizens can even help interpret the data,” he adds. Engineering and emissions expert Kris Vanherle says that the project becomes easier with more people that take initiatives to do the job perfectly. WeCount Traffic Sensors based on Raspberry Pi

Cloud data upload

There are 6 European cities, Madrid, Barcelona, Dublin, Cardiff, Ljubljana, and Leuven , that have accepted this technology and work is in process. All the data from the people uploads on the cloud which enables the creator to monitor the traffic with all the accumulated data. There are initiatives like pollution, safety, active travel, noise, and speed in which one can use this data to solve these issues in a more informed manner. Monitor Traffic Data with WeCount Traffic Sensors based on Raspberry Pi


At the start of the project, all the sensors were built according to Raspberry Pi 3B+ computers but after some time the production unit used Raspberry Pi 3A+. “These already provide the required processing power and memory and we found we did not need the extra ports of its big brother after the initial development phase,” explains Dr Péter I. Pápics, a researcher at Transport & Mobility Leuven.

He revealed that the project uses standard Python libraries combined with OPENCV for the image processing in an efficient manner and algorithm of object tracking.  “We need to maintain the necessary frame rate, which is around 30fps, to capture even the fastest cars over at least a few frames,” he continues.

“So we are using the most simple background extraction and contour detection methods to find moving objects on each frame and then a tracking algorithm to identify and track them over their visibility period stretching across a set of consecutive frames.”

A Raspberry Pi can operate as a powerful and advanced wireless hotspot with a simpler user interface than any other single board computer.  “After ten minutes, the hotspot mode is automatically disabled and Raspberry Pi attempts to connect to the local Wi-Fi,” says Péter. “If successful, the actual traffic monitoring script is activated and various properties of the detected objects are periodically transmitted to our services where data processing, classification, and aggregation services produce the data that’s available on our website or via the public API.”

Response of the citizen

The creating team was so overwhelmed by the response  of the citizens as most of the people want to come forward for the solution. It came as a tsunami of the responses of the citizens that helped the team to build a better flow of traffic and other things in the city. The cities involved are enthusiastic. Prof Enda Hayes, from the University of the West of England in Bristol, says he was keen to include Cardiff because it has immeasurable potential for more active travel. “The city’s inhabitants are very car dependent and the city experiences a large influx of daily commuters with the majority of these journeys – some 80 percent – by car,” he says.

Sensors of the project 

These sensors are also designed for counting the pedestrians and cycles that improve the data system for the team. “I delivered one to a volunteer who lived on a dead-end street and found out pedestrians and cyclists were using the street as an active travel rat-run to get to a local train station. He wanted to convert the street into a Low Traffic Neighborhood.”

Kris says the data also allows researchers to observe how traffic behaves if lanes are closed on adjacent streets and it’s been used to increase compliance to speed limits. “WeCount empowers citizens and anyone who wants to join can do so because the platform is open,” he says.


Leave a comment

Your email address will not be published. Required fields are marked *

Please note, comments must be approved before they are published