DriveWorks SDK Reference
3.5.78 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>
36 #include <dw/core/Context.h>
37 #include <dw/core/Types.h>
39 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
63 
66 typedef struct dwBoxTracker2DObject* dwBoxTracker2DHandle_t;
67 
73 typedef struct
74 {
78  int32_t id;
86  size_t nFeatures;
88 
92 typedef struct
93 {
95  uint32_t maxBoxCount;
119  uint32_t groupThreshold;
153 
155 
165 
167 
181 dwStatus dwBoxTracker2D_initialize(dwBoxTracker2DHandle_t* obj, const dwBoxTracker2DParams* parameters,
182  int32_t imageWidth, int32_t imageHeight, dwContextHandle_t context);
183 
193 dwStatus dwBoxTracker2D_reset(dwBoxTracker2DHandle_t obj);
194 
206 dwStatus dwBoxTracker2D_shallowReset(dwBoxTracker2DHandle_t obj);
207 
217 dwStatus dwBoxTracker2D_release(dwBoxTracker2DHandle_t obj);
218 
232 dwStatus dwBoxTracker2D_add(const dwBox2D* boxes, size_t num, dwBoxTracker2DHandle_t obj);
233 
247 dwStatus dwBoxTracker2D_addPreClustered(const dwTrackedBox2D* boxes, size_t num, dwBoxTracker2DHandle_t obj);
248 
267 dwStatus dwBoxTracker2D_track(const float32_t* curFeatureLocations,
268  const dwFeature2DStatus* curFeatureStatuses,
269  const float32_t* preFeatureLocations, dwBoxTracker2DHandle_t obj);
270 
286 dwStatus dwBoxTracker2D_updateFeatures(const float32_t* featureLocations,
287  const dwFeature2DStatus* statuses,
288  size_t nFeatures, dwBoxTracker2DHandle_t obj);
289 
303 dwStatus dwBoxTracker2D_get(const dwTrackedBox2D** boxList, size_t* num, dwBoxTracker2DHandle_t obj);
304 
318 dwStatus dwBoxTracker2D_enablePriorityTracking(bool enable, dwBoxTracker2DHandle_t obj);
319 
331 dwStatus dwBoxTracker2D_setTrackingPriority(uint32_t idx, float32_t priority, dwBoxTracker2DHandle_t obj);
332 
344 dwStatus dwBoxTracker2D_getTrackingPriority(float32_t* priority, uint32_t idx, dwBoxTracker2DHandle_t obj);
345 
346 #ifdef __cplusplus
347 }
348 #endif
349 
350 #endif // DW_FEATURES_BOXTRACKER2D_H_
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:113
NVIDIA DriveWorks API: Core Types
float float32_t
Specifies POD types.
Definition: Types.h:70
size_t nFeatures
Total number of tracked 2D features.
Definition: BoxTracker2D.h:86
Defines a rectangle.
Definition: Types.h:189
Holds 2D object-tracker parameters.
Definition: BoxTracker2D.h:92
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:119
NVIDIA DriveWorks API: Core Methods
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:66
dwBox2D box
Bounding box location and size.
Definition: BoxTracker2D.h:76
float64_t maxBoxImageScale
Maximum box scale in the image to track.
Definition: BoxTracker2D.h:102
dwStatus
Status definition.
Definition: Status.h:178
float32_t confThreshDiscard
Threshold on confidence below which tracker no longer track box location.
Definition: BoxTracker2D.h:151
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:78
float32_t maxMatchDistance
Maximum distance around the closest tracked box to search for a candidate matching box...
Definition: BoxTracker2D.h:126
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:64
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:80
float32_t confThreshConfirm
Threshold on confidence below which tracker no longer report box location.
Definition: BoxTracker2D.h:147
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:73
const float32_t * featureLocations
2d feature coordinates inside the bounding box.
Definition: BoxTracker2D.h:84
float32_t confRateTrack
Rate at which confidence values of tracked boxes changes from frame to frame, i.e., conf = conf - rate.
Definition: BoxTracker2D.h:142
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:131
float64_t minBoxImageScale
Minimum box scale in the image to track.
Definition: BoxTracker2D.h:107
NVIDIA DriveWorks API: Feature Array and Feature History Array
float32_t confidence
Confidence in tracking results.
Definition: BoxTracker2D.h:80
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:137
#define DW_API_PUBLIC
Definition: Exports.h:56
int32_t trackedFrameCount
Total number of tracked frames.
Definition: BoxTracker2D.h:82
uint32_t maxBoxCount
Maximum 2D boxes to track.
Definition: BoxTracker2D.h:95
uint32_t maxFeatureCountPerBox
Maximum features to track for each 2D bounding box.
Definition: BoxTracker2D.h:97
DW_API_PUBLIC dwStatus dwBoxTracker2D_release(dwBoxTracker2DHandle_t obj)
Releases the 2D bounding box tracker.