Table of Contents

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

mhi InputArray

Motion history single-channel floating-point image.

mask OutputArray

Output 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.

orientation OutputArray

Output 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.

delta1 double

Minimal (or maximal) allowed difference between mhi values within a pixel neighborhood.

delta2 double

Maximal (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).

apertureSize int