Emgu CV Library Documentation
cvSegmentMotion Method (mhi, segMask, storage, timestamp, segThresh)
NamespacesEmgu.CVCvInvokecvSegmentMotion(IntPtr, IntPtr, IntPtr, Double, Double)

www.emgu.com/wiki
Finds all the motion segments and marks them in seg_mask with individual values each (1,2,...). It also returns a sequence of CvConnectedComp structures, one per each motion components. After than the motion direction for every component can be calculated with cvCalcGlobalOrientation using extracted mask of the particular component (using cvCmp)
Declaration Syntax
C#Visual BasicVisual C++
public static IntPtr cvSegmentMotion(
	IntPtr mhi,
	IntPtr segMask,
	IntPtr storage,
	double timestamp,
	double segThresh
)
Public Shared Function cvSegmentMotion ( _
	mhi As IntPtr, _
	segMask As IntPtr, _
	storage As IntPtr, _
	timestamp As Double, _
	segThresh As Double _
) As IntPtr
public:
static IntPtr cvSegmentMotion(
	IntPtr mhi, 
	IntPtr segMask, 
	IntPtr storage, 
	double timestamp, 
	double segThresh
)
Parameters
mhi (IntPtr)
Motion history image
segMask (IntPtr)
Image where the mask found should be stored, single-channel, 32-bit floating-point
storage (IntPtr)
Memory storage that will contain a sequence of motion connected components
timestamp (Double)
Current time in milliseconds or other units
segThresh (Double)
Segmentation threshold; recommended to be equal to the interval between motion history "steps" or greater
Return Value

[Missing <returns> documentation for M:Emgu.CV.CvInvoke.cvSegmentMotion(System.IntPtr,System.IntPtr,System.IntPtr,System.Double,System.Double)]

Assembly: Emgu.CV (Module: Emgu.CV) Version: 1.3.0.0 (1.3.0.0)