Defines the 2D box tracker API.
|
DW_API_PUBLIC dwStatus | dwBoxTracker2D_initParams (dwBoxTracker2DParams *parameters) |
| Initializes 2D tracker parameters with default values. More...
|
|
DW_API_PUBLIC dwStatus | dwBoxTracker2D_initialize (dwBoxTracker2DHandle_t *obj, const dwBoxTracker2DParams *parameters, int32_t imageWidth, int32_t imageHeight, dwContextHandle_t context) |
| Initializes 2D bounding box tracker. More...
|
|
DW_API_PUBLIC dwStatus | dwBoxTracker2D_reset (dwBoxTracker2DHandle_t obj) |
| Resets the 2D bounding box tracker. More...
|
|
DW_API_PUBLIC dwStatus | dwBoxTracker2D_shallowReset (dwBoxTracker2DHandle_t obj) |
| Performs a shallow reset on the 2D bounding box tracker. More...
|
|
DW_API_PUBLIC dwStatus | dwBoxTracker2D_release (dwBoxTracker2DHandle_t obj) |
| Releases the 2D bounding box tracker. More...
|
|
DW_API_PUBLIC dwStatus | dwBoxTracker2D_add (const dwBox2D *boxes, size_t num, dwBoxTracker2DHandle_t obj) |
| Adds bounding boxes to the tracker. More...
|
|
DW_API_PUBLIC dwStatus | dwBoxTracker2D_addPreClustered (const dwTrackedBox2D *boxes, size_t num, dwBoxTracker2DHandle_t obj) |
| Adds pre-clustered bounding boxes to the tracker. More...
|
|
DW_API_PUBLIC dwStatus | dwBoxTracker2D_track (const float32_t *curFeatureLocations, const dwFeature2DStatus *curFeatureStatuses, const float32_t *preFeatureLocations, dwBoxTracker2DHandle_t obj) |
| Tracks the bounding boxes. More...
|
|
DW_API_PUBLIC dwStatus | dwBoxTracker2D_updateFeatures (const float32_t *featureLocations, const dwFeature2DStatus *statuses, size_t nFeatures, dwBoxTracker2DHandle_t obj) |
| Updates the feature locations of the 2D bounding boxes. More...
|
|
DW_API_PUBLIC dwStatus | dwBoxTracker2D_get (const dwTrackedBox2D **boxList, size_t *num, dwBoxTracker2DHandle_t obj) |
| Gets tracked bounding boxes and IDs. More...
|
|
DW_API_PUBLIC dwStatus | dwBoxTracker2D_enablePriorityTracking (bool enable, dwBoxTracker2DHandle_t obj) |
| Enables priority tracking of a boundary box. More...
|
|
DW_API_PUBLIC dwStatus | dwBoxTracker2D_setTrackingPriority (uint32_t idx, float32_t priority, dwBoxTracker2DHandle_t obj) |
| Sets the priority of a bounding box. More...
|
|
DW_API_PUBLIC dwStatus | dwBoxTracker2D_getTrackingPriority (float32_t *priority, uint32_t idx, dwBoxTracker2DHandle_t obj) |
| Returns the priority of a bounding box. More...
|
|
◆ dwBoxTracker2DHandle_t
◆ dwBoxTracker2D_add()
Adds bounding boxes to the tracker.
The tracker first performs clustering to the group close-by redundant bounding boxes. In each cluster, the average box is computed and added to the tracker.
- Parameters
-
[in] | boxes | The list of 2D bounding boxes to added. |
[in] | num | Number of boxes passed in the given list. |
[in] | obj | Handle to the 2D bounding box tracker. |
- Returns
- DW_INVALID_ARGUMENT if box tracker2D handle is NULL or num is greater than 0 and boxes is NULL.
DW_SUCCESS otherwise.
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwBoxTracker2D_addPreClustered()
Adds pre-clustered bounding boxes to the tracker.
The tracker assumes input boxes are pre-clustered and all boxes are added to the tracker. If the input box matches an internal tracked box, the ID of the internal tracked box is preferred.
- Parameters
-
[in] | boxes | The list of pre-clustered boxes. |
[in] | num | Number of boxes passed in the given list. |
[in] | obj | Handle to the 2D bounding box tracker. |
- Returns
- DW_INVALID_ARGUMENT if box tracker2D handle is NULL or num is greater than 0 and boxes is NULL.
DW_SUCCESS otherwise.
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwBoxTracker2D_enablePriorityTracking()
Enables priority tracking of a boundary box.
The priority of the bounding boxes can be used to control the association between 2D features and bounding boxes in case of overlap. With priority tracking enabled, the box with the higher priority gets the feature.
- Parameters
-
[in] | enable | Enables (true)/disable(false) priority tracking. |
[in] | obj | Handle to the 2D bounding box tracker. |
- Returns
- DW_INVALID_ARGUMENT if box tracker2D handle is NULL.
DW_SUCCESS otherwise.
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwBoxTracker2D_get()
Gets tracked bounding boxes and IDs.
- Parameters
-
[out] | boxList | The list of tracked bounding boxes. |
[out] | num | Number of bounding box returned in boxList. |
[in] | obj | Handle to the 2D bounding box tracker. |
- Returns
- DW_INVALID_ARGUMENT if any parameter is NULL.
DW_SUCCESS otherwise.
- Note
boxList
is pointing to an internally allocated memory.
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwBoxTracker2D_getTrackingPriority()
Returns the priority of a bounding box.
- Parameters
-
[out] | priority | Tracking priority (smaller value == higher priority). |
[in] | idx | Index of the object. |
[in] | obj | Handle to the 2D bounding box tracker. |
- Returns
- DW_INVALID_ARGUMENT if box tracker2D handle or priority is NULL.
DW_SUCCESS otherwise.
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwBoxTracker2D_initialize()
Initializes 2D bounding box tracker.
- Parameters
-
[out] | obj | Handle to 2D bounding box tracker. |
[in] | parameters | The 2D tracker parameters. |
[in] | imageWidth | The width of the image. |
[in] | imageHeight | The height of the image. |
[in] | context | Handle to the context under which it is created. |
- Returns
- DW_INVALID_ARGUMENT if box tracker2D handle or parameters are NULL or imageWidht or imageHeight are equal or less than zero.
DW_SUCCESS otherwise.
- API Group
- Init: Yes
- Runtime: No
- De-Init: No
◆ dwBoxTracker2D_initParams()
Initializes 2D tracker parameters with default values.
- Parameters
-
[out] | parameters | 2D tracker parameters. |
- Returns
- DW_INVALID_ARGUMENT if parameters are NULL.
DW_SUCCESS otherwise.
- API Group
- Init: Yes
- Runtime: No
- De-Init: No
◆ dwBoxTracker2D_release()
Releases the 2D bounding box tracker.
- Parameters
-
[in] | obj | Handle to release. |
- Returns
- DW_INVALID_HANDLE if box tracker2D handle is NULL.
DW_SUCCESS otherwise.
- API Group
- Init: Yes
- Runtime: No
- De-Init: Yes
◆ dwBoxTracker2D_reset()
Resets the 2D bounding box tracker.
- Parameters
-
- Returns
- DW_INVALID_ARGUMENT if box tracker2D handle is NULL.
DW_SUCCESS otherwise.
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwBoxTracker2D_setTrackingPriority()
Sets the priority of a bounding box.
- Parameters
-
[in] | idx | Index of the object. |
[in] | priority | Tracking priority (smaller value == higher priority). |
[in] | obj | Handle to the 2D bounding box tracker. |
- Returns
- DW_INVALID_ARGUMENT if box tracker2D handle is NULL.
DW_SUCCESS otherwise.
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwBoxTracker2D_shallowReset()
Performs a shallow reset on the 2D bounding box tracker.
This function does not initialize all variables. It just sets the count to zero.
- Parameters
-
- Returns
- DW_INVALID_ARGUMENT if box tracker2D handle is NULL.
DW_SUCCESS otherwise.
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwBoxTracker2D_track()
Tracks the bounding boxes.
- Parameters
-
[in] | curFeatureLocations | The feature locations computed in the current image frame. It has 2*featureCount number of items. |
[in] | curFeatureStatuses | The feature statues of the current image frame. It has featureCount number of items. |
[in] | preFeatureLocations | The feature locations computed in the previous image frame. It has 2*featureCount number of items. |
[in] | obj | Handle to the 2D bounding box tracker. |
- Returns
- DW_INVALID_ARGUMENT if any parameter is NULL.
DW_SUCCESS otherwise.
- Note
- Ensure the curFeatureLocations argument has the same size as preFeatureLocations.
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwBoxTracker2D_updateFeatures()
Updates the feature locations of the 2D bounding boxes.
This function call must occur between dwBoxTracker2D_track() and dwBoxTracker2D_get().
- Parameters
-
[in] | featureLocations | The feature locations with 2*nFeatures items. |
[in] | statuses | The feature statuses with nFeatures items. |
[in] | nFeatures | The number of 2D features, 0 < nFeatures < 8000. |
[in] | obj | Handle to the 2D bounding box tracker. |
- Returns
- DW_INVALID_ARGUMENT if box the tracker2D handle, featureLocations, or statuses are NULL; or if nFeatures is greater than 8000.
DW_SUCCESS otherwise.
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes