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

Link copied to clipboard
constructor(logger: Logger, context: Context, tag: String)

Functions

Link copied to clipboard
fun drawImageWithMask(scaledInputBitmap: Bitmap, outputBitmap: Bitmap?, filteredBitmap: Bitmap?): Bitmap?
Link copied to clipboard
Link copied to clipboard
fun getProcessedFrame(frame: VideoFrame, filteredBitmap: Bitmap?, rgbaData: ByteBuffer): VideoFrame
Link copied to clipboard
fun getScaledInputBitmap(frame: VideoFrame, inputBitmap: Bitmap): Bitmap

Scales the input bitmap as per ML model specification.

Link copied to clipboard
fun getSegmentationMask(scaledInputBitmap: Bitmap): Bitmap?
Link copied to clipboard
fun release()