Vehicle speed determination from video

erkme73

BIT Beta Team
Joined
Nov 9, 2014
Messages
1,540
Reaction score
1,412
I would love to know how fast cars are driving past my home. With a 2.5yo and 7mo, what used to be of no concern to me, has suddenly taken on a new perspective.

Assuming I knew the precise distance between two points, and calculated the time to travel between them, I'm sure I could manually calculated it as needed.

But wouldn't it be neat if such a plug-in or other overlay function existed? Kind of like the red square that follows objects in the MD. Drawing two virtual lines and having BI (or a plug-in) calculate speed, real-time, and the overlay that data somehow? That would be awesome.

Any ideas? Who do I need to bribe? BP? Mike?
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
Ive seen the functionality before in License Plate Recognition, would be pretty cool for BI..

Here is some software I found with a quick bit of google fu: http://www.amazon.com/Speedcam-Speed-Radar-Camera-Radargun/dp/B00EQ7FLRA/ref=sr_1_5?ie=UTF8&qid=1435906469&sr=8-5&keywords=radar+gun

I think good results are going to require a high framerate, this is where a 3ch camera would be handy.. full hd for recording, low hd for mobile devices, and low resolution high FPS for speed/alpr

but something like this might be cheaper, easier and more usefull: http://www.amazon.com/Bushnell-Velocity-Speed-Colors-vary/dp/B0002X7V1Q/ref=sr_1_1?ie=UTF8&qid=1435906469&sr=8-1&keywords=radar+gun

If you have repeat speeders who like to blast through durring inappropriate times I find you can get results by jumping out into the street aggressively infront of them.. warn them you'll do it every time you see them speeding and the'll get the idea.. especially teenagers.. If they expect someone to jump out of nowhere and try to make them wreck the'll slow down a lil bit :)
 
As an Amazon Associate IPCamTalk earns from qualifying purchases.

toomscj7

n3wb
Joined
Jul 2, 2015
Messages
25
Reaction score
19
I've done it with Python code in the past and took multiple snapshots of the car one motion happened. I got it within about 5-8mph. My camera was at an angle on the road so it was hard to get much more accurate. If you had a camera face the road head on it would be easier to dial in.

When I get some free time I am going to make it interface with Hikvisions so it updates the overlay immediately with the speed of the last object.


 

Attachments

erkme73

BIT Beta Team
Joined
Nov 9, 2014
Messages
1,540
Reaction score
1,412
I've asked around about this software before but no one really has an experience, ive been waiting on the new release to see what it offers but appears to have been delayed.
http://www.raserabwehr.de/
That seems to be the only turn-key product for the consumer-level user. I was very close to pulling the trigger, but couldn't seem to find any reviews or discussions on how well it works.
 

MikeyOnline

Young grasshopper
Joined
Feb 23, 2016
Messages
72
Reaction score
18
I do this now, but manually. I drive the speed limit (30 mph) and recorded the number of frames when the car passes by two trees near the left and right of the frame. At 30, it's exactly 14 frames. So when a teen flies by in only 7 frames, he's going 60. So you don't need a high frame rate. Just more distance. Considering you can estimate partial frames if the car ends up a little before or after the markers, I can get close to 5 mph accuracy even at 60 to 70 mph.

I know, would be nice to have it automated and even better to get speed alerts! But I'm enjoying being able to pick out the problem kids in the hood.

Mike
 

erkme73

BIT Beta Team
Joined
Nov 9, 2014
Messages
1,540
Reaction score
1,412
I do this now, but manually. I drive the speed limit (30 mph) and recorded the number of frames when the car passes by two trees near the left and right of the frame. At 30, it's exactly 14 frames. So when a teen flies by in only 7 frames, he's going 60. So you don't need a high frame rate. Just more distance. Considering you can estimate partial frames if the car ends up a little before or after the markers, I can get close to 5 mph accuracy even at 60 to 70 mph.

I know, would be nice to have it automated and even better to get speed alerts! But I'm enjoying being able to pick out the problem kids in the hood.

Mike

I'm glad you posted to this thread, Mike. It reminded me to provide an update. I actually sprung the $60 or so for the German program at Raserabwehr - but it's a dud. At least for me. It supposedly can work with IP cameras, but the developer doesn't reveal that it's a poor fit until after you buy it... or I didn't find it until then. I sent him an email, and never received a response. I'd have contested the charge with my CC, but never got around to it.
 

zero-degrees

Known around here
Joined
Aug 15, 2015
Messages
1,359
Reaction score
847
I'm glad you posted to this thread, Mike. It reminded me to provide an update. I actually sprung the $60 or so for the German program at Raserabwehr - but it's a dud. At least for me. It supposedly can work with IP cameras, but the developer doesn't reveal that it's a poor fit until after you buy it... or I didn't find it until then. I sent him an email, and never received a response. I'd have contested the charge with my CC, but never got around to it.
This is disappointing as I've kept my eye on that software for the last several months considering it, however based on the limited interactions with the developer and slow responses to a few questions I always held off waiting on someone else to take the leap. Here is the answer I guess I expected... Yet the developer told me he was using it with HIK IP cameras with no problem.
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
OpenALPR has speed detection functionality built in, however it requires two cameras reading plates spaced over a distance so would only really work on a long private drive/road or if you teamed up with a neighbor a block or so away.
 

pozzello

Known around here
Joined
Oct 7, 2015
Messages
2,270
Reaction score
1,117
Ooooh! I already have 2 cams set up for use with OpenALPR. They are pointing in opposite directions to get cars coming and going
(in CA, you're supposed to have both front and back plates, but not everyone does...) Wonder if the speed detection works with
that sort of setup, or if it requires cams facing the same way? Will look into how that works... Thanx!
 

jtmeece

n3wb
Joined
May 20, 2016
Messages
1
Reaction score
1
I have this software and it works amazingly well...With a USB webcam. Just tried today to add an IP Camera and it has not been going well. I have an email in with the developer for support. Hopefully I can get this IP Cam to work.
 

Kawboy12R

Known around here
Joined
Nov 18, 2014
Messages
1,771
Reaction score
609
Somebody wrote their own implementation ages ago. I can't remember who though. Rory maybe? Soundy? If you remember these guys posting you've been around a while. One of the points that came up was that cars in different lanes gave different speeds so you needed a fudge factor for the other lane after it was calibrated for one lane.
 

IpCamManCf

Young grasshopper
Joined
Feb 27, 2016
Messages
39
Reaction score
2
I've done it with Python code in the past and took multiple snapshots of the car one motion happened. I got it within about 5-8mph. My camera was at an angle on the road so it was hard to get much more accurate. If you had a camera face the road head on it would be easier to dial in.

When I get some free time I am going to make it interface with Hikvisions so it updates the overlay immediately with the speed of the last object.


Any updates on this? I am also very interested in this as others have mentioned.

I currently pretty much only further investigate (manually review footage from two ip cams with a road view) individuals I witness repeatedly driving like a bat out of hell and what not, so something such as this could certainly come in handy.
 

Dodutils

Pulling my weight
Joined
Dec 10, 2016
Messages
451
Reaction score
166
If you do a bit of electronic you can buy and hack some Speed Gun toy (they are pretty accurate) to make it communicate with BI (or whatever software) and record timestamp of a detected speed > xxx
 

IpCamManCf

Young grasshopper
Joined
Feb 27, 2016
Messages
39
Reaction score
2
You asked for "video" detection you could read this project with RasPi + Python + OpenCV Car Speed Detector

But here is a sample of real Speed Gun toy hack project Radar Speed Detector | Make:
I currently have an un-utilized raspberry pi 2 & 3 I've tinkered with and those are interesting projects that could be a possibility so I may consider them in possible future projects. Although and at least in the near future, I would still prefer to utilize a s/w based solution that could be integrated with BI and will search open source places such as GitHub to see what I can find.

If toomscj7 is willing to share his python code or if anyone else has something they would like share on the topic, please chime in.


About the toy radar gun:
It appears that the range is about 40 ft., so in my case that would mean securely mounting it in a tamper / impact / weather resistant housing (as discrete looking as possible) near the edge of my property line facing the road to make it a practical solution. The cameras I currently use are mounted in places that allow me to easily run them off of one cat5e cable and are discrete looking enough to prevent a Ft. Knox look. Anything that would be located in or near the property line easement area would be much more difficult or work to install, protect from theft, tampering, or physical damage since the drunks would probably use it as target practice with beer bottles / cans if they were to figure out what it was!

Interesting ideas and thanks for chiming in with your thoughts.
 
Last edited:

hmjgriffon

Known around here
Joined
Mar 30, 2014
Messages
3,401
Reaction score
980
Location
North Florida
I currently have an un-utilized raspberry pi 2 & 3 I've tinkered with and those are interesting projects that could be a possibility so I may consider them in possible future projects. Although and at least in the near future, I would still prefer to utilize a s/w based solution that could be integrated with BI and will search open source places such as GitHub to see what I can find.

If toomscj7 is willing to share his python code or if anyone else has something they would like share on the topic, please chime in.


About the toy radar gun:
It appears that the range of is about 40 ft., so in my case that would mean securely mounting it in a tamper / impact / weather resistant housing (as discrete looking as possible) near the edge of my property line facing the road to make it a practical solution. The cameras I currently use are mounted in places that allow me to easily run them off of one cat5e cable and are discrete looking enough to prevent a Ft. Knox look. Anything that would be located in or near the property line easement area would be much more difficult or work to install, protect from theft, tampering, or physical damage since the drunks would probably use it as target practice with beer bottles / cans if they were to figure out what it was!

Interesting ideas and thanks for chiming in with your thoughts.
get cameras with lots of zoom and mount them high up, on poles, or in trees, and point them far enough down the road that you get a good angle on the cars/plates. nothing will stop sniper fire unless it's a bullet proof box but the random beer bottles and stuff.
 
Top