CelStabilize

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
(fix link and other minor things)
Line 1: Line 1:
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.
+
CelStabilize - a stabilization script, designed for animations.  The movement typically comes from the process that scans the animation to video; resulting in jerkiness.  By mg262.
  
 
CelStabilise.avs
 
CelStabilise.avs
Line 22: Line 22:
 
  #load clip here
 
  #load clip here
 
  Stabilise(capabsolutemetric(15))
 
  Stabilise(capabsolutemetric(15))
  #crop(4, 4, -4, -4) #or as appropriate to remove borders created by stabilisation
+
  #crop(4, 4, -4, -4, true) #or as appropriate to remove borders created by stabilization
  
 
These are the distinctive features of this filter:
 
These are the distinctive features of this filter:
Line 34: Line 34:
  
 
Further discussion: http://forum.doom9.org/showthread.php?t=100396
 
Further discussion: http://forum.doom9.org/showthread.php?t=100396
CelBackground plugin dll http://avisynth.org/warpenterprises/files/celbackground_20050923.zip
+
CelBackground plugin dll http://www.avisynth.nl/users/warpenterprises/files/celbackground_20050923.zip
  
 
[[Category:External filters]]
 
[[Category:External filters]]

Revision as of 17:24, 28 February 2015

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

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, true) #or as appropriate to remove borders created by stabilization

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://www.avisynth.nl/users/warpenterprises/files/celbackground_20050923.zip

Personal tools