Tracks object bounding boxes on a sequence of frames using the Discriminative Correlation Filter (DCF) algorithm. More...
Data Structures | |
struct | VPIDCFTrackerCreationParams |
Creation parameters of DCF Tracker. More... | |
struct | VPIDCFTrackerParams |
Structure that defines the parameters for vpiCreateDCFTracker. More... | |
struct | VPIDCFTrackedBoundingBox |
Stores information about an object tracked by DCF Tracker. More... | |
Enumerations | |
enum | VPIDCFTrackerCreationFlag |
Flags to customize DCF Tracker algorithm. More... | |
Functions | |
VPIStatus | vpiInitDCFTrackerCreationParams (VPIDCFTrackerCreationParams *params) |
Initialize VPIDCFTrackerCreationParams with default values. More... | |
VPIStatus | vpiCreateDCFTracker (uint64_t backends, int32_t maxNumSequences, int32_t maxNumObjects, const VPIDCFTrackerCreationParams *params, VPIPayload *payload) |
Creates payload for DCF Tracker. More... | |
VPIStatus | vpiInitDCFTrackerParams (VPIDCFTrackerParams *params) |
Initialize VPIDCFTrackerParams with default values. More... | |
VPIStatus | vpiSubmitDCFTrackerLocalizeBatch (VPIStream stream, uint64_t backend, VPIPayload payload, const int32_t *enabledSequences, int32_t numSequences, VPIImage featureMaskingWindow, VPIImage inPatches, VPIArray inObjects, VPIArray outObjects, VPIImage outCorrelationResponses, VPIArray outMaxCorrelationResponses, const VPIDCFTrackerParams *params) |
Localizes each tracked object in the input image patches using the Discriminative Correlation Filter method. More... | |
VPIStatus | vpiSubmitDCFTrackerUpdateBatch (VPIStream stream, uint64_t backend, VPIPayload payload, const int32_t *enabledSequences, int32_t numSequences, VPIImage featureMaskingWindow, VPIImage modelMaskingWindow, VPIImage inPatches, VPIArray trackedObjects, const VPIDCFTrackerParams *params) |
Update internal object tracking information based on its state and its corresponding input image patch. More... | |
VPIStatus | vpiDCFTrackerGetChannelWeights (VPIPayload payload, VPIArray *channelWeights, int32_t *numFeatureChannels) |
Returns the array with channel weight information for each tracked object. More... | |
Tracks object bounding boxes on a sequence of frames using the Discriminative Correlation Filter (DCF) algorithm.
The processing flow allows for external customization of the tracking algorithm, including tracking termination criteria and external refinement of estimated of the tracked object's bounding box.
The high-level pseudo-code of the processing flow is as follows:
struct VPIDCFTrackerCreationParams |
Creation parameters of DCF Tracker.
Definition at line 191 of file DCFTracker.h.
Data Fields | ||
---|---|---|
uint32_t | flags |
Flags to customize DCF Tracker algorithm.
|
int32_t | featurePatchSize |
Size of an object feature patch. The patch image is always square, thus the value passed correspond to one dimension.
|
int32_t | hogCellSize |
Cell size for features from Histogram of Oriented Gradients.
|
float | featureFocusVertOffsetFactor |
Offset for the center of the Hanning window relative to the patch height.
|
float | gaussianSigma |
Standard deviation for gaussian for desired response.
|
struct VPIDCFTrackerParams |
Structure that defines the parameters for vpiCreateDCFTracker.
Definition at line 277 of file DCFTracker.h.
Data Fields | ||
---|---|---|
float | dcfRegFactor | Regularization factor used in DCF filter creation. |
struct VPIDCFTrackedBoundingBox |
Stores information about an object tracked by DCF Tracker.
Data Fields | ||
---|---|---|
VPIAxisAlignedBoundingBoxF32 | bbox | Bounding box around the object being tracked. |
VPITrackingState | state | Tracking status of this bounding box. |
int32_t | seqIndex |
Index of the input sequence where the tracked object is in. If seqIndex < 0, the sequence is assumed to be disabled, i.e., object won't be processed. |
float | filterLR |
Learning rate for DCF filter in exponential moving average.
|
float | filterChannelWeightsLR |
Learning rate for weights of different feature channels in DCF.
|
void * | userData |
Pointer to some unspecified user data. This is used to associated some externa data to the tracked object. DCFTracker won't interpret it in any way, it'll just copy it over. |
#include <vpi/algo/DCFTracker.h>
Flags to customize DCF Tracker algorithm.
Definition at line 178 of file DCFTracker.h.
VPIStatus vpiInitDCFTrackerCreationParams | ( | VPIDCFTrackerCreationParams * | params | ) |
#include <vpi/algo/DCFTracker.h>
Initialize VPIDCFTrackerCreationParams with default values.
Default values:
[out] | params | Structure to be filled with default values. |
VPI_ERROR_INVALID_ARGUMENT | params is NULL. |
VPI_SUCCESS | Operation executed successfully. |
VPIStatus vpiCreateDCFTracker | ( | uint64_t | backends, |
int32_t | maxNumSequences, | ||
int32_t | maxNumObjects, | ||
const VPIDCFTrackerCreationParams * | params, | ||
VPIPayload * | payload | ||
) |
#include <vpi/algo/DCFTracker.h>
Creates payload for DCF Tracker.
[in] | backends | VPI backends that are eligible to execute the algorithm.
|
[in] | maxNumSequences | Maximum number of sequences that contains objects.
|
[in] | maxNumObjects | Maximum number of objects to track.
|
[in] | params | Configuration parameters. Pass NULL to use defaults specified by vpiInitDCFTrackerCreationParams. |
[out] | payload | Pointer to the payload variable that receives the created handle. |
VPI_ERROR_INVALID_ARGUMENT | payload is NULL. |
VPI_ERROR_INVALID_ARGUMENT | backends refers to an invalid backend. |
VPI_ERROR_INVALID_ARGUMENT | maxTrackedObjects is outside valid range. |
VPI_ERROR_INVALID_ARGUMENT | One or more configuration parameters are invalid. |
VPI_ERROR_INVALID_OPERATION | PVA hardware is not available. |
VPI_ERROR_INVALID_OPERATION | Backend isn't enabled in current context. |
VPI_ERROR_NOT_IMPLEMENTED | DCF Tracker algorithm is not supported by given backend. |
VPI_ERROR_INVALID_CONTEXT | Current context is destroyed. |
VPI_ERROR_OUT_OF_MEMORY | Cannot allocate required resources. |
VPI_SUCCESS | Operation executed successfully. |
VPIStatus vpiInitDCFTrackerParams | ( | VPIDCFTrackerParams * | params | ) |
#include <vpi/algo/DCFTracker.h>
Initialize VPIDCFTrackerParams with default values.
Default values:
[out] | params | Structure to be filled with default values. |
VPIStatus vpiSubmitDCFTrackerLocalizeBatch | ( | VPIStream | stream, |
uint64_t | backend, | ||
VPIPayload | payload, | ||
const int32_t * | enabledSequences, | ||
int32_t | numSequences, | ||
VPIImage | featureMaskingWindow, | ||
VPIImage | inPatches, | ||
VPIArray | inObjects, | ||
VPIArray | outObjects, | ||
VPIImage | outCorrelationResponses, | ||
VPIArray | outMaxCorrelationResponses, | ||
const VPIDCFTrackerParams * | params | ||
) |
#include <vpi/algo/DCFTracker.h>
Localizes each tracked object in the input image patches using the Discriminative Correlation Filter method.
The bounding box of each tracked object will be updated with the object's estimated position in its corresponding input patch.
[in] | stream | The stream where the operation will be queued in.
| |||||||||
[in] | backend | Backend that will execute the algorithm.
| |||||||||
[in] | payload | Payload created by vpiCreateDCFTracker.
| |||||||||
[in] | enabledSequences | Defines the sequences whose objects are to be processed, irrespective of their state. If an element in the array is 0, the objects that refer the sequence with given index won't be processed, otherwise the algorithm will use the object's state to tell if objects is to be processed or not.
| |||||||||
[in] | numSequences | Number of elements in enabledSequences . If an object refer to a sequence whose index is >= numSequences , this sequence will be assumed to be enabled. Or else if the sequence index refered is < 0, this sequence will be assumed to be disabled.
| |||||||||
[in] | featureMaskingWindow | Image used as window applied to each object feature channel, commonly used to reduce border effects. If NULL, a standard Hanning window will be used in all objects being tracked.
| |||||||||
[in] | inPatches | Image containing the image patches that tentatively contain the tracked objects. Patches are usually generated by the CropScaler algorithm.
| |||||||||
[in] | inObjects | Input array with objects being tracked.
| |||||||||
[out] | outObjects | Output objects' array with their bounding box updated with the estimated position on input sequence. Only objects whose state is VPI_TRACKING_STATE_TRACKED are updated. Remaining objects are just copied over.
| |||||||||
[out] | outCorrelationResponses | Optional output with the correlation response map for each object being tracked. If NULL, correlation response won't be generated. The correlation map for an object 'o' will start at row o * featurePatchSize and have height 'featurePatchSize'.
| |||||||||
[out] | outMaxCorrelationResponses | Option output with the maximum correlation response for each tracked object. The maximum correlation response is only valid for objects whose state is VPI_TRACKING_STATE_TRACKED and VPI_TRACKING_STATE_SHADOW_TRACKED.
| |||||||||
[in] | params | Control parameters of the DCF tracker algorithm. If NULL, use defaults as specified by vpiInitDCFTrackerParams. |
VPI_ERROR_INVALID_ARGUMENT | stream is NULL. |
VPI_ERROR_INVALID_ARGUMENT | inPatches , inObjects or outObjects are NULL. |
VPI_ERROR_INVALID_ARGUMENT | payload not created by vpiCreateDCFTracker. |
VPI_ERROR_INVALID_ARGUMENT | Unsupported array type in inObjects or outObjects . |
VPI_ERROR_INVALID_ARGUMENT | outObjects capacity too small. |
VPI_ERROR_INVALID_ARGUMENT | Parameter(s) in params outside valid range. |
VPI_ERROR_INVALID_PAYLOAD_TYPE | payload is invalid. |
VPI_ERROR_INVALID_OPERATION | The needed backends aren't enabled in stream , inPatches , inObjects or outObjects. |
VPI_SUCCESS | Operation executed successfully. |
VPIStatus vpiSubmitDCFTrackerUpdateBatch | ( | VPIStream | stream, |
uint64_t | backend, | ||
VPIPayload | payload, | ||
const int32_t * | enabledSequences, | ||
int32_t | numSequences, | ||
VPIImage | featureMaskingWindow, | ||
VPIImage | modelMaskingWindow, | ||
VPIImage | inPatches, | ||
VPIArray | trackedObjects, | ||
const VPIDCFTrackerParams * | params | ||
) |
#include <vpi/algo/DCFTracker.h>
Update internal object tracking information based on its state and its corresponding input image patch.
The operation performed on each object depends on the object's state:
[in] | stream | The stream where the operation will be queued in.
| |||||||||
[in] | backend | Backend that will execute the algorithm.
| |||||||||
[in] | payload | Payload created by vpiCreateDCFTracker.
| |||||||||
[in] | enabledSequences | Defines the sequences whose objects are to be processed, irrespective of their state. If an element in the array is 0, the objects that refer the sequence with given index won't be processed, otherwise the algorithm will use the object's state to tell if objects is to be processed or not.
| |||||||||
[in] | numSequences | Number of elements in enabledSequences . If an object refer to a sequence whose index is >= numSequences , this sequence will be assumed to be enabled. Or else if the sequence index refered is < 0, this sequence will be assumed to be disabled.
| |||||||||
[in] | featureMaskingWindow | Image used as window applied to each object feature channel, commonly used to reduce border effects. If NULL, a standard Hanning window will be used for all patches being tracked.
| |||||||||
[in] | modelMaskingWindow | Image used as window applied to the internal object model. If NULL, the feature masking window will be used.
| |||||||||
[in] | inPatches | Image containing the patches of each object in trackedObjects that corresponds to its bounding box. Patches are usually generated by the CropScaler algorithm.
| |||||||||
[in,out] | trackedObjects | Array with tracked objects.
| |||||||||
[in] | params | Control parameters of the DCF tracker algorithm. If NULL, use defaults as specified by vpiInitDCFTrackerParams. |
VPI_ERROR_INVALID_ARGUMENT | stream is NULL. |
VPI_ERROR_INVALID_ARGUMENT | inPatches or trackedObjects are NULL. |
VPI_ERROR_INVALID_ARGUMENT | payload not created by vpiCreateDCFTracker. |
VPI_ERROR_INVALID_ARGUMENT | inPatches dimensions outside valid range. |
VPI_ERROR_INVALID_ARGUMENT | Unsupported array type in trackedObjects . |
VPI_ERROR_INVALID_ARGUMENT | Parameter(s) in params outside valid range. |
VPI_ERROR_INVALID_PAYLOAD_TYPE | payload is invalid. |
VPI_ERROR_INVALID_OPERATION | The needed backends aren't enabled in stream , inPatches or trackedObjects . |
VPI_SUCCESS | Operation executed successfully. |
VPIStatus vpiDCFTrackerGetChannelWeights | ( | VPIPayload | payload, |
VPIArray * | channelWeights, | ||
int32_t * | numFeatureChannels | ||
) |
#include <vpi/algo/DCFTracker.h>
Returns the array with channel weight information for each tracked object.
[in] | payload | Payload created by vpiCreateDCFTracker.
|
[out] | channelWeights | Array of channel weights for each tracked object. The returned VPIArray has type VPI_ARRAY_TYPE_F32 and size equal to numFeatureChannels times the number of tracked objects. The weight 'c' of object with index 'o' in array buffer 'd' is given by: \[ w_d(c,o) = (float)d + c * numFeatureChannels \] The weight information is only valid for objects whose state is VPI_TRACKING_STATE_TRACKED.
|
[out] | numFeatureChannels | Number of feature channels per object. |
VPI_ERROR_INVALID_ARGUMENT | channelWeights or numFeatureChannels is NULL. |
VPI_SUCCESS | Operation executed successfully. |