amazon-chime-sdk / com.amazonaws.services.chime.sdk.meetings.audiovideo.video.backgroundfilter / BackgroundFilterVideoFrameProcessor

BackgroundFilterVideoFrameProcessor

class BackgroundFilterVideoFrameProcessor

BackgroundFilterVideoFrameProcessor Draws frames to RGBA, converts to CPU, identifies the foreground person and applies filter (blur or replacement) to a video frame.

Parameters

logger - : Logger - Logger to log the data.

context - : Context - Context to create blur and segmentation processor.

tag - : String - Tag for logger.

Constructors

<init>

BackgroundFilterVideoFrameProcessor Draws frames to RGBA, converts to CPU, identifies the foreground person and applies filter (blur or replacement) to a video frame.

BackgroundFilterVideoFrameProcessor(logger: Logger, context: Context, tag: String)

Functions

drawImageWithMask

fun drawImageWithMask(scaledInputBitmap: Bitmap, outputBitmap: Bitmap?, filteredBitmap: Bitmap?): Bitmap?

getByteBufferFromInputVideoFrame

fun getByteBufferFromInputVideoFrame(frame: VideoFrame): ByteBuffer

getInputBitmap

fun getInputBitmap(frame: VideoFrame): Bitmap

getProcessedFrame

fun getProcessedFrame(frame: VideoFrame, filteredBitmap: Bitmap?, rgbaData: ByteBuffer): VideoFrame

getScaledInputBitmap

Scales the input bitmap as per ML model specification.

fun getScaledInputBitmap(frame: VideoFrame, inputBitmap: Bitmap): Bitmap

getSegmentationMask

fun getSegmentationMask(scaledInputBitmap: Bitmap): Bitmap?

release

fun release(): Unit