Skip to main content
Version: Next

Interface: PersonSegmentationFrameKernel

Defined in: core/types.ts:72

The per-frame entry points of a segmentation session as standalone worklet functions. Use this instead of the session methods when frames are processed on another JS runtime (for example a camera thread): capture the kernel once and call its functions with kernel.state.

Properties​

state​

readonly state: PersonSegmentationKernelState

Defined in: core/types.ts:73

Methods​

latest()​

latest(state, renderTimestampUs): null | PersonMask

Defined in: core/types.ts:75

Parameters​

ParameterType
statePersonSegmentationKernelState
renderTimestampUsnumber

Returns​

null | PersonMask


offer()​

offer(state, input): void

Defined in: core/types.ts:74

Parameters​

ParameterType
statePersonSegmentationKernelState
inputSegmentationInput

Returns​

void


reset()​

reset(state): void

Defined in: core/types.ts:79

Parameters​

ParameterType
statePersonSegmentationKernelState

Returns​

void