This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

 GradientFilter gives an image corresponding to the magnitude of the gradient of image, computed using discrete derivatives of a Gaussian of pixel radius r. GradientFilteruses a Gaussian with standard deviation . GradientFilteruses a Gaussian with radii etc. in vertical and horizontal directions. GradientFilterapplies gradient filtering to an array of data.
• GradientFilter works with arbitrary grayscale and multichannel images.
• For multichannel images, GradientFilter computes the n-dimensional gradient magnitude, taken in the spatial direction in which the pixel vectors vary the most. Variation of the pixel vectors along a given direction is defined by the Euclidean norm of the dot product between the Jacobian matrix of the first spatial derivatives and .
• The following options can be specified:
 Method "Bessel" convolution kernel Padding "Fixed" padding method WorkingPrecision Automatic the precision to use "NonMaxSuppression" False whether to use non-maximum suppression
• GradientFilter by default gives an image of the same dimensions as image.
• In GradientFilter, data can be an array of any rank, and can contain symbolic as well as numerical entries.
• Possible settings for Method include:
 "Bessel" standardized Bessel derivative kernel, used for Canny edge detection "Gaussian" standardized Gaussian derivative kernel, used for Canny edge detection "ShenCastan" first-order derivatives of exponentials "Sobel" binomial generalizations of the Sobel edge detection kernels {kernel1,kernel2,...} explicit kernels specified for each dimension
Gradient filtering of a multichannel image:
Apply gradient filtering to a vector of numbers:
Gradient filtering of a multichannel image:
 Out[1]=

 Out[1]=

Apply gradient filtering to a vector of numbers:
 Out[1]=
 Options   (3)
Compute the gradient magnitude using Prewitt kernels:
Typically, corners are rounded during gradient filtering:
The Shen-Castan method gives a better corner localization at large scales:
Non-max suppression gives only the ridges of gradient lines:
 Applications   (2)
Use gradient filtering to find edges:
Use gradient filtering as a preprocessing step for watershed segmentation:
Gradient filtering usually results in a dark image with small pixel values: