Skip to main content
Version: Next

Type Alias: DepthEstimator

DepthEstimator = object

Defined in: extensions/cv/tasks/depthEstimation.ts:63

Depth estimation task runner.

Properties​

dispose()​

readonly dispose: () => void

Defined in: extensions/cv/tasks/depthEstimation.ts:67

Releases all allocated native resources.

Returns​

void


estimateDepth()​

readonly estimateDepth: (input) => Promise<DepthMap>

Defined in: extensions/cv/tasks/depthEstimation.ts:80

Asynchronously performs depth estimation on the input image.

The full input image is stretched to the model's input size, and the floating-point depth map is resized back to the input image dimensions. Depth values retain the model's original scale.

Parameters​

input​

ImageBuffer

The input image buffer.

Returns​

Promise<DepthMap>

A promise resolving to the depth map at the input image resolution.

Throws​

With code RESOURCE_BUSY if the model is in use, or RESOURCE_DISPOSED if disposed.


estimateDepthWorklet()​

readonly estimateDepthWorklet: (input) => DepthMap

Defined in: extensions/cv/tasks/depthEstimation.ts:86

Synchronous version of estimateDepth to be executed directly on the caller or worklet thread.

Parameters​

input​

ImageBuffer

Returns​

DepthMap