DriveWorks SDK Reference

| 0.6.67 Release

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-2016 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_FEATURES_BOXTRACKER2D_H__
32 #define DW_FEATURES_BOXTRACKER2D_H__
33 
34 // C api
35 #include <dw/core/Config.h>
36 #include <dw/core/Context.h>
37 #include <dw/core/Types.h>
38 #include <dw/features/Features.h>
39 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
61 
64 typedef struct dwBoxTracker2DObject *dwBoxTracker2DHandle_t;
65 
71 typedef struct {
75  int32_t id;
83  size_t nFeatures;
85 
89 typedef struct {
91  uint32_t maxBoxCount;
115  uint32_t groupThreshold;
149 
151 
161 
163 
177 dwStatus dwBoxTracker2D_initialize(dwBoxTracker2DHandle_t *obj, const dwBoxTracker2DParams *parameters,
178  int32_t imageWidth, int32_t imageHeight, dwContextHandle_t context);
179 
189 dwStatus dwBoxTracker2D_reset(dwBoxTracker2DHandle_t obj);
190 
202 dwStatus dwBoxTracker2D_shallowReset(dwBoxTracker2DHandle_t obj);
203 
213 dwStatus dwBoxTracker2D_release(dwBoxTracker2DHandle_t* obj);
214 
228 dwStatus dwBoxTracker2D_add(const dwBox2D *boxes, size_t num, dwBoxTracker2DHandle_t obj);
229 
243 dwStatus dwBoxTracker2D_addPreClustered(const dwTrackedBox2D *boxes, size_t num, dwBoxTracker2DHandle_t obj);
244 
263 dwStatus dwBoxTracker2D_track(const float32_t *curFeatureLocations,
264  const dwFeatureStatus *curFeatureStatuses,
265  const float32_t *preFeatureLocations, dwBoxTracker2DHandle_t obj);
266 
282 dwStatus dwBoxTracker2D_updateFeatures(const float32_t *featureLocations,
283  const dwFeatureStatus *statuses,
284  size_t nFeatures, dwBoxTracker2DHandle_t obj);
285 
297 dwStatus dwBoxTracker2D_get(const dwTrackedBox2D **boxList, size_t *num, dwBoxTracker2DHandle_t obj);
298 
312 dwStatus dwBoxTracker2D_enablePriorityTracking(dwBool enable, dwBoxTracker2DHandle_t obj);
313 
325 dwStatus dwBoxTracker2D_setTrackingPriority(uint32_t idx, float32_t priority, dwBoxTracker2DHandle_t obj);
326 
338 dwStatus dwBoxTracker2D_getTrackingPriority(float32_t *priority, uint32_t idx, dwBoxTracker2DHandle_t obj);
339 
340 #ifdef __cplusplus
341 }
342 #endif
343 
344 #endif // DW_FEATURES_BOXTRACKER2D_H__
float64_t similarityThreshold
The threshold to define the location and size similarity of the bounding boxes.
Definition: BoxTracker2D.h:109
NVIDIA DriveWorks API: Core Types
float float32_t
Specifies POD types.
Definition: Types.h:77
dwFeatureStatus
Defines the possible status of a feature.
Definition: Features.h:88
size_t nFeatures
Total number of tracked 2D features.
Definition: BoxTracker2D.h:83
Defines a rectangle.
Definition: Types.h:151
DW_API_PUBLIC dwStatus dwBoxTracker2D_updateFeatures(const float32_t *featureLocations, const dwFeatureStatus *statuses, size_t nFeatures, dwBoxTracker2DHandle_t obj)
Updates the feature locations of the 2D bounding boxes.
Holds 2D object-tracker parameters.
Definition: BoxTracker2D.h:89
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.
uint32_t groupThreshold
Minimum possible number of boxes minus 1.
Definition: BoxTracker2D.h:115
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.
DW_API_PUBLIC dwStatus dwBoxTracker2D_release(dwBoxTracker2DHandle_t *obj)
Releases the 2D bounding box tracker.
double float64_t
Definition: Types.h:78
struct dwBoxTracker2DObject * dwBoxTracker2DHandle_t
Handle to a 2D object tracker.
Definition: BoxTracker2D.h:64
dwBox2D box
Bounding box location and size.
Definition: BoxTracker2D.h:73
float64_t maxBoxImageScale
Maximum box scale in the image to track.
Definition: BoxTracker2D.h:98
dwStatus
Status definition.
Definition: Status.h:167
DW_API_PUBLIC dwStatus dwBoxTracker2D_enablePriorityTracking(dwBool enable, dwBoxTracker2DHandle_t obj)
Enables priority tracking of a boundary box.
float32_t confThreshDiscard
Threshold on confidence below which tracker no longer track box location.
Definition: BoxTracker2D.h:147
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:75
float32_t maxMatchDistance
Maximum distance around the closest tracked box to search for a candidate matching box...
Definition: BoxTracker2D.h:122
DW_API_PUBLIC dwStatus dwBoxTracker2D_getTrackingPriority(float32_t *priority, uint32_t idx, dwBoxTracker2DHandle_t obj)
Returns the priority of a bounding box.
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.
uint8_t dwBool
Definition: Types.h:79
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:78
float32_t confThreshConfirm
Threshold on confidence below which tracker no longer report box location.
Definition: BoxTracker2D.h:143
DW_API_PUBLIC dwStatus dwBoxTracker2D_track(const float32_t *curFeatureLocations, const dwFeatureStatus *curFeatureStatuses, const float32_t *preFeatureLocations, dwBoxTracker2DHandle_t obj)
Tracks the bounding boxes.
NVIDIA DriveWorks API: 2D Tracker
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:81
float32_t confRateTrack
Rate at which confidence values of tracked boxes changes from frame to frame, i.e., conf = conf - rate.
Definition: BoxTracker2D.h:138
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:127
float64_t minBoxImageScale
Minimum box scale in the image to track.
Definition: BoxTracker2D.h:103
float32_t confidence
Confidence in tracking results.
Definition: BoxTracker2D.h:77
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:133
#define DW_API_PUBLIC
Definition: Exports.h:76
int32_t trackedFrameCount
Total number of tracked frames.
Definition: BoxTracker2D.h:79
uint32_t maxBoxCount
Maximum 2D boxes to track.
Definition: BoxTracker2D.h:91
uint32_t maxFeatureCountPerBox
Maximum features to track for each 2D bounding box.
Definition: BoxTracker2D.h:93