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

# GaussianMatrix

 gives a matrix that corresponds to a Gaussian kernel of radius r. GaussianMatrix[{r, }] gives a matrix corresponding to a Gaussian kernel with radius r and standard deviation . GaussianMatrix[r, {n1, n2}]gives a matrix formed from the n1 discrete derivative of the Gaussian with respect to rows and n2 discrete derivative with respect to columns. GaussianMatrix[r, {{n11, n12}, {n21, n22}, ...}]gives a matrix formed from the sums of the ni1 and ni2 derivatives. GaussianMatrix[{{r1, r2, ...}, }, ...] gives an array corresponding to a Gaussian kernel with radius ri in the i index direction.
• gives values that approximate at x index positions from the center, where =r/2.
• By default, the elements of sum to 1.
• GaussianMatrix[..., {n1, n2}] by default constructs discrete derivatives as finite differences.
• GaussianMatrix[r, {{2, 0}, {0, 2}}] gives a matrix formed from the Laplacian of a Gaussian.
• GaussianMatrix[{Automatic, , f}, ...] constructs a matrix just large enough to include at least a fraction f of the discrete integral of a Gaussian in each direction.
• GaussianMatrix allows any of r, and f to be lists, specifying different values for different directions.
• For non-integer r, the value of r is effectively rounded to an integer.
• With the default option setting Method->"Bessel", has elements proportional to Exp[-2] BesselI[x, 2], yielding a kernel with optimal discrete convolution properties.
• With Method->"Gaussian", has elements proportional to the raw continuous functional form Exp[-x2/(2 2)].
Compute and plot a Gaussian matrix:
First derivative of a Gaussian matrix in the vertical dimension:
Compute and plot a Gaussian matrix:
 Out[1]=

First derivative of a Gaussian matrix in the vertical dimension:
 Out[1]=
Generate an exact symbolic Gaussian matrix:
With Method->"Gaussian", the normalization uses the integral over the domain:
With Method->"Bessel", the normalization uses the sum over the domain:
New in 7