Core Electronics Forum

Detect Speed with a Raspberry Pi, Camera and OpenCV

Hey all, newest machine learning tutorial with a Raspberry Pi handheld computer all polished up on how to "Detect Speed with a Raspberry Pi, Pi Camera and OpenCV".

After learning from this you will be able to actively determine the speed of objects of any size (be it a vehicle, person, or matchbox car) via a live feed easily. You will even be able to use the object’s speed to control GPIO directly! Too fast and you can set off the alarms. Cameras in combination with artificial intelligence create arguably the most powerful sensor you can ever put on a Raspberry Pi and it has never been easier to try it out yourself.

As the object travels in front of it machine learning will take over to determine both the moving object and its speed (in km/h or mp/h). The Open-Source software compares two photos and (from some trigonometry and known distances) infers the speed of that object. Then it will take the second compared image, provide it with a timestamp, file location and stamp the speed of the object onto it, save it and upload it to a local network website. These photos can then be accessed through a website from any machine on your local network. This guide is taking a fully-fledged speed camera for monitoring cars and retrofitting it to all kinds of speed monitoring tasks.

Read More