Dienstag, 12. August 2014

Better video stabilization in Blender

Hello!

Blender has got a great tracking tool, which can also be used to compensate unwanted camera movements. A common use case is represented by the intention to make a shaky handheld video look stable.

A very good introduction to the basics of Blender's stabilizing features is found here.

Though if you try to deshake a video you will encounter the Problem that the algorithm compensates all camera movement. This is fine if you are going to stabilize a steady shot like it is shown in the tutorial above, but in most cases there is some intended movement like a camera pan that should be preserved while annoying jittering needs to be removed.

To make this kind of selective video stabilization possible I have written a small addon which applies a rudimentary highpass filter to a selected tracking marker. After the filter is applied, only the fast, jittering moves are represented by the marker so that you can use it to get much better stabilization results!

You can download it on BlenderArtists and I have a quick example comparing the standard and highpass stabilization for you:


Please notice that the wobbliness is caused by the rolling shutter of my camera und thus not introduced by Blender ;-)

Using the addon is very simple:
Find a good feature and track it, just like in the tutorial.
When you have done this, select the marker and use the addon whose UI is located on the bottom of the Clip Editor's tool panel.

  

The numeric value represents the range of frames over which the motion is smoothed. A higher value makes slower motions being stabilized, too. Usually a value between 5 and 15 gives good results.
The Apply operator filters the selected marker in the scene's frame range (the start and end frame that are found in the timeline window's header).
Please make sure that the marker is tracked/keyframed for every frame in that range; otherwise the addon will fail.


Now a second trackpoint is created. Simply use it for 2d stabilization instead of the original track.
You can also repeat the procedure for a second track point and use it for rotation stabilization!

That's it. Have fun!