Construct a GaussianBlurBackgroundProcessor. Default values will be used for any missing properties in [[GaussianBlurBackgroundProcessorOptions]], and invalid properties will be ignored.
The current background blur filter radius in pixels.
Set a new background blur filter radius in pixels.
Whether the pipeline is calculating the person mask without waiting for the current input frame to be downscaled (Chrome only).
Toggle whether the pipeline should calculate the person mask without waiting for the current input frame to be downscaled (Chrome only).
The current blur radius when smoothing out the edges of the person's mask.
Set a new blur radius to be used when smoothing out the edges of the person's mask.
Apply a transform to the background of an input video frame and leaving the foreground (person(s)) untouched. Any exception detected will result in the frame being dropped.
The source of the input frame to process.
OffscreenCanvas - Good for canvas-related processing
that can be rendered off screen.
HTMLCanvasElement - This is recommended on browsers
that doesn't support OffscreenCanvas
, or if you need to render the frame on the screen.
HTMLVideoElement
VideoFrame - Recommended on browsers that support the
Insertable Streams API.
The output frame buffer to use to draw the processed frame.
Generated using TypeDoc
The GaussianBlurBackgroundProcessor, when added to a VideoTrack, applies a gaussian blur filter on the background in each video frame and leaves the foreground (person(s)) untouched. Each instance of GaussianBlurBackgroundProcessor should be added to only one VideoTrack at a time to prevent overlapping of image data from multiple VideoTracks.
Example