Skip to main content
API Reference SwiftyNsdk

NsdkDepthSession

Depth feature session for NSDK. Provides control over depth sensing capabilities....

Declaration

final class NsdkDepthSession

Summary

Depth feature session for NSDK. Provides control over depth sensing capabilities. Upon starting the depth session, NSDK will begin processing AR frames to generate depth data. The latest depth data can be retrieved using latestDepth(), and latestImageParams() provides information to synchronize the depth image with camera frame.


Methods

NameTypeSummary
configurevoid
Configures the session with the specified settings.
- Attention: This method must be called while the session is stopped,
or else configuration will fail. In that case, while this function returns without
throwing, configuration will still fail asynchronously. Use featureStatus()
to check that configuration has not failed.
- Parameter config: An object that defines this session's behavior.
Only settings that differ from the defaults will be applied.
- Throws: NsdkError.invalidArgument if the configuration is invalid.
Check NSDK's C logs for more information.
featureStatusNsdkFeatureStatus
The current feature status of the depth session.
latestDepthNsdkAsyncState<DepthResult, AwarenessError>
Retrieves the latest depth result from the depth session.
- Returns: An NsdkAsyncState containing either the latest DepthResult,
or an AwarenessError.
latestImageParamsNsdkAsyncState<AwarenessImageParams, AwarenessError>
Retrieves the latest image parameters associated with the depth data.
- Returns: An NsdkAsyncState containing either the latest AwarenessImageParams,
or an AwarenessError.
startvoid
Starts the depth session, enabling depth data processing with the current configuration.
stopvoid
Stops the depth session, halting depth data processing.

Nested Types

Structs

NameTypeSummary
ConfigurationConfiguration
The type of configuration used by this session

Enums

NameTypeSummary
DepthModeDepthMode
Options for different depth sensing modes.
These trade off between performance and quality.

Relationships

conforms to: NsdkFeatureSession