Module: @geenee/bodyrenderers-common
Classes
- BgBlurPlugin
- BgReplacePlugin
- BilateralPlugin
- BodyPatchPlugin
- BrightnessPlugin
- CallbackPlugin
- DilationShader
- ErosionShader
- FaceCallbackPlugin
- FaceFilterPlugin
- MaskDilationPlugin
- MaskErosionPlugin
- MaskMorphPlugin
- MaskSmoothPlugin
- MaskUploadPlugin
- MaskUpscalePlugin
- PerfDevPlugin
- PoseCallbackPlugin
- PoseFilterPlugin
- VideoMergePlugin
Interfaces
Type Aliases
SegmentationResult
Ƭ SegmentationResult: PoseResult
| FaceResult
| MaskResult
Tracking results having segmentation mask
Functions
DelayPlugin
▸ DelayPlugin<PluginT
, ResultT
>(plugin
, delay?
): PluginT
& { delay
: number
; results
: ResultT
[] }
Factory function adding delay to a plugin
In delayed plugin update() method is called with detection results from one of the previous iterations of the tracking engine. This way we achieve effect of object following its controller with some delay. Delay may be used in combination with various twin plugins to achieve less artificial behaviour of twins that will repeat user movements without absolute synchronization in time and thus look more natural.
Type parameters
Name | Type | Description |
---|---|---|
PluginT | extends Plugin <ResultT > | Type of plugin |
ResultT | extends Object = | Type of processing results |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
plugin | PluginT | undefined | Plugin to introduce delay to |
delay | number | 0 | Number of updates to delay |
Returns
PluginT
& { delay
: number
; results
: ResultT
[] }
Plugin with delay added
getMaskBuf
▸ getMaskBuf(result
): undefined
| BodyMask
Extract mask buffer from processing results
Parameters
Name | Type | Description |
---|---|---|
result | SegmentationResult | Processing/tracking results |
Returns
undefined
| BodyMask
Segmentation mask buffer
getMaskObj
▸ getMaskObj(result
): undefined
| Mask
Extract detected object with segmentation mask
Parameters
Name | Type | Description |
---|---|---|
result | SegmentationResult | Processing/tracking results |
Returns
undefined
| Mask
Detcted object with segmentation mask
getMaskTex
▸ getMaskTex(result
): undefined
| BodyMaskTexture
Extract mask texture from processing results
Parameters
Name | Type | Description |
---|---|---|
result | SegmentationResult | Processing/tracking results |
Returns
undefined
| BodyMaskTexture
Segmentation mask texture
maskRectUniform
▸ maskRectUniform(b
): [number
, number
, number
, number
]
Convert segmentation mask box to rect shader uniform
Parameters
Name | Type | Description |
---|---|---|
b | Box | Mask box |
Returns
[number
, number
, number
, number
]
Mask rect shader uniform