DriftCapture · function
prepareSamFrame
rgba as MobileSAM's predictor prepares it: [3, square, square], the frame itself in the top
left at the size this answers, and zeros after it.
Explained in DriftCapture.
function prepareSamFrame(rgba: Uint8Array, width: number, height: number, mean: readonly number[], deviation: readonly number[], square?: number): PreparedFrameimport { prepareSamFrame } from '@driftengine/capture';Parameters
| Parameter | Type | Description |
|---|---|---|
rgba | Uint8Array | |
width | number | |
height | number | |
mean | readonly number[] | |
deviation | readonly number[] | |
square? | number |