UseDepthOutputProps
interface UseDepthOutputProps extends PartialProperties
allowDeferredStart?
optional allowDeferredStart: booleanAllow this output to start later in the capture pipeline startup process.
Enabling this lets the camera prioritize outputs needed for preview first,
then start the CameraFrameOutput shortly afterwards.
This can improve startup behavior when preview responsiveness is more important than receiving frame-processor frames immediately.
Inherited from
FrameOutputOptions.allowDeferredStart
dropFramesWhileBusy?
optional dropFramesWhileBusy: booleanWhether to drop new Frames when they arrive while the Frame Processor is still executing.
- If set to
true, theCameraFrameOutputwill automatically drop any Frames that arrive while your Frame Processor is still executing to avoid exhausting resources, at the risk of loosing information since Frames may be dropped. - If set to
false, theCameraFrameOutputwill queue up any Frames that arrive while your Frame Processor is still executing and immediatelly call it once it is free again, at the risk of exhausting resources and growing RAM.
Default
trueInherited from
FrameOutputOptions.dropFramesWhileBusy
enableFiltering?
optional enableFiltering: booleanEnables or disables depth data filtering to smoothen out uneven spots in the depth map.
Inherited from
DepthFrameOutputOptions.enableFiltering
onDepth()?
optional onDepth: (depth: Depth) => voidA callback that will be called for every Depth Frame
the Camera produces.
This must be a synchronous function, like a Worklet.
The Depth Frame must be disposed as soon as it
is no longer needed to avoid stalling the Camera pipeline.
Worklet
onDepthFrameDropped()?
optional onDepthFrameDropped: (reason: FrameDroppedReason) => voidA callback that will be called every time the Camera pipeline
has to drop a Depth Frame.
See
targetResolution?
optional targetResolution: SizeThe target Frame Resolution to use.
Discussion
The CameraSession will negotiate all
output targetResolutions and constraints (such
as HDR, FPS, etc) in a CameraSessionConfig to
finalize the Resolution used for the Output.
This is therefore merely a resolution target, and may
not be exactly met.
If the given targetResolution cannot be met
exactly, its aspect ratio (computed by
Size.width / Size.height) will
be prioritized over pixel count.