VirtualBackgroundVideoFilter

constructor(context: Context, @DrawableRes backgroundImage: Int, foregroundThreshold: Double = DEFAULT_FOREGROUND_THRESHOLD)

Parameters

context

Context used to access resources.

backgroundImage

The drawable resource ID of the custom background image.

foregroundThreshold

The confidence threshold for the foreground. Pixels with a confidence value greater than or equal to this threshold are considered to be in the foreground. Value is coerced between 0 and 1, inclusive.