Click or drag to resize
CvInvokeCalcOpticalFlowPyrLK Method (IInputArray, IInputArray, PointF, Size, Int32, MCvTermCriteria, PointF, Byte, Single, LKFlowFlag, Double)
http://www.emgu.com
Calculates optical flow for a sparse feature set using iterative Lucas-Kanade method in pyramids

Namespace: Emgu.CV
Assembly: Emgu.CV.World (in Emgu.CV.World.dll) Version: 3.1.0.2282 (3.1.0.2282)
Syntax
public static void CalcOpticalFlowPyrLK(
	IInputArray prev,
	IInputArray curr,
	PointF[] prevFeatures,
	Size winSize,
	int level,
	MCvTermCriteria criteria,
	out PointF[] currFeatures,
	out byte[] status,
	out float[] trackError,
	LKFlowFlag flags = LKFlowFlag.Default,
	double minEigThreshold = 0.0001
)

Parameters

prev
Type: Emgu.CVIInputArray
First frame, at time t
curr
Type: Emgu.CVIInputArray
Second frame, at time t + dt
prevFeatures
Type: System.DrawingPointF
Array of points for which the flow needs to be found
winSize
Type: System.DrawingSize
Size of the search window of each pyramid level
level
Type: SystemInt32
Maximal pyramid level number. If 0 , pyramids are not used (single level), if 1 , two levels are used, etc
criteria
Type: Emgu.CV.StructureMCvTermCriteria
Specifies when the iteration process of finding the flow for each point on each pyramid level should be stopped
currFeatures
Type: System.DrawingPointF
Array of 2D points containing calculated new positions of input features in the second image
status
Type: SystemByte
Array. Every element of the array is set to 1 if the flow for the corresponding feature has been found, 0 otherwise
trackError
Type: SystemSingle
Array of double numbers containing difference between patches around the original and moved points
flags (Optional)
Type: Emgu.CV.CvEnumLKFlowFlag
Flags
minEigThreshold (Optional)
Type: SystemDouble
the algorithm calculates the minimum eigen value of a 2x2 normal matrix of optical flow equations (this matrix is called a spatial gradient matrix in [Bouguet00]), divided by number of pixels in a window; if this value is less than minEigThreshold, then a corresponding feature is filtered out and its flow is not processed, so it allows to remove bad points and get a performance boost.
See Also