DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

BoxTracker2D.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed
3 // under the Mutual Non-Disclosure Agreement.
4 //
5 // Notice
6 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
8 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10 //
11 // NVIDIA Corporation assumes no responsibility for the consequences of use of such
12 // information or for any infringement of patents or other rights of third parties that may
13 // result from its use. No license is granted by implication or otherwise under any patent
14 // or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15 // expressly authorized by NVIDIA. Details are subject to change without notice.
16 // This code supersedes and replaces all information previously supplied.
17 // NVIDIA Corporation products are not authorized for use as critical
18 // components in life support devices or systems without express written approval of
19 // NVIDIA Corporation.
20 //
21 // Copyright (c) 2015-2019 NVIDIA Corporation. All rights reserved.
22 //
23 // NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24 // rights in and to this software and related documentation and any modifications thereto.
25 // Any use, reproduction, disclosure or distribution of this software and related
26 // documentation without an express license agreement from NVIDIA Corporation is
27 // strictly prohibited.
28 //
30 
31 #ifndef DW_IMAGEPROCESSING_BOXTRACKER2D_H_
32 #define DW_IMAGEPROCESSING_BOXTRACKER2D_H_
33 
34 // C api
35 #include <dw/core/Config.h>
37 #include <dw/core/base/Types.h>
39 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
61 
64 typedef struct dwBoxTracker2DObject* dwBoxTracker2DHandle_t;
65 
71 typedef struct
72 {
76  int32_t id;
84  size_t nFeatures;
86 
90 typedef struct
91 {
93  uint32_t maxBoxCount;
117  uint32_t groupThreshold;
151 
153 
163 
165 
179 dwStatus dwBoxTracker2D_initialize(dwBoxTracker2DHandle_t* obj, const dwBoxTracker2DParams* parameters,
180  int32_t imageWidth, int32_t imageHeight, dwContextHandle_t context);
181 
191 dwStatus dwBoxTracker2D_reset(dwBoxTracker2DHandle_t obj);
192 
204 dwStatus dwBoxTracker2D_shallowReset(dwBoxTracker2DHandle_t obj);
205 
215 dwStatus dwBoxTracker2D_release(dwBoxTracker2DHandle_t obj);
216 
230 dwStatus dwBoxTracker2D_add(const dwBox2D* boxes, size_t num, dwBoxTracker2DHandle_t obj);
231 
245 dwStatus dwBoxTracker2D_addPreClustered(const dwTrackedBox2D* boxes, size_t num, dwBoxTracker2DHandle_t obj);
246 
265 dwStatus dwBoxTracker2D_track(const float32_t* curFeatureLocations,
266  const dwFeature2DStatus* curFeatureStatuses,
267  const float32_t* preFeatureLocations, dwBoxTracker2DHandle_t obj);
268 
284 dwStatus dwBoxTracker2D_updateFeatures(const float32_t* featureLocations,
285  const dwFeature2DStatus* statuses,
286  size_t nFeatures, dwBoxTracker2DHandle_t obj);
287 
301 dwStatus dwBoxTracker2D_get(const dwTrackedBox2D** boxList, size_t* num, dwBoxTracker2DHandle_t obj);
302 
316 dwStatus dwBoxTracker2D_enablePriorityTracking(bool enable, dwBoxTracker2DHandle_t obj);
317 
329 dwStatus dwBoxTracker2D_setTrackingPriority(uint32_t idx, float32_t priority, dwBoxTracker2DHandle_t obj);
330 
342 dwStatus dwBoxTracker2D_getTrackingPriority(float32_t* priority, uint32_t idx, dwBoxTracker2DHandle_t obj);
343 
344 #ifdef __cplusplus
345 }
346 #endif
347 
348 #endif // DW_FEATURES_BOXTRACKER2D_H_
NVIDIA DriveWorks API: Core Types
DW_API_PUBLIC dwStatus dwBoxTracker2D_enablePriorityTracking(bool enable, dwBoxTracker2DHandle_t obj)
Enables priority tracking of a boundary box.
float64_t similarityThreshold
The threshold to define the location and size similarity of the bounding boxes.
Definition: BoxTracker2D.h:111
float float32_t
Specifies POD types.
Definition: Types.h:70
size_t nFeatures
Total number of tracked 2D features.
Definition: BoxTracker2D.h:84
Defines a rectangle.
Definition: Types.h:189
Holds 2D object-tracker parameters.
Definition: BoxTracker2D.h:90
DW_API_PUBLIC dwStatus dwBoxTracker2D_reset(dwBoxTracker2DHandle_t obj)
Resets the 2D bounding box tracker.
DW_API_PUBLIC dwStatus dwBoxTracker2D_addPreClustered(const dwTrackedBox2D *boxes, size_t num, dwBoxTracker2DHandle_t obj)
Adds pre-clustered bounding boxes to the tracker.
DW_API_PUBLIC dwStatus dwBoxTracker2D_track(const float32_t *curFeatureLocations, const dwFeature2DStatus *curFeatureStatuses, const float32_t *preFeatureLocations, dwBoxTracker2DHandle_t obj)
Tracks the bounding boxes.
uint32_t groupThreshold
Minimum possible number of boxes minus 1.
Definition: BoxTracker2D.h:117
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.
double float64_t
Definition: Types.h:71
struct dwBoxTracker2DObject * dwBoxTracker2DHandle_t
Handle to a 2D object tracker.
Definition: BoxTracker2D.h:64
dwBox2D box
Bounding box location and size.
Definition: BoxTracker2D.h:74
float64_t maxBoxImageScale
Maximum box scale in the image to track.
Definition: BoxTracker2D.h:100
dwStatus
Status definition.
Definition: Status.h:180
float32_t confThreshDiscard
Threshold on confidence below which tracker no longer track box location.
Definition: BoxTracker2D.h:149
DW_API_PUBLIC dwStatus dwBoxTracker2D_get(const dwTrackedBox2D **boxList, size_t *num, dwBoxTracker2DHandle_t obj)
Gets tracked bounding boxes and IDs.
int32_t id
Bounding box ID.
Definition: BoxTracker2D.h:76
float32_t maxMatchDistance
Maximum distance around the closest tracked box to search for a candidate matching box...
Definition: BoxTracker2D.h:124
DW_API_PUBLIC dwStatus dwBoxTracker2D_getTrackingPriority(float32_t *priority, uint32_t idx, dwBoxTracker2DHandle_t obj)
Returns the priority of a bounding box.
dwFeature2DStatus
Defines the possible status of a feature.
Definition: FeatureList.h:62
DW_API_PUBLIC dwStatus dwBoxTracker2D_shallowReset(dwBoxTracker2DHandle_t obj)
Performs a shallow reset on the 2D bounding box tracker.
DW_API_PUBLIC dwStatus dwBoxTracker2D_initParams(dwBoxTracker2DParams *parameters)
Initializes 2D tracker parameters with default values.
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:79
float32_t confThreshConfirm
Threshold on confidence below which tracker no longer report box location.
Definition: BoxTracker2D.h:145
NVIDIA DriveWorks API: Core Methods
DW_API_PUBLIC dwStatus dwBoxTracker2D_add(const dwBox2D *boxes, size_t num, dwBoxTracker2DHandle_t obj)
Adds bounding boxes to the tracker.
DW_API_PUBLIC dwStatus dwBoxTracker2D_setTrackingPriority(uint32_t idx, float32_t priority, dwBoxTracker2DHandle_t obj)
Sets the priority of a bounding box.
Holds a tracked 2D bounding box.
Definition: BoxTracker2D.h:71
const float32_t * featureLocations
2d feature coordinates inside the bounding box.
Definition: BoxTracker2D.h:82
float32_t confRateTrack
Rate at which confidence values of tracked boxes changes from frame to frame, i.e., conf = conf - rate.
Definition: BoxTracker2D.h:140
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:129
float64_t minBoxImageScale
Minimum box scale in the image to track.
Definition: BoxTracker2D.h:105
NVIDIA DriveWorks API: Feature Array and Feature History Array
float32_t confidence
Confidence in tracking results.
Definition: BoxTracker2D.h:78
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.
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:135
#define DW_API_PUBLIC
Definition: Exports.h:54
int32_t trackedFrameCount
Total number of tracked frames.
Definition: BoxTracker2D.h:80
uint32_t maxBoxCount
Maximum 2D boxes to track.
Definition: BoxTracker2D.h:93
uint32_t maxFeatureCountPerBox
Maximum features to track for each 2D bounding box.
Definition: BoxTracker2D.h:95
DW_API_PUBLIC dwStatus dwBoxTracker2D_release(dwBoxTracker2DHandle_t obj)
Releases the 2D bounding box tracker.