SegmentationResult

data class SegmentationResult(val processedFrame: ByteArray? = null, val mask: ByteArray? = null, val maskWidth: Int? = null, val maskHeight: Int? = null, val confidence: Float? = null, val processingTimeMs: Int = 0, val success: Boolean = true, val error: String? = null)

Result of background segmentation processing.

Constructors

Link copied to clipboard
constructor(processedFrame: ByteArray? = null, mask: ByteArray? = null, maskWidth: Int? = null, maskHeight: Int? = null, confidence: Float? = null, processingTimeMs: Int = 0, success: Boolean = true, error: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val confidence: Float? = null

Per-pixel confidence (0.0-1.0) from ML Kit, if available

Link copied to clipboard
val error: String? = null

Error message if processing failed

Link copied to clipboard
val mask: ByteArray? = null

The segmentation mask (grayscale: 0=background, 255=person)

Link copied to clipboard
val maskHeight: Int? = null

Mask height

Link copied to clipboard
val maskWidth: Int? = null

Mask width

Link copied to clipboard

The processed frame with background replaced

Link copied to clipboard

Processing time in milliseconds

Link copied to clipboard
val success: Boolean = true

Whether processing was successful

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int