DriveWorks SDK Reference

| 0.6.67 Release

ScalingFeatureTracker.h File Reference

Detailed Description

NVIDIA DriveWorks API: ScalingFeatureTracker Methods * Description: This file defines scaling-extend KLT tracking methods.

Definition in file ScalingFeatureTracker.h.

Go to the source code of this file.

Data Structures

struct  dwScalingFeatureListPointers
 Pointer list to the CUDA table with type = DW_CUDA_TABLE_SIMPLE. More...
 
struct  dwScalingFeatureTrackerParameters
 Configuration parameters for a dwScalingFeatureTracker. More...
 

Macros

#define DW_MAX_TEMPLATE_SIZE   128
 defines the maximum template size More...
 

Typedefs

typedef struct dwScalingFeatureListObject const * dwConstScalingFeatureListHandle_t
 Handle representing a const list of 2D scaling features. More...
 
typedef struct dwScalingFeatureTrackerObject const * dwConstScalingFeatureTrackerHandle_t
 Handle representing a const ScalingFeatureTracker tracker. More...
 
typedef struct dwScalingFeatureListObject * dwScalingFeatureListHandle_t
 Handle representing a list of 2D scaling features. More...
 
typedef struct dwScalingFeatureTrackerObject * dwScalingFeatureTrackerHandle_t
 Handle representing a ScalingFeatureTracker tracker. More...
 

Functions

DW_API_PUBLIC dwStatus dwScalingFeatureList_addEmptyFeature (uint32_t nFeatures, dwScalingFeatureListHandle_t obj)
 Insert nFeatures empty feature into the feature list. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureList_applySizeFilter (float32_t maxWidth, float32_t maxHeight, dwScalingFeatureListHandle_t obj)
 Mark the features in the list as DW_FEATURE_STATUS_INVALID with size larger than (maxWidth, maxHeight) More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureList_compact (dwScalingFeatureListHandle_t list, const uint32_t *d_validIndexCount, const uint32_t *d_validIndexes, const uint32_t *d_invalidIndexCount, const uint32_t *d_invalidIndexes)
 Removes scaling features from the list. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureList_getCUDAStream (cudaStream_t *stream, dwScalingFeatureListHandle_t obj)
 Gets the CUDA stream used by the scaling feature list. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureList_getDataBasePointer (void **d_basePointer, size_t *size, dwScalingFeatureListHandle_t obj)
 Returns the start position of the data buffer that stores all of the scaling feature list information (in GPU memory). More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureList_getDataPointers (dwScalingFeatureListPointers *pointers, void *basePointer, dwScalingFeatureListHandle_t obj)
 Returns the pointers to the actual data of a scaling feature list given the base pointer. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureList_initialize (dwScalingFeatureListHandle_t *obj, dwContextHandle_t context, cudaStream_t stream, const uint32_t maxFeatureCount, const dwTrivialDataType pxlType)
 Creates and initializes a scaling feature list. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureList_release (dwScalingFeatureListHandle_t *obj)
 Releases the scaling feature list. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureList_reset (dwScalingFeatureListHandle_t obj)
 Resets the scaling feature list. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureList_selectValid (uint32_t *d_validIndexCount, uint32_t *d_validIndexes, uint32_t *d_invalidIndexCount, uint32_t *d_invalidIndexes, dwConstScalingFeatureListHandle_t obj)
 Creates a list of indexes of those scaling features with a status of detected or tracked, and list of indexes of those scaling features with a status of invalid. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureList_setCUDAStream (cudaStream_t stream, dwScalingFeatureListHandle_t obj)
 Sets the CUDA stream for CUDA related operations. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureTracker_getCUDAStream (cudaStream_t *cudaStream, dwScalingFeatureTrackerHandle_t obj)
 Gets the CUDA stream used. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureTracker_initDefaultParams (dwScalingFeatureTrackerParameters *params)
 Initializes ScalingFeatureTracker parameters with default values. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureTracker_initialize (dwScalingFeatureTrackerHandle_t *obj, const dwScalingFeatureTrackerParameters *params, cudaStream_t stream, dwContextHandle_t context)
 Initialize the ScalingFeatureTracker module. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureTracker_release (dwScalingFeatureTrackerHandle_t *obj)
 Releases the ScalingFeatureTracker module. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureTracker_reset (dwScalingFeatureTrackerHandle_t obj)
 Resets the ScalingFeatureTracker. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureTracker_setCUDAStream (cudaStream_t cudaStream, dwScalingFeatureTrackerHandle_t obj)
 Sets the CUDA stream used. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureTracker_trackAsync (dwScalingFeatureListHandle_t list, const dwImageCUDA *currentImage, dwScalingFeatureTrackerHandle_t obj)
 Track the features in currentImage
. More...
 
DW_API_PUBLIC dwStatus dwScalingFeatureTracker_updateTemplateAsync (dwScalingFeatureListHandle_t list, const dwImageCUDA *templateImage, dwScalingFeatureTrackerHandle_t obj)
 Update the tracking template for each valid feature in the tracker The computation takes place asynchronously on the device (GPU). More...
 

Data Structure Documentation

◆ dwScalingFeatureListPointers

struct dwScalingFeatureListPointers
Data Fields
uint32_t * ages age of the feature
dwBool * bNewTemplate true when the overall data is updated, false when only location info is updated
uint32_t * featureCount Total number of feature points. Single value.
uint32_t * ids id of the feature
dwVector2f * locations center location of the feature to be tracked
float32_t * scaleFactors scaleFactor of frame N to N-1
float32_t * scaleToTemplate scaleFactor of frame N to the template
dwVector2f * sizes size of the feature to be tracked
dwFeatureStatus * statuses status of the tracking
dwVector2f * templateLocations location of the feature template
dwVector2f * templateSizes size of the feature template

◆ dwScalingFeatureTrackerParameters

struct dwScalingFeatureTrackerParameters
Data Fields
float32_t maxPixelTolerance When template image data is kept and only updates its location, if the pixel offset between the center of template feature and incoming feature is less than this value, tracker will not update template to the new location but use the old ones to prevent drifting.
float32_t maxScaleChange If scalingFactor between frame N to N-1 is outside range [1/maxScaleChange, maxScaleChange] tracking will be killed.
float32_t maxSizeDifference If templateSize/newDetectedSize is not within [1/maxSizeDifference, maxSizeDifference] region, Or the new added box size is far different to the existing template size, tracker will apply a force update to the template image/size/location.
uint32_t numIterScaling Iteration number to apply the translation-and-scaling KLT.
uint32_t numIterTranslation Iteration number to apply the translation-only KLT for robustness.
float32_t thresholdKill Killing threshold in [0, 1].

If normalized zero cross correlation between 2 frames is less than this value, tracking will be killed. Smaller value means less possible to be killed. If thresholdKill = 0, the tracking will not be marked as failure until it's out of time or move out of boundary. If thresholdKill = 1, the tracking will always be killed.

float32_t thresholdUpdate Updating threshold in [0, 1].

If normalized zero cross correlation between 2 frames is less than this value, tracking template will be updated. Otherwise only updates its location but keep the original size and image data unchanged. Larger value means updating the tempalte more frequently. If thresholdUpdate = 1, template will be updated every frame If thresholdUpdate = 0, template won't be updated unless the size of template and new feature differs too much.

Macro Definition Documentation

◆ DW_MAX_TEMPLATE_SIZE

#define DW_MAX_TEMPLATE_SIZE   128

defines the maximum template size

Definition at line 52 of file ScalingFeatureTracker.h.

Typedef Documentation

◆ dwConstScalingFeatureListHandle_t

typedef struct dwScalingFeatureListObject const* dwConstScalingFeatureListHandle_t

Handle representing a const list of 2D scaling features.

Definition at line 64 of file ScalingFeatureTracker.h.

◆ dwConstScalingFeatureTrackerHandle_t

typedef struct dwScalingFeatureTrackerObject const* dwConstScalingFeatureTrackerHandle_t

Handle representing a const ScalingFeatureTracker tracker.

Definition at line 58 of file ScalingFeatureTracker.h.

◆ dwScalingFeatureListHandle_t

typedef struct dwScalingFeatureListObject* dwScalingFeatureListHandle_t

Handle representing a list of 2D scaling features.

Definition at line 61 of file ScalingFeatureTracker.h.

◆ dwScalingFeatureTrackerHandle_t

typedef struct dwScalingFeatureTrackerObject* dwScalingFeatureTrackerHandle_t

Handle representing a ScalingFeatureTracker tracker.

Definition at line 55 of file ScalingFeatureTracker.h.