Method CalcMotionGradient
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
CalcMotionGradient(InputArray, OutputArray, OutputArray, double, double, int)
Computes the motion gradient orientation image from the motion history image
public static void CalcMotionGradient(InputArray mhi, OutputArray mask, OutputArray orientation, double delta1, double delta2, int apertureSize = 3)
Parameters
mhiInputArrayMotion history single-channel floating-point image.
maskOutputArrayOutput mask image that has the type CV_8UC1 and the same size as mhi. Its non-zero elements mark pixels where the motion gradient data is correct.
orientationOutputArrayOutput motion gradient orientation image that has the same type and the same size as mhi. Each pixel of the image is a motion orientation, from 0 to 360 degrees.
delta1doubleMinimal (or maximal) allowed difference between mhi values within a pixel neighborhood.
delta2doubleMaximal (or minimal) allowed difference between mhi values within a pixel neighborhood. That is, the function finds the minimum ( m(x,y) ) and maximum ( M(x,y) ) mhi values over 3x3 neighborhood of each pixel and marks the motion orientation at (x, y) as valid only if: min(delta1, delta2) <= M(x,y)-m(x,y) <= max(delta1, delta2).
apertureSizeint