Click or drag to resize

Cv2GetDerivKernels Method

Returns filter coefficients for computing spatial image derivatives.

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public static void GetDerivKernels(
	OutputArray kx,
	OutputArray ky,
	int dx,
	int dy,
	int ksize,
	bool normalize = false,
	Nullable<MatType> ktype = null
)

Parameters

kx
Type: OpenCvSharpOutputArray
Output matrix of row filter coefficients. It has the type ktype.
ky
Type: OpenCvSharpOutputArray
Output matrix of column filter coefficients. It has the type ktype.
dx
Type: SystemInt32
Derivative order in respect of x.
dy
Type: SystemInt32
Derivative order in respect of y.
ksize
Type: SystemInt32
Aperture size. It can be CV_SCHARR, 1, 3, 5, or 7.
normalize (Optional)
Type: SystemBoolean
Flag 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.
ktype (Optional)
Type: SystemNullableMatType
Type of filter coefficients. It can be CV_32f or CV_64F.
See Also