http://www.emgu.com
Calculates optical flow for overlapped blocks block_size.width * block_size.height pixels each, thus the velocity fields are smaller than the original images. For every block in prev the functions tries to find a similar block in curr in some neighborhood of the original block or shifted by (velx(x0,y0),vely(x0,y0)) block as has been calculated by previous function call (if use_previous)

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

Syntax

C#
public static void BM(
	Image<Gray, byte> prev,
	Image<Gray, byte> curr,
	Size blockSize,
	Size shiftSize,
	Size maxRange,
	bool usePrevious,
	Image<Gray, float> velx,
	Image<Gray, float> vely
)
Visual Basic
Public Shared Sub BM ( 
	prev As Image(Of Gray, Byte),
	curr As Image(Of Gray, Byte),
	blockSize As Size,
	shiftSize As Size,
	maxRange As Size,
	usePrevious As Boolean,
	velx As Image(Of Gray, Single),
	vely As Image(Of Gray, Single)
)
Visual C++
public:
static void BM(
	Image<Gray, unsigned char>^ prev, 
	Image<Gray, unsigned char>^ curr, 
	Size blockSize, 
	Size shiftSize, 
	Size maxRange, 
	bool usePrevious, 
	Image<Gray, float>^ velx, 
	Image<Gray, float>^ vely
)
F#
static member BM : 
        prev : Image<Gray, byte> * 
        curr : Image<Gray, byte> * 
        blockSize : Size * 
        shiftSize : Size * 
        maxRange : Size * 
        usePrevious : bool * 
        velx : Image<Gray, float32> * 
        vely : Image<Gray, float32> -> unit 

Parameters

prev
Type: Emgu.CV..::..Image<(Of <(<'Gray, Byte>)>)>
First image
curr
Type: Emgu.CV..::..Image<(Of <(<'Gray, Byte>)>)>
Second image
blockSize
Type: System.Drawing..::..Size
Size of basic blocks that are compared.
shiftSize
Type: System.Drawing..::..Size
Block coordinate increments.
maxRange
Type: System.Drawing..::..Size
Size of the scanned neighborhood in pixels around block.
usePrevious
Type: System..::..Boolean
Uses previous (input) velocity field.
velx
Type: Emgu.CV..::..Image<(Of <(<'Gray, Single>)>)>
Horizontal component of the optical flow of floor((prev->width - block_size.width)/shiftSize.width) x floor((prev->height - block_size.height)/shiftSize.height) size.
vely
Type: Emgu.CV..::..Image<(Of <(<'Gray, Single>)>)>
Vertical component of the optical flow of the same size velx.

See Also