calcOpticalFlowFarneback function
Mat
calcOpticalFlowFarneback(
- InputArray prev,
- InputArray next,
- InputOutputArray flow,
- double pyrScale,
- int levels,
- int winsize,
- int iterations,
- int polyN,
- double polySigma,
- int flags,
Apply computes a foreground mask using the current BackgroundSubtractorMOG2.
For further details, please see: https://docs.opencv.org/master/d7/df6/classcv_1_1BackgroundSubtractor.html#aa735e76f7069b3fa9c3f32395f9ccd21 CalcOpticalFlowFarneback computes a dense optical flow using Gunnar Farneback's algorithm.
For further details, please see: https://docs.opencv.org/master/dc/d6b/group__video__track.html#ga5d10ebbd59fe09c5f650289ec0ece5af
Implementation
/// CalcOpticalFlowFarneback computes a dense optical flow using
/// Gunnar Farneback's algorithm.
///
/// For further details, please see:
/// https://docs.opencv.org/master/dc/d6b/group__video__track.html#ga5d10ebbd59fe09c5f650289ec0ece5af
Mat calcOpticalFlowFarneback(
InputArray prev,
InputArray next,
InputOutputArray flow,
double pyrScale,
int levels,
int winsize,
int iterations,
int polyN,
double polySigma,
int flags,
) {
cvRun(
() => cvideo.cv_calcOpticalFlowFarneback(
prev.ref,
next.ref,
flow.ref,
pyrScale,
levels,
winsize,
iterations,
polyN,
polySigma,
flags,
ffi.nullptr,
),
);
return flow;
}