DerivativeFilter[image, {n1, n2}]
computes the ^(th) derivative of image in the vertical and horizontal directions.

DerivativeFilter[image, {n1, n2}, ]
computes the derivative at a Gaussian scale of standard deviation .

DerivativeFilter[array, {n1, n2, ...}]
computes the derivative of array.

Details and OptionsDetails and Options

  • DerivativeFilter is a linear filter that renders the derivatives of an image based on a spline interpolation model.
  • DerivativeFilter uses the array coordinate system, where the first coordinate runs from the top to the bottom of image, and the second coordinate increases from right to left.
  • DerivativeFilter works with arbitrary grayscale or multichannel images, operating separately on each channel.
  • DerivativeFilter works with 3D as well as 2D images, and also with data arrays of any rank.
  • DerivativeFilter[image, ...] gives a real image of the same dimensions as image.
  • DerivativeFilter can take the following options:
  • InterpolationOrderAutomaticinterpolation order
    Padding"Fixed"padding method
  • Possible settings for the InterpolationOrder option are 1, 3, 5, 7, or 9. The derivation order has to be smaller than the specified interpolation order.
  • Image derivatives are susceptible to noise. To counteract this effect, you can regularize the image or data by a Gaussian kernel of standard deviation . The default value is =0.
  • The Padding option accepts the settings , , , , or a numeric value. A list of these settings can specify different paddings for every dimension of image or data.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

The vertical derivative of an image:

Click for copyable input

The horizontal derivative of an image:

Click for copyable input
New in 8 | Last modified in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »