Skip to content

Separate

Separate
Utility

Detects all disconnected foreground regions in an image and outputs each one as a clean cutout in a batch, cropped to its bounding box with the other objects’ pixels erased so every frame contains exactly one object. Separate works on a single image and does not accept a batch on its input.

PinTypeDescription
ImageImage (required)The source image to analyze
MaskMaskOptional mask defining background (white = background, black = foreground); when connected, overrides the Background Mode parameter
BatchBatchOne frame per detected foreground object, named object_01, object_02, … in the chosen sort order

Pins

ImageImage
InputRequired
MaskMask
InputOptional
BatchBatch
Output

Detection

BackgroundChoice
Default: Alpha

How background is detected. Alpha: transparent pixels are background. Corner Color: pixels matching a corner's color. Custom Color

  • AlphaTreat transparent pixels (alpha = 0) as background.
  • Corner ColorSample a corner pixel and treat matching colors as background.
  • Custom ColorSpecify a color directly as the background reference.
CornerChoice
Default: Top-Left
Background = Corner Color

Which corner pixel to sample as the background reference color

  • Top-LeftSample the top-left pixel as the background reference.
  • Bottom-RightSample the bottom-right pixel as the background reference.
ColorColor (RGB)
Default: rgb(255, 255, 255)
Background = Custom Color

Background reference color

ThresholdInteger
Default: 1 Range: 1–255

Alpha mode: pixels with alpha above this are content. Color modes: maximum color distance from the reference color to still count as background (higher tolerates anti-aliasing halos / JPEG fringing)

Merge Gap (px)Integer
Default: 0 Range: 0–100

Expand the foreground mask by this many pixels before detecting regions, to merge objects that are nearly - but not quite - touching (e.g. a leaf with a thin transparent gap through it)

Filter

Min Area (px²)Integer
Default: 64 Range: 1–100000

Regions smaller than this area are ignored (dust, compression artefacts)

Max ObjectsInteger
Default: 0 Range: 0–2048

Hard cap on output frames. 0 = unlimited

Output

Padding (px)Integer
Default: 0 Range: 0–500

Extra pixels kept around each cropped bounding box

Sort ByChoice
Default: Reading Order

Order of the output frames. Reading Order scans left-to-right, top-to-bottom like a grid

  • Left → RightOrder objects by their left edge, leftmost first.
  • Top → BottomOrder objects by their top edge, topmost first.
  • Reading OrderScan left-to-right, top-to-bottom, like reading a page.
  • Largest FirstSort by bounding-box area, largest object first.
  • Smallest FirstSort by bounding-box area, smallest object first.
  • Wire the Batch output into Scatter to use each detected object as a stamp, or into Export Batch to save each one as a separately named file.
  • Use Merge Gap to close small transparent gaps within a single object before detection. A leaf with a thin transparent seam through it becomes one cutout instead of two.
  • Min Area filters out dust and JPEG compression artifacts that would otherwise produce extra frames. Raise it until only real objects remain.
  • Padding adds breathing room around each cutout. Useful when downstream nodes need a few pixels of context around the edge.
  • Max Objects caps the output count when you only need the N largest or leftmost objects from a large image.
  • Reading Order sorts objects as a human would read text: left-to-right, top-to-bottom across rows.