BackgroundSegmenterBase class abstract

Abstract base class for background segmenters.

All platform-specific implementations MUST extend this class. This ensures API consistency across platforms and allows the core VirtualBackgroundProcessor to work with any implementation.

Contract

  1. initialize MUST be called before processFrame
  2. dispose MUST be called when done to free resources
  3. processFrame MUST handle null/empty input gracefully
  4. Implementations SHOULD be thread-safe for use with Isolates
Implementers

Constructors

BackgroundSegmenterBase()

Properties

hashCode int
The hash code for this object.
no setterinherited
isReady bool
Whether the segmenter is initialized and ready.
no setter
isSupported bool
Whether this platform actually supports segmentation.
no setter
platformName String
Platform-specific identifier (for debugging/logging).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() Future<void>
Release all resources.
initialize([SegmenterConfig config = const SegmenterConfig()]) Future<void>
Initialize the segmenter with optional configuration.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processFile(String filePath, Uint8List frameData, SegmenterInputMetadata metadata) Future<SegmentationResult>
Process an image file and return segmentation result.
processFrame(Uint8List frameData, SegmenterInputMetadata metadata) Future<SegmentationResult>
Process a single frame and return segmentation result.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited