Bilateral Filter
   HOME

TheInfoList



OR:

A bilateral filter is a
non-linear In mathematics and science, a nonlinear system is a system in which the change of the output is not proportional to the change of the input. Nonlinear problems are of interest to engineers, biologists, physicists, mathematicians, and many other ...
, edge-preserving, and noise-reducing
smoothing In statistics and image processing, to smooth a data set is to create an approximating function that attempts to capture important patterns in the data, while leaving out noise or other fine-scale structures/rapid phenomena. In smoothing, the dat ...
filter for images. It replaces the intensity of each pixel with a weighted average of intensity values from nearby pixels. This weight can be based on a Gaussian distribution. Crucially, the weights depend not only on Euclidean distance of pixels, but also on the radiometric differences (e.g., range differences, such as color intensity, depth distance, etc.). This preserves sharp edges.


Definition

The bilateral filter is defined as : I^\text(x) = \frac \sum_ I(x_i)f_r(\, I(x_i) - I(x)\, )g_s(\, x_i - x\, ), and normalization term, , is defined as : W_p = \sum_ where : I^\text is the filtered image; : I is the original input image to be filtered; : x are the coordinates of the current pixel to be filtered; : \Omega is the window centered in x, so x_i \in \Omega is another pixel; : f_r is the range kernel for smoothing differences in intensities (this function can be 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 ...
); : g_s is the spatial (or domain) kernel for smoothing differences in coordinates (this function can be a Gaussian function). The weight W_p is assigned using the spatial closeness (using the spatial kernel g_s) and the intensity difference (using the range kernel f_r). Consider a pixel located at (i, j) that needs to be denoised in image using its neighbouring pixels and one of its neighbouring pixels is located at (k, l). Then, assuming the range and spatial kernels to be Gaussian kernels, the weight assigned for pixel (k, l) to denoise the pixel (i, j) is given by : w(i, j, k, l) = \exp\left(-\frac - \frac\right), where σd and σr are smoothing parameters, and ''I''(''i'', ''j'') and ''I''(''k'', ''l'') are the intensity of pixels (i, j) and (k, l) respectively. After calculating the weights, normalize them: : I_D(i, j) = \frac, where I_D is the denoised intensity of pixel (i, j).


Parameters

* As the range parameter σr increases, the bilateral filter gradually approaches Gaussian convolution more closely because the range Gaussian widens and flattens, which means that it becomes nearly constant over the intensity interval of the image. * As the spatial parameter σd increases, the larger features get smoothened.


Limitations

The bilateral filter in its direct form can introduce several types of image artifacts: * Staircase effect – intensity plateaus that lead to images appearing like cartoons * Gradient reversal – introduction of false edges in the image. There exist several extensions to the filter that deal with these artifacts, like the scaled bilateral filter that uses downscaled image for computing the weights. Alternative filters, like the ''guided filter'', have also been proposed as an efficient alternative without these limitations.


Implementations

Adobe Photoshop Adobe Photoshop is a raster graphics editor developed and published by Adobe Inc. for Microsoft Windows, Windows and macOS. It was originally created in 1988 by Thomas Knoll, Thomas and John Knoll. Since then, the software has become the indu ...
implements a bilateral filter in its ''surface blur'' tool.
GIMP GIMP ( ; GNU Image Manipulation Program) is a free and open-source raster graphics editor used for image manipulation (retouching) and image editing, free-form drawing, transcoding between different image file formats, and more specialized task ...
implements a bilateral filter in its ''Filters → Blur'' tools; and it is called ''Selective Gaussian Blur''. The free
G'MIC G'MIC (GREYC's Magic for Image Computing) is a free and open-source framework for image processing. It defines a script language that allows the creation of complex macros. Originally usable only through a command line interface, it is currently ...
plugin ''Repair → Smooth ilateral' for
GIMP GIMP ( ; GNU Image Manipulation Program) is a free and open-source raster graphics editor used for image manipulation (retouching) and image editing, free-form drawing, transcoding between different image file formats, and more specialized task ...
adds more control. A simple trick to efficiently implement a bilateral filter is to exploit Poisson-disk subsampling.


Related models

The bilateral filter has been shown to be an application of the short time kernel of the
Beltrami flow In fluid dynamics, Beltrami flows are flows in which the vorticity vector \mathbf and the velocity vector \mathbf are parallel to each other. In other words, Beltrami flow is a flow where Lamb vector is zero. It is named after the Italian mathematic ...
that was introduced as an edge preserving selective smoothing mechanism before the bilateral filter. Other
edge-preserving smoothing Edge-preserving smoothing or edge-preserving filtering is an image processing technique that smooths away noise or textures while retaining sharp edges. Examples are the median, bilateral, guided, anisotropic diffusion, and Kuwahara filters. I ...
filters include:
anisotropic diffusion In image processing and computer vision, anisotropic diffusion, also called Perona–Malik diffusion, is a technique aiming at reducing image noise without removing significant parts of the image content, typically edges, lines or other details t ...
, weighted least squares, edge-avoiding wavelets, geodesic editing, guided filtering, iterative guided filtering and domain transforms.Gastal, Eduardo S. L., and Manuel M. Oliveira. "Domain transform for edge-aware image and video processing." In ACM Transactions on Graphics, vol. 30, no. 4 (2011): 69. http://inf.ufrgs.br/~eslgastal/DomainTransform/


See also

*
Gaussian filter In electronics and signal processing mainly in digital signal processing, a Gaussian filter is a filter whose impulse response is a Gaussian function (or an approximation to it, since a true Gaussian response would have infinite impulse respons ...
*
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 ...
*
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, ...
*
Convolution In mathematics (in particular, functional analysis), convolution is a operation (mathematics), mathematical operation on two function (mathematics), functions ( and ) that produces a third function (f*g) that expresses how the shape of one is ...


External links

* Kaiming He
Guided image filtering
(faster than bilateral filter and avoids staircasing and gradient reversal artifacts) * Haarith Devarajan, Harold Nyikal

in
Image Scaling and Bilateral Filtering
2006 course * Sylvain Paris, Pierre Kornprobst, Jack Tumblin, Frédo Durand
Bilateral Filtering: Theory and Applicationspreprint
* Sylvain Paris, Pierre Kornprobst, Jack Tumblin, Frédo Durand
A Gentle Introduction to Bilateral Filtering and its ApplicationsSIGGRAPH 2008
class * Ben Weiss
Fast Median and Bilateral FilteringSIGGRAPH 2006
preprint * Carlo Tomasi, Roberto Manduchi
Bilateral Filtering for Gray and Color Images
(shorte

version), proceedings of th
ICCV 1998
* Qingxiong Yang, Kar-Han Tan, Narendra Ahuja
Real-Time ''O''(1) Bilateral Filtering


References

{{Noise, state=uncollapsed Image noise reduction techniques