The visual effect of this blurring technique is a smooth blur resembling that of viewing the image through a translucent screen, distinctly different from the bokeh effect produced by an out-of-focus lens or the shadow of an object under usual illumination.
Gaussian smoothing is also used as a pre-processing stage in computer vision algorithms in order to enhance image structures at different scales—see scale space representation and scale space implementation.
By contrast, convolving by a circle (i.e., a circular box blur) would more accurately reproduce the bokeh effect.
The Gaussian blur is a type of image-blurring filter that uses a Gaussian function (which also expresses the normal distribution in statistics) for calculating the transformation to apply to each pixel in the image.
When applied in two dimensions, this formula produces a surface whose contours are concentric circles with a Gaussian distribution from the center point.
Values from this distribution are used to build a convolution matrix which is applied to the original image.
In practice, when computing a discrete approximation of the Gaussian function, pixels at a distance of more than 3σ have a small enough influence to be considered effectively zero.
Typically, an image processing program need only calculate a matrix with dimensions
is the ceiling function) to ensure a result sufficiently close to that obtained by the entire Gaussian distribution.
In addition to being circularly symmetric, the Gaussian blur can be applied to a two-dimensional image as two independent one-dimensional calculations, and so is termed a separable filter.
That is, the effect of applying the two-dimensional matrix can also be achieved by applying a series of single-dimensional Gaussian matrices in the horizontal direction, then repeating the process in the vertical direction.
Gaussian blurring is commonly used when reducing the size of an image.
This is to ensure that spurious high-frequency information does not appear in the downsampled image (aliasing).
Gaussian blurs have nice properties, such as having no sharp edges, and thus do not introduce ringing into the filtered image.
Gaussian blur is a low-pass filter, attenuating high frequency signals.
[3] Its amplitude Bode plot (the log scale in the frequency domain) is a parabola.
In other words, how much does it reduce the standard deviation of pixel values in the picture?
In practice, it is best to take advantage of the Gaussian blur’s separable property by dividing the process into two passes.
In the first pass, a one-dimensional kernel is used to blur the image in only the horizontal or vertical direction.
The resulting effect is the same as convolving with a two-dimensional kernel in a single pass, but requires fewer calculations.
In these cases, accuracy is maintained (at a slight computational cost) by integration of the Gaussian function over each pixel's area.
A much better and theoretically more well-founded approach is to instead perform the smoothing with the discrete analogue of the Gaussian kernel,[6] which possesses similar properties over a discrete domain as makes the continuous Gaussian kernel special over a continuous domain, for example, the kernel corresponding to the solution of a diffusion equation describing a spatial smoothing process, obeying a semi-group property over additions of the variance of the kernel, or describing the effect of Brownian motion over a spatial domain, and with the sum of its values being exactly equal to 1.
For a more detailed description about the discrete analogue of the Gaussian kernel, see the article on scale-space implementation and.
For temporal smoothing in real-time situations, one can instead use the temporal kernel referred to as the time-causal limit kernel,[8] which possesses similar properties in a time-causal situation (non-creation of new structures towards increasing scale and temporal scale covariance) as the Gaussian kernel obeys in the non-causal case.
The time-causal limit kernel corresponds to convolution with an infinite number of truncated exponential kernels coupled in cascade, with specifically chosen time constants.
For discrete data, this kernel can often be numerically well approximated by a small set of first-order recursive filters coupled in cascade, see [8] for further details.
Using a Gaussian Blur filter before edge detection aims to reduce the level of noise in the image, which improves the result of the following edge-detection algorithm.
This approach is commonly referred to as Laplacian of Gaussian, or LoG filtering.
[9] Lower-end digital cameras, including many mobile phone cameras, commonly use gaussian blurring[citation needed] to obscure image noise caused by higher ISO light sensitivities.
Gaussian blur is automatically applied as part of the image post-processing of the photo by the camera software, leading to an irreversible loss of detail.