http://www.emgu.com
Computes dense optical flow using Gunnar Farneback's algorithm

Namespace: Emgu.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.4.10.1935 (2.4.10.1935)

Syntax

C#
public static void cvCalcOpticalFlowFarneback(
	IntPtr prev0,
	IntPtr next0,
	IntPtr flow0,
	double pyrScale,
	int levels,
	int winSize,
	int iterations,
	int polyN,
	double polySigma,
	OPTICALFLOW_FARNEBACK_FLAG flags
)
Visual Basic
Public Shared Sub cvCalcOpticalFlowFarneback ( 
	prev0 As IntPtr,
	next0 As IntPtr,
	flow0 As IntPtr,
	pyrScale As Double,
	levels As Integer,
	winSize As Integer,
	iterations As Integer,
	polyN As Integer,
	polySigma As Double,
	flags As OPTICALFLOW_FARNEBACK_FLAG
)
Visual C++
public:
static void cvCalcOpticalFlowFarneback(
	IntPtr prev0, 
	IntPtr next0, 
	IntPtr flow0, 
	double pyrScale, 
	int levels, 
	int winSize, 
	int iterations, 
	int polyN, 
	double polySigma, 
	OPTICALFLOW_FARNEBACK_FLAG flags
)
F#
static member cvCalcOpticalFlowFarneback : 
        prev0 : IntPtr * 
        next0 : IntPtr * 
        flow0 : IntPtr * 
        pyrScale : float * 
        levels : int * 
        winSize : int * 
        iterations : int * 
        polyN : int * 
        polySigma : float * 
        flags : OPTICALFLOW_FARNEBACK_FLAG -> unit 

Parameters

prev0
Type: System..::..IntPtr
The first 8-bit single-channel input image
next0
Type: System..::..IntPtr
The second input image of the same size and the same type as prevImg
flow0
Type: System..::..IntPtr
The computed flow image; will have the same size as prevImg and type CV 32FC2
pyrScale
Type: System..::..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
Type: System..::..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
Type: System..::..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
Type: System..::..Int32
The number of iterations the algorithm does at each pyramid level
polyN
Type: System..::..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
Type: System..::..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
Type: Emgu.CV.CvEnum..::..OPTICALFLOW_FARNEBACK_FLAG
The operation flags

See Also