CLASS
ArdkDepthSession
public final class ArdkDepthSession: ArdkSession.IDisposable, ArdkFeatureSession
Depth feature session for ARDK. Provides control over depth sensing capabilities.
Upon starting the depth session, ARDK 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
featureStatus()
public func featureStatus() -> ArdkFeatureStatus
The current feature status of the depth session.
configure(with:)
public func configure(with config: Configuration) throws
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:
ArdkError.invalidArgumentif the configuration is invalid. Check ARDK's C logs for more information.
Parameters
| Name | Description |
|---|---|
| config | An object that defines this session’s behavior. Only settings that differ from the defaults will be applied. |
start()
public func start()
Starts the depth session, enabling depth data processing with the current configuration.
stop()
public func stop()
Stops the depth session, halting depth data processing.
latestDepth()
public func latestDepth() -> ArdkAsyncState<DepthResult, AwarenessError>
Retrieves the latest depth result from the depth session.
- Returns: An
ArdkAsyncStatecontaining either the latestDepthResult, or anAwarenessError.
latestImageParams()
public func latestImageParams() -> ArdkAsyncState<AwarenessImageParams, AwarenessError>
Retrieves the latest image parameters associated with the depth data.
- Returns: An
ArdkAsyncStatecontaining either the latestAwarenessImageParams, or anAwarenessError.