Method GetDerivKernels
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
GetDerivKernels(OutputArray, OutputArray, int, int, int, bool, MatType?)
Returns filter coefficients for computing spatial image derivatives.
public static void GetDerivKernels(OutputArray kx, OutputArray ky, int dx, int dy, int ksize, bool normalize = false, MatType? ktype = null)
Parameters
kxOutputArrayOutput matrix of row filter coefficients. It has the type ktype.
kyOutputArrayOutput matrix of column filter coefficients. It has the type ktype.
dxintDerivative order in respect of x.
dyintDerivative order in respect of y.
ksizeintAperture size. It can be CV_SCHARR, 1, 3, 5, or 7.
normalizeboolFlag indicating whether to normalize (scale down) the filter coefficients or not. Theoretically, the coefficients should have the denominator \f$=2^{ksize*2-dx-dy-2}\f$. If you are going to filter floating-point images, you are likely to use the normalized kernels. But if you compute derivatives of an 8-bit image, store the results in a 16-bit image, and wish to preserve all the fractional bits, you may want to set normalize = false.
ktypeMatType?Type of filter coefficients. It can be CV_32f or CV_64F.