MATLAB File Help: cv.calcMotionGradient Index
cv.calcMotionGradient

Calculates a gradient orientation of a motion history image

[mask,orientation] = cv.calcMotionGradient(mhi, delta1, delta2)
[...] = cv.calcMotionGradient(..., 'OptionName', optionValue, ...)

Input

Output

Options

The function calculates a gradient orientation at each pixel (x,y) as:

 orientation(x,y) = arctan((dmhi / dy) / (dmhi / dx))

In fact, fastAtan2() and phase() are used so that the computed angle is measured in degrees and covers the full range 0..360. Also, the mask is filled to indicate pixels where the computed angle is valid.

See also