Start » Filter Reference » OpenCV » Image Filtering » cvGetDerivKernels

cvGetDerivKernels


Module: OpenCV

Returns filter coefficients for computing spatial image derivatives.

Applications

Prepares matrices to be used with cvSepFilter2D or cvFilter2D.
Name Type Range Description
Input value
inDX Integer 0 - Derivative order in respect of x.
Input value
inDY Integer 0 - Derivative order in respect of y.
Input value
inKSize Integer -1 - 7 Aperture size. It can be CV_SCHARR(-1), 1, 3, 5, or 7.
Input value
inNormalize Bool Flag indicating whether to normalize [scale down] the filter coefficients or not.
Output value
outKX Matrix Output matrix of row filter coefficients.
Output value
outKY Matrix Output matrix of column filter coefficients.

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError inKSize parameter must be CV_SCHARR(-1), 1, 3, 5 or 7 in cvGetDerivKernels.
DomainError Sum of inDX and inDY must be greater than 0 in cvGetDerivKernels.

Complexity Level

This filter is available on Basic Complexity Level.