Emgu CV Library Documentation
cvCalcGlobalOrientation Method (orientation, mask, mhi, timestamp, duration)
NamespacesEmgu.CVCvInvokecvCalcGlobalOrientation(IntPtr, IntPtr, IntPtr, Double, Double)

www.emgu.com/wiki
Calculates the general motion direction in the selected region and returns the angle between 0 and 360. At first the function builds the orientation histogram and finds the basic orientation as a coordinate of the histogram maximum. After that the function calculates the shift relative to the basic orientation as a weighted sum of all orientation vectors: the more recent is the motion, the greater is the weight. The resultant angle is a circular sum of the basic orientation and the shift.
Declaration Syntax
C#Visual BasicVisual C++
public static double cvCalcGlobalOrientation(
	IntPtr orientation,
	IntPtr mask,
	IntPtr mhi,
	double timestamp,
	double duration
)
Public Shared Function cvCalcGlobalOrientation ( _
	orientation As IntPtr, _
	mask As IntPtr, _
	mhi As IntPtr, _
	timestamp As Double, _
	duration As Double _
) As Double
public:
static double cvCalcGlobalOrientation(
	IntPtr orientation, 
	IntPtr mask, 
	IntPtr mhi, 
	double timestamp, 
	double duration
)
Parameters
orientation (IntPtr)
Motion gradient orientation image; calculated by the function cvCalcMotionGradient.
mask (IntPtr)
Mask image. It may be a conjunction of valid gradient mask, obtained with cvCalcMotionGradient and mask of the region, whose direction needs to be calculated.
mhi (IntPtr)
Motion history image.
timestamp (Double)
Current time in milliseconds or other units, it is better to store time passed to cvUpdateMotionHistory before and reuse it here, because running cvUpdateMotionHistory and cvCalcMotionGradient on large images may take some time.
duration (Double)
Maximal duration of motion track in milliseconds, the same as in cvUpdateMotionHistory
Return Value
The angle

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