ObjectDetectionSession
↳ extends SessionBase
Creates and manages an instance of the Object Detection ARDK feature. Object Detection classifies objects in the camera image. Use [start] and [stop] to control processing, and [configure] to adjust inference settings like frame rate and filtering.
Declaration
class ObjectDetectionSessionProperties
| Name | Type | Summary |
|---|---|---|
| ardkHandle | Long | - |
| detectionUpdates | Flow<NSDKResult<ObjectDetectionResult, AwarenessStatus>> | Flow of object detection updates. This is the primary way to receive detection updates in Kotlin. The Flow emits [NSDKResult] containing [ObjectDetectionResult] whenever new detections are available. |
| pollingIntervalMs | Long | - |
Functions
| Name | Type | Summary |
|---|---|---|
| calculateViewportMapping | Matrix? | Compute a transform [Matrix] that maps detection boxes from model frame coordinates into viewport coordinates. |
| configure | void | Configures the object detection feature with provided parameters. |
| featureStatus | FeatureStatus | Reports errors that have occurred with processes running inside this feature. 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. |
| getClassNames | NSDKResult<Array<String>, AwarenessStatus> | Query the set of possible object detection class names. |
| getLatestDetections | NSDKResult<ObjectDetectionResult, AwarenessStatus> | Get the latest object detection results. |
| getMetadata | NSDKResult<ObjectDetectionMetadata, AwarenessStatus> | Get the metadata for the object detection feature. If previously retrieved successfully, the cached value is returned. |
| onDestroy | void | - |
| onInit | void | - |
| start | void | Starts object detection. |
| stop | void | Stops object detection. |