News for hackers. Stuff that matters.

Ask HN: What's the best way to detect whether a road is jammed?

I have a webcam looking at a particular narrow bottleneck of road near my house. It's usually either free flowing, or completely jammed for ages, most often due to two wide cars not being able to get past each other leading them to have to reverse and do some weird manoeuvres.

I want to build a system which will output whether it's jammed or not. What would be the best path to go down for this?

( 4 comments | on HN )
Re:Ask HN: What's the best way to detect whether a road is j... by threecoins on Wednesday October 09, 2019 @05:53AM (#21201615)
If the camera is stationary, as a naive approach you can sample the amount of black road area that is visible over a sample time
Re:Ask HN: What's the best way to detect whether a road is j... by spark3k on Wednesday October 09, 2019 @11:10PM (#21210476)
Thanks for the suggestion :) The is kind of semi dirt and blends with its surroundings though. I will keep this in mind as an augmentation maybe.
Re:Ask HN: What's the best way to detect whether a road is j... by runariot on Wednesday October 09, 2019 @05:33AM (#21201513)
You can use OpenCV to detect motion/objects and then calculate their speed/flow.
Re:Ask HN: What's the best way to detect whether a road is j... by spark3k on Wednesday October 09, 2019 @11:17PM (#21210534)
Thanks. I'm going to definitely try this route.