filters data by convolving with a Gaussian kernel of radius r.
convolves data with a kernel formed from the ni derivatives of the discrete Gaussian.
uses a Gaussian kernel with radius r and standard deviation σ.
uses radius ri at level i in data.
Details and Options
- GaussianFilter is a filter commonly used in image processing for smoothing, reducing noise and computing derivatives of an image. It is a convolution-based filter that uses a Gaussian matrix as its underlying kernel.
- The data can be any of the following:
list arbitrary-rank numerical array tseries temporal data such as TimeSeries, TemporalData, … image arbitrary Image or Image3D object audio an Audio object
- GaussianFilter[data,r] uses standard deviation .
- GaussianFilter[data,…] by default gives an array, audio or image of the same dimensions as data.
- The following options can be specified:
Method "Bessel" how to determine elements of the Gaussian matrix Padding "Fixed" padding method Standardized True whether to rescale and shift the Gaussian matrix to account for truncation WorkingPrecision Automatic the precision to use
- Possible settings for the Method option are "Bessel" and "Gaussian".
- With a setting Padding->None, GaussianFilter[data,…] normally returns an array, audio or image smaller than data. »
Background & Context
- GaussianFilter is a filter commonly used in image processing for smoothing, reducing noise, and computing derivatives of an image. It is a convolution-based filter that uses a Gaussian matrix as its underlying kernel.
- Gaussian filtering is linear, meaning it replaces each pixel by a linear combination of its neighbors (in this case with weights specified by a Gaussian matrix). It is also local, meaning it produces output pixel values based only upon the pixel values in its neighborhood as determined by the convolution kernel.
- Gaussian filtering is not edge preserving, so other filters such as BilateralFilter and MeanShiftFilter may be more appropriate in applications where edges must be preserved.
- Applying GaussianFilter is equivalent to using ImageConvolve with a GaussianMatrix kernel. MeanFilter is a similar smoothing filter.
Examplesopen allclose all
Basic Examples (3)
Filter a TimeSeries:
Filter an Audio signal:
MachinePrecision is by default used with integer arrays:
WorkingPrecision is ignored when filtering images:
Smoothing & Sharpening (3)
Use GaussianFilter to smooth a time series and identify the trend:
Convert the image to LABColor space:
Use GaussianFilter to denoise an audio signal:
Wolfram Research (2008), GaussianFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/GaussianFilter.html (updated 2016).
Wolfram Language. 2008. "GaussianFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/GaussianFilter.html.
Wolfram Language. (2008). GaussianFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GaussianFilter.html