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 (in Emgu.CV.dll) Version: 2.4.10.1935 (2.4.10.1935)

Syntax

C#
public static void PyrLK(
	Image<Gray, byte> prev,
	Image<Gray, byte> curr,
	Image<Gray, byte> prevPyrBuffer,
	Image<Gray, byte> currPyrBuffer,
	PointF[] prevFeatures,
	Size winSize,
	int level,
	MCvTermCriteria criteria,
	LKFLOW_TYPE flags,
	out PointF[] currFeatures,
	out byte[] status,
	out float[] trackError
)
Visual Basic
Public Shared Sub PyrLK ( 
	prev As Image(Of Gray, Byte),
	curr As Image(Of Gray, Byte),
	prevPyrBuffer As Image(Of Gray, Byte),
	currPyrBuffer As Image(Of Gray, Byte),
	prevFeatures As PointF(),
	winSize As Size,
	level As Integer,
	criteria As MCvTermCriteria,
	flags As LKFLOW_TYPE,
	<OutAttribute> ByRef currFeatures As PointF(),
	<OutAttribute> ByRef status As Byte(),
	<OutAttribute> ByRef trackError As Single()
)
Visual C++
public:
static void PyrLK(
	Image<Gray, unsigned char>^ prev, 
	Image<Gray, unsigned char>^ curr, 
	Image<Gray, unsigned char>^ prevPyrBuffer, 
	Image<Gray, unsigned char>^ currPyrBuffer, 
	array<PointF>^ prevFeatures, 
	Size winSize, 
	int level, 
	MCvTermCriteria criteria, 
	LKFLOW_TYPE flags, 
	[OutAttribute] array<PointF>^% currFeatures, 
	[OutAttribute] array<unsigned char>^% status, 
	[OutAttribute] array<float>^% trackError
)
F#
static member PyrLK : 
        prev : Image<Gray, byte> * 
        curr : Image<Gray, byte> * 
        prevPyrBuffer : Image<Gray, byte> * 
        currPyrBuffer : Image<Gray, byte> * 
        prevFeatures : PointF[] * 
        winSize : Size * 
        level : int * 
        criteria : MCvTermCriteria * 
        flags : LKFLOW_TYPE * 
        currFeatures : PointF[] byref * 
        status : byte[] byref * 
        trackError : float32[] byref -> unit 

Parameters

prev
Type: Emgu.CV..::..Image<(Of <(<'Gray, Byte>)>)>
First frame, at time t
curr
Type: Emgu.CV..::..Image<(Of <(<'Gray, Byte>)>)>
Second frame, at time t + dt
prevPyrBuffer
Type: Emgu.CV..::..Image<(Of <(<'Gray, Byte>)>)>
Buffer for the pyramid for the first frame. If it is not NULL, the buffer must have a sufficient size to store the pyramid from level 1 to level #level ; the total size of (image_width+8)*image_height/3 bytes is sufficient
currPyrBuffer
Type: Emgu.CV..::..Image<(Of <(<'Gray, Byte>)>)>
Similar to prev_pyr, used for the second frame
prevFeatures
Type: array<System.Drawing..::..PointF>[]()[][]
Array of points for which the flow needs to be found
winSize
Type: System.Drawing..::..Size
Size of the search window of each pyramid level
level
Type: System..::..Int32
Maximal pyramid level number. If 0 , pyramids are not used (single level), if 1 , two levels are used, etc
criteria
Type: Emgu.CV.Structure..::..MCvTermCriteria
Specifies when the iteration process of finding the flow for each point on each pyramid level should be stopped
flags
Type: Emgu.CV.CvEnum..::..LKFLOW_TYPE
Flags
currFeatures
Type: array<System.Drawing..::..PointF>[]()[][]%
Array of 2D points containing calculated new positions of input features in the second image
status
Type: array<System..::..Byte>[]()[][]%
Array. Every element of the array is set to 1 if the flow for the corresponding feature has been found, 0 otherwise
trackError
Type: array<System..::..Single>[]()[][]%
Array of double numbers containing difference between patches around the original and moved points

See Also