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.
|C#||Visual Basic||Visual C++|
- 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
Assembly: Emgu.CV (Module: Emgu.CV) Version: 188.8.131.52 (184.108.40.206)