MediaPipeTasksVision Framework Reference

InteractiveSegmenterStroke

class InteractiveSegmenterStroke : NSObject

Represents a single user-drawn stroke (in Swift aliased as Stroke) for split-mode interactive segmentation.

  • The sequence of normalized points forming the stroke.

    Declaration

    Swift

    var points: [InteractiveSegmenterStrokePoint] { get }
  • The brush mode used for this stroke.

    Declaration

    Swift

    var brushMode: InteractiveSegmenterBrushMode { get }
  • Whether the stroke is complete.

    Declaration

    Swift

    var isCompleted: Bool { get }
  • Initializes a new stroke with the given points, brush mode, and completion status.

    Declaration

    Swift

    init(points: [InteractiveSegmenterStrokePoint], brushMode: InteractiveSegmenterBrushMode, isCompleted: Bool)

    Parameters

    points

    The sequence of normalized stroke points.

    brushMode

    The brush mode used for this stroke.

    isCompleted

    Whether the stroke is complete.

    Return Value

    An initialized stroke instance.