Measure Speed With Raspberry Pi + OpenCV + Python

preview_player
Показать описание
Actively determine speed of objects of any size (be it a vehicle, person, or matchbox car) via a live feed. Then use the object's speed to control GPIO!

Make sure to use the Previous Raspberry Pi 'Buster' OS with this Guide.

Related Information

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. By the time I'm done here we will be able to use the video data coming in to determine accurately the speed of moving objects. Open-CV, which is a huge resource that helps solve real-time computer vision and image processing problems, will be used here to determine what is a moving object. The open-source software will then compare two photos and (from some trigonometry and known distances) infer the speed of that object. Then! It will take the second compared image, provide it with a timestamp, slapping the file location and 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 and are stored indefinitely on the Pi. Then having all that under your belt I will take it a step further and use the recorded speed of the object to control physical hardware (in this case whenever a recorded object goes faster than 0.5km/h it will turn on a LED light). A huge thank you to Claude Pageau whose created the amazing fully fledged speed camera software, it is already brilliant and there is just so much potential to take projects to the next level.

Core Electronics is located in the heart of Newcastle, Australia. We're powered by makers, for makers. Drop by if you are looking for:

0:00 Intro
0:12 Video Overview
0:27 Open-CV and Software Features
1:03 A Glimpse of the Pay-Off
1:10 What You Need
1:43 Initial Set Up and Terminal Commands
4:11 Best Way to Run the Code
4:39 Demonstration!
5:12 Configuration and Live Preview
6:13 Calibrate Software
7:50 Camera Settings
8:34 GPIO Control Via 'High Speed Activity'
10:00 Acknowledgements
10:10 Outro
Рекомендации по теме
Комментарии
Автор

Exactly what I needed, as working on a similar project. Thanks

aaronag
Автор

It'd be cool if this could add the info into a csv file too.

aled
Автор

Thanks for the step by step info. Is it possible to use a regular USB camera for these projects ?

danyf
Автор

Hi, thanks for this great guide and write up. I've got the system up and running but having issues where only the slower moving cars and pedestrians are being picked up. I have adjusted the red box to only cover the road, and using identical hardware (Pi4B-8GB and PiHQ cam). What settings can I play with to increase the ability to capture faster moving vehicles? I can't move camera further away. Cars are roughly 10m away. Thanks

jimherefordbmx
Автор

Theory question. Would a camera based system be as effective as a radar or laser system at detecting distance between a lead vehicle? Also curious about rate of distance change?

dynasty
Автор

Could this project change to USB webcam?

zoyamchuang
Автор

I am trying to make a similar system to track the exit velocity and launch angle of a baseball being hit off of a tee. Would this be able to measure object's velocity and position of a quick moving object (around 100mph)?

christopherzaino
Автор

Hello and thank you for going through this. I have this up and running and have been tweaking it to get the speed as accurate as possible. I am having an issue where the camera is taking multiple photos of a vehicle as it goes by. How do I reduce that so it calculates just one average? I’m running this in an Orange. I had it on a RPi but I do not think it was as smoothing. The Orange is running it really well. Any help would be appreciated!

MrEspeediE
Автор

i need help with genereic web cam, i saw some options in settings, where at present its set to pilibcam, and can be changed to usbcam, and doing so didnt do anything.

adlernunez
Автор

what camera module model you have used sir. pls reply with the model number and other essential details on additional components needed for implementation .what kind of camera module is suitable if it is to be implemented in road?

thank you

rangakaarthi
Автор

at 4:27 when i try to open menubox, it says permission denied, do you know why?

olliewang
Автор

If I want to measure the speed and revolution of a baseball throughout the whole flight, can you recommend me a camera that can do that?

anghanquan
Автор

Is it possible to scan a street with 100 different cars a day?

faulio
Автор

Would this software work with a car driving towards the camera vs perpendicular to it? working on a speed sign with speed display for my neighborhood. Thanks!

rossmischnick
Автор

what are the speed limitations on this if i was to replace the car with say a golf ball?

SandbagG
Автор

Hello, can raspberry Pi face detection integrate with ANFIS?

azzezza
Автор

Hy is it possible to run rasp model b 1 GB Ram and can I use 5 doller raspberry pi cam?

TARUN__
Автор

5:00 "ip address : 8 o 8 o", nope, 8080, no letters, also use tab completion for a filename in the current directory

jyvben
Автор

Can we measure the speed of the ball using this software?

abhinigam
Автор

Bro is Conor Murphy the bodybuilder your bro ? 😮

edypeqk