SegmentationResult class

Result of background segmentation processing.

This mirrors the React implementation where selfieSegmentation.onResults receives the segmentation mask and confidence data.

Constructors

SegmentationResult.new({Uint8List? processedFrame, Uint8List? mask, int? maskWidth, int? maskHeight, double? confidence, int processingTimeMs = 0, bool success = true, String? error})
const
SegmentationResult.error(String message)
factory

Properties

confidence → double?
Per-pixel confidence (0.0-1.0) from ML Kit, if available
final
error → String?
Error message if processing failed
final
hashCode → int
The hash code for this object.
no setterinherited
mask → Uint8List?
The segmentation mask (grayscale: 0=background, 255=person)
final
maskHeight → int?
Mask height (may differ from input if enableRawSizeMask is false)
final
maskWidth → int?
Mask width (may differ from input if enableRawSizeMask is false)
final
processedFrame → Uint8List?
The processed frame with background replaced
final
processingTimeMs → int
Processing time in milliseconds
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
success → bool
Whether processing was successful
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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