Class SparseOpticalFlow
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Base interface for sparse optical flow algorithms.
public abstract class SparseOpticalFlow : Algorithm, IDisposable
- Inheritance
-
SparseOpticalFlow
- Implements
- Derived
- Inherited Members
Constructors
SparseOpticalFlow(nint, nint, Action<nint>)
Constructor for the factory pattern (cv::Ptr<T>* + raw T*).
protected SparseOpticalFlow(nint smartPtr, nint rawPtr, Action<nint> release)
Parameters
Methods
Calc(InputArray, InputArray, InputArray, InputOutputArray, OutputArray, OutputArray)
Calculates a sparse optical flow.
public virtual void Calc(InputArray prevImg, InputArray nextImg, InputArray prevPts, InputOutputArray nextPts, OutputArray status, OutputArray err = default)
Parameters
prevImgInputArrayFirst input image.
nextImgInputArraySecond input image of the same size and the same type 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 of the vector is set to 1 if the flow for the corresponding features has been found. Otherwise, it is set to 0.
errOutputArrayOptional output vector that contains error response for each point (inverse confidence).