Log in

View Full Version : Recording of bicycle ride - normalise Speed


hanfrunz
15th September 2014, 13:10
Hello everyone,

i recorded a bicycle ride with a gopro camera. I like to "normalize" the speed, to get a constant speed of let's say 20km/h. Any ideas how i could do that with avisynth, or is there a commercial plugin?
I want to use the video in combination with my hometrainer and a player that alters the speed accordingly.

regards,
hanfrunz

raffriff42
15th September 2014, 13:57
How would that even work? Do you have GPS or other ground speed data over the trip? If so, you could create an EDL of some kind - doubling the playback speed for sequences where you are doing 10km/h, halving it where you are doing 40, deleting frames where you are stopped, and so on. If you don't have true speed data, perhaps you can estimate it from the apparent motion of the world as it flies by, but that sounds tricky - perhaps the DARPA challenge guys, or the self-driving car guys, have figured it out.

Ghitulescu
15th September 2014, 15:08
I like to "normalize" the speed, to get a constant speed of let's say 20km/h.

That's easy, get a Cruise Control (Tempomat) on your bike. It would keep 20kmh within reasonable wow&flutter.

hanfrunz
15th September 2014, 16:04
i have a recording of the speed on my iphone. But i think you can just use the image data. The camera points to the street and you can calculate the speed with this info.

My first idea was just to calculate the difference between to frames. If the difference is small the bike was slow, if it's bigger the speed is higher. The problem is with moving objects like cars...

hanfrunz

StainlessS
15th September 2014, 16:29
The camera points to the street and you can calculate the speed with this info.

So when in narrow streets you would be moving faster, than in wide streets, and when passing a football field, you would hardly be travelling at all.

EDIT: Of course when normalised, the opposite would be the case, you would zip past football fields.

johnmeyer
15th September 2014, 21:54
This is easy to do in my editing program (Sony Vegas), although you would have to do it "by eye." Here is a tutorial:

Controlling Velocity in Vegas Pro (http://www.sonycreativesoftware.com/controlling_velocity_in_vegas_pro)

There is nothing I know of that can compute your speed and make real-time speed adjustments based on those calculations. Having said that, if your video was taken on a highway that had dashes down the center line, and if those lines were uniformly spaced, you could probably use RT_Stats functions to develop a sync function from those lines on the pavement.

Sony Vegas has a speed envelope that makes it easy to ramp playback speed up and down, and do so gradually or quickly, and make the rate of speed increase (the acceleration) uniform (i.e., linear) or non-linear.

foxyshadis
18th September 2014, 01:15
i have a recording of the speed on my iphone. But i think you can just use the image data. The camera points to the street and you can calculate the speed with this info.

My first idea was just to calculate the difference between to frames. If the difference is small the bike was slow, if it's bigger the speed is higher. The problem is with moving objects like cars...

hanfrunz

Actually, this isn't such a bad idea, but the differencing would have to be done with mvtools. I tested out a few ideas on some youtube videos and couldn't get anything even close to working, though; I'd wager it'd take days or weeks to perfect that algorithm. If you have GPS data, just work with that instead.

smok3
18th September 2014, 12:03
This certainly looks promising
http://research.microsoft.com/en-us/um/redmond/projects/hyperlapse/

raffriff42
18th September 2014, 12:33
Yes! That's the one I was trying to recall. If you can reconstruct a virtual 3D environment (even a crude one) from your video, finding your ground speed is fairly easy. There are related projects, like KinectFusion - and isn't there a photo app that reconstructs famous landmarks from multiple stills? *googles* Yes, Photosynth (http://en.wikipedia.org/wiki/Photosynth) (also from Microsoft - a pattern is emerging here)

EDIT Photosynth has a big advantage over Hyperlapse - it's available now. I think it's free, not sure.

EDIT looks like Instagram bought out Hyperlapse (https://en.wikipedia.org/wiki/Hyperlapse); it's available. It sounds perfect for your task.
...EDIT did not buy out; it's an unrelated project with the same name.

EDIT related: Structure From Motion (http://en.wikipedia.org/wiki/Structure_from_motion#External_links) (wikipedia)
>> Voodoo Camera Tracker (http://www.viscoda.com/index.php/en/products/non-commercial/voodoo-camera-tracker) (free) "estimates camera parameters and reconstructs a 3D scene from image sequences"

EDIT It is possible in theory to get your speed by analyzing the tire whine, or even (ultrasonic) drive chain noise. In a similar way, I understand Formula One teams would find their opposition's RPMs from the TV camera/microphone. This was mostly useful before the rules imposed rev limits.