| CvOptFlowCalcMotionGradient Method |
Computes the motion gradient orientation image from the motion history image
Namespace:
OpenCvSharp.OptFlow
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static void CalcMotionGradient(
InputArray mhi,
OutputArray mask,
OutputArray orientation,
double delta1,
double delta2,
int apertureSize = 3
)
Public Shared Sub CalcMotionGradient (
mhi As InputArray,
mask As OutputArray,
orientation As OutputArray,
delta1 As Double,
delta2 As Double,
Optional apertureSize As Integer = 3
)
public:
static void CalcMotionGradient(
InputArray^ mhi,
OutputArray^ mask,
OutputArray^ orientation,
double delta1,
double delta2,
int apertureSize = 3
)
static member CalcMotionGradient :
mhi : InputArray *
mask : OutputArray *
orientation : OutputArray *
delta1 : float *
delta2 : float *
?apertureSize : int
(* Defaults:
let _apertureSize = defaultArg apertureSize 3
*)
-> unit
Parameters
- mhi
- Type: OpenCvSharpInputArray
Motion history single-channel floating-point image. - mask
- Type: OpenCvSharpOutputArray
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
- Type: OpenCvSharpOutputArray
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
- Type: SystemDouble
Minimal (or maximal) allowed difference between mhi values within a pixel neighborhood. - delta2
- Type: SystemDouble
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 (Optional)
- Type: SystemInt32
[Missing <param name="apertureSize"/> documentation for "M:OpenCvSharp.OptFlow.CvOptFlow.CalcMotionGradient(OpenCvSharp.InputArray,OpenCvSharp.OutputArray,OpenCvSharp.OutputArray,System.Double,System.Double,System.Int32)"]
See Also