@pexip/media-processor 20.3.4 → 21.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/api-docs/README.mdx +438 -0
- package/api-docs/enumerations/AbortReason.mdx +5 -0
- package/api-docs/functions/avg.mdx +15 -0
- package/api-docs/functions/calculateDistance.mdx +18 -0
- package/api-docs/functions/closedCurve.mdx +27 -0
- package/api-docs/functions/copyByteBufferToFloatBuffer.mdx +16 -0
- package/api-docs/functions/createAnalyzerGraphNode.mdx +19 -0
- package/api-docs/functions/createAnalyzerSubscribableGraphNode.mdx +15 -0
- package/api-docs/functions/createAsyncCallbackLoop.mdx +35 -0
- package/api-docs/functions/createAudioContext.mdx +22 -0
- package/api-docs/functions/createAudioDestinationGraphNode.mdx +9 -0
- package/api-docs/functions/createAudioGraph.mdx +28 -0
- package/api-docs/functions/createAudioGraphProxy.mdx +14 -0
- package/api-docs/functions/createAudioSignalDetector.mdx +51 -0
- package/api-docs/functions/createAudioStats.mdx +19 -0
- package/api-docs/functions/createBenchmark.mdx +26 -0
- package/api-docs/functions/createCanvas.mdx +16 -0
- package/api-docs/functions/createCanvasTransform.mdx +14 -0
- package/api-docs/functions/createChannelMergerGraphNode.mdx +19 -0
- package/api-docs/functions/createChannelSplitterGraphNode.mdx +19 -0
- package/api-docs/functions/createDelayGraphNode.mdx +19 -0
- package/api-docs/functions/createDenoiseWorkletGraphNode.mdx +16 -0
- package/api-docs/functions/createFrameCallbackRequest.mdx +29 -0
- package/api-docs/functions/createGainGraphNode.mdx +15 -0
- package/api-docs/functions/createMediaElementSourceGraphNode.mdx +15 -0
- package/api-docs/functions/createSegmenter.mdx +14 -0
- package/api-docs/functions/createStreamDestinationGraphNode.mdx +15 -0
- package/api-docs/functions/createStreamSourceGraphNode.mdx +16 -0
- package/api-docs/functions/createVADetector.mdx +54 -0
- package/api-docs/functions/createVideoProcessor.mdx +14 -0
- package/api-docs/functions/createVideoTrackProcessor.mdx +9 -0
- package/api-docs/functions/createVideoTrackProcessorWithFallback.mdx +15 -0
- package/api-docs/functions/createVoiceDetectorFromProbability.mdx +15 -0
- package/api-docs/functions/createVoiceDetectorFromTimeData.mdx +19 -0
- package/api-docs/functions/createWindowedStats.mdx +23 -0
- package/api-docs/functions/curve.mdx +15 -0
- package/api-docs/functions/fromByteToFloat.mdx +27 -0
- package/api-docs/functions/fromFloatToByte.mdx +27 -0
- package/api-docs/functions/getAudioStats.mdx +19 -0
- package/api-docs/functions/getBezierCurveControlPoints.mdx +26 -0
- package/api-docs/functions/iou.mdx +19 -0
- package/api-docs/functions/isAnalyzerNodeInit.mdx +13 -0
- package/api-docs/functions/isAudioNode.mdx +13 -0
- package/api-docs/functions/isAudioNodeInit.mdx +13 -0
- package/api-docs/functions/isAudioParam.mdx +13 -0
- package/api-docs/functions/isClipping.mdx +18 -0
- package/api-docs/functions/isEqualSize.mdx +22 -0
- package/api-docs/functions/isLowVolume.mdx +19 -0
- package/api-docs/functions/isMono.mdx +22 -0
- package/api-docs/functions/isRenderEffects.mdx +13 -0
- package/api-docs/functions/isSilent.mdx +22 -0
- package/api-docs/functions/isVoiceActivity.mdx +29 -0
- package/api-docs/functions/labelComponents.mdx +20 -0
- package/api-docs/functions/line.mdx +15 -0
- package/api-docs/functions/loadScript.mdx +14 -0
- package/api-docs/functions/loadWasms.mdx +13 -0
- package/api-docs/functions/nearestPowerOfTwo.mdx +21 -0
- package/api-docs/functions/playVideo.mdx +16 -0
- package/api-docs/functions/pow.mdx +29 -0
- package/api-docs/functions/processAverageVolume.mdx +15 -0
- package/api-docs/functions/resumeAudioOnInterruption.mdx +23 -0
- package/api-docs/functions/resumeAudioOnUnmute.mdx +27 -0
- package/api-docs/functions/rms.mdx +15 -0
- package/api-docs/functions/round.mdx +23 -0
- package/api-docs/functions/scoreComponent.mdx +22 -0
- package/api-docs/functions/setVideoElementSrc.mdx +14 -0
- package/api-docs/functions/subscribeTimeoutAnalyzerNode.mdx +22 -0
- package/api-docs/functions/subscribeWorkletNode.mdx +28 -0
- package/api-docs/functions/sum.mdx +15 -0
- package/api-docs/functions/toDecibel.mdx +18 -0
- package/api-docs/interfaces/Analyzer.mdx +368 -0
- package/api-docs/interfaces/AnalyzerSubscribableOptions.mdx +11 -0
- package/api-docs/interfaces/AsyncAssets.mdx +7 -0
- package/api-docs/interfaces/AudioGraph.mdx +92 -0
- package/api-docs/interfaces/AudioGraphOptions.mdx +6 -0
- package/api-docs/interfaces/AudioNodeInit.mdx +127 -0
- package/api-docs/interfaces/AudioNodeProps.mdx +15 -0
- package/api-docs/interfaces/AudioStats.mdx +16 -0
- package/api-docs/interfaces/BackgroundImage.mdx +6 -0
- package/api-docs/interfaces/Benchmark.mdx +47 -0
- package/api-docs/interfaces/Clock.mdx +11 -0
- package/api-docs/interfaces/Denoise.mdx +50 -0
- package/api-docs/interfaces/Detector.mdx +81 -0
- package/api-docs/interfaces/Frame.mdx +11 -0
- package/api-docs/interfaces/Gain.mdx +227 -0
- package/api-docs/interfaces/ImageRecord.mdx +6 -0
- package/api-docs/interfaces/ImageSegmenterOptions.mdx +8 -0
- package/api-docs/interfaces/MPMask.mdx +145 -0
- package/api-docs/interfaces/Point.mdx +10 -0
- package/api-docs/interfaces/Process.mdx +46 -0
- package/api-docs/interfaces/ProcessEventClose.mdx +7 -0
- package/api-docs/interfaces/ProcessEventDebug.mdx +14 -0
- package/api-docs/interfaces/ProcessEventDestroy.mdx +7 -0
- package/api-docs/interfaces/ProcessEventOpen.mdx +14 -0
- package/api-docs/interfaces/ProcessEventProcess.mdx +14 -0
- package/api-docs/interfaces/ProcessEventUpdate.mdx +14 -0
- package/api-docs/interfaces/ProcessWorkerDebugMessage.mdx +6 -0
- package/api-docs/interfaces/ProcessWorkerEvent.mdx +12 -0
- package/api-docs/interfaces/ProcessWorkerEventDebug.mdx +12 -0
- package/api-docs/interfaces/ProcessWorkerEventOpened.mdx +5 -0
- package/api-docs/interfaces/ProcessWorkerEventProcessed.mdx +12 -0
- package/api-docs/interfaces/ProcessWorkerEventUpdated.mdx +5 -0
- package/api-docs/interfaces/ProcessorEvent.mdx +7 -0
- package/api-docs/interfaces/ProcessorOptions.mdx +16 -0
- package/api-docs/interfaces/ProcessorProcessOptions.mdx +6 -0
- package/api-docs/interfaces/Rect.mdx +8 -0
- package/api-docs/interfaces/RenderEventHandlers.mdx +7 -0
- package/api-docs/interfaces/Renderer.mdx +64 -0
- package/api-docs/interfaces/RendererOptions.mdx +32 -0
- package/api-docs/interfaces/Runner.mdx +41 -0
- package/api-docs/interfaces/Segmentation.mdx +5 -0
- package/api-docs/interfaces/SegmentationModelAsset.mdx +8 -0
- package/api-docs/interfaces/SegmentationParams.mdx +35 -0
- package/api-docs/interfaces/SegmentationSmoothingConfig.mdx +5 -0
- package/api-docs/interfaces/Segmenter.mdx +121 -0
- package/api-docs/interfaces/SegmenterOptions.mdx +13 -0
- package/api-docs/interfaces/SelectionOptions.mdx +15 -0
- package/api-docs/interfaces/Size.mdx +10 -0
- package/api-docs/interfaces/Stats.mdx +11 -0
- package/api-docs/interfaces/StatsOptions.mdx +10 -0
- package/api-docs/interfaces/SubscribableOptions.mdx +9 -0
- package/api-docs/interfaces/ThrottleOptions.mdx +8 -0
- package/api-docs/interfaces/Transform.mdx +62 -0
- package/api-docs/interfaces/VideoFrameLike.mdx +8 -0
- package/api-docs/interfaces/VideoProcessor.mdx +38 -0
- package/api-docs/interfaces/Weights.mdx +12 -0
- package/api-docs/interfaces/WorkletMessagePortOptions.mdx +16 -0
- package/api-docs/interfaces/WorkletModule.mdx +6 -0
- package/api-docs/type-aliases/AnalyzerNodeInit.mdx +3 -0
- package/api-docs/type-aliases/AsyncCallback.mdx +7 -0
- package/api-docs/type-aliases/AudioBufferBytes.mdx +5 -0
- package/api-docs/type-aliases/AudioBufferFloats.mdx +6 -0
- package/api-docs/type-aliases/AudioDestinationNodeInit.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeConnectParam.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeInitConnectParam.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeInitConnection.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeInitConnections.mdx +3 -0
- package/api-docs/type-aliases/AudioNodeParam.mdx +3 -0
- package/api-docs/type-aliases/AudioSamples.mdx +17 -0
- package/api-docs/type-aliases/BaseAudioNode.mdx +3 -0
- package/api-docs/type-aliases/Callback.mdx +20 -0
- package/api-docs/type-aliases/Canvas.mdx +3 -0
- package/api-docs/type-aliases/CanvasContext.mdx +3 -0
- package/api-docs/type-aliases/ChannelSplitterNodeInit.mdx +3 -0
- package/api-docs/type-aliases/Color.mdx +12 -0
- package/api-docs/type-aliases/ConnectInitParamBaseType.mdx +3 -0
- package/api-docs/type-aliases/ConnectInitParamType.mdx +3 -0
- package/api-docs/type-aliases/ConnectParamBase.mdx +11 -0
- package/api-docs/type-aliases/ConnectParamBaseType.mdx +3 -0
- package/api-docs/type-aliases/ConnectParamType.mdx +3 -0
- package/api-docs/type-aliases/DelayNodeInit.mdx +3 -0
- package/api-docs/type-aliases/Delegate.mdx +3 -0
- package/api-docs/type-aliases/DenoiseWorkletNodeInit.mdx +3 -0
- package/api-docs/type-aliases/ExtractMessageEventType.mdx +9 -0
- package/api-docs/type-aliases/GainNodeInit.mdx +3 -0
- package/api-docs/type-aliases/ImageMapIterable.mdx +3 -0
- package/api-docs/type-aliases/ImageType.mdx +6 -0
- package/api-docs/type-aliases/IncludeMessageEventDataType.mdx +10 -0
- package/api-docs/type-aliases/InputFrame.mdx +3 -0
- package/api-docs/type-aliases/IsVoice.mdx +19 -0
- package/api-docs/type-aliases/MediaElementAudioSourceNodeInit.mdx +3 -0
- package/api-docs/type-aliases/MediaStreamAudioDestinationNodeInit.mdx +3 -0
- package/api-docs/type-aliases/MediaStreamAudioSourceNodeInit.mdx +3 -0
- package/api-docs/type-aliases/Node.mdx +3 -0
- package/api-docs/type-aliases/NodeConnectionAction.mdx +3 -0
- package/api-docs/type-aliases/Nodes.mdx +3 -0
- package/api-docs/type-aliases/OptionalKeys.mdx +10 -0
- package/api-docs/type-aliases/ProcessEvents.mdx +17 -0
- package/api-docs/type-aliases/ProcessInputType.mdx +3 -0
- package/api-docs/type-aliases/ProcessStatus.mdx +3 -0
- package/api-docs/type-aliases/ProcessVideoTrack.mdx +15 -0
- package/api-docs/type-aliases/ProcessWorkerEvents.mdx +18 -0
- package/api-docs/type-aliases/ProcessorEvents.mdx +3 -0
- package/api-docs/type-aliases/ProcessorWorkerEvents.mdx +3 -0
- package/api-docs/type-aliases/RenderBackend.mdx +3 -0
- package/api-docs/type-aliases/RenderEffects.mdx +3 -0
- package/api-docs/type-aliases/RenderingEvents.mdx +3 -0
- package/api-docs/type-aliases/RunnerCreator.mdx +21 -0
- package/api-docs/type-aliases/SegmentationModel.mdx +3 -0
- package/api-docs/type-aliases/SegmentationTransform.mdx +3 -0
- package/api-docs/type-aliases/TupleOf.mdx +12 -0
- package/api-docs/type-aliases/UniversalAudioContextState.mdx +6 -0
- package/api-docs/type-aliases/Unsubscribe.mdx +9 -0
- package/api-docs/type-aliases/WasmPaths.mdx +3 -0
- package/api-docs/variables/BACKGROUND_BLUR_AMOUNT.mdx +3 -0
- package/api-docs/variables/BACKGROUND_THRESHOLD.mdx +3 -0
- package/api-docs/variables/CLIP_COUNT_THRESHOLD.mdx +6 -0
- package/api-docs/variables/CLIP_THRESHOLD.mdx +5 -0
- package/api-docs/variables/DOWN_SAMPLE_FACTOR.mdx +3 -0
- package/api-docs/variables/EDGE_BLUR_AMOUNT.mdx +3 -0
- package/api-docs/variables/EXCLUDE_BYSTANDERS.mdx +3 -0
- package/api-docs/variables/FOREGROUND_THRESHOLD.mdx +3 -0
- package/api-docs/variables/FRAME_RATE.mdx +3 -0
- package/api-docs/variables/LIGHT_WRAP_BLUR_AMOUNT.mdx +3 -0
- package/api-docs/variables/LIGHT_WRAP_EDGE_BAND.mdx +3 -0
- package/api-docs/variables/LIGHT_WRAP_INTENSITY.mdx +3 -0
- package/api-docs/variables/LIGHT_WRAP_TIGHTNESS.mdx +3 -0
- package/api-docs/variables/LOW_VOLUME_THRESHOLD.mdx +5 -0
- package/api-docs/variables/MASK_COMBINE_RATIO.mdx +3 -0
- package/api-docs/variables/MONO_THRESHOLD.mdx +6 -0
- package/api-docs/variables/MORPH_DILATE_RADIUS_PX.mdx +3 -0
- package/api-docs/variables/MORPH_ERODE_RADIUS_PX.mdx +3 -0
- package/api-docs/variables/MORPH_PASS.mdx +3 -0
- package/api-docs/variables/PERSON_CENTER.mdx +3 -0
- package/api-docs/variables/PLAY_VIDEO_TIMEOUT.mdx +3 -0
- package/api-docs/variables/PROCESSING_HEIGHT.mdx +3 -0
- package/api-docs/variables/PROCESSING_WIDTH.mdx +3 -0
- package/api-docs/variables/PROCESS_STATUS.mdx +22 -0
- package/api-docs/variables/RENDERING_EVENTS.mdx +14 -0
- package/api-docs/variables/RENDER_BACKEND.mdx +10 -0
- package/api-docs/variables/RENDER_EFFECT.mdx +11 -0
- package/api-docs/variables/SEGMENTATION_MODELS.mdx +10 -0
- package/api-docs/variables/SIGMA_RANGE.mdx +3 -0
- package/api-docs/variables/SIGMA_SPACE.mdx +3 -0
- package/api-docs/variables/SILENT_THRESHOLD.mdx +6 -0
- package/api-docs/variables/STRONG_EDGE_BLUR_AMOUNT.mdx +3 -0
- package/api-docs/variables/VOICE_PROBABILITY_THRESHOLD.mdx +5 -0
- package/api-docs/variables/calculateMaxBlurPass.mdx +13 -0
- package/api-docs/variables/clamping.mdx +26 -0
- package/api-docs/variables/createLazyProps.mdx +19 -0
- package/api-docs/variables/createObjectUpdater.mdx +31 -0
- package/api-docs/variables/createRemoteImageBitmap.mdx +21 -0
- package/api-docs/variables/getCanvasRenderingContext2D.mdx +14 -0
- package/api-docs/variables/getErrorMessage.mdx +13 -0
- package/api-docs/variables/getImageSize.mdx +13 -0
- package/api-docs/variables/handleWebGLContextLoss.mdx +21 -0
- package/api-docs/variables/isRenderingEvents.mdx +13 -0
- package/api-docs/variables/isSegmentationModel.mdx +13 -0
- package/api-docs/variables/resize.mdx +30 -0
- package/api-docs/variables/toRenderingEvents.mdx +13 -0
- package/api-docs/variables/urls.mdx +10 -0
- package/dist/common/backends/webgl/binaryMask.d.ts +8 -0
- package/dist/common/backends/webgl/binaryMask.js +95 -0
- package/dist/common/backends/webgl/blender.d.ts +2 -1
- package/dist/common/backends/webgl/blender.js +18 -15
- package/dist/common/backends/webgl/blur.d.ts +1 -1
- package/dist/common/backends/webgl/blur.js +23 -16
- package/dist/common/backends/webgl/canvas.js +9 -4
- package/dist/common/backends/webgl/diffAbsMask.d.ts +10 -0
- package/dist/common/backends/webgl/diffAbsMask.js +103 -0
- package/dist/common/backends/webgl/geodesicReconstruction.d.ts +13 -0
- package/dist/common/backends/webgl/geodesicReconstruction.js +176 -0
- package/dist/common/backends/webgl/jointBilateralFilter.d.ts +12 -0
- package/dist/common/backends/webgl/jointBilateralFilter.js +108 -0
- package/dist/common/backends/webgl/morphErode.d.ts +13 -0
- package/dist/common/backends/webgl/morphErode.js +121 -0
- package/dist/common/backends/webgl/renderer.js +194 -34
- package/dist/common/backends/webgl/replace.d.ts +17 -0
- package/dist/common/backends/webgl/replace.js +126 -0
- package/dist/common/backends/webgl/selectComponent.d.ts +15 -0
- package/dist/common/backends/webgl/selectComponent.js +102 -0
- package/dist/common/backends/webgl/smoothingMask.d.ts +3 -3
- package/dist/common/backends/webgl/smoothingMask.js +22 -21
- package/dist/common/backends/webgl/tentBlur.d.ts +9 -0
- package/dist/common/backends/webgl/tentBlur.js +118 -0
- package/dist/common/backends/webgl/texture.d.ts +1 -1
- package/dist/common/backends/webgl/texture.js +19 -17
- package/dist/common/backends/webgl/textureToTexture.d.ts +1 -1
- package/dist/common/backends/webgl/textureToTexture.js +19 -16
- package/dist/common/backends/webgl/webglUtils.d.ts +7 -1
- package/dist/common/backends/webgl/webglUtils.js +64 -6
- package/dist/common/backends/webgpu/blender.d.ts +6 -1
- package/dist/common/backends/webgpu/blender.js +96 -51
- package/dist/common/backends/webgpu/constants.js +1 -1
- package/dist/common/backends/webgpu/dualFilterBlur.d.ts +2 -3
- package/dist/common/backends/webgpu/dualFilterBlur.js +146 -140
- package/dist/common/backends/webgpu/jointBilateralFilter.d.ts +7 -0
- package/dist/common/backends/webgpu/jointBilateralFilter.js +162 -0
- package/dist/common/backends/webgpu/renderer.js +211 -39
- package/dist/common/backends/webgpu/replace.d.ts +11 -0
- package/dist/common/backends/webgpu/replace.js +175 -0
- package/dist/common/backends/webgpu/resize.d.ts +4 -0
- package/dist/common/backends/webgpu/resize.js +76 -0
- package/dist/common/backends/webgpu/smoothingMask.d.ts +2 -2
- package/dist/common/backends/webgpu/smoothingMask.js +74 -40
- package/dist/common/backends/webgpu/tentBlur.d.ts +5 -0
- package/dist/common/backends/webgpu/tentBlur.js +131 -0
- package/dist/common/backends/webgpu/texture.d.ts +2 -2
- package/dist/common/backends/webgpu/texture.js +24 -19
- package/dist/common/backends/webgpu/textureToTexture.d.ts +1 -1
- package/dist/common/backends/webgpu/textureToTexture.js +28 -15
- package/dist/common/backends/webgpu/types.d.ts +2 -0
- package/dist/common/backends/webgpu/webgpuUtils.d.ts +24 -4
- package/dist/common/backends/webgpu/webgpuUtils.js +60 -11
- package/dist/common/constants.d.ts +19 -5
- package/dist/common/constants.js +19 -5
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.js +1 -0
- package/dist/common/tsconfig.tsbuildinfo +1 -1
- package/dist/common/types/render.d.ts +142 -13
- package/dist/common/types/utils.d.ts +21 -0
- package/dist/common/utils.d.ts +16 -0
- package/dist/common/utils.js +152 -0
- package/dist/main/benchUtils.d.ts +33 -1
- package/dist/main/benchUtils.js +145 -11
- package/dist/main/tsconfig.tsbuildinfo +1 -1
- package/dist/main/video/canvasTransform.d.ts +1 -1
- package/dist/main/video/canvasTransform.js +135 -47
- package/dist/main/video/index.d.ts +1 -1
- package/dist/main/video/index.js +1 -1
- package/dist/workers/mediaWorker.js +35 -162
- package/dist/workers/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -10
- package/dist/common/backends/webgl/shaders/blendFragmentShader.d.ts +0 -1
- package/dist/common/backends/webgl/shaders/blendFragmentShader.js +0 -21
- package/dist/common/backends/webgl/shaders/dualFilterBlurFragmentShader.d.ts +0 -1
- package/dist/common/backends/webgl/shaders/dualFilterBlurFragmentShader.js +0 -45
- package/dist/common/backends/webgl/shaders/smoothingMaskFragmentShader.d.ts +0 -1
- package/dist/common/backends/webgl/shaders/smoothingMaskFragmentShader.js +0 -57
- package/dist/common/backends/webgl/shaders/textureFragmentShader.d.ts +0 -1
- package/dist/common/backends/webgl/shaders/textureFragmentShader.js +0 -16
- package/dist/common/backends/webgl/shaders/vertexShader.d.ts +0 -1
- package/dist/common/backends/webgl/shaders/vertexShader.js +0 -19
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
## Properties
|
|
2
|
+
|
|
3
|
+
| Property | Type |
|
|
4
|
+
| ------ | ------ |
|
|
5
|
+
| <a id="type"></a> `type` | \| `"Error"` \| `"ContextCreationError"` \| `"ContextLost"` \| `"ContextRestored"` \| `"ProcessorRestarted"` \| `"SamplingError"` |
|
|
6
|
+
| <a id="message"></a> `message?` | `string` |
|
|
7
|
+
| <a id="frame"></a> `frame?` | [`VideoFrameLike`](VideoFrameLike.mdx) |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## Extends
|
|
2
|
+
|
|
3
|
+
- [`SegmenterOptions`](SegmenterOptions.mdx)
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Type | Inherited from |
|
|
8
|
+
| ------ | ------ | ------ |
|
|
9
|
+
| <a id="renderoptions"></a> `renderOptions?` | [`RendererOptions`](RendererOptions.mdx) | - |
|
|
10
|
+
| <a id="backgroundimage"></a> `backgroundImage?` | [`ImageRecord`](ImageRecord.mdx) | - |
|
|
11
|
+
| <a id="restart"></a> `restart?` | `boolean` | - |
|
|
12
|
+
| <a id="basepath"></a> `basePath?` | `string` | [`SegmenterOptions`](SegmenterOptions.mdx).[`basePath`](SegmenterOptions.mdx#basepath) |
|
|
13
|
+
| <a id="output"></a> `output?` | `OffscreenCanvas` \| `null` | [`SegmenterOptions`](SegmenterOptions.mdx).[`output`](SegmenterOptions.mdx#output) |
|
|
14
|
+
| <a id="processingwidth"></a> `processingWidth?` | `number` | [`SegmenterOptions`](SegmenterOptions.mdx).[`processingWidth`](SegmenterOptions.mdx#processingwidth) |
|
|
15
|
+
| <a id="processingheight"></a> `processingHeight?` | `number` | [`SegmenterOptions`](SegmenterOptions.mdx).[`processingHeight`](SegmenterOptions.mdx#processingheight) |
|
|
16
|
+
| <a id="imagesegmenteroptions"></a> `imageSegmenterOptions?` | [`ImageSegmenterOptions`](ImageSegmenterOptions.mdx) | [`SegmenterOptions`](SegmenterOptions.mdx).[`imageSegmenterOptions`](SegmenterOptions.mdx#imagesegmenteroptions) |
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
## Properties
|
|
2
|
+
|
|
3
|
+
| Property | Type |
|
|
4
|
+
| ------ | ------ |
|
|
5
|
+
| <a id="contextlost"></a> `contextLost` | (`message`) => `void` |
|
|
6
|
+
| <a id="contextrestored"></a> `contextRestored` | (`message`) => `void` |
|
|
7
|
+
| <a id="contextcreationerror"></a> `contextCreationError` | (`message`) => `void` |
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
## Methods
|
|
2
|
+
|
|
3
|
+
### init()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
init(options?): void | Promise<void>;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
#### Parameters
|
|
10
|
+
|
|
11
|
+
| Parameter | Type |
|
|
12
|
+
| ------ | ------ |
|
|
13
|
+
| `options?` | `Options` |
|
|
14
|
+
|
|
15
|
+
#### Returns
|
|
16
|
+
|
|
17
|
+
`void` \| `Promise`\<`void`\>
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### render()
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
render(
|
|
25
|
+
mask,
|
|
26
|
+
frame,
|
|
27
|
+
options): void;
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
#### Parameters
|
|
31
|
+
|
|
32
|
+
| Parameter | Type |
|
|
33
|
+
| ------ | ------ |
|
|
34
|
+
| `mask` | `ImageBitmap` |
|
|
35
|
+
| `frame` | [`VideoFrameLike`](VideoFrameLike.mdx) |
|
|
36
|
+
| `options` | `Options` |
|
|
37
|
+
|
|
38
|
+
#### Returns
|
|
39
|
+
|
|
40
|
+
`void`
|
|
41
|
+
|
|
42
|
+
***
|
|
43
|
+
|
|
44
|
+
### isContextLost()
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
isContextLost(): boolean;
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
#### Returns
|
|
51
|
+
|
|
52
|
+
`boolean`
|
|
53
|
+
|
|
54
|
+
***
|
|
55
|
+
|
|
56
|
+
### release()
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
release(): void;
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
#### Returns
|
|
63
|
+
|
|
64
|
+
`void`
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Options controlling the rendering and effects for person/background segmentation.
|
|
2
|
+
All values are stable per-frame and can be safely updated in real-time.
|
|
3
|
+
|
|
4
|
+
## Extended by
|
|
5
|
+
|
|
6
|
+
- [`SegmentationParams`](SegmentationParams.mdx)
|
|
7
|
+
|
|
8
|
+
## Properties
|
|
9
|
+
|
|
10
|
+
| Property | Type | Description |
|
|
11
|
+
| ------ | ------ | ------ |
|
|
12
|
+
| <a id="backgroundimageurl"></a> `backgroundImageUrl` | `string` | URL or Data URI for the virtual background image (used in "overlay" effect). |
|
|
13
|
+
| <a id="backgroundbluramount"></a> `backgroundBlurAmount` | `number` | Amount of background blur (radius in px): [0,9]. Recommend: 3–6 for portraits. Higher may be slow and over-blurred. **Default** `3` |
|
|
14
|
+
| <a id="edgebluramount"></a> `edgeBlurAmount` | `number` | Edge blur for mask boundary antialiasing (radius in px): [0,9]. Small values (1–5) smooth mask stair-steps; large values soften edges more visibly. **Default** `4` |
|
|
15
|
+
| <a id="effects"></a> `effects` | `"blur"` \| `"none"` \| `"overlay"` | Effects to apply: "none", "blur", or "overlay". "blur" = background blur. "overlay" = replace BG with backgroundImageUrl. |
|
|
16
|
+
| <a id="backend"></a> `backend` | `"webgl"` \| `"webgpu"` | Backend to render background effects |
|
|
17
|
+
| <a id="foregroundthreshold"></a> `foregroundThreshold` | `number` | [0,1] Upper mask confidence: all mask pixels >= this are considered definite foreground. Adjust to make mask edges tighter or more permissive for foreground inclusion. Example: 0.8 ("mask > 0.8 = sure foreground"). Must always be >= backgroundThreshold. **Default** `0.85` |
|
|
18
|
+
| <a id="backgroundthreshold"></a> `backgroundThreshold` | `number` | [0,1] Lower mask confidence: all mask pixels <= this are considered definite background. Adjust to make mask edges tighter or more permissive for background inclusion. Example: 0.3 ("mask < 0.3 = sure background"). **Default** `0.35` |
|
|
19
|
+
| <a id="sigmaspace"></a> `sigmaSpace` | `number` | Bilateral filter: sigma in pixel space for mask edge snapping. Controls the neighborhood/pixel distance—higher is larger window (5–10 typical). **Default** `5` |
|
|
20
|
+
| <a id="sigmarangelo"></a> `sigmaRangeLo` | `number` | Bilateral filter: minimum sigma in color/luma (for mask interiors), [0,1]. Controls how little color difference is needed to cross-mask regions away from edge. Lower = sharper edge preservation in mask interiors. Example: 0.2 **Default** `0.2` |
|
|
21
|
+
| <a id="sigmarangehi"></a> `sigmaRangeHi` | `number` | Bilateral filter: maximum sigma in color/luma (for mask uncertain zones), [0,1]. Controls how much color similarity is required at uncertain/edge mask locations. Higher = more mask smoothing at edges. Example: 0.8 **Default** `0.8` |
|
|
22
|
+
| <a id="maskcombineratio"></a> `maskCombineRatio` | `number` | Ratio for mask smoothing (how much uncertainty enables temporal blend), [0,1]. Higher = more frame-to-frame blending, more stability but more trailing ghosts. Typical: 0.6–0.85. **Default** `0.8` |
|
|
23
|
+
| <a id="excludebystanders"></a> `excludeBystanders` | `boolean` | **`Experimental`** Whether to exclude bystanders/connected people from the output mask. The main person instance (closest to personCenter OR largest blob) is kept in the output mask. All other bystanders/connected people are suppressed (bystander removal). **Default** `false (no bystander removal, all detected people are included in the mask). @experimental This feature is experimental and only works in WebGL backend.` |
|
|
24
|
+
| <a id="personcenter"></a> `personCenter` | \[`number`, `number`\] | **`Experimental`** Person center: normalized (x, y) in [0,1] image coordinates for main subject selection. Used by the CCL/bias filter to select the main person blob. **Default** `[0.5, 0.42] (= center, slightly above vertical midpoint). @experimental This feature is experimental and only works in WebGL backend.` |
|
|
25
|
+
| <a id="morpheroderadiuspx"></a> `morphErodeRadiusPx` | `number` | **`Experimental`** Morphological erosion: radius in pixels [1,12]. Sets kernel size for bridge-breaking. Larger values break thicker bridges but may erode fine details. **Default** `5 @experimental This feature is experimental and only works in WebGL backend.` |
|
|
26
|
+
| <a id="morphpass"></a> `morphPass` | `number` | **`Experimental`** Morphological pass: number of separable passes [1,10]. More passes increase the effective span. **Default** `4 @experimental This feature is experimental and only works in WebGL backend.` |
|
|
27
|
+
| <a id="morphdilateradiuspx"></a> `morphDilateRadiusPx` | `number` | **`Experimental`** Geodesic dilation: radius in pixels [1,12]. Must match erosion for good reconstruction. **Default** `6 @experimental This feature is experimental and only works in WebGL backend.` |
|
|
28
|
+
| <a id="lightwrapintensity"></a> `lightWrapIntensity` | `number` | [0,1] Light wrap amount (halo intensity) at mask edge. Wraps blurred background color just outside the subject edge onto the subject boundary for realism. **Default** `0.8` |
|
|
29
|
+
| <a id="lightwraptightness"></a> `lightWrapTightness` | `number` | [0.5,4.0] Controls power/tightness of the wrap band falloff. Higher = tighter/narrower wrap. **Default** `1.2` |
|
|
30
|
+
| <a id="lightwrapedgeband"></a> `lightWrapEdgeBand` | `number` | Width of the wrap band (feather size, in normalized mask units) between the backgroundThreshold and foregroundThreshold in [0.0, (foregroundThreshold - backgroundThreshold) / 2] Higher = wider soft halo. **Default** `0.25` |
|
|
31
|
+
| <a id="lightwrapbluramount"></a> `lightWrapBlurAmount` | `number` | Blur amount used for background color in the wrap band (units=blur passes). **Default** `1` |
|
|
32
|
+
| <a id="downsamplefactor"></a> `downSampleFactor` | `number` | Downsampling factor for mask/blurring, must be [2,4]. 2 = half resolution, 4 = quarter resolution for faster filtering. Use for performance tuning vs. quality. **Default** `2` |
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
## Type Parameters
|
|
2
|
+
|
|
3
|
+
| Type Parameter |
|
|
4
|
+
| ------ |
|
|
5
|
+
| `P` *extends* `unknown`[] |
|
|
6
|
+
|
|
7
|
+
## Properties
|
|
8
|
+
|
|
9
|
+
| Property | Type |
|
|
10
|
+
| ------ | ------ |
|
|
11
|
+
| <a id="framerate"></a> `frameRate` | `number` |
|
|
12
|
+
|
|
13
|
+
## Methods
|
|
14
|
+
|
|
15
|
+
### start()
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
start(...params): Promise<void>;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
#### Parameters
|
|
22
|
+
|
|
23
|
+
| Parameter | Type |
|
|
24
|
+
| ------ | ------ |
|
|
25
|
+
| ...`params` | `P` |
|
|
26
|
+
|
|
27
|
+
#### Returns
|
|
28
|
+
|
|
29
|
+
`Promise`\<`void`\>
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### stop()
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
stop(): void;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
#### Returns
|
|
40
|
+
|
|
41
|
+
`void`
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Segmentation model asset that can be used to load a segmentation model.
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Property | Type |
|
|
6
|
+
| ------ | ------ |
|
|
7
|
+
| <a id="path"></a> `path` | `string` |
|
|
8
|
+
| <a id="modelname"></a> `modelName` | [`SegmentationModel`](../type-aliases/SegmentationModel.mdx) |
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Options controlling the rendering and effects for person/background segmentation.
|
|
2
|
+
All values are stable per-frame and can be safely updated in real-time.
|
|
3
|
+
|
|
4
|
+
## Extends
|
|
5
|
+
|
|
6
|
+
- [`RendererOptions`](RendererOptions.mdx)
|
|
7
|
+
|
|
8
|
+
## Properties
|
|
9
|
+
|
|
10
|
+
| Property | Type | Description | Inherited from |
|
|
11
|
+
| ------ | ------ | ------ | ------ |
|
|
12
|
+
| <a id="backgroundimageurl"></a> `backgroundImageUrl` | `string` | URL or Data URI for the virtual background image (used in "overlay" effect). | [`RendererOptions`](RendererOptions.mdx).[`backgroundImageUrl`](RendererOptions.mdx#backgroundimageurl) |
|
|
13
|
+
| <a id="backgroundbluramount"></a> `backgroundBlurAmount` | `number` | Amount of background blur (radius in px): [0,9]. Recommend: 3–6 for portraits. Higher may be slow and over-blurred. **Default** `3` | [`RendererOptions`](RendererOptions.mdx).[`backgroundBlurAmount`](RendererOptions.mdx#backgroundbluramount) |
|
|
14
|
+
| <a id="edgebluramount"></a> `edgeBlurAmount` | `number` | Edge blur for mask boundary antialiasing (radius in px): [0,9]. Small values (1–5) smooth mask stair-steps; large values soften edges more visibly. **Default** `4` | [`RendererOptions`](RendererOptions.mdx).[`edgeBlurAmount`](RendererOptions.mdx#edgebluramount) |
|
|
15
|
+
| <a id="effects"></a> `effects` | `"blur"` \| `"none"` \| `"overlay"` | Effects to apply: "none", "blur", or "overlay". "blur" = background blur. "overlay" = replace BG with backgroundImageUrl. | [`RendererOptions`](RendererOptions.mdx).[`effects`](RendererOptions.mdx#effects) |
|
|
16
|
+
| <a id="backend"></a> `backend` | `"webgl"` \| `"webgpu"` | Backend to render background effects | [`RendererOptions`](RendererOptions.mdx).[`backend`](RendererOptions.mdx#backend) |
|
|
17
|
+
| <a id="foregroundthreshold"></a> `foregroundThreshold` | `number` | [0,1] Upper mask confidence: all mask pixels >= this are considered definite foreground. Adjust to make mask edges tighter or more permissive for foreground inclusion. Example: 0.8 ("mask > 0.8 = sure foreground"). Must always be >= backgroundThreshold. **Default** `0.85` | [`RendererOptions`](RendererOptions.mdx).[`foregroundThreshold`](RendererOptions.mdx#foregroundthreshold) |
|
|
18
|
+
| <a id="backgroundthreshold"></a> `backgroundThreshold` | `number` | [0,1] Lower mask confidence: all mask pixels <= this are considered definite background. Adjust to make mask edges tighter or more permissive for background inclusion. Example: 0.3 ("mask < 0.3 = sure background"). **Default** `0.35` | [`RendererOptions`](RendererOptions.mdx).[`backgroundThreshold`](RendererOptions.mdx#backgroundthreshold) |
|
|
19
|
+
| <a id="sigmaspace"></a> `sigmaSpace` | `number` | Bilateral filter: sigma in pixel space for mask edge snapping. Controls the neighborhood/pixel distance—higher is larger window (5–10 typical). **Default** `5` | [`RendererOptions`](RendererOptions.mdx).[`sigmaSpace`](RendererOptions.mdx#sigmaspace) |
|
|
20
|
+
| <a id="sigmarangelo"></a> `sigmaRangeLo` | `number` | Bilateral filter: minimum sigma in color/luma (for mask interiors), [0,1]. Controls how little color difference is needed to cross-mask regions away from edge. Lower = sharper edge preservation in mask interiors. Example: 0.2 **Default** `0.2` | [`RendererOptions`](RendererOptions.mdx).[`sigmaRangeLo`](RendererOptions.mdx#sigmarangelo) |
|
|
21
|
+
| <a id="sigmarangehi"></a> `sigmaRangeHi` | `number` | Bilateral filter: maximum sigma in color/luma (for mask uncertain zones), [0,1]. Controls how much color similarity is required at uncertain/edge mask locations. Higher = more mask smoothing at edges. Example: 0.8 **Default** `0.8` | [`RendererOptions`](RendererOptions.mdx).[`sigmaRangeHi`](RendererOptions.mdx#sigmarangehi) |
|
|
22
|
+
| <a id="maskcombineratio"></a> `maskCombineRatio` | `number` | Ratio for mask smoothing (how much uncertainty enables temporal blend), [0,1]. Higher = more frame-to-frame blending, more stability but more trailing ghosts. Typical: 0.6–0.85. **Default** `0.8` | [`RendererOptions`](RendererOptions.mdx).[`maskCombineRatio`](RendererOptions.mdx#maskcombineratio) |
|
|
23
|
+
| <a id="excludebystanders"></a> `excludeBystanders` | `boolean` | **`Experimental`** Whether to exclude bystanders/connected people from the output mask. The main person instance (closest to personCenter OR largest blob) is kept in the output mask. All other bystanders/connected people are suppressed (bystander removal). **Default** `false (no bystander removal, all detected people are included in the mask). @experimental This feature is experimental and only works in WebGL backend.` | [`RendererOptions`](RendererOptions.mdx).[`excludeBystanders`](RendererOptions.mdx#excludebystanders) |
|
|
24
|
+
| <a id="personcenter"></a> `personCenter` | \[`number`, `number`\] | **`Experimental`** Person center: normalized (x, y) in [0,1] image coordinates for main subject selection. Used by the CCL/bias filter to select the main person blob. **Default** `[0.5, 0.42] (= center, slightly above vertical midpoint). @experimental This feature is experimental and only works in WebGL backend.` | [`RendererOptions`](RendererOptions.mdx).[`personCenter`](RendererOptions.mdx#personcenter) |
|
|
25
|
+
| <a id="morpheroderadiuspx"></a> `morphErodeRadiusPx` | `number` | **`Experimental`** Morphological erosion: radius in pixels [1,12]. Sets kernel size for bridge-breaking. Larger values break thicker bridges but may erode fine details. **Default** `5 @experimental This feature is experimental and only works in WebGL backend.` | [`RendererOptions`](RendererOptions.mdx).[`morphErodeRadiusPx`](RendererOptions.mdx#morpheroderadiuspx) |
|
|
26
|
+
| <a id="morphpass"></a> `morphPass` | `number` | **`Experimental`** Morphological pass: number of separable passes [1,10]. More passes increase the effective span. **Default** `4 @experimental This feature is experimental and only works in WebGL backend.` | [`RendererOptions`](RendererOptions.mdx).[`morphPass`](RendererOptions.mdx#morphpass) |
|
|
27
|
+
| <a id="morphdilateradiuspx"></a> `morphDilateRadiusPx` | `number` | **`Experimental`** Geodesic dilation: radius in pixels [1,12]. Must match erosion for good reconstruction. **Default** `6 @experimental This feature is experimental and only works in WebGL backend.` | [`RendererOptions`](RendererOptions.mdx).[`morphDilateRadiusPx`](RendererOptions.mdx#morphdilateradiuspx) |
|
|
28
|
+
| <a id="lightwrapintensity"></a> `lightWrapIntensity` | `number` | [0,1] Light wrap amount (halo intensity) at mask edge. Wraps blurred background color just outside the subject edge onto the subject boundary for realism. **Default** `0.8` | [`RendererOptions`](RendererOptions.mdx).[`lightWrapIntensity`](RendererOptions.mdx#lightwrapintensity) |
|
|
29
|
+
| <a id="lightwraptightness"></a> `lightWrapTightness` | `number` | [0.5,4.0] Controls power/tightness of the wrap band falloff. Higher = tighter/narrower wrap. **Default** `1.2` | [`RendererOptions`](RendererOptions.mdx).[`lightWrapTightness`](RendererOptions.mdx#lightwraptightness) |
|
|
30
|
+
| <a id="lightwrapedgeband"></a> `lightWrapEdgeBand` | `number` | Width of the wrap band (feather size, in normalized mask units) between the backgroundThreshold and foregroundThreshold in [0.0, (foregroundThreshold - backgroundThreshold) / 2] Higher = wider soft halo. **Default** `0.25` | [`RendererOptions`](RendererOptions.mdx).[`lightWrapEdgeBand`](RendererOptions.mdx#lightwrapedgeband) |
|
|
31
|
+
| <a id="lightwrapbluramount"></a> `lightWrapBlurAmount` | `number` | Blur amount used for background color in the wrap band (units=blur passes). **Default** `1` | [`RendererOptions`](RendererOptions.mdx).[`lightWrapBlurAmount`](RendererOptions.mdx#lightwrapbluramount) |
|
|
32
|
+
| <a id="downsamplefactor"></a> `downSampleFactor` | `number` | Downsampling factor for mask/blurring, must be [2,4]. 2 = half resolution, 4 = quarter resolution for faster filtering. Use for performance tuning vs. quality. **Default** `2` | [`RendererOptions`](RendererOptions.mdx).[`downSampleFactor`](RendererOptions.mdx#downsamplefactor) |
|
|
33
|
+
| <a id="segmenter"></a> `segmenter` | [`Segmenter`](Segmenter.mdx) | - | - |
|
|
34
|
+
| <a id="width"></a> `width` | `number` | - | - |
|
|
35
|
+
| <a id="height"></a> `height` | `number` | - | - |
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
## Extends
|
|
2
|
+
|
|
3
|
+
- [`Process`](Process.mdx)
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Type | Inherited from |
|
|
8
|
+
| ------ | ------ | ------ |
|
|
9
|
+
| <a id="status"></a> `status` | \| `"closed"` \| `"closing"` \| `"Error"` \| `"destroyed"` \| `"destroying"` \| `"idle"` \| `"new"` \| `"opened"` \| `"opening"` \| `"processing"` \| `"updated"` \| `"updating"` | [`Process`](Process.mdx).[`status`](Process.mdx#status) |
|
|
10
|
+
| <a id="modelasset"></a> `modelAsset` | [`SegmentationModelAsset`](SegmentationModelAsset.mdx) | - |
|
|
11
|
+
| <a id="backgroundimage"></a> `backgroundImage?` | [`BackgroundImage`](BackgroundImage.mdx) | - |
|
|
12
|
+
|
|
13
|
+
## Methods
|
|
14
|
+
|
|
15
|
+
### close()
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
close(): void;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
#### Returns
|
|
22
|
+
|
|
23
|
+
`void`
|
|
24
|
+
|
|
25
|
+
#### Inherited from
|
|
26
|
+
|
|
27
|
+
[`Process`](Process.mdx).[`close`](Process.mdx#close)
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### destroy()
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
destroy(): Promise<void>;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
#### Returns
|
|
38
|
+
|
|
39
|
+
`Promise`\<`void`\>
|
|
40
|
+
|
|
41
|
+
#### Inherited from
|
|
42
|
+
|
|
43
|
+
[`Process`](Process.mdx).[`destroy`](Process.mdx#destroy)
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### open()
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
open(options?): Promise<void>;
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
#### Parameters
|
|
54
|
+
|
|
55
|
+
| Parameter | Type |
|
|
56
|
+
| ------ | ------ |
|
|
57
|
+
| `options?` | [`ProcessorOptions`](ProcessorOptions.mdx) |
|
|
58
|
+
|
|
59
|
+
#### Returns
|
|
60
|
+
|
|
61
|
+
`Promise`\<`void`\>
|
|
62
|
+
|
|
63
|
+
#### Overrides
|
|
64
|
+
|
|
65
|
+
[`Process`](Process.mdx).[`open`](Process.mdx#open)
|
|
66
|
+
|
|
67
|
+
***
|
|
68
|
+
|
|
69
|
+
### update()
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
update(options): Promise<void>;
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
#### Parameters
|
|
76
|
+
|
|
77
|
+
| Parameter | Type |
|
|
78
|
+
| ------ | ------ |
|
|
79
|
+
| `options` | [`ProcessorOptions`](ProcessorOptions.mdx) |
|
|
80
|
+
|
|
81
|
+
#### Returns
|
|
82
|
+
|
|
83
|
+
`Promise`\<`void`\>
|
|
84
|
+
|
|
85
|
+
***
|
|
86
|
+
|
|
87
|
+
### process()
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
process(input, options?): Promise<VideoFrameLike | undefined>;
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
#### Parameters
|
|
94
|
+
|
|
95
|
+
| Parameter | Type |
|
|
96
|
+
| ------ | ------ |
|
|
97
|
+
| `input` | [`VideoFrameLike`](VideoFrameLike.mdx) |
|
|
98
|
+
| `options?` | [`RendererOptions`](RendererOptions.mdx) |
|
|
99
|
+
|
|
100
|
+
#### Returns
|
|
101
|
+
|
|
102
|
+
`Promise`\<[`VideoFrameLike`](VideoFrameLike.mdx) \| `undefined`\>
|
|
103
|
+
|
|
104
|
+
***
|
|
105
|
+
|
|
106
|
+
### subscribe()
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
subscribe(event, callback): Unsubscribe;
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
#### Parameters
|
|
113
|
+
|
|
114
|
+
| Parameter | Type |
|
|
115
|
+
| ------ | ------ |
|
|
116
|
+
| `event` | \| `"Error"` \| `"ContextCreationError"` \| `"ContextLost"` \| `"ContextRestored"` \| `"ProcessorRestarted"` \| `"SamplingError"` |
|
|
117
|
+
| `callback` | `Callback`\<`void`\> |
|
|
118
|
+
|
|
119
|
+
#### Returns
|
|
120
|
+
|
|
121
|
+
`Unsubscribe`
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## Extended by
|
|
2
|
+
|
|
3
|
+
- [`ProcessorOptions`](ProcessorOptions.mdx)
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Type |
|
|
8
|
+
| ------ | ------ |
|
|
9
|
+
| <a id="basepath"></a> `basePath?` | `string` |
|
|
10
|
+
| <a id="output"></a> `output?` | `OffscreenCanvas` \| `null` |
|
|
11
|
+
| <a id="processingwidth"></a> `processingWidth?` | `number` |
|
|
12
|
+
| <a id="processingheight"></a> `processingHeight?` | `number` |
|
|
13
|
+
| <a id="imagesegmenteroptions"></a> `imageSegmenterOptions?` | [`ImageSegmenterOptions`](ImageSegmenterOptions.mdx) |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
## Extends
|
|
2
|
+
|
|
3
|
+
- [`Weights`](Weights.mdx)
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Type | Inherited from |
|
|
8
|
+
| ------ | ------ | ------ |
|
|
9
|
+
| <a id="iou"></a> `iou` | `number` | [`Weights`](Weights.mdx).[`iou`](Weights.mdx#iou) |
|
|
10
|
+
| <a id="area"></a> `area` | `number` | [`Weights`](Weights.mdx).[`area`](Weights.mdx#area) |
|
|
11
|
+
| <a id="height"></a> `height` | `number` | [`Weights`](Weights.mdx).[`height`](Weights.mdx#height) |
|
|
12
|
+
| <a id="center"></a> `center` | `number` | [`Weights`](Weights.mdx).[`center`](Weights.mdx#center) |
|
|
13
|
+
| <a id="centerx"></a> `centerX` | `number` | - |
|
|
14
|
+
| <a id="centery"></a> `centerY` | `number` | - |
|
|
15
|
+
| <a id="decay"></a> `decay` | `number` | - |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Properties
|
|
2
|
+
|
|
3
|
+
| Property | Type |
|
|
4
|
+
| ------ | ------ |
|
|
5
|
+
| <a id="sumx"></a> `sumX` | `number` |
|
|
6
|
+
| <a id="sumy"></a> `sumY` | `number` |
|
|
7
|
+
| <a id="count"></a> `count` | `number` |
|
|
8
|
+
| <a id="minx"></a> `minX` | `number` |
|
|
9
|
+
| <a id="maxx"></a> `maxX` | `number` |
|
|
10
|
+
| <a id="miny"></a> `minY` | `number` |
|
|
11
|
+
| <a id="maxy"></a> `maxY` | `number` |
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Stats options for calculating the audio stats
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Property | Type | Default value | Description |
|
|
6
|
+
| ------ | ------ | ------ | ------ |
|
|
7
|
+
| <a id="samples"></a> `samples` | [`AudioSamples`](../type-aliases/AudioSamples.mdx) | `undefined` | Used for the analysis |
|
|
8
|
+
| <a id="basestats"></a> `baseStats?` | [`AudioStats`](AudioStats.mdx) | `undefined` | this will be used for accumulation |
|
|
9
|
+
| <a id="clipthreshold"></a> `clipThreshold?` | `number` | `1.0` as assuming it is float value | Threshold for clipping |
|
|
10
|
+
| <a id="silentthreshold"></a> `silentThreshold?` | `number` | `1.0 / 32767` | Threshold for silent |
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
## Extends
|
|
2
|
+
|
|
3
|
+
- `Transformer`\<`I`, `O`\>
|
|
4
|
+
|
|
5
|
+
## Type Parameters
|
|
6
|
+
|
|
7
|
+
| Type Parameter |
|
|
8
|
+
| ------ |
|
|
9
|
+
| `I` |
|
|
10
|
+
| `O` |
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
| Property | Type | Inherited from |
|
|
15
|
+
| ------ | ------ | ------ |
|
|
16
|
+
| <a id="flush"></a> `flush?` | `TransformerFlushCallback`\<`O`\> | `Transformer.flush` |
|
|
17
|
+
| <a id="readabletype"></a> `readableType?` | `undefined` | `Transformer.readableType` |
|
|
18
|
+
| <a id="start"></a> `start?` | `TransformerStartCallback`\<`O`\> | `Transformer.start` |
|
|
19
|
+
| <a id="transform"></a> `transform?` | `TransformerTransformCallback`\<`I`, `O`\> | `Transformer.transform` |
|
|
20
|
+
| <a id="writabletype"></a> `writableType?` | `undefined` | `Transformer.writableType` |
|
|
21
|
+
|
|
22
|
+
## Methods
|
|
23
|
+
|
|
24
|
+
### init()
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
init(options?): Promise<void>;
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
#### Parameters
|
|
31
|
+
|
|
32
|
+
| Parameter | Type |
|
|
33
|
+
| ------ | ------ |
|
|
34
|
+
| `options?` | [`ProcessorOptions`](ProcessorOptions.mdx) |
|
|
35
|
+
|
|
36
|
+
#### Returns
|
|
37
|
+
|
|
38
|
+
`Promise`\<`void`\>
|
|
39
|
+
|
|
40
|
+
***
|
|
41
|
+
|
|
42
|
+
### close()
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
close(): void;
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
#### Returns
|
|
49
|
+
|
|
50
|
+
`void`
|
|
51
|
+
|
|
52
|
+
***
|
|
53
|
+
|
|
54
|
+
### destroy()
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
destroy(): Promise<void>;
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### Returns
|
|
61
|
+
|
|
62
|
+
`Promise`\<`void`\>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
## Properties
|
|
2
|
+
|
|
3
|
+
| Property | Type |
|
|
4
|
+
| ------ | ------ |
|
|
5
|
+
| <a id="frame"></a> `frame` | `ImageBitmap` \| `VideoFrame` |
|
|
6
|
+
| <a id="timestamp"></a> `timestamp` | `number` |
|
|
7
|
+
| <a id="width"></a> `width` | `number` |
|
|
8
|
+
| <a id="height"></a> `height` | `number` |
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
## Properties
|
|
2
|
+
|
|
3
|
+
| Property | Type | Description |
|
|
4
|
+
| ------ | ------ | ------ |
|
|
5
|
+
| <a id="process"></a> `process` | (`source`) => `Promise`\<`MediaStream`\> | Process the video and return a MediaStream |
|
|
6
|
+
| <a id="destroy"></a> `destroy` | () => `Promise`\<`void`\> | Destroy the segmentation wasm instance |
|
|
7
|
+
|
|
8
|
+
## Methods
|
|
9
|
+
|
|
10
|
+
### open()
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
open(options?): Promise<void>;
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
#### Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Type |
|
|
19
|
+
| ------ | ------ |
|
|
20
|
+
| `options?` | [`ProcessorOptions`](ProcessorOptions.mdx) |
|
|
21
|
+
|
|
22
|
+
#### Returns
|
|
23
|
+
|
|
24
|
+
`Promise`\<`void`\>
|
|
25
|
+
|
|
26
|
+
***
|
|
27
|
+
|
|
28
|
+
### close()
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
close(): void;
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Stop the process of video segmentation
|
|
35
|
+
|
|
36
|
+
#### Returns
|
|
37
|
+
|
|
38
|
+
`void`
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## Extended by
|
|
2
|
+
|
|
3
|
+
- [`SelectionOptions`](SelectionOptions.mdx)
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Type |
|
|
8
|
+
| ------ | ------ |
|
|
9
|
+
| <a id="iou"></a> `iou` | `number` |
|
|
10
|
+
| <a id="area"></a> `area` | `number` |
|
|
11
|
+
| <a id="height"></a> `height` | `number` |
|
|
12
|
+
| <a id="center"></a> `center` | `number` |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
## Extended by
|
|
2
|
+
|
|
3
|
+
- [`AnalyzerSubscribableOptions`](AnalyzerSubscribableOptions.mdx)
|
|
4
|
+
|
|
5
|
+
## Type Parameters
|
|
6
|
+
|
|
7
|
+
| Type Parameter |
|
|
8
|
+
| ------ |
|
|
9
|
+
| `T` |
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
| Property | Type |
|
|
14
|
+
| ------ | ------ |
|
|
15
|
+
| <a id="messagehandler"></a> `messageHandler` | (`message`) => `void` |
|
|
16
|
+
| <a id="errorhandler"></a> `errorHandler?` | (`event`) => `void` |
|