Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#259510 - 01/07/2005 08:58 Maths expert required...
g_attrill
old hand

Registered: 14/04/2002
Posts: 1172
Loc: Hants, UK
Ok, I have a problem and need a simple explanation of how to calculate something.

I would like to know how to calculate the speed of a vehicle based on two frames from a video recording. You can measure the width of the vehicle in both frames, you can measure the car itself and you know the precise time between each frame, so I presume there is some way to tell how fast it was going? Assume no information is available about the properties of the lens. The distance to the object in the first frame is available, rounded to the nearest metre.

I have done a Google search but there isn't anything that somebody with basic mathematical skills could follow.

edit: Here is an example of the imagery available:
http://www.freepichosting.com/Albums/421617291/1.html
The "NR" is the field number, and it is PAL so there are 50 fields per second.

Gareth


Edited by g_attrill (01/07/2005 09:02)

Top
#259511 - 01/07/2005 09:12 Re: Maths expert required... [Re: g_attrill]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4174
Loc: Cambridge, England
If the lens is reasonably close to planar over the area subtended by the car -- in other words, if it's not a fish-eye lens really close-up -- then the width of the car in the image is inversely proportional to the distance, i.e. width1 * distance2 = width2 * distance1.

Because you know both widths and distance1, you can determine distance2. The difference in distances, in metres, divided by the time in seconds, gives the speed.

If the lens is severely non-planar, you can always photograph yourself at various known distances and determine the exact diminution of image size as a function of distance. The factor by which image sizes change, will apply to the car as well as to you, and you can work out the distances and thus, again, the speed.

Edit: The road marking in your three example images are different, so either the camera has panned or zoomed. If it has panned, or if the images are all clipped from larger images shot at the same zoom, the analysis still applies. If the camera has zoomed, all bets are off.

Peter


Edited by peter (01/07/2005 09:14)

Top
#259512 - 01/07/2005 09:30 Re: Maths expert required... [Re: g_attrill]
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3995
Loc: Manchester UK
You building a truvelo?
_________________________
Cheers,

Andy M

Top
#259513 - 01/07/2005 09:47 Re: Maths expert required... [Re: peter]
g_attrill
old hand

Registered: 14/04/2002
Posts: 1172
Loc: Hants, UK
Holy crap it works! Wow, thanks, I thought it would be trickier than that so I didn't get the calculator out.

Here are my workings and they are astonishly accurate:

Size 1 = 434px
Size 2 = 232px
Distance 1 = 80.3m

Therefore (434* 80.3m) / 232 = 150.2m (the far distance)
Subtract 80.3m then divide by 4.06 seconds = 17.2m/s = 38.52mph

Given rough measurements and the fact that the distance could be up to four frames out, that isn't bad!

Gareth

Top
#259514 - 01/07/2005 09:48 Re: Maths expert required... [Re: andym]
g_attrill
old hand

Registered: 14/04/2002
Posts: 1172
Loc: Hants, UK
Quote:
You building a truvelo?

Not likely! The frames are from a mobile LTI 20:20 camera (manually operated). There are quite a few people being given frames like that which I can now see is actually enough to do a secondary calculation of speed and check whether the equipment was working correctly.

Gareth

Top
#259515 - 01/07/2005 10:10 Re: Maths expert required... [Re: g_attrill]
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3995
Loc: Manchester UK
So it's not your Skoda caught speeding then?
_________________________
Cheers,

Andy M

Top