CelStabilize

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
 
m (1 revision)

Revision as of 00:03, 20 May 2013

CelStabilize - a stabilization script, designed for animations. The movement typically comes from the process that scans the animation to video; resulting in jerkiness. By mpg262.

CelStabilise.avs

function Stabilise(clip o, clip metric)
{
Selectall(o)
SelectFirstOfRun()
scene = Breakon(last)
FindIntegerPan (o, metric)
UnmaskedRefinePan(o, metric, last)
motion = last.ScaleMotion(-1.0)
totalmotion = AccumulateMotion(scene, motion)
# Stabilise
ApplyUnmaskedPowerTranslate(o, totalmotion, o)#.Expand(900, 640))
return Paper()
}

Usage:

LoadPlugin("CelBackground_23Sep05.dll")
Import("CelStabilise.avs")

#load clip here
Stabilise(capabsolutemetric(15))
#crop(4, 4, -4, -4) #or as appropriate to remove borders created by stabilisation

These are the distinctive features of this filter:

1. It takes masks specifying regions to ignore. 2. It works on a scene by scene basis and tries to stabilise still scenes completely rather than applying a filter to reduce the motion.* 3. The sensitivity to different luma-differences is specifiable.

  • i.e. of each pair of pixels that lie on top of each other.

Edit: I should have said that this is primarily meant for animation, especially old animation, although as far as I can see it should work on live material if the background is reasonably still...

Further discussion: http://forum.doom9.org/showthread.php?t=100396 CelBackground plugin dll http://avisynth.org/warpenterprises/files/celbackground_20050923.zip

Personal tools