GreenscreenMediaFilter class
This filter segments the video frames into classified regions (for example body/background) and removes the background by making it transparent. Used to apply a virtual "green screen" effect.
Signature:
export declare class GreenscreenMediaFilter extends MediaFilter
Extends: MediaFilter
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(config) | Creates a new GreenscreenMediaFilter. |
GreenscreenMediaFilter.(constructor)
Creates a new GreenscreenMediaFilter.
Signature:
constructor(config: GreenscreenMediaFilterConfig);
Parameters
Parameter | Type | Description |
---|---|---|
config | GreenscreenMediaFilterConfig | The configuration of the filter. |
Remarks
If the width and/or height of the source frame is greater than the supplied maxWidth or maxHeight in the configuration it will be scaled down. The aspect ratio is always maintained, and the filtered frame is never scaled up.
If your module is having performance issues when using this filter you can try reducing the maximum width and height and/or running at a lower frame rate.
Updated about 1 year ago