Skip to main content
←API Reference ←com.nianticspatial.nsdk.depth

DepthSession

↳ extends SessionBase

Declaration​

class DepthSession

Summary​

Creates a Depth session. Depth enables your app to get estimated depth information from passed in camera data. This must be called before using any other Depth functionality.


Properties​

NameTypeSummary
ardkHandleLong
-
depthUpdatesFlow<NSDKResult<DepthBuffer, AwarenessStatus>>
Flow of depth updates. This is the primary way to receive depth updates in Kotlin.
pollingIntervalMsLong
-

Functions​

NameTypeSummary
configurevoid
Configures depth settings and parameters.
This sets up depth configuration including frame rate,
and model the feature is using.
Must be called after [create] but before [start].
latestDepthNSDKResult<DepthBuffer, AwarenessStatus>
Get the latest output from the depth feature
This retrieves the latest depth buffer represented as an image, along side other
relevant information such as the camera pose, intrinsics, and min max disparity.
latestDepthImageParamsNSDKResult<AwarenessImageParams, AwarenessStatus>
Get the latest image params from the depth feature
This retrieves the latest camera parameters used in the depth calculations.
Includes the camera extrinsics, intrinsics, and image width and height.
onDestroyvoid
-
onInitvoid
-
startvoid
Starts the depth process.
This begins generating depth information from passed in camera data.
stopvoid
Stops the depth process.
This halts depth processing.
You can restart depth later with [start].