Skip to content

PoseCallbackPlugin

Callback plugin for pose detection

Specialization of CallbackPlugin for pose detection results.

Extends

Constructors

new PoseCallbackPlugin()

new PoseCallbackPlugin(callback): PoseCallbackPlugin

Constructor

Parameters

callback

Callback method

Returns

PoseCallbackPlugin

Inherited from

CallbackPlugin.constructor

Properties

callback()

protected callback: (r) => void

Callback method

Parameters

r: PoseResult

Returns

void

Inherited from

CallbackPlugin.callback


loaded

loaded: boolean

Loaded state

Inherited from

CallbackPlugin.loaded


ordinal

ordinal: number

Ordinal number

Inherited from

CallbackPlugin.ordinal


renderer?

protected optional renderer: Renderer<PoseResult>

Renderer loaded the plugin

Inherited from

CallbackPlugin.renderer

Methods

dispose()

dispose(): void

Dispose video plugin

Returns

void

Inherited from

CallbackPlugin.dispose


load()

load(renderer): Promise<void>

Initialize plugin

Initializes resources/instances needed by plugin. Overridden by derived classes for particular task.

Parameters

renderer: Renderer<PoseResult>

Renderer this plugin is attached to

Returns

Promise<void>

Promise resolving when initialization is finished

Inherited from

CallbackPlugin.load


setupCamera()

setupCamera(ratio, angle): void

Set camera parameters

Could be overridden to adjust plugin’s pipeline.

Parameters

ratio: number

Aspect ration of input video

angle: number

Vertical field of view in radians

Returns

void

Inherited from

CallbackPlugin.setupCamera


setupVideo()

setupVideo(size): void

Set video size

Could be overridden to adjust plugin’s pipeline.

Parameters

size: Size

Resolution of input video

Returns

void

Inherited from

CallbackPlugin.setupVideo


unload()

unload(): void

Reset plugin

Releases all resources/instances created in load(). Overridden by derived classes for particular task.

Returns

void

Inherited from

CallbackPlugin.unload


update()

update(result, stream): Promise<void>

Update

Override executes the callback on results of video processing.

Parameters

result: PoseResult

Results of video processing

stream: HTMLCanvasElement

Captured video frame

Returns

Promise<void>

Promise resolving when update is finished

Inherited from

CallbackPlugin.update