SemanticsSession
↳ extends SessionBase
Creates a Semantics session for semantic understanding. The Semantics feature allows you to understand the semantic content of the environment, identifying objects, surfaces, and other meaningful elements in the scene.
Declaration
class SemanticsSessionProperties
| Name | Type | Summary |
|---|---|---|
| ardkHandle | Long | - |
| confidenceChannel | SemanticsChannel | The channel index for confidence updates. Can be changed at any time. When changed, the polling will automatically use the new channel index on the next poll. Default is 0 (Sky channel). |
| confidenceUpdates | Flow<NSDKResult<SemanticsResult, AwarenessStatus>> | Flow of confidence updates for the currently configured semantic channel. Confidence values represent the probability that a pixel belongs to the channel. The channel index can be changed by setting [confidenceChannelIndex]. |
| imageParamsUpdates | Flow<NSDKResult<AwarenessImageParams, AwarenessStatus>> | Flow of image parameter updates. Image parameters include camera intrinsics, extrinsics, and image dimensions. |
| packedChannelsUpdates | Flow<NSDKResult<SemanticsResult, AwarenessStatus>> | Flow of packed channel updates. This is the primary way to receive packed channel semantics updates. Packed channels contain all semantic channels in a single bitmask per pixel. |
| pollingIntervalMs | Long | - |
| suppressionMaskUpdates | Flow<NSDKResult<SemanticsResult, AwarenessStatus>> | Flow of suppression mask updates. Suppression masks indicate which pixels should be suppressed in semantic processing. |
Functions
| Name | Type | Summary |
|---|---|---|
| channelNames | Array<SemanticsChannel> | Gets the names of available semantic channels. This retrieves a list of semantic channel names that can be used for semantic analysis and classification. |
| configure | void | Configures semantics settings and parameters. This sets up semantics configuration including quality settings, processing parameters, and output options. This can only be run while the session is stopped. |
| featureStatus | FeatureStatus | Reports errors that have occurred with processes running inside this session. Check this periodically to see if any errors have occurred with processes running inside this feature. Once an error has been flagged, it will remain flagged until the culprit process has been run again and completed successfully. |
| latestConfidence | NSDKResult<SemanticsResult, AwarenessStatus> | Gets the latest semantics confidence data. This retrieves the most recent confidence values for semantic classification of the current frame. |
| latestImageParams | NSDKResult<AwarenessImageParams, AwarenessStatus> | Gets the latest image parameters for semantics processing. This retrieves the most recent image parameters used for semantic analysis of the current frame. |
| latestPackedChannel | NSDKResult<SemanticsResult, AwarenessStatus> | Gets the latest packed channel semantics data. This retrieves the most recent packed channel data for semantic classification of the current frame. |
| latestSuppressionMask | NSDKResult<SemanticsResult, AwarenessStatus> | Gets the latest suppression mask data. This retrieves the most recent suppression mask for semantic classification of the current frame. |
| onDestroy | void | - |
| onInit | void | - |
| start | void | Starts the semantics session. This begins actively analyzing the environment for semantic content, identifying objects and surfaces in real-time. |
| stop | void | Stops the semantics session. This halts semantics processing while keeping the native semantics session loaded. You can restart semantics later with [start]. |
| unpackChannelsFromBitmask | EnumSet<SemanticsChannel> | Unpacks semantic channels from a packed channel bitmask. This converts a bitmask value (where each bit represents a semantic channel) into an EnumSet of SemanticsChannel enum values representing the channels present in the bitmask. |