A user brush stroke for interactive segmentation (also exported as Stroke).
Signature:
export declare interface InteractiveSegmenterStroke
Properties
| Property | Type | Description |
|---|---|---|
| brushRadius | number | undefined | Optional brush radius normalized to [0.0, 1.0] relative to the shorter image dimension. Defaults to 0.02. |
| mode | InteractiveSegmenterBrushMode | Whether this stroke adds to the foreground (POSITIVE), subtracts from the foreground (NEGATIVE), or defines a closed polygon (LASSO). |
| points | InteractiveSegmenterStrokePoint[] | Ordered list of normalized 2D coordinates along the stroke path. |
InteractiveSegmenterStroke.brushRadius
Optional brush radius normalized to [0.0, 1.0] relative to the shorter image dimension. Defaults to 0.02.
Signature:
brushRadius?: number;
InteractiveSegmenterStroke.mode
Whether this stroke adds to the foreground (POSITIVE), subtracts from the foreground (NEGATIVE), or defines a closed polygon (LASSO).
Signature:
mode: InteractiveSegmenterBrushMode;
InteractiveSegmenterStroke.points
Ordered list of normalized 2D coordinates along the stroke path.
Signature:
points: InteractiveSegmenterStrokePoint[];