Studio Yotsuba
Back to Node List

Pixel Cleanup

pixel_cleanup

Removes isolated 1px noise and fills tiny 1px holes

Reviewed
Guide available

Input Ports

NameTypeDescription
Image
input
Image
Required
Image to clean up
Editable Area
permission_mask
Image
Optional mask that protects pixels outside the editable area. White permits cleanup; black or transparent pixels keep the input unchanged. The whole image is still inspected when deciding what counts as noise or a hole.

Output Ports

NameTypeDescription
Image
output
Image
Cleaned up image

Parameters

NameTypeDefaultRangeDescription / Options
Editable Area
editable_area
Enum
Inside—

Which side of the connected mask may be changed. Use Inside to clean a selected part, or Outside to protect a face, eye, or intentional thin line. This setting has no effect until a mask is connected.

  • InsideInside
    Change only pixels where the Editable Area mask is white and opaque
  • OutsideOutside
    Protect the white area and change only pixels outside it
Alpha Threshold
threshold
Float
0.50–1 / step 0.01

Alpha used to decide whether a pixel belongs to the shape. Start at 0.5; lower it to include faint edge pixels, or raise it when semi-transparent noise is being kept.

Remove Isolated Pixels
remove_single_pixels
Bool
true—

Remove 1px dots with no filled neighbors

Fill Single Holes
fill_single_holes
Bool
true—

Fill tiny 1px holes surrounded on four sides

Binarize Alpha
binarize_alpha
Bool
false—

Set alpha to fully opaque or fully transparent using Alpha Threshold

Passes
passes
Int
11–8

How many times to recheck the result. Start at 1; use 2–3 only when removing one pixel exposes another isolated pixel. Higher values can erase intentional sparse detail.

Overview

A conservative cleanup node that fixes only isolated 1px specks and 1px holes. Insert it after automatic generation or conversion (text rasterization, mask compositing, dithering) to remove distracting dots from pixel art.

Usage tips

  • Its regular position is just before finishing: place it one node before the final output so upstream edits are less likely to leave specks.
  • Increase passes when the effect is too weak. Larger noise that still remains is a job for Open / Close in morphology.
  • Disable it for artwork containing intentional 1px dots such as stars or highlights, or composite those parts afterward.
  • Enable binarize_alpha only when semitransparent alpha should be forced to fully transparent or fully opaque. With isolated-pixel removal, hole filling, and alpha binarization all OFF, the input pixel data is returned unchanged.

Related nodes

  • morphology — full shaping with a specified radius
  • silhouette_cleanup — clean up L-shaped steps (a complementary finishing step)
  • text_rasterize / dither — examples of upstream nodes that may produce specks

Notes

  • This node is limited to conservative 1px correction. It is not a large hole filler or median filter.
  • Newly filled pixels are assigned the average of their original neighboring colors.
  • Shape decisions use only alpha, so colors with similar opacity are treated as the same filled region even when their RGB values differ.
  • When binarize_alpha is OFF, pixels whose shape classification did not change keep their original alpha.

Examples

  1. Clean up small noise from Text Rasterize.
  2. Fill 1px chips after Mask Boolean.
  3. Thin scattered 1px dots after Noise or Dither.
Back to Node List