Table of Contents

Method CalcOpticalFlowSparseRLOF

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

CalcOpticalFlowSparseRLOF(InputArray, InputArray, InputArray, InputOutputArray, OutputArray, OutputArray, RLOFOpticalFlowParameter?, float)

Calculates a fast optical flow for a sparse feature set using the robust local optical flow (RLOF), similar to CalcOpticalFlowPyrLK().

public static void CalcOpticalFlowSparseRLOF(InputArray prevImg, InputArray nextImg, InputArray prevPts, InputOutputArray nextPts, OutputArray status, OutputArray err, RLOFOpticalFlowParameter? rlofParam = null, float forwardBackwardThreshold = 0)

Parameters

prevImg InputArray

First 8-bit input image. If cross-based RLOF is used (SupportRegionType = Cross) the image has to be an 8-bit 3-channel image.

nextImg InputArray

Second 8-bit input image, same requirements as prevImg.

prevPts InputArray

Vector of 2D points for which the flow needs to be found.

nextPts InputOutputArray

Output vector of 2D points containing the calculated new positions of input features in the second image.

status OutputArray

Output status vector. Each element is set to 1 if the flow for the corresponding feature has passed the forward backward check.

err OutputArray

Output vector of errors; each element is set to the forward backward error for the corresponding feature.

rlofParam RLOFOpticalFlowParameter

See RLOFOpticalFlowParameter. Uses the algorithm's defaults when null.

forwardBackwardThreshold float

Threshold for the forward backward confidence check. If <= 0, the forward backward check is not applied.