Watershed Segment
Overview
Watershed Segment node segments distinct regions in the input frame by combining color-based thresholding, morphological cleanup, and watershed marker propagation.
The watershed algorithm treats the image as a topographic surface and floods it from seed markers until region boundaries are found. Use this node to separate touching or overlapping objects that share a similar color, where bounding-box detection would merge them into one result.
Input
Input Image
image requiredThe image frame to segment. Connect this to a camera or upstream image output.
Color Thresholds
array requiredColor rules used to isolate target-colored regions before segmentation. See Color Thresholds for configuration details.
Morphology
object requiredMorphological operations to clean the thresholded mask before watershed processing. See Morphology for details.
Watershed Settings
object requiredParameters that control the watershed processing step.
Key fields:
norm— pixel intensity range to normalise the distance transform into before thresholding (for example[0, 255]).normThresh— intensity range after normalisation that is accepted as a seed marker (for example[0.5, 1.0]). Tighter ranges produce fewer, more confident seeds.boxWidth—[min, max]pixel width range; segments outside this range are discarded.boxHeight—[min, max]pixel height range; segments outside this range are discarded.
Overlay Results
boolean requiredWhether to draw segmented region overlays on the output frame. See Overlay Results.
Overlay Alpha Mask
number requiredOpacity of the colored segment overlays. See Overlay Alpha Mask.
Output
Overlay Image
imageOutput frame from the node. If overlays are enabled, each segmented region is filled with a distinct color at the configured opacity.
Detected Count
integerNumber of segments found in the current frame.
Detected Objects
arrayArray of segment objects. Each object contains the segment contour as a list of [x, y] boundary points.