WOLFRAM

DerivativeFilter[data,{n1,n2,}]

computes the ni^(th) derivative of data at level i.

DerivativeFilter[data,{n1,n2,},σ]

computes the derivative at a Gaussian scale of standard deviation σ.

DerivativeFilter[data,{der1,der2,},]

computes several derivatives der1, der2, .

Details and Options

  • DerivativeFilter is a linear filter that computes the derivatives of data based on a spline interpolation model. Regularization with a Gaussian kernel of standard deviation σ (defaults to 0) can be used to reduce susceptibility to noise.
  • The data can be any of the following:
  • listarbitrary-rank numerical array
    tseriestemporal data such as TimeSeries, TemporalData,
    imagearbitrary Image or Image3D object
    audioan Audio object
  • DerivativeFilter operates separately on each level of data.
  • DerivativeFilter[image,] uses the array coordinate system, where the first coordinate runs from the top to the bottom of image, and the second coordinate increases from left to right.
  • DerivativeFilter gives a result with the same dimensions as data.
  • DerivativeFilter can take the following options:
  • InterpolationOrder Automaticinterpolation order up to 9
    Padding "Fixed"padding method
  • With Padding->{pad1,pad2,}, different padding schemes can be used for every dimension of data.
  • The derivative order has to be smaller than the specified interpolation order.

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

A horizontal derivative of an image:

Out[4]=4

A regularized horizontal derivative of an image:

Out[1]=1

Derivative of a numeric list:

Out[2]=2

Scope  (13)Survey of the scope of standard use cases

Data  (5)

First-order derivatives of a 2D array:

Obtain the first derivative of a TimeSeries object:

Out[1]=1

Filter an Audio signal:

Out[1]=1
Out[2]=2

Vertical derivative of a color image:

Out[1]=1

Vertical derivative of a 3D image:

Out[1]=1

Parameters  (8)

Zeroth derivative of a list:

Out[1]=1

First, second and third derivatives of a step sequence:

Out[1]=1

Vertical derivative of an image:

Out[1]=1

Horizontal derivative:

Out[2]=2

Second-order derivative in both dimensions:

Out[1]=1

Compute several derivatives of an image:

Out[1]=1

Vertical derivative of a 3D image:

Out[1]=1

Horizontal derivatives only:

Out[2]=2

Regularize the derivative using Gaussian smoothing:

Out[1]=1

Horizontal derivative at different Gaussian scales:

Out[1]=1

Options  (3)Common values & functionality for each option

InterpolationOrder  (1)

Filtering an array using different InterpolationOrder values:

Out[1]=1

Padding  (2)

Derivative filtering using different padding schemes:

Out[9]=9

First derivatives of a grayscale image using different padding schemes:

Out[1]=1

Use different padding schemes in each spatial direction:

Out[2]=2

Applications  (5)Sample problems that can be solved with this function

Compute the image gradient:

Out[20]=20

Compute the Laplacian of an image at scale σ=6:

Out[1]=1

Ridge detection at scale σ=2:

Out[1]=1

T-junction filter:

Out[1]=1

Get borders from a colored map:

Out[1]=1

Properties & Relations  (4)Properties of the function, and connections to other functions

For larger values of , the results of GaussianFilter and DerivativeFilter converge:

Out[6]=6
Out[8]=8
Out[10]=10

DerivativeFilter and the corresponding derivatives of a spline interpolation return the same values:

Out[1]=1
Out[2]=2

Plot the result of the filter on top of the derivative of the interpolating function:

Out[3]=3

Derivative filtering of a binary image gives a grayscale image of a real type:

Out[1]=1

DerivativeFilter is a linear filter:

Out[1]=1
Wolfram Research (2010), DerivativeFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/DerivativeFilter.html (updated 2016).
Wolfram Research (2010), DerivativeFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/DerivativeFilter.html (updated 2016).

Text

Wolfram Research (2010), DerivativeFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/DerivativeFilter.html (updated 2016).

Wolfram Research (2010), DerivativeFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/DerivativeFilter.html (updated 2016).

CMS

Wolfram Language. 2010. "DerivativeFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/DerivativeFilter.html.

Wolfram Language. 2010. "DerivativeFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/DerivativeFilter.html.

APA

Wolfram Language. (2010). DerivativeFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DerivativeFilter.html

Wolfram Language. (2010). DerivativeFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DerivativeFilter.html

BibTeX

@misc{reference.wolfram_2025_derivativefilter, author="Wolfram Research", title="{DerivativeFilter}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/DerivativeFilter.html}", note=[Accessed: 30-April-2025 ]}

@misc{reference.wolfram_2025_derivativefilter, author="Wolfram Research", title="{DerivativeFilter}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/DerivativeFilter.html}", note=[Accessed: 30-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_derivativefilter, organization={Wolfram Research}, title={DerivativeFilter}, year={2016}, url={https://reference.wolfram.com/language/ref/DerivativeFilter.html}, note=[Accessed: 30-April-2025 ]}

@online{reference.wolfram_2025_derivativefilter, organization={Wolfram Research}, title={DerivativeFilter}, year={2016}, url={https://reference.wolfram.com/language/ref/DerivativeFilter.html}, note=[Accessed: 30-April-2025 ]}