Mask Refine
Refines a mask with erode, dilate, feather, threshold, and morphological operations.
Mask Refine is the primary tool for cleaning up and adjusting masks. Erode shrinks the mask (positive values) or dilates it (negative values). Feather applies a Gaussian blur for soft edges. Threshold binarizes the mask.
The morphology section offers advanced operations: Open (removes small noise), Close (fills small holes), Gradient (extracts edges), Top Hat (bright detail), and Black Hat (dark detail).
Parameters
Section titled “Parameters”Mask
Binarize mask before refinement; off=preserve gradients
Binarization cutoff; pixels >= threshold become white
Positive=erode (shrink), negative=dilate (expand)
Gaussian blur on edges; 0=hard (pixel art)
Invert mask
Morphology
None/Open (remove noise)/Close (fill holes)/Gradient/Top Hat/Black Hat
Structuring element
Kernel radius; actual kernel is (2*size+1) wide
Repeat count; higher amplifies the effect
Threshold slider only visible when Threshold is enabled. Morphology params only visible when Operation is active.
Usage Tips
Section titled “Usage Tips”- A small erode (1–2px) removes fringe pixels at mask edges.
- Negative erode values dilate (expand) the mask, which is useful for extending selections.
- Use Open to clean up noisy masks without changing the overall shape.
- Close fills small holes in masks and works well for patching gaps in selections.