Defines ObjectTracker module for object tracking.
|
| 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 dwObjectTracker_featureTrackDeviceAsync. More...
|
| |
| 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 current frame. More...
|
| |
| DW_API_PUBLIC dwStatus | dwObjectTracker_featureTrackDeviceAsync (const dwImageCUDA *image, dwObjectTrackerHandle_t obj) |
| | Tracks the features from a previously given image to the current image. More...
|
| |
| DW_API_PUBLIC dwStatus | dwObjectTracker_getCUDAStream (cudaStream_t *stream, dwObjectTrackerHandle_t obj) |
| | Gets the CUDA stream used. More...
|
| |
| DW_API_PUBLIC dwStatus | dwObjectTracker_initDefaultParams (dwObjectFeatureTrackerParams *featureTrackerParams, dwObjectTrackerParams *objectTrackerParamsArray, uint32_t numClasses) |
| | Initializes ObjectTracker parameters with default values. More...
|
| |
| 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. More...
|
| |
| DW_API_PUBLIC dwStatus | dwObjectTracker_release (dwObjectTrackerHandle_t *obj) |
| | Releases the ObjectTracker module. More...
|
| |
| DW_API_PUBLIC dwStatus | dwObjectTracker_reset (dwObjectTrackerHandle_t obj) |
| | Resets the ObjectTracker. More...
|
| |
| DW_API_PUBLIC dwStatus | dwObjectTracker_setCUDAStream (cudaStream_t stream, dwObjectTrackerHandle_t obj) |
| | Sets the CUDA stream used. More...
|
| |
◆ dwObjectFeatureTrackerParams
| struct dwObjectFeatureTrackerParams |
| Data Fields |
|
float32_t |
detectorScoreThreshold |
Higher thresholds detect less features. Default is 0.3. |
|
uint32_t |
historyCapacity |
Capacity of feature history circular buffer. |
|
uint32_t |
iterationsLK |
Upper bound on number of Lucas-Kanade iterations per level. Default is 10. |
|
dwRect |
maskROI |
Region of interest where the objects are tracked. Default is full image. |
|
uint32_t |
maxFeatureCount |
Upper bound on number of features handled. |
|
uint32_t |
pyramidLevelCount |
Number of levels in the pyramid. Default is 3. |
|
uint32_t |
windowSizeLK |
Window size used in the Lucas-Kanade tracker. Supported sizes are 6,8,10,12,14. Default is 8. |
◆ dwObjectTrackerParams
| struct dwObjectTrackerParams |
| Data Fields |
|
float32_t |
confRateDetect |
Rate at which to combine confidence values of new boxes to existing tracked boxes when a new box is found to match an existing box, i.e., conf = conf + conf_new * rate. This also applies to the initial confidence value for a new box, i.e., conf = conf_new * rate. Default is 1.
|
|
float32_t |
confRateTrackMax |
Max rate at which confidence values of tracked boxes changes from frame to frame. When there is no corresponding detection, conf = conf - actualConfRate. Actual decaying rate is determined between 'confRateTrackMin' and 'confRateTrackMax' according to the number of feature points used to track the object. i.e., actualConfRate = confRateTrackMin + (confRateTrackMax - confRateTrackMin) * (1.f - sqrt(featureCount / maxFeatureCount))
|
|
float32_t |
confRateTrackMin |
Min rate at which confidence values of tracked boxes changes from frame to frame. |
|
float32_t |
confThreshConfirm |
Threshold on confidence below which tracker will not confirmed to be used yet. |
|
float32_t |
confThreshDiscard |
Threshold on confidence below which tracker no longer tracks the box location. Default is 0. |
|
dwBool |
enablePriorityTracking |
Priority of the objects can be used to control association between 2D features and bounding boxes in case of overlap. With priority tracking enabled, the object with the lower index gets the feature.
|
|
float32_t |
maxBoxImageScale |
Maximum box scale in the image to track. It multiplies with image width and height to get the maximum box size. Default is 0.5.
|
|
uint32_t |
maxFeatureCountPerBox |
Maximum features to track for each 2D bounding box. Default is 500. |
|
uint32_t |
maxNumObjects |
Maximum number of objects to track. This information is used to allocate resources at initialization time. Default is 100.
|
|
float32_t |
minBoxImageScale |
Minimum box scale in the image to track. It multiplies with image width and height to get the minimum box size. Default is 0.005.
|
◆ dwObjectTrackerHandle_t
Handle to an object tracker.
Definition at line 62 of file Tracker.h.
◆ dwObjectTracker_boxTrackHost()
Tracks objects in previousDetections based on the tracked features by previously called dwObjectTracker_featureTrackDeviceAsync.
This function synchronizes host with the CUDA stream.
- Parameters
-
| [out] | trackedDetections | List of tracked objects. |
| [out] | numTrackedDetections | Number of tracked objects. |
| [in] | previousDetections | List of input objects to be tracked. |
| [in] | numPreviousDetections | Number of input objects. |
| [in] | classIdx | Class index from which to use the object tracker parameters. |
| [in] | obj | Specifies the ObjectTracker handle. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT
- Note
- trackedDetections must be allocated with maxNumObjects given at initialization.
◆ dwObjectTracker_boxTrackHostExternalFeatures()
This function enables tracking of objects using already extracted features from the previous and current frame.
This function synchronizes host with the CUDA stream.
- Parameters
-
| [out] | trackedDetections | List of tracked objects. |
| [out] | numTrackedDetections | Number of tracked objects. |
| [in] | previousDetections | List of input objects to be tracked. |
| [in] | numPreviousDetections | Number of input objects. |
| [in] | featureList | Feature list in host. |
| [in] | maxFeatureCount | Maximum number of features that featureList can store. |
| [in] | historyCapacity | Capacity of featureList circular buffer. |
| [in] | currentTimeIdx | Row index of the current frame in featureList circular buffer. |
| [in] | classIdx | Class index from which to use the object tracker parameters. |
| [in] | obj | Specifies the ObjectTracker handle. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT
- Note
- trackedDetections must be allocated with maxNumObjects given at initialization.
-
previousFeatures and currentFeatures are expected to be in host memory.
◆ dwObjectTracker_featureTrackDeviceAsync()
Tracks the features from a previously given image to the current image.
This function must be called before dwObjectTracker_boxTrackHost. The computation takes place asynchronously on the device (GPU).
- Parameters
-
| [in] | image | CUDA image where the objects are tracked. |
| [in] | obj | Specifies the ObjectTracker handle. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT
◆ dwObjectTracker_getCUDAStream()
Gets the CUDA stream used.
- Parameters
-
| [out] | stream | The CUDA stream used. |
| [in] | obj | A pointer to the ObjectTracker handle that is updated. |
- Returns
- DW_INVALID_ARGUMENT, DW_SUCCESS
◆ dwObjectTracker_initDefaultParams()
Initializes ObjectTracker parameters with default values.
- Parameters
-
| [out] | featureTrackerParams | Feature tracking parameters. |
| [out] | objectTrackerParamsArray | Object tracking parameters for each class. |
| [in] | numClasses | Number of classes. Maximum allowed is DW_OBJECT_MAX_CLASSES. |
- Returns
- DW_SUCCESS, DW_INVALID_ARGUMENT
◆ dwObjectTracker_initialize()
Initializes the ObjectTracker module.
- Parameters
-
| [out] | obj | A pointer to ObjectTracker handle that is initialized from parameters. |
| [in] | ctx | Specifies the handle to the context. |
| [in] | imageProperties | Image properties to set up the tracker for. |
| [in] | featureTrackerParams | Feature tracker parameters. |
| [in] | objectTrackerParamsArray | Object tracker parameters for each object class. |
| [in] | numClasses | Number of object classes. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT
- Note
- Expected pxlType for the image are: DW_TYPE_UINT8, DW_TYPE_UINT16, DW_TYPE_FP16
◆ dwObjectTracker_release()
Releases the ObjectTracker module.
- Parameters
-
| [in] | obj | A pointer to the object handle to release. |
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
- Note
- This method renders the handle unusable.
◆ dwObjectTracker_reset()
Resets the ObjectTracker.
- Parameters
-
- Returns
- DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST
◆ dwObjectTracker_setCUDAStream()
Sets the CUDA stream used.
- Parameters
-
| [in] | stream | The CUDA stream used. |
| [in] | obj | A pointer to the ObjectTracker handle that is updated. |
- Returns
- DW_INVALID_ARGUMENT, DW_SUCCESS