This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

GaussianMatrix

GaussianMatrix[r]
gives a matrix that corresponds to a Gaussian kernel of radius r.
GaussianMatrix
gives a matrix corresponding to a Gaussian kernel with radius r and standard deviation .
GaussianMatrix
gives a matrix formed from the ^(th) derivative of the Gaussian with respect to rows and the ^(th) derivative with respect to columns.
GaussianMatrix
gives a matrix formed from the sums of the and derivatives.
GaussianMatrix
gives an array corresponding to a Gaussian kernel with radius in the i^(th) index direction.
  • GaussianMatrix[r] gives values that approximate at index positions from the center, where .
  • GaussianMatrix by default constructs discrete derivatives as finite differences.
  • GaussianMatrix 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.
Method"Bessel"how to determine matrix elements
WorkingPrecisionAutomaticthe precision with which to compute matrix elements
"Standardization"Truewhether to rescale and shift the matrix to account for truncation
  • Possible settings for the Method option are and .
  • With the default option setting Method, GaussianMatrix[r] has elements proportional to Exp[-2] BesselI[x, 2], yielding a kernel with optimal discrete convolution properties.
  • For Method, derivatives of GaussianMatrix[r] are obtained by the finite difference operator. GaussianMatrix satisfies the finite difference equation .
  • For Method, derivatives of GaussianMatrix[r] are proportional to the partial derivatives of the functional form. The GaussianMatrix approximately satisfies the differential equation .
  • With , the elements of GaussianMatrix[r] will sum to 1. However, the elements of GaussianMatrix 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.
Compute and plot a Gaussian matrix:
Compute and plot a Gaussian vector:
First derivative of a Gaussian matrix in the vertical dimension:
Compute and plot a Gaussian matrix:
In[1]:=
Click for copyable input
Out[1]=
 
Compute and plot a Gaussian vector:
In[1]:=
Click for copyable input
Out[1]=
 
First derivative of a Gaussian matrix in the vertical dimension:
In[1]:=
Click for copyable input
Out[1]=
With Method, the derivative is computed using a finite difference:
With Method, the continuous derivative is used:
Generate an exact symbolic Gaussian matrix:
A Gaussian matrix appropriate for discrete convolution:
A Gaussian matrix sampled from the continuum:
A machine-precision Gaussian vector:
An exact symbolic Gaussian vector:
A high-precision Gaussian vector:
A normalized Gaussian vector:
A normalized Gaussian matrix:
An unnormalized Gaussian vector:
The total of the unnormalized matrix approaches 1 as the ratio of its size to its standard deviation increases:
A shifted Gaussian derivative:
A shifted Gaussian derivative is also rescaled:
A Gaussian derivative that is not standardized:
Shifts and rescalings are performed using a discrete normalization for all methods:
New in 7 | Last modified in 8