DriveWorks SDK Reference

| 0.6.67 Release

Tracker.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) 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 
46 #ifndef DW_OBJECT_TRACKER_H__
47 #define DW_OBJECT_TRACKER_H__
48 
49 #include <dw/object/Object.h>
50 #include <dw/features/Features.h>
51 #include <dw/image/Image.h>
52 #include <dw/core/Context.h>
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
59 
62 typedef struct dwObjectTrackerObject *dwObjectTrackerHandle_t;
63 
66  uint32_t iterationsLK;
67 
69  uint32_t windowSizeLK;
70 
73 
76 
79 
81  uint32_t maxFeatureCount;
82 
84  uint32_t historyCapacity;
86 
87 typedef struct dwObjectTrackerParams {
90 
94 
98 
104 
110 
113 
116 
119 
122  uint32_t maxNumObjects;
123 
129 
141  dwObjectTrackerParams *objectTrackerParamsArray,
142  uint32_t numClasses);
143 
160 dwStatus dwObjectTracker_initialize(dwObjectTrackerHandle_t *obj, dwContextHandle_t ctx,
161  const dwImageProperties *imageProperties,
162  const dwObjectFeatureTrackerParams *featureTrackerParams,
163  const dwObjectTrackerParams *objectTrackerParamsArray,
164  uint32_t numClasses);
165 
174 dwStatus dwObjectTracker_reset(dwObjectTrackerHandle_t obj);
175 
186 dwStatus dwObjectTracker_release(dwObjectTrackerHandle_t *obj);
187 
198 dwStatus dwObjectTracker_featureTrackDeviceAsync(const dwImageCUDA *image, dwObjectTrackerHandle_t obj);
199 
215 dwStatus dwObjectTracker_boxTrackHost(dwObject *trackedDetections, size_t *numTrackedDetections,
216  const dwObject *previousDetections, size_t numPreviousDetections,
217  uint32_t classIdx, dwObjectTrackerHandle_t obj);
218 
240  size_t *numTrackedDetections,
241  const dwObject *previousDetections,
242  size_t numPreviousDetections,
243  const dwFeatureListPointers *featureList,
244  uint32_t maxFeatureCount,
245  uint32_t historyCapacity,
246  uint32_t currentTimeIdx,
247  uint32_t classIdx, dwObjectTrackerHandle_t obj);
248 
258 dwStatus dwObjectTracker_setCUDAStream(cudaStream_t stream, dwObjectTrackerHandle_t obj);
259 
269 dwStatus dwObjectTracker_getCUDAStream(cudaStream_t *stream, dwObjectTrackerHandle_t obj);
270 
271 #ifdef __cplusplus
272 }
273 #endif
274 
275 #endif // DW_OBJECT_TRACKER_H__
float float32_t
Specifies POD types.
Definition: Types.h:77
DW_API_PUBLIC dwStatus dwObjectTracker_setCUDAStream(cudaStream_t stream, dwObjectTrackerHandle_t obj)
Sets the CUDA stream used.
Defines a rectangle.
Definition: Types.h:151
Defines a CUDA image.
Definition: Image.h:263
NVIDIA DriveWorks API: Core Methods
uint32_t historyCapacity
Capacity of feature history circular buffer.
Definition: Tracker.h:84
DW_API_PUBLIC dwStatus dwObjectTracker_reset(dwObjectTrackerHandle_t obj)
Resets the ObjectTracker.
float32_t detectorScoreThreshold
Higher thresholds detect less features. Default is 0.3.
Definition: Tracker.h:72
uint32_t maxFeatureCountPerBox
Maximum features to track for each 2D bounding box. Default is 500.
Definition: Tracker.h:89
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
DW_API_PUBLIC dwStatus dwObjectTracker_featureTrackDeviceAsync(const dwImageCUDA *image, dwObjectTrackerHandle_t obj)
Tracks the features from a previously given image to the current image.
dwStatus
Status definition.
Definition: Status.h:167
float32_t confRateTrackMin
Min rate at which confidence values of tracked boxes changes from frame to frame. ...
Definition: Tracker.h:112
float32_t maxBoxImageScale
Maximum box scale in the image to track.
Definition: Tracker.h:93
DW_API_PUBLIC dwStatus dwObjectTracker_boxTrackHost(dwObject *trackedDetections, size_t *numTrackedDetections, const dwObject *previousDetections, size_t numPreviousDetections, uint32_t classIdx, dwObjectTrackerHandle_t obj)
Tracks objects in previousDetections based on the tracked features by previously called dwObjectTrack...
DW_API_PUBLIC dwStatus dwObjectTracker_getCUDAStream(cudaStream_t *stream, dwObjectTrackerHandle_t obj)
Gets the CUDA stream used.
uint32_t maxNumObjects
Maximum number of objects to track.
Definition: Tracker.h:122
float32_t confThreshDiscard
Threshold on confidence below which tracker no longer tracks the box location. Default is 0...
Definition: Tracker.h:115
uint32_t pyramidLevelCount
Number of levels in the pyramid. Default is 3.
Definition: Tracker.h:75
DW_API_PUBLIC dwStatus dwObjectTracker_release(dwObjectTrackerHandle_t *obj)
Releases the ObjectTracker module.
uint32_t iterationsLK
Upper bound on number of Lucas-Kanade iterations per level. Default is 10.
Definition: Tracker.h:66
dwRect maskROI
Region of interest where the objects are tracked. Default is full image.
Definition: Tracker.h:78
float32_t confRateDetect
Rate at which to combine confidence values of new boxes to existing tracked boxes when a new box is f...
Definition: Tracker.h:103
float32_t minBoxImageScale
Minimum box scale in the image to track.
Definition: Tracker.h:97
DW_API_PUBLIC dwStatus dwObjectTracker_initDefaultParams(dwObjectFeatureTrackerParams *featureTrackerParams, dwObjectTrackerParams *objectTrackerParamsArray, uint32_t numClasses)
Initializes ObjectTracker parameters with default values.
uint8_t dwBool
Definition: Types.h:79
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:78
float32_t confRateTrackMax
Max rate at which confidence values of tracked boxes changes from frame to frame. ...
Definition: Tracker.h:109
NVIDIA DriveWorks API: Object Methods
DW_API_PUBLIC dwStatus dwObjectTracker_boxTrackHostExternalFeatures(dwObject *trackedDetections, size_t *numTrackedDetections, const dwObject *previousDetections, size_t numPreviousDetections, const dwFeatureListPointers *featureList, uint32_t maxFeatureCount, uint32_t historyCapacity, uint32_t currentTimeIdx, uint32_t classIdx, dwObjectTrackerHandle_t obj)
This function enables tracking of objects using already extracted features from the previous and curr...
NVIDIA DriveWorks API: 2D Tracker
Holds pointers to the data exposed by a feature list.
Definition: Features.h:143
uint32_t windowSizeLK
Window size used in the Lucas-Kanade tracker. Supported sizes are 6,8,10,12,14. Default is 8...
Definition: Tracker.h:69
uint32_t maxFeatureCount
Upper bound on number of features handled.
Definition: Tracker.h:81
dwBool enablePriorityTracking
Priority of the objects can be used to control association between 2D features and bounding boxes in ...
Definition: Tracker.h:127
float32_t confThreshConfirm
Threshold on confidence below which tracker will not confirmed to be used yet.
Definition: Tracker.h:118
#define DW_API_PUBLIC
Definition: Exports.h:76
struct dwObjectTrackerObject * dwObjectTrackerHandle_t
Handle to an object tracker.
Definition: Tracker.h:62
DW_API_PUBLIC dwStatus dwObjectTracker_initialize(dwObjectTrackerHandle_t *obj, dwContextHandle_t ctx, const dwImageProperties *imageProperties, const dwObjectFeatureTrackerParams *featureTrackerParams, const dwObjectTrackerParams *objectTrackerParamsArray, uint32_t numClasses)
Initializes the ObjectTracker module.
Defines the properties of the image.
Definition: Image.h:220