Emgu CV Library Documentation
PyrLK Method (prev, curr, prevPyrBuffer, currPyrBuffer, prevFeatures, winSize, level, criteria, flags, currFeatures, status, trackError)
NamespacesEmgu.CVOpticalFlowPyrLK(Image<(Of <(Gray, Byte>)>), Image<(Of <(Gray, Byte>)>), Image<(Of <(Gray, Byte>)>), Image<(Of <(Gray, Byte>)>), array<Point2D<(Of <(Single>)>)>[]()[], MCvSize, Int32, MCvTermCriteria, LKFLOW_TYPE, array<Point2D<(Of <(Single>)>)>[]()[]%, array<Byte>[]()[]%, array<Single>[]()[]%)

www.emgu.com/wiki
Calculates optical flow for a sparse feature set using iterative Lucas-Kanade method in pyramids
Declaration Syntax
C#Visual BasicVisual C++
public static void PyrLK(
	Image<Gray, byte> prev,
	Image<Gray, byte> curr,
	Image<Gray, byte> prevPyrBuffer,
	Image<Gray, byte> currPyrBuffer,
	Point2D<float>[] prevFeatures,
	MCvSize winSize,
	int level,
	MCvTermCriteria criteria,
	LKFLOW_TYPE flags,
	out Point2D<float>[] currFeatures,
	out byte[] status,
	out float[] trackError
)
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 Point2D(Of Single)(), _
	winSize As MCvSize, _
	level As Integer, _
	criteria As MCvTermCriteria, _
	flags As LKFLOW_TYPE, _
	<OutAttribute> ByRef currFeatures As Point2D(Of Single)(), _
	<OutAttribute> ByRef status As Byte(), _
	<OutAttribute> ByRef trackError As Single() _
)
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<Point2D<float>^>^ prevFeatures, 
	MCvSize winSize, 
	int level, 
	MCvTermCriteria criteria, 
	LKFLOW_TYPE flags, 
	[OutAttribute] array<Point2D<float>^>^% currFeatures, 
	[OutAttribute] array<unsigned char>^% status, 
	[OutAttribute] array<float>^% trackError
)
Parameters
prev (Image<(Of <(Gray, Byte>)>))
First frame, at time t
curr (Image<(Of <(Gray, Byte>)>))
Second frame, at time t + dt
prevPyrBuffer (Image<(Of <(Gray, Byte>)>))
Buffer for the pyramid for the first frame. If the pointer 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 (Image<(Of <(Gray, Byte>)>))
Similar to prev_pyr, used for the second frame
prevFeatures (array< Point2D<(Of <(Single>)>) >[]()[])
Array of points for which the flow needs to be found
winSize (MCvSize)
Size of the search window of each pyramid level
level (Int32)
Maximal pyramid level number. If 0 , pyramids are not used (single level), if 1 , two levels are used, etc
criteria (MCvTermCriteria)
Specifies when the iteration process of finding the flow for each point on each pyramid level should be stopped
flags (LKFLOW_TYPE)
Flags
currFeatures ( array< Point2D<(Of <(Single>)>) >[]()[] %)
Array of 2D points containing calculated new positions of input features in the second image
status ( array< Byte >[]()[] %)
Array. Every element of the array is set to 1 if the flow for the corresponding feature has been found, 0 otherwise
trackError ( array< Single >[]()[] %)
Array of double numbers containing difference between patches around the original and moved points

Assembly: Emgu.CV (Module: Emgu.CV) Version: 1.4.3249.6313 (1.4.0.0)