Computes dense optical flow using Gunnar Farneback's algorithm
Namespace: Emgu.CVAssembly: Emgu.CV (in Emgu.CV.dll) Version: 2.2.1.1150 (2.2.1.1150)
Syntax
C# | Visual Basic | Visual C++ |
Public Shared Sub Farneback ( _ prev0 As Image(Of Gray, Byte), _ next0 As Image(Of Gray, Byte), _ flowX As Image(Of Gray, Single), _ flowY As Image(Of Gray, Single), _ pyrScale As Double, _ levels As Integer, _ winSize As Integer, _ iterations As Integer, _ polyN As Integer, _ polySigma As Double, _ flags As OPTICALFLOW_FARNEBACK_FLAG _ )
Parameters
- next0
- Image<(Of <(<'Gray, Byte>)>)>
The second input image of the same size and the same type as prevImg
- flowX
- Image<(Of <(<'Gray, Single>)>)>
The computed flow image for x-velocity; will have the same size as prevImg
- flowY
- Image<(Of <(<'Gray, Single>)>)>
The computed flow image for y-velocity; will have the same size as prevImg
- pyrScale
- Double
Specifies the image scale (!1) to build the pyramids for each image. pyrScale=0.5 means the classical pyramid, where each next layer is twice smaller than the previous
- levels
- Int32
The number of pyramid layers, including the initial image. levels=1 means that no extra layers are created and only the original images are used
- winSize
- Int32
The averaging window size; The larger values increase the algorithm robustness to image noise and give more chances for fast motion detection, but yield more blurred motion field
- iterations
- Int32
The number of iterations the algorithm does at each pyramid level
- polyN
- Int32
Size of the pixel neighborhood used to find polynomial expansion in each pixel. The larger values mean that the image will be approximated with smoother surfaces, yielding more robust algorithm and more blurred motion field. Typically, poly n=5 or 7
- polySigma
- Double
Standard deviation of the Gaussian that is used to smooth derivatives that are used as a basis for the polynomial expansion. For poly n=5 you can set poly sigma=1.1, for poly n=7 a good value would be poly sigma=1.5
- flags
- OPTICALFLOW_FARNEBACK_FLAG
The operation flags