Compositor class

Composites a person with a virtual background using a segmentation mask.

This mirrors the React canvas compositing logic:

ctx.drawImage(results.segmentationMask, ...);
ctx.globalCompositeOperation = "source-out";
ctx.fillStyle = ctx.createPattern(virtualImage, ...);
ctx.fillRect(...);
ctx.globalCompositeOperation = "destination-atop";
ctx.drawImage(results.image, ...);

Constructors

Compositor()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearCache() → void
Clear cached images
compose({required ProcessedFrame frame, required VirtualBackground background}) Future<Image>
Compose a processed frame with a virtual background
dispose() → void
Dispose resources
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited