Class FarnebackOpticalFlow
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Class computing a dense optical flow using the Gunnar Farneback's algorithm.
public class FarnebackOpticalFlow : DenseOpticalFlow, IDisposable
- Inheritance
-
FarnebackOpticalFlow
- Implements
- Inherited Members
Properties
FastPyramids
Whether to use fast pyramids
public bool FastPyramids { get; set; }
Property Value
Flags
operation flags
public int Flags { get; set; }
Property Value
NumIters
number of iterations the algorithm does at each pyramid level
public int NumIters { get; set; }
Property Value
NumLevels
number of pyramid layers including the initial image
public int NumLevels { get; set; }
Property Value
PolyN
size of the pixel neighborhood used to find polynomial expansion in each pixel
public int PolyN { get; set; }
Property Value
PolySigma
standard deviation of the Gaussian that is used to smooth derivatives used as a basis for the polynomial expansion
public double PolySigma { get; set; }
Property Value
PyrScale
image scale (<1) to build pyramids for each image
public double PyrScale { get; set; }
Property Value
WinSize
averaging window size
public int WinSize { get; set; }
Property Value
Methods
Create(int, double, bool, int, int, int, double, int)
Creates instance of cv::FarnebackOpticalFlow.
public static FarnebackOpticalFlow Create(int numLevels = 5, double pyrScale = 0.5, bool fastPyramids = false, int winSize = 13, int numIters = 10, int polyN = 5, double polySigma = 1.1, int flags = 0)
Parameters
numLevelsintnumber of pyramid layers including the initial image; levels=1 means that no extra layers are created and only the original images are used.
pyrScaledoubleparameter, specifying the image scale (<1) to build pyramids for each image; pyrScale=0.5 means a classical pyramid, where each next layer is twice smaller than the previous one.
fastPyramidsboolwinSizeintaveraging window size; larger values increase the algorithm robustness to image noise and give more chances for fast motion detection, but yield more blurred motion field.
numItersintnumber of iterations the algorithm does at each pyramid level.
polyNintsize of the pixel neighborhood used to find polynomial expansion in each pixel; larger values mean that the image will be approximated with smoother surfaces, yielding more robust algorithm and more blurred motion field, typically polyN =5 or 7.
polySigmadoublestandard deviation of the Gaussian that is used to smooth derivatives used as a basis for the polynomial expansion; for polyN=5, you can set polySigma=1.1, for polyN=7, a good value would be polySigma=1.5.
flagsintoperation flags that can be a combination of OPTFLOW_USE_INITIAL_FLOW and/or OPTFLOW_FARNEBACK_GAUSSIAN