Gaussian filter
   HOME

TheInfoList



OR:

In
electronics The field of electronics is a branch of physics and electrical engineering that deals with the emission, behaviour and effects of electrons using electronic devices. Electronics uses active devices to control electron flow by amplification ...
and
signal processing Signal processing is an electrical engineering subfield that focuses on analyzing, modifying and synthesizing ''signals'', such as sound, images, and scientific measurements. Signal processing techniques are used to optimize transmissions, ...
mainly in digital signal processing, a Gaussian filter is a
filter Filter, filtering or filters may refer to: Science and technology Computing * Filter (higher-order function), in functional programming * Filter (software), a computer program to process a data stream * Filter (video), a software component tha ...
whose impulse response is a
Gaussian function In mathematics, a Gaussian function, often simply referred to as a Gaussian, is a function of the base form f(x) = \exp (-x^2) and with parametric extension f(x) = a \exp\left( -\frac \right) for arbitrary real constants , and non-zero . It is ...
(or an approximation to it, since a true Gaussian response would have
infinite impulse response Infinite impulse response (IIR) is a property applying to many linear time-invariant systems that are distinguished by having an impulse response h(t) which does not become exactly zero past a certain point, but continues indefinitely. This is in ...
). Gaussian filters have the properties of having no overshoot to a step function input while minimizing the rise and fall time. This behavior is closely connected to the fact that the Gaussian filter has the minimum possible group delay. A Gaussian filter will have the best combination of suppression of high frequencies while also minimizing spatial spread, being the critical point of the
uncertainty principle In quantum mechanics, the uncertainty principle (also known as Heisenberg's uncertainty principle) is any of a variety of mathematical inequalities asserting a fundamental limit to the accuracy with which the values for certain pairs of physic ...
. These properties are important in areas such as
oscilloscopes An oscilloscope (informally a scope) is a type of electronic test instrument that graphically displays varying electrical voltages as a two-dimensional plot of one or more signals as a function of time. The main purposes are to display repetiti ...
and digital telecommunication systems. Mathematically, a Gaussian filter modifies the input signal by
convolution In mathematics (in particular, functional analysis), convolution is a mathematical operation on two functions ( and ) that produces a third function (f*g) that expresses how the shape of one is modified by the other. The term ''convolution'' ...
with a Gaussian function; this transformation is also known as the Weierstrass transform.


Definition

The one-dimensional Gaussian filter has an impulse response given by :g(x)= \sqrte^ and the frequency response is given by the Fourier transform :\hat g(f)= e^ with f the ordinary frequency. These equations can also be expressed with the standard deviation as parameter :g(x) = \frace^ and the frequency response is given by :\hat g(f) = e^ By writing a as a function of \sigma with the two equations for g(x) and as a function of \sigma_f with the two equations for \hat g(f) it can be shown that the product of the standard deviation and the standard deviation in the frequency domain is given by :\sigma\sigma_f=\frac, where the standard deviations are expressed in their physical units, e.g. in the case of time and frequency in seconds and hertz, respectively. In two dimensions, it is the product of two such Gaussians, one per direction: :g(x,y) = \frace^ R.A. Haddad and A.N. Akansu,
A Class of Fast Gaussian Binomial Filters for Speech and Image Processing
" IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 39, pp 723–727, March 1991.
Shapiro, L. G. & Stockman, G. C: "Computer Vision", page 137, 150. Prentence Hall, 2001Mark S. Nixon and Alberto S. Aguado. ''Feature Extraction and Image Processing''. Academic Press, 2008, p. 88. where ''x'' is the distance from the origin in the horizontal axis, ''y'' is the distance from the origin in the vertical axis, and ''σ'' is the standard deviation of the Gaussian distribution.


Digital implementation

The Gaussian function is for x \in (-\infty,\infty) and would theoretically require an infinite window length. However, since it decays rapidly, it is often reasonable to truncate the filter window and implement the filter directly for narrow windows, in effect by using a simple rectangular window function. In other cases, the truncation may introduce significant errors. Better results can be achieved by instead using a different window function; see
scale space implementation In the areas of computer vision, image analysis and signal processing, the notion of scale-space representation is used for processing measurement data at multiple scales, and specifically enhance or suppress image features over different ranges o ...
for details. Filtering involves
convolution In mathematics (in particular, functional analysis), convolution is a mathematical operation on two functions ( and ) that produces a third function (f*g) that expresses how the shape of one is modified by the other. The term ''convolution'' ...
. The filter function is said to be the kernel of an integral transform. The Gaussian kernel is continuous. Most commonly, the discrete equivalent is the
sampled Gaussian kernel In the areas of computer vision, image analysis and signal processing, the notion of scale-space representation is used for processing measurement data at multiple scales, and specifically enhance or suppress image features over different ranges o ...
that is produced by sampling points from the continuous Gaussian. An alternate method is to use the discrete Gaussian kernelLindeberg, T., "Scale-space for discrete signals," PAMI(12), No. 3, March 1990, pp. 234–254.
/ref> which has superior characteristics for some purposes. Unlike the sampled Gaussian kernel, the discrete Gaussian kernel is the solution to the discrete diffusion equation. Since the Fourier transform of the Gaussian function yields a Gaussian function, the signal (preferably after being divided into overlapping windowed blocks) can be transformed with a fast Fourier transform, multiplied with a Gaussian function and transformed back. This is the standard procedure of applying an arbitrary
finite impulse response In signal processing, a finite impulse response (FIR) filter is a filter whose impulse response (or response to any finite length input) is of ''finite'' duration, because it settles to zero in finite time. This is in contrast to infinite impulse ...
filter, with the only difference that the Fourier transform of the filter window is explicitly known. Due to the
central limit theorem In probability theory, the central limit theorem (CLT) establishes that, in many situations, when independent random variables are summed up, their properly normalized sum tends toward a normal distribution even if the original variables themsel ...
, the Gaussian can be approximated by several runs of a very simple filter such as the
moving average In statistics, a moving average (rolling average or running average) is a calculation to analyze data points by creating a series of averages of different subsets of the full data set. It is also called a moving mean (MM) or rolling mean and is ...
. The simple moving average corresponds to
convolution In mathematics (in particular, functional analysis), convolution is a mathematical operation on two functions ( and ) that produces a third function (f*g) that expresses how the shape of one is modified by the other. The term ''convolution'' ...
with the constant B-spline (a rectangular pulse), and, for example, four iterations of a moving average yields a cubic B-spline as filter window which approximates the Gaussian quite well. A moving average is quite cheap to compute, so levels can be cascaded quite easily. In the discrete case the standard deviations are related by :\sigma\cdot\sigma_f=\frac where the standard deviations are expressed in number of samples and ''N'' is the total number of samples. Borrowing the terms from statistics, the standard deviation of a filter can be interpreted as a measure of its size. The cut-off frequency of a Gaussian filter might be defined by the standard deviation in the frequency domain yielding : f_c = \sigma_f = \frac where all quantities are expressed in their physical units. If \sigma is measured in samples the cut-off frequency (in physical units) can be calculated with : f_c = \frac where F_s is the sample rate. The response value of the Gaussian filter at this cut-off frequency equals exp(−0.5) ≈ 0.607. However, it is more common to define the cut-off frequency as the half power point: where the filter response is reduced to 0.5 (−3 dB) in the power spectrum, or 1/ ≈ 0.707 in the amplitude spectrum (see e.g. Butterworth filter). For an arbitrary cut-off value 1/''c'' for the response of the filter the cut-off frequency is given by :f_c = \sqrt\cdot\sigma_f Stefano Bottacchi, ''Noise and Signal Interference in Optical Fiber Transmission Systems'', p. 242, John Wiley & Sons, 2008 For ''c'' = 2 the constant before the standard deviation in the frequency domain in the last equation equals approximately 1.1774, which is half the Full Width at Half Maximum (FWHM) (see
Gaussian function In mathematics, a Gaussian function, often simply referred to as a Gaussian, is a function of the base form f(x) = \exp (-x^2) and with parametric extension f(x) = a \exp\left( -\frac \right) for arbitrary real constants , and non-zero . It is ...
). For ''c'' =  this constant equals approximately 0.8326. These values are quite close to 1. A simple moving average corresponds to a uniform probability distribution and thus its filter width of size n has standard deviation \sqrt. Thus the application of successive m moving averages with sizes _1,\dots,_m yield a standard deviation of : \sigma = \sqrt (Note that standard deviations do not sum up, but
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbe ...
s do.) A gaussian kernel requires 6\sigma-1 values, e.g. for a of 3 it needs a kernel of length 17. A running mean filter of 5 points will have a sigma of . Running it three times will give a of 2.42. It remains to be seen where the advantage is over using a gaussian rather than a poor approximation. When applied in two dimensions, this formula produces a Gaussian surface that has a maximum at the origin, whose
contour Contour may refer to: * Contour (linguistics), a phonetic sound * Pitch contour * Contour (camera system), a 3D digital camera system * Contour, the KDE Plasma 4 interface for tablet devices * Contour line, a curve along which the function ha ...
s are
concentric circles In geometry, two or more objects are said to be concentric, coaxal, or coaxial when they share the same center or axis. Circles, regular polygons and regular polyhedra, and spheres may be concentric to one another (sharing the same center poi ...
with the origin as center. A two dimensional
convolution In mathematics (in particular, functional analysis), convolution is a mathematical operation on two functions ( and ) that produces a third function (f*g) that expresses how the shape of one is modified by the other. The term ''convolution'' ...
matrix is precomputed from the formula and convolved with two dimensional data. Each element in the resultant matrix new value is set to a
weighted average The weighted arithmetic mean is similar to an ordinary arithmetic mean (the most common type of average), except that instead of each of the data points contributing equally to the final average, some data points contribute more than others. The ...
of that elements neighborhood. The focal element receives the heaviest weight (having the highest Gaussian value) and neighboring elements receive smaller weights as their distance to the focal element increases. In Image processing, each element in the matrix represents a pixel attribute such as brightness or a color intensity, and the overall effect is called
Gaussian blur In image processing, a Gaussian blur (also known as Gaussian smoothing) is the result of blurring an image by a Gaussian function (named after mathematician and scientist Carl Friedrich Gauss). It is a widely used effect in graphics software, ...
. The Gaussian filter is non-causal which means the filter window is symmetric about the origin in the time-domain. This makes the Gaussian filter physically unrealizable. This is usually of no consequence for applications where the filter bandwidth is much larger than the signal. In real-time systems, a delay is incurred because incoming samples need to fill the filter window before the filter can be applied to the signal. While no amount of delay can make a theoretical Gaussian filter causal (because the Gaussian function is non-zero everywhere), the Gaussian function converges to zero so rapidly that a causal approximation can achieve any required tolerance with a modest delay, even to the accuracy of floating point representation.


Applications

*
GSM The Global System for Mobile Communications (GSM) is a standard developed by the European Telecommunications Standards Institute (ETSI) to describe the protocols for second-generation ( 2G) digital cellular networks used by mobile devices such ...
since it applies
GMSK In digital modulation, minimum-shift keying (MSK) is a type of continuous-phase frequency-shift keying that was developed in the late 1950s by Collins Radio employees Melvin L. Doelz and Earl T. Heald. Similar to OQPSK, MSK is encoded with bit ...
modulation * the Gaussian filter is also used in
GFSK Frequency-shift keying (FSK) is a frequency modulation scheme in which digital information is transmitted through discrete frequency changes of a carrier signal. The technology is used for communication systems such as telemetry, weather ba ...
. * Canny Edge Detector used in image processing.


See also

* Butterworth filter * Comb filter *
Chebyshev filter Chebyshev filters are analog or digital filters that have a steeper roll-off than Butterworth filters, and have either passband ripple (type I) or stopband ripple (type II). Chebyshev filters have the property that they minimize the error betwee ...
* Discrete Gaussian kernel *
Elliptic filter An elliptic filter (also known as a Cauer filter, named after Wilhelm Cauer, or as a Zolotarev filter, after Yegor Zolotarev) is a signal processing filter with equalized ripple (equiripple) behavior in both the passband and the stopband. The ...
*
Gaussian blur In image processing, a Gaussian blur (also known as Gaussian smoothing) is the result of blurring an image by a Gaussian function (named after mathematician and scientist Carl Friedrich Gauss). It is a widely used effect in graphics software, ...
* Gaussian pyramid *
Scale space Scale-space theory is a framework for multi-scale signal representation developed by the computer vision, image processing and signal processing communities with complementary motivations from physics and biological vision. It is a formal theor ...
*
Scale space implementation In the areas of computer vision, image analysis and signal processing, the notion of scale-space representation is used for processing measurement data at multiple scales, and specifically enhance or suppress image features over different ranges o ...


References

{{DEFAULTSORT:Gaussian Filter Linear filters Gaussian function