NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
BoxTracker2D.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2015-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef DW_IMAGEPROCESSING_TRACKING_BOXTRACKER2D_BOXTRACKER2D_H_
14 #define DW_IMAGEPROCESSING_TRACKING_BOXTRACKER2D_BOXTRACKER2D_H_
15 
16 // C api
17 #include <dw/core/base/Config.h>
18 #include <dw/core/context/Context.h>
19 #include <dw/core/base/Types.h>
20 #include <dw/imageprocessing/features/FeatureList.h>
21 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
44 
47 typedef struct dwBoxTracker2DObject* dwBoxTracker2DHandle_t;
48 
54 typedef struct
55 {
59  int32_t id;
67  size_t nFeatures;
69 
73 typedef struct
74 {
76  uint32_t maxBoxCount;
100  uint32_t groupThreshold;
134 
136 
150 
152 
171  int32_t imageWidth, int32_t imageHeight, dwContextHandle_t context);
172 
187 
204 
219 
238 
257 
279 dwStatus dwBoxTracker2D_track(const float32_t* curFeatureLocations,
280  const dwFeature2DStatus* curFeatureStatuses,
281  const float32_t* preFeatureLocations, dwBoxTracker2DHandle_t obj);
282 
302 dwStatus dwBoxTracker2D_updateFeatures(const float32_t* featureLocations,
303  const dwFeature2DStatus* statuses,
304  size_t nFeatures, dwBoxTracker2DHandle_t obj);
305 
324 
343 
360 
377 
378 #ifdef __cplusplus
379 }
380 #endif
381 
382 #endif // DW_IMAGEPROCESSING_TRACKING_BOXTRACKER2D_BOXTRACKER2D_H_
dwBoxTracker2DParams::minBoxImageScale
float64_t minBoxImageScale
Minimum box scale in the image to track.
Definition: BoxTracker2D.h:88
dwBoxTracker2DParams::maxBoxImageScale
float64_t maxBoxImageScale
Maximum box scale in the image to track.
Definition: BoxTracker2D.h:83
dwBoxTracker2D_getTrackingPriority
DW_API_PUBLIC dwStatus dwBoxTracker2D_getTrackingPriority(float32_t *priority, uint32_t idx, dwBoxTracker2DHandle_t obj)
Returns the priority of a bounding box.
dwBoxTracker2DParams::maxBoxCount
uint32_t maxBoxCount
Maximum 2D boxes to track.
Definition: BoxTracker2D.h:76
dwBoxTracker2D_initialize
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.
dwBoxTracker2DParams::groupThreshold
uint32_t groupThreshold
Minimum possible number of boxes minus 1.
Definition: BoxTracker2D.h:100
dwTrackedBox2D::trackedFrameCount
int32_t trackedFrameCount
Total number of tracked frames.
Definition: BoxTracker2D.h:63
dwTrackedBox2D::id
int32_t id
Bounding box ID.
Definition: BoxTracker2D.h:59
dwBoxTracker2D_shallowReset
DW_API_PUBLIC dwStatus dwBoxTracker2D_shallowReset(dwBoxTracker2DHandle_t obj)
Performs a shallow reset on the 2D bounding box tracker.
dwBoxTracker2D_enablePriorityTracking
DW_API_PUBLIC dwStatus dwBoxTracker2D_enablePriorityTracking(bool enable, dwBoxTracker2DHandle_t obj)
Enables priority tracking of a boundary box.
dwBoxTracker2D_add
DW_API_PUBLIC dwStatus dwBoxTracker2D_add(const dwBox2D *boxes, size_t num, dwBoxTracker2DHandle_t obj)
Adds bounding boxes to the tracker.
dwTrackedBox2D::confidence
float32_t confidence
Confidence in tracking results.
Definition: BoxTracker2D.h:61
dwBoxTracker2D_get
DW_API_PUBLIC dwStatus dwBoxTracker2D_get(const dwTrackedBox2D **boxList, size_t *num, dwBoxTracker2DHandle_t obj)
Gets tracked bounding boxes and IDs.
dwBoxTracker2DParams::confThreshConfirm
float32_t confThreshConfirm
Threshold on confidence below which tracker no longer report box location.
Definition: BoxTracker2D.h:128
dwBoxTracker2D_reset
DW_API_PUBLIC dwStatus dwBoxTracker2D_reset(dwBoxTracker2DHandle_t obj)
Resets the 2D bounding box tracker.
dwBoxTracker2DParams::maxMatchDistance
float32_t maxMatchDistance
Maximum distance around the closest tracked box to search for a candidate matching box.
Definition: BoxTracker2D.h:107
dwBoxTracker2D_setTrackingPriority
DW_API_PUBLIC dwStatus dwBoxTracker2D_setTrackingPriority(uint32_t idx, float32_t priority, dwBoxTracker2DHandle_t obj)
Sets the priority of a bounding box.
dwTrackedBox2D::nFeatures
size_t nFeatures
Total number of tracked 2D features.
Definition: BoxTracker2D.h:67
dwBoxTracker2D_release
DW_API_PUBLIC dwStatus dwBoxTracker2D_release(dwBoxTracker2DHandle_t obj)
Releases the 2D bounding box tracker.
float32_t
float float32_t
Specifies POD types.
Definition: BasicTypes.h:41
dwRect
Defines a rectangle.
Definition: GeometricTypes.h:47
dwTrackedBox2D::featureLocations
const float32_t * featureLocations
2d feature coordinates inside the bounding box.
Definition: BoxTracker2D.h:65
dwBoxTracker2D_track
DW_API_PUBLIC dwStatus dwBoxTracker2D_track(const float32_t *curFeatureLocations, const dwFeature2DStatus *curFeatureStatuses, const float32_t *preFeatureLocations, dwBoxTracker2DHandle_t obj)
Tracks the bounding boxes.
dwBoxTracker2DParams::confThreshDiscard
float32_t confThreshDiscard
Threshold on confidence below which tracker no longer track box location.
Definition: BoxTracker2D.h:132
dwBoxTracker2D_addPreClustered
DW_API_PUBLIC dwStatus dwBoxTracker2D_addPreClustered(const dwTrackedBox2D *boxes, size_t num, dwBoxTracker2DHandle_t obj)
Adds pre-clustered bounding boxes to the tracker.
dwTrackedBox2D
Holds a tracked 2D bounding box.
Definition: BoxTracker2D.h:54
float64_t
double float64_t
Definition: BasicTypes.h:42
dwFeature2DStatus
dwFeature2DStatus
Defines the feature array used by detector and tracker.
Definition: FeatureList.h:52
dwContextHandle_t
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:74
dwBoxTracker2DParams
Holds 2D object-tracker parameters.
Definition: BoxTracker2D.h:73
dwBoxTracker2DParams::maxFeatureCountPerBox
uint32_t maxFeatureCountPerBox
Maximum features to track for each 2D bounding box.
Definition: BoxTracker2D.h:78
dwBoxTracker2DParams::minMatchOverlap
float32_t minMatchOverlap
Minimum amount of overlap between a tracked box and an added box such that the 2 boxes can be conside...
Definition: BoxTracker2D.h:112
dwBoxTracker2D_initParams
DW_API_PUBLIC dwStatus dwBoxTracker2D_initParams(dwBoxTracker2DParams *parameters)
Initializes 2D tracker parameters with default values.
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:27
dwBoxTracker2DParams::confRateDetect
float32_t confRateDetect
Rate at which to combine confidence values of new boxes to existing tracked boxes when a new box is f...
Definition: BoxTracker2D.h:118
DW_API_PUBLIC
#define DW_API_PUBLIC
Definition: Exports.h:38
obj
const NvSciSyncObj *const obj
Definition: wfdext.h:120
dwTrackedBox2D::box
dwBox2D box
Bounding box location and size.
Definition: BoxTracker2D.h:57
dwBoxTracker2D_updateFeatures
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.
dwBoxTracker2DParams::similarityThreshold
float64_t similarityThreshold
The threshold to define the location and size similarity of the bounding boxes.
Definition: BoxTracker2D.h:94
dwBoxTracker2DParams::confRateTrack
float32_t confRateTrack
Rate at which confidence values of tracked boxes changes from frame to frame, i.e....
Definition: BoxTracker2D.h:123
dwBoxTracker2DHandle_t
struct dwBoxTracker2DObject * dwBoxTracker2DHandle_t
Handle to a 2D object tracker.
Definition: BoxTracker2D.h:47