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
prevImgInputArrayFirst 8-bit input image. If cross-based RLOF is used (SupportRegionType = Cross) the image has to be an 8-bit 3-channel image.
nextImgInputArraySecond 8-bit input image, same requirements as
prevImg.prevPtsInputArrayVector of 2D points for which the flow needs to be found.
nextPtsInputOutputArrayOutput vector of 2D points containing the calculated new positions of input features in the second image.
statusOutputArrayOutput status vector. Each element is set to 1 if the flow for the corresponding feature has passed the forward backward check.
errOutputArrayOutput vector of errors; each element is set to the forward backward error for the corresponding feature.
rlofParamRLOFOpticalFlowParameterSee RLOFOpticalFlowParameter. Uses the algorithm's defaults when null.
forwardBackwardThresholdfloatThreshold for the forward backward confidence check. If <= 0, the forward backward check is not applied.