|
Auterion App SDK
Auterion SDK is a library that can be used by AuterionOS apps to communicate with the system.
|
Publisher for 2D object detections. More...
#include <auterion_sdk/object_detection/object_detection_provider.hpp>
Public Member Functions | |
| ObjectDetectionProvider (SDK &sdk, DetectionProviderOptions options={}) | |
| Construct a new Object Detection Provider object. | |
| virtual | ~ObjectDetectionProvider () |
| Destroy the Object Detection Provider object. | |
| ObjectDetectionProvider (const ObjectDetectionProvider &)=delete | |
| ObjectDetectionProvider & | operator= (const ObjectDetectionProvider &)=delete |
| ObjectDetectionProvider (ObjectDetectionProvider &&)=delete | |
| ObjectDetectionProvider & | operator= (ObjectDetectionProvider &&)=delete |
| void | updateDetections2D (const ImageDetections2D &image_detections) |
| Publishes 2D object detections. | |
| void | setClassCatalog (const ClassCatalog &catalog) |
| Replaces the class catalog at runtime, for example after a model switch. | |
| ObjectDetectionEnabledSubscription & | objectDetectionEnabledSubscription () const |
| Get the object detection enabled subscription. | |
| ObjectDetectionProvider & | subscribeObjectDetectionEnabled (ObjectDetectionEnabledCallback callback=nullptr) |
| Subscribe to object detection enabled state changes to control provider operation. | |
Publisher for 2D object detections.
Example usage:
To publish 2D object detections:
To control provider operation based on object detection enabled state:
To check object detection enabled state programmatically and control processing:
|
explicit |
Construct a new Object Detection Provider object.
| sdk | The SDK instance to use for creating providers. |
| options | Where detections go, and the class names to publish with them. Defaults to both channels enabled and no class names. |
| ObjectDetectionEnabledSubscription & auterion::ObjectDetectionProvider::objectDetectionEnabledSubscription | ( | ) | const |
Get the object detection enabled subscription.
| void auterion::ObjectDetectionProvider::setClassCatalog | ( | const ClassCatalog & | catalog | ) |
Replaces the class catalog at runtime, for example after a model switch.
No-op when MAVLink output is disabled. Thread-safe with respect to updateDetections2D.
| catalog | The catalog backing the class ids. |
|
inline |
Subscribe to object detection enabled state changes to control provider operation.
Providers should use this to start/stop computational work based on whether the object detection is enabled or disabled, avoiding unnecessary resource usage.
| callback | The callback function to be invoked when the object detection enabled state changes. Should implement logic to start/stop processing accordingly. |
| void auterion::ObjectDetectionProvider::updateDetections2D | ( | const ImageDetections2D & | image_detections | ) |
Publishes 2D object detections.
| image_detections | The image detections to publish. |