Finds all the motion segments and marks them in segMask 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)

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

Syntax

         
 C#  Visual Basic  Visual 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

Pointer to the sequence of MCvConnectedComp

See Also