Sick of cars coming too close when out riding your bike?
I want to build a wide-angle lens rasp pi camera to capture cars coming too close. More than this, I want to be able to detect exactly how close they are to my bike with some sort of radar detector.
I will write some software to overlay the captured video with a “closeness” indicator that gets recorded in real time.
But, I’ve never built anything using rasp pi yet. I am a Ubuntu AI dev - so, it shouldn’t be too hard right?
Thanks for making a post and welcome to the forums!
Probably the simplest way to do it would be a distance sensor to a microcontroller set up as a proximity sensor. When an object is in detection range it sends a trigger to a Pi’s GPIO pins - then you can do whatever you want in software start recording, or have a rolling recording like a dashcam and preserve the preceding seconds.
Depending on the sensor you go with, you might be able to go straight from the distance sensor to your Pi using something like this:
PS, this one features in a recent episode of the factory with Michael:
For the video recording, I’d suggest looking into code written for wildlife observation cameras like this:
re the proximity sensor - that sounds neat - but I want to be able to identify what part of the passing vehicle is at the closest distance and draw a line from the centre of the camera image to that point showing the actual distance - all in real time. I don’t think the proximity sensor is going to be sufficient. Needs to be more like a lidar sensor?
ie I don’t just want to use a proximity sensor to detect something within a given distance - rather, I want to be able to measure and display that distance as an overlay on the video feed - which all gets recorded in realtime - ie not just triggering the video to turn on - that can be done manually - ie when one sets out on a ride
I’d say that will be your best option for that application, you could possibly use another form of distance sensor and then by mapping the maximum distance over time within a given range determine the shape and position of the object, but personally, I’d just go with either a camera with some image recognition software running or lidar as they’re much more suitable for that kind of application.