VideoEffectsBackground class

Background blur: the person stays sharp and everything behind them is blurred.

Runs on the CPU engine only (VideoEffectsPipeline.LEGACY); the GPU engine has no blur yet, and the readback's background.reason says so.

On Android the person is found with ML Kit selfie segmentation, which the SDK does not bundle: add implementation "com.google.mlkit:segmentation-selfie:16.0.0-beta6" to your app's build.gradle. On iOS it uses Vision and needs iOS 15.

Constructors

VideoEffectsBackground({VideoEffectsBackgroundMode mode = VideoEffectsBackgroundMode.OFF, double blurStrength = 0.5})
What to do with the area behind the speaker.
const

Properties

blurStrength → double
How strongly the background is blurred, 0.0..1.0. 0.5 by default.
final
hashCode → int
The hash code for this object.
no setterinherited
mode → VideoEffectsBackgroundMode
VideoEffectsBackgroundMode.OFF by default.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited

Operators

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