View Single Post
Old 29th September 2009, 00:32   #185  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,493
I ran a default first pass (with a 1% search range), then I altered all four of the motion smoothness parameters (horizontal, vertical, rotation, zoom) to 100, 1000, or 10000 in turn.

If you remember, a long time ago I was playing around with writing a perspective-correcting deshaker, which used deshaker.log as it's input. For each frame, all I did was average the values for a number of frames on either side, then subtract that from the original value for that frame to get the parameter for adjusting the image. It seemed to come out pretty similar to Deshaker (although I should say it was a bit of a guess, I didn't know if it would work), but I didn't take it very far.

The beauty of it is that a) if the average of a parameter for frame x is calculated from by the total from p[x-w] to p[x+w], divided by 2w+1, the next average (for x+1) can be calculated by taking that total (pre-division), and subtracting p[x-w] and adding p[x+w+1]. Only the calculation for the first frame is dependent on the size of w - all other frames only need one subtraction and one addition.

And b) if you perform this averaging 3 or more times, you have a good approximation to a Gaussian distribution, which makes for a nice smooth curve.

As I said, I don't doubt that no-one else has been bothered by this, because who really needs to smooth over 10000 frames (except me )?

David
wonkey_monkey is offline   Reply With Quote