class BackgroundReplacementVideoFrameProcessor : VideoSource, VideoSink
BackgroundReplacementVideoFrameProcessor Draws frames to RGBA, converts to CPU, identifies the foreground person and replaces the background of a video frame.
logger
- : Logger - Logger to log the data.
eglCoreFactory
- : EglCoreFactory - Factory to create EglCore objects to hold EGL state.
context
- : Context - Context to create segmentation processor.
configurations
- : BackgroundReplacementConfiguration - Image to replace the background with.
<init> |
BackgroundReplacementVideoFrameProcessor Draws frames to RGBA, converts to CPU, identifies the foreground person and replaces the background of a video frame. BackgroundReplacementVideoFrameProcessor(logger: Logger, eglCoreFactory: EglCoreFactory, context: Context, configurations: BackgroundReplacementConfiguration?) |
configurations |
: BackgroundReplacementConfiguration - Image to replace the background with. var configurations: BackgroundReplacementConfiguration? |
contentHint |
Content hint for downstream processing val contentHint: VideoContentHint |
addVideoSink |
Add a video sink which will immediately begin to receive new frames. fun addVideoSink(sink: VideoSink): Unit |
getBackgroundReplacedBitmap |
fun getBackgroundReplacedBitmap(inputBitmap: Bitmap, frame: VideoFrame): Bitmap? |
onVideoFrameReceived |
Receive a video frame from some upstream source. The VideoSink may render, store, process, and forward the frame, among other applications. fun onVideoFrameReceived(frame: VideoFrame): Unit |
release |
fun release(): Unit |
removeVideoSink |
Remove a video sink which will no longer receive new frames on return fun removeVideoSink(sink: VideoSink): Unit |