SOLUTIONS

Search for all pages containing GaussianMatrix
Mathematica
>
Data Manipulation
>
Image Processing & Analysis
>
Image Filtering & Neighborhood Processing
>
Structure Matrices & Convolution Kernels
>
GaussianMatrix
BUILTIN MATHEMATICA SYMBOL
GaussianMatrix
GaussianMatrix[r]
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, {n_{1}, n_{2}}]
gives a matrix formed from the derivative of the Gaussian with respect to rows and the derivative with respect to columns.
GaussianMatrix[r, {{n_{11}, n_{12}}, {n_{21}, n_{22}}, ...}]
gives a matrix formed from the sums of the and derivatives.
GaussianMatrix[{{r_{1}, r_{2}, ...}, }, ...]
gives an array corresponding to a Gaussian kernel with radius in the i index direction.
Details and OptionsDetails and Options
 GaussianMatrix[r] gives values that approximate at index position from the center, where .
 By default, the elements of GaussianMatrix[r] sum to 1.
 GaussianMatrix[..., {n_{1}, n_{2}}] 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 integer r, GaussianMatrix[r, ...] yields a × matrix.
 For noninteger r, the value of r is effectively rounded to an integer.
 Options for GaussianMatrix include:

Method "Bessel" how to determine matrix elements WorkingPrecision Automatic the precision with which to compute matrix elements "Standardization" True whether to rescale and shift the matrix to account for truncation  Possible settings for the Method option are and .
 With the default option setting Method>"Bessel", GaussianMatrix[r] has elements proportional to Exp[^{2}] BesselI[x, ^{2}], yielding a kernel with optimal discrete convolution properties.
 For Method>"Bessel", derivatives of GaussianMatrix[r] are obtained by the finite difference operator. GaussianMatrix[{r, }] satisfies the finite difference equation .
 With Method>"Gaussian", GaussianMatrix[r] has elements proportional to the raw continuous functional form Exp[x_{i}^{2}/(2 ^{2})]/().
 For Method>"Gaussian", derivatives of GaussianMatrix[r] are proportional to the partial derivatives of the functional form. The GaussianMatrix[{r, }] approximately satisfies the differential equation .
 With , the elements of GaussianMatrix[r] will sum to 1. However, the elements of GaussianMatrix[r, {n_{1}, n_{2}, ...}] with at least one nonzero will sum to 0, and the sum of the elements, weighted in each direction by times the distance from the origin to the power of , will be 1.
 With "Standardization">True, the proportionality factor ensures that the elements of GaussianMatrix[r] sum to 1. However, the elements of GaussianMatrix[r, {n_{1}, n_{2}, ...}] with at least one nonzero will sum to 0, and the sum of the elements, weighted in each direction by times the distance from the origin to the power of , will be 1.
 With "Standardization">False, no proportionality factor is used.
New in 7  Last modified in 8
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »