DIPlib Documentation - ©1995-2017 Quantitative Imaging Group, Delft University of Technology.

Derivative

Derivative filter

SYNOPSIS

#include "dip_derivatives.h"

dip_Error dip_Derivative ( in, out, boundary, ps, sigmas, order, truncation, flavour )

DATA TYPES

Depends on the underlying implementation, but expect:

binary, integer, float

FUNCTION

This function provides a common interface to different families of regularised derivative operators. Which family is used, is specified by the flavour parameter. The order of the derivative operator along each of the cartesian axes may be specified independently.

Be sure to read the documentation on the underlying implementation to learn about the properties and limitations of the various families.

For the Gaussian family of filters, sigmas must be given, but order can be 0 (only smooth, don't take the derivative).

For the finite difference filter, sigmas can be 0, in which case the non-derivative dimensions will not be processed. Any element of sigmas that is non-zero where the corresponding order is zero, indicates a dimension that will be smoothed. Note it's possible to reporduce the SobelGradient filter this way.

ARGUMENTS

Data typeNameDescription
dip_ImageinInput
dip_ImageoutOutput
dip_BoundaryArraybcBoundary conditions
dip_BooleanArrayps (0)Dimensions to process
dip_FloatArraysigmasSigma of Gaussian
dip_intorder (0)Derivative order
dip_floattruncationTruncation, see GlobalGaussianTruncationGet
dip_DerivativeFlavourflavourDerivative filter flavour

The enumerator flavour parameter is one of:

NameDescription
DIP_DF_DEFAULTDefault derivative flavour (==DIP_DF_FIRGAUSS)
DIP_DF_FIRGAUSSGaussian family, FIR implementation, Gauss
DIP_DF_IIRGAUSSGaussian family, IIR implementation, GaussIIR
DIP_DF_FTGAUSSGaussian family, FT implementation, GaussFT
DIP_DF_FINITEDIFFFinite difference implementation, FiniteDifferenceEx

SEE ALSO

See section 9.5, "Derivative-based operations", in Fundamentals of Image Processing.

Gauss, GaussFT, GaussIIR, FiniteDifferenceEx, GradientMagnitude, GradientDirection2D, Laplace, SobelGradient