Click or drag to resize
CvInvokeCalcGlobalOrientation Method
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.

Namespace: Emgu.CV
Assembly: Emgu.CV.World (in Emgu.CV.World.dll) Version: (
public static double CalcGlobalOrientation(
	IInputArray orientation,
	IInputArray mask,
	IInputArray mhi,
	double timestamp,
	double duration


Type: Emgu.CVIInputArray
Motion gradient orientation image; calculated by the function cvCalcMotionGradient.
Type: Emgu.CVIInputArray
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.
Type: Emgu.CVIInputArray
Motion history image.
Type: SystemDouble
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.
Type: SystemDouble
Maximal duration of motion track in milliseconds, the same as in cvUpdateMotionHistory

Return Value

Type: Double
The angle
See Also