JavaLaurence Posted April 30, 2014 at 03:17 PM Posted April 30, 2014 at 03:17 PM A few weeks ago I had the idea to count the cars passing in our street using some TF magic. Initially I thought maybe one of the Distance IR/US would work, but quickly realised that the cars would be out of reach of the detection range. Then I thought, "Sound Intensity" ? A passing vehicle produces neat peaks of noisy sound, and this ought to be enough to create some counting application. A couple of days of software tinkering, and it works ! Screenshot attached. It's far from perfect: a passing tractor was counted as 3 vehicles, and the occasional car that glides past really silently doesn't register at all. But so far, out of the 50 counts I'd say that 47 are real. PS. I bought 2x Sound Intensity, because I was hoping to extract vehicle speed too... that's next. Quote
raphael_vogel Posted May 1, 2014 at 07:48 AM Posted May 1, 2014 at 07:48 AM I would have done this with a reflective light barrier (e.g. http://www.conrad.de/ce/de/product/585418/Quadratische-Lichtschranke-Contrinex-LLK-5050-000-Einweg-Lichtschranke-Sender-Reichweite-15000-mm/?ref=detview1&rt=detview1&rb=1) and the Industrial Digital In Bricklet. I guess this would be 50 out of 50 correct detections. Quote
JavaLaurence Posted May 2, 2014 at 08:42 AM Author Posted May 2, 2014 at 08:42 AM 100% correct identification is always impossible with all low-level sensor approaches. The classic black hose over the road approach also does not count cars perfectly: if you have some kids dancing on the tube, their dancing will trip the detector. A light barrier could be fooled equally easily. Would it count passing pedestrians? Yes, if the beam is horizontal and low enough. So the beam would have to point downwards, so that it goes over the heads of pedestrians..? That approach would have other undesirable side-effects. And so on.. AFAIMK, 100% detection rate is always impossible, so I'm quite happy with a rate in the 95%+. Quote
raphael_vogel Posted May 2, 2014 at 02:15 PM Posted May 2, 2014 at 02:15 PM You are right ;-) What about RasPi + WebCam + OpenCV library? or Realy cool stuff what you can do alreday with (free) software. Quote
JavaLaurence Posted May 4, 2014 at 01:48 PM Author Posted May 4, 2014 at 01:48 PM Yep, pretty cool software. In fact, I know of a few companies who would have paid a fortune for such capacity just 10 years ago. It is amazing what features can be found in free software these days. But briefly returning to the car counting problem. Did you notice how the video analysis URL you posted also did not latch on to the big white truck? So even if you have heavy-duty hardware and software, 100% is just an impossibility. Even putting a human next to a road, and telling him/her to count everything that passes for x hours... you're not going to get 100% accuracy. Google proved this point again with their house numbers recognition efforts: even humans as detectors don't give you perfection. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.