The estimation of road traffic density plays a vital role in transportation systems, as it provides valuable insights for traffic management, infrastructure planning, and congestion control. Accurate estimation of traffic density enables authorities to make informed decisions, optimize traffic flow, and improve overall road safety. Traffic density estimation based on block variance is a simple but highly accurate approach.
Select 4 points of lane in order top left --> bottom left --> top right --> bottom right. If the road has more than 2 lanes, choose in order (top left, bottom left) from left to right
There are a few parameters you need to pay attention to:
- Path of video
- Number of blocks for each lane
- Number of frames for background initialization
- Increment of blocks (Because distant vehicles are small and nearby are large, the blocks in the back need to be larger than the previous ones in a certain ratio)
Each frame is classified as light, medium, or heavy. We choose the category to which the maximum number of frames from the video sequence has been classified.
Output.mp4
- Run main.py with parameters
- Select lane
- Garg, K., Lam, S.-K., Srikanthan, T., & Agarwal, V. (2016). Real-time road traffic density estimation using block variance. 2016 IEEE Winter Conference on Applications of Computer Vision (WACV). doi:10.1109/wacv.2016.7477607
- Garg, K., Ramakrishnan, N., Prakash, A., & Srikanthan, T. (2019). Rapid and Robust Background Modeling Technique for Low-Cost Road Traffic Surveillance Systems. IEEE Transactions on Intelligent Transportation Systems, 1–12. doi:10.1109/tits.2019.2917560