Coding Questions/Possibility - Cameras - Object Tracking

kerlix

Donator
Donator
Joined
Mar 28, 2010
Messages
294
Reaction score
47
Points
43
Hello,

I was bored and came across an idea. Something more fun than actually useful I guess.

Unfortunately, I possess very little, if any, coding skills.

Basically, I was wondering if it would be possible to use either a dashboard camera or webcam connected to either an Arduino, Rasberry Pi or something else, that would enable to the camera/program to track other vehicles in front of me.

And then use aftermarket parts to create a HUD for my vehicle that would basically highlight the vehicles in view (imagine the Iron Man helmet, only a little more believable). And also, if possible, to detect the closure rate of vehicles, vehicles changing lanes within a dangerous distance, etc. and give an aural and visual warning.


I became curious about this because I drive 5-6 days a week and around 10 hours a day as a medical transportation driver.

I just thought it would be a cool project and I was driving around bored and wondering how to make it cooler and more interesting.


Is this even possible?


Sent from my Moto E (4) using Tapatalk
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,403
Reaction score
581
Points
153
Location
Vienna
Basically, I was wondering if it would be possible to use either a dashboard camera or webcam connected to either an Arduino, Rasberry Pi or something else, that would enable to the camera/program to track other vehicles in front of me.

This is certainly no trivial task. However, many camera drones today - even cheap ones - have a tracking feature for their "follow-me" functionality, so it should be possible to implement a similar algorithm in small micro-computers like the Pi. Perhaps searching in the drone DIY community can yield something?

And then use aftermarket parts to create a HUD for my vehicle that would basically highlight the vehicles in view (imagine the Iron Man helmet, only a little more believable). And also, if possible, to detect the closure rate of vehicles, vehicles changing lanes within a dangerous distance, etc. and give an aural and visual warning.

Drawing to a HUD is "just" a matter of getting the hardware and drivers. Measuring closure rate - or distance - from a single visual input alone is a hard problem IMHO, for various reasons like size measurement, contrast management, perspective correction, etc. I guess it is better solved by using 2 or more visual inputs for parallax effects, just like our brains do it. OTOH, once you have the direction by tracking the object, you could also point a Doppler effect sensor on the object and get a pretty precise closure rate. That would mean one object at a time, though.
 

kerlix

Donator
Donator
Joined
Mar 28, 2010
Messages
294
Reaction score
47
Points
43
I ordered a Rasberry Pi 3 Model B-Plus Ultimate Kit (32GB). Along with a keyboard and Rasberry Pi 8 megapixel camera.

I'm looking into paid, as well as free, classes to try to learn what I'd need to know


Sent from my Moto E (4) using Tapatalk
 

Messierhunter

New member
Joined
Apr 30, 2008
Messages
488
Reaction score
2
Points
0
I don't know any classes to recommend, but there are many great resources available for free online, not the least of which are YouTube tutorials. I taught myself the basics of OpenCV using those resources, and I think that would be the way to go for your project. I personally recommend picking up a dummy's guide to python to get a grasp on the basics of the language, then start picking up more advanced concepts on Sentdex's youtube videos. His OpenCV series is excellent.
Rather than use Haar cascades though, I recommend you also check out his series on tensorflow object detection, it seems much more robust than older Haar-like feature detection.
 
Last edited:

kerlix

Donator
Donator
Joined
Mar 28, 2010
Messages
294
Reaction score
47
Points
43
Thanks guys. I'll definitely be checking all of this out.

Sent from my Moto E (4) using Tapatalk
 
Top