MaskTools/MotionMask

From Avisynth wiki
Jump to: navigation, search


MotionMask (clip[, int "thY1"[, int "thY2"[, int "thC1"[, int "thC2"[, int "thSD"]]]]])

Plugin: MaskTools

This filter creates a mask of the motion of the picture. As with the other filters which create masks, once the motion is computed, it is thresholded by two thresholds. This filter will also check for scene changes, and won't output a mask if a scene change is detected.

Scene change detection is made by computing the sum of absolute differences of the picture and the previous one. This sum is averaged, and then compared to thSD. If it is more than thSD, a scene change is detected.

Motion is computed the same way as NoMoSmooth, meaning that for each pixel, we'll compute the absolute sum of differences between the pixel and its surrounding, and the pixel and its surrounding in the previous picture. The resulting value is then divided by 9, in order to normalize the result between 0 and 255.

This algorithm only gives an approximation of the motion. It will work well on the edges of an object, but not on its inside.

Defaults are : thY1=20, thY2=20, thC1=10, thC2=10 and thSD=10.


Back to MaskTools.

Personal tools