Algorithm used to track points from one frame to the next. More...
Data Structures | |
struct | VPIOpticalFlowPyrLKParams |
Structure that defines the parameters for vpiSubmitOpticalFlowPyrLK. More... | |
Enumerations | |
enum | VPIEpsilonType |
Defines the error measurement types. More... | |
Functions | |
VPIStatus | vpiInitOpticalFlowPyrLKParams (VPIOpticalFlowPyrLKParams *params) |
Initializes VPIOpticalFlowPyrLKParams with default values. More... | |
VPIStatus | vpiCreateOpticalFlowPyrLK (uint32_t backends, int32_t width, int32_t height, VPIImageFormat fmt, int32_t levels, float scale, VPIPayload *payload) |
Creates payload for vpiSubmitOpticalFlowPyrLK. More... | |
VPIStatus | vpiSubmitOpticalFlowPyrLK (VPIStream stream, uint32_t backend, VPIPayload payload, VPIPyramid prevPyr, VPIPyramid curPyr, VPIArray prevPts, VPIArray curPts, VPIArray trackingStatus, const VPIOpticalFlowPyrLKParams *params) |
Runs Pyramidal LK Optical Flow on two frames. More... | |
Algorithm used to track points from one frame to the next.
struct VPIOpticalFlowPyrLKParams |
Structure that defines the parameters for vpiSubmitOpticalFlowPyrLK.
Definition at line 92 of file OpticalFlowPyrLK.h.
Data Fields | ||
---|---|---|
float | epsilon | Specifies the error for terminating the algorithm. |
VPIEpsilonType | epsilonType | Specifies the tracking error type. |
int32_t | numIterations |
Specifies the number of iterations. Value must be >= 1 and <= 32. |
uint32_t | termination |
Specifies the termination criteria. It can be bitwise combination of VPI_TERMINATION_CRITERIA_ITERATIONS and VPI_TERMINATION_CRITERIA_EPSILON. |
uint32_t | useInitialFlow | Uses initial estimations stored in curPts when this flag is not 0, otherwise prevPts is copied to curPts and is considered the initial estimate. |
int32_t | windowDimension |
Specifies the size of the window on which to perform the algorithm. Value must be >= 6 and <= 32. |
enum VPIEpsilonType |
#include <vpi/algo/OpticalFlowPyrLK.h>
Defines the error measurement types.
Enumerator | |
---|---|
VPI_LK_ERROR_L1 | L1 distance between previous feature and a next feature. |
Definition at line 82 of file OpticalFlowPyrLK.h.
VPIStatus vpiCreateOpticalFlowPyrLK | ( | uint32_t | backends, |
int32_t | width, | ||
int32_t | height, | ||
VPIImageFormat | fmt, | ||
int32_t | levels, | ||
float | scale, | ||
VPIPayload * | payload | ||
) |
#include <vpi/algo/OpticalFlowPyrLK.h>
Creates payload for vpiSubmitOpticalFlowPyrLK.
[in] | backends | VPI backends that are eligible to execute the algorithm. Currently only one backend is accepted. |
[in] | fmt | Specifies the format for the pyramid. |
[in] | width,height | Specifies the dimensions of the pyramid on the finest resolution. |
[in] | levels | Specifies the level of the pyramid. |
[in] | scale | Specifies the scale of the pyramid. |
[out] | payload | Pointer to memory where the created payload handle will be written to. |
VPIStatus vpiInitOpticalFlowPyrLKParams | ( | VPIOpticalFlowPyrLKParams * | params | ) |
#include <vpi/algo/OpticalFlowPyrLK.h>
Initializes VPIOpticalFlowPyrLKParams with default values.
Defaults:
[in] | params | Structure to be filled with default values. |
VPIStatus vpiSubmitOpticalFlowPyrLK | ( | VPIStream | stream, |
uint32_t | backend, | ||
VPIPayload | payload, | ||
VPIPyramid | prevPyr, | ||
VPIPyramid | curPyr, | ||
VPIArray | prevPts, | ||
VPIArray | curPts, | ||
VPIArray | trackingStatus, | ||
const VPIOpticalFlowPyrLKParams * | params | ||
) |
#include <vpi/algo/OpticalFlowPyrLK.h>
Runs Pyramidal LK Optical Flow on two frames.
Outputs estimated feature points and tracking status.
[in] | stream | The stream where the operation will be queued in. |
[in] | backend | Backend that will execute the algorithm. Must be one of the backends specified during payload creation. If 0, VPI will select one of the eligible backends from the payload that accepts the given parameters, usually the fastest one. |
[in] | payload | Payload created with vpiCreateOpticalFlowPyrLK |
[in] | prevPyr | Previous frame, represented as a gaussian pyramid. |
[in] | curPyr | Current frame, represented as a gaussian pyramid. |
[in] | prevPts | array of keypoints in the prevPyr high resolution pyramid. The type of array must be VPI_ARRAY_TYPE_KEYPOINT. |
[in,out] | curPts | array of keypoints in the curPyr high resolution pyramid. It is used as starting search point in curPyr if useInitialFlow is not 0. The type of array must be VPI_ARRAY_TYPE_KEYPOINT. |
[in,out] | trackingStatus | Status array for tracking status for each input in prevPts. If element is one, the corresponding keypoint isn't being tracked, otherwise, it is. The type of the array must be VPI_ARRAY_TYPE_U8. |
[in] | params | Parameters for the LK tracker. If NULL, it uses default parameters are returned by vpiInitOpticalFlowPyrLKParams. |