TMaskCleaner

From Avisynth wiki
Revision as of 03:07, 28 March 2020 by Reel.Deal (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Abstract
Author tp7
Version v0.91
Download tmaskcleaner-x86.zip // tmaskcleaner-x64.zip
Category Masking
License GPLv2
Discussion

Contents

Description

A really simple mask cleaning plugin for AviSynth based on mt_hysteresis. It discards all areas of less than length pixels with values bigger or equal to thresh.

Requirements


Syntax and Parameters

TMaskCleaner (clip, int "length", int "thresh", int "fade")


clip   =
Input clip.


int  length = 5
int  thresh = 235
It discards all areas of less than length pixels with values bigger or equal to thresh.


int  fade = 0
Usage: TMaskCleaner(length=100, fade=200) will zero areas below length, assign 0..255 to areas in [length,length+fade] range, and 255 to areas above length+fade.
This allows adaptive processing of area ranges for example by transforming the mask from linear 0..255 distribution denoted here as / to:
  • /\ with mt_lut("x 128 > 255 x - x ?")
  • || to grab some arbitrary range with mt_lut("x 118 > x 138 < & 255 0 ?")
  • non-linear _/_ mask by smoothly amplifying the middle with mt_lut("x 128 > 255 x - x ? 100 - 28 / 0.5 ^ 256 *")


Examples

TMaskCleaner with default values:

AviSource("bah.avi")
TMaskCleaner(length=5, fade=235, fade=0)


Changelog

Version      Date            Changes
v0.91 2013/12/24 - 'Fade' parameter added v0.9 2013/11/30 - Initial release


External Links

  • GitHub - Source code repository.




Back to External Filters

Personal tools