Guided filter

Last updated

A guided filter is an edge-preserving smoothing image filter. As with a bilateral filter, it can filter out noise or texture while retaining sharp edges. [1] [2]

Contents

Comparison

Compared to the bilateral filter, the guided image filter has two advantages: bilateral filters have high computational complexity, while the guided image filter uses simpler calculations with linear computational complexity. Bilateral filters sometimes include unwanted gradient reversal artifacts and cause image distortion. The guided image filter is based on linear combination, making the output image consistent with the gradient direction of the guidance image, preventing gradient reversal.

Definition

One key assumption of the guided filter is that the relation between guidance and the filtering output is linear. Suppose that is a linear transformation of in a window centered at the pixel .

In order to determine the linear coefficient , constraints from the filtering input are required. The output is modeled as the input with unwanted components , such as noise/textures subtracted.

The basic model:

(1)  

(2)  

in which:

is the output pixel;
is the input pixel;
is the pixel of noise components;
is the guidance image pixel;
are some linear coefficients assumed to be constant in .

The reason to use a linear combination is that the boundary of an object is related to its gradient. The local linear model ensures that has an edge only if has an edge, since .

Subtract (1) and (2) to get formula (3);At the same time, define a cost function (4):

(3)  

(4)  

in which

is a regularization parameter penalizing large ;
is a window centered at the pixel .

And the cost function's solution is:

(5)  

(6)  

in which

and are the mean and variance of in ;
is the number of pixels in ;
is the mean of in .

After obtaining the linear coefficients , the filtering output is provided by the following algorithm:

Algorithm

By definition, the algorithm can be written as:

Algorithm 1. Guided Filter

input: filtering input image ,guidance image ,window radius ,regularization

output: filtering output

1.

 =  =  =  = 

2.

 =  = 

3.

 =  = 

4.

 =  = 

5.

 = 

is a mean filter with a wide variety of O(N) time methods.

Properties

Edge-preserving filtering

When the guidance image is the same as the filtering input . The guided filter removes noise in the input image while preserving clear edges.

Specifically, a “flat patch” or a “high variance patch” can be specified by the parameter of the guided filter. Patches with variance much lower than the parameter will be smoothed, and those with variances much higher than will be preserved. The role of the range variance in the bilateral filter is similar to in the guided filter. Both of them define the edge/high variance patches that should be kept and noise/flat patches that should be smoothed.”

Gradient-preserving filtering

When using the bilateral filter to filter an image, artifacts may appear on the edges. This is because of the pixel value's abrupt change on the edge. These artifacts are inherent and hard to avoid, because edges appear in all kinds of pictures.

The guided filter performs better in avoiding gradient reversal. Moreover, in some cases, it can be ensured that gradient reversal does not occur.

Structure-transferring filtering

Due to the local linear model of , it is possible to transfer the structure from the guidance to the output . This property enables some special filtering-based applications, such as feathering, matting and dehazing.

Implementations

See also

Related Research Articles

<span class="mw-page-title-main">Computable number</span> Real number that can be computed within arbitrary precision

In mathematics, computable numbers are the real numbers that can be computed to within any desired precision by a finite, terminating algorithm. They are also known as the recursive numbers, effective numbers or the computable reals or recursive reals. The concept of a computable real number was introduced by Emile Borel in 1912, using the intuitive notion of computability available at the time.

In engineering, a transfer function of a system, sub-system, or component is a mathematical function that models the system's output for each possible input. It is widely used in electronic engineering tools like circuit simulators and control systems. In simple cases, this function can be represented as a two-dimensional graph of an independent scalar input versus the dependent scalar output. Transfer functions for components are used to design and analyze systems assembled from components, particularly using the block diagram technique, in electronics and control theory.

A Costas loop is a phase-locked loop (PLL) based circuit which is used for carrier frequency recovery from suppressed-carrier modulation signals and phase modulation signals. It was invented by John P. Costas at General Electric in the 1950s. Its invention was described as having had "a profound effect on modern digital communications". The primary application of Costas loops is in wireless receivers. Its advantage over other PLL-based detectors is that at small deviations the Costas loop error voltage is as compared to . This translates to double the sensitivity and also makes the Costas loop uniquely suited for tracking Doppler-shifted carriers, especially in OFDM and GPS receivers.

<span class="mw-page-title-main">Drude model</span> Model of electrical conduction

The Drude model of electrical conduction was proposed in 1900 by Paul Drude to explain the transport properties of electrons in materials. Basically, Ohm's law was well established and stated that the current J and voltage V driving the current are related to the resistance R of the material. The inverse of the resistance is known as the conductance. When we consider a metal of unit length and unit cross sectional area, the conductance is known as the conductivity, which is the inverse of resistivity. The Drude model attempts to explain the resistivity of a conductor in terms of the scattering of electrons by the relatively immobile ions in the metal that act like obstructions to the flow of electrons.

In econometrics, the autoregressive conditional heteroskedasticity (ARCH) model is a statistical model for time series data that describes the variance of the current error term or innovation as a function of the actual sizes of the previous time periods' error terms; often the variance is related to the squares of the previous innovations. The ARCH model is appropriate when the error variance in a time series follows an autoregressive (AR) model; if an autoregressive moving average (ARMA) model is assumed for the error variance, the model is a generalized autoregressive conditional heteroskedasticity (GARCH) model.

In mechanics, virtual work arises in the application of the principle of least action to the study of forces and movement of a mechanical system. The work of a force acting on a particle as it moves along a displacement is different for different displacements. Among all the possible displacements that a particle may follow, called virtual displacements, one will minimize the action. This displacement is therefore the displacement followed by the particle according to the principle of least action.

The work of a force on a particle along a virtual displacement is known as the virtual work.

In statistics, econometrics, and signal processing, an autoregressive (AR) model is a representation of a type of random process; as such, it is used to describe certain time-varying processes in nature, economics, behavior, etc. The autoregressive model specifies that the output variable depends linearly on its own previous values and on a stochastic term ; thus the model is in the form of a stochastic difference equation which should not be confused with a differential equation. Together with the moving-average (MA) model, it is a special case and key component of the more general autoregressive–moving-average (ARMA) and autoregressive integrated moving average (ARIMA) models of time series, which have a more complicated stochastic structure; it is also a special case of the vector autoregressive model (VAR), which consists of a system of more than one interlocking stochastic difference equation in more than one evolving random variable.

An elliptic filter is a signal processing filter with equalized ripple (equiripple) behavior in both the passband and the stopband. The amount of ripple in each band is independently adjustable, and no other filter of equal order can have a faster transition in gain between the passband and the stopband, for the given values of ripple. Alternatively, one may give up the ability to adjust independently the passband and stopband ripple, and instead design a filter which is maximally insensitive to component variations.

<span class="mw-page-title-main">Otsu's method</span> In computer vision and image processing

In computer vision and image processing, Otsu's method, named after Nobuyuki Otsu, is used to perform automatic image thresholding. In the simplest form, the algorithm returns a single intensity threshold that separate pixels into two classes, foreground and background. This threshold is determined by minimizing intra-class intensity variance, or equivalently, by maximizing inter-class variance. Otsu's method is a one-dimensional discrete analogue of Fisher's Discriminant Analysis, is related to Jenks optimization method, and is equivalent to a globally optimal k-means performed on the intensity histogram. The extension to multi-level thresholding was described in the original paper, and computationally efficient implementations have since been proposed.

In statistics, generalized least squares (GLS) is a method used to estimate the unknown parameters in a linear regression model. It is used when there is a non-zero amount of correlation between the residuals in the regression model. GLS is employed to improve statistical efficiency and reduce the risk of drawing erroneous inferences, as compared to conventional least squares and weighted least squares methods. It was first described by Alexander Aitken in 1935.

Betti's theorem, also known as Maxwell–Betti reciprocal work theorem, discovered by Enrico Betti in 1872, states that for a linear elastic structure subject to two sets of forces {Pi} i=1,...,n and {Qj}, j=1,2,...,n, the work done by the set P through the displacements produced by the set Q is equal to the work done by the set Q through the displacements produced by the set P. This theorem has applications in structural engineering where it is used to define influence lines and derive the boundary element method.

<span class="mw-page-title-main">Coble creep</span>

Coble creep, a form of diffusion creep, is a mechanism for deformation of crystalline solids. Contrasted with other diffusional creep mechanisms, Coble creep is similar to Nabarro–Herring creep in that it is dominant at lower stress levels and higher temperatures than creep mechanisms utilizing dislocation glide. Coble creep occurs through the diffusion of atoms in a material along grain boundaries. This mechanism is observed in polycrystals or along the surface in a single crystal, which produces a net flow of material and a sliding of the grain boundaries.

The topological derivative is, conceptually, a derivative of a shape functional with respect to infinitesimal changes in its topology, such as adding an infinitesimal hole or crack. When used in higher dimensions than one, the term topological gradient is also used to name the first-order term of the topological asymptotic expansion, dealing only with infinitesimal singular domain perturbations. It has applications in shape optimization, topology optimization, image processing and mechanical modeling.

<span class="mw-page-title-main">Bilateral filter</span> Smoothing filler for images

A bilateral filter is a non-linear, edge-preserving, and noise-reducing smoothing 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. This preserves sharp edges.

A randomness extractor, often simply called an "extractor", is a function, which being applied to output from a weak entropy source, together with a short, uniformly random seed, generates a highly random output that appears independent from the source and uniformly distributed. Examples of weakly random sources include radioactive decay or thermal noise; the only restriction on possible sources is that there is no way they can be fully controlled, calculated or predicted, and that a lower bound on their entropy rate can be established. For a given source, a randomness extractor can even be considered to be a true random number generator (TRNG); but there is no single extractor that has been proven to produce truly random output from any type of weakly random source.

Sum frequency generation spectroscopy (SFG) is a nonlinear laser spectroscopy technique used to analyze surfaces and interfaces. It can be expressed as a sum of a series of Lorentz oscillators. In a typical SFG setup, two laser beams mix at an interface and generate an output beam with a frequency equal to the sum of the two input frequencies, traveling in a direction allegedly given by the sum of the incident beams' wavevectors. The technique was developed in 1987 by Yuen-Ron Shen and his students as an extension of second harmonic generation spectroscopy and rapidly applied to deduce the composition, orientation distributions, and structural information of molecules at gas–solid, gas–liquid and liquid–solid interfaces. Soon after its invention, Philippe Guyot-Sionnest extended the technique to obtain the first measurements of electronic and vibrational dynamics at surfaces. SFG has advantages in its ability to be monolayer surface sensitive, ability to be performed in situ, and its capability to provide ultrafast time resolution. SFG gives information complementary to infrared and Raman spectroscopy.

<span class="mw-page-title-main">Non-local means</span>

Non-local means is an algorithm in image processing for image denoising. Unlike "local mean" filters, which take the mean value of a group of pixels surrounding a target pixel to smooth the image, non-local means filtering takes a mean of all pixels in the image, weighted by how similar these pixels are to the target pixel. This results in much greater post-filtering clarity, and less loss of detail in the image compared with local mean algorithms.

Generalized filtering is a generic Bayesian filtering scheme for nonlinear state-space models. It is based on a variational principle of least action, formulated in generalized coordinates of motion. Note that "generalized coordinates of motion" are related to—but distinct from—generalized coordinates as used in (multibody) dynamical systems analysis. Generalized filtering furnishes posterior densities over hidden states generating observed data using a generalized gradient descent on variational free energy, under the Laplace assumption. Unlike classical filtering, generalized filtering eschews Markovian assumptions about random fluctuations. Furthermore, it operates online, assimilating data to approximate the posterior density over unknown quantities, without the need for a backward pass. Special cases include variational filtering, dynamic expectation maximization and generalized predictive coding.

Kernel methods are a well-established tool to analyze the relationship between input data and the corresponding output of a function. Kernels encapsulate the properties of functions in a computationally efficient way and allow algorithms to easily swap functions of varying complexity.

Batch normalization is a method used to make training of artificial neural networks faster and more stable through normalization of the layers' inputs by re-centering and re-scaling. It was proposed by Sergey Ioffe and Christian Szegedy in 2015.

References

  1. He, Kaiming; Sun, Jian; Tang, Xiaoou (2013). "Guided Image Filtering". 35 (6): 1397–1409. doi:10.1109/TPAMI.2012.213.{{cite journal}}: Cite journal requires |journal= (help)
  2. Guided Image Filtering
  3. "Guided filtering of images - MATLAB imguidedfilter".
  4. "OpenCV: Filters".
  5. "FFmpeg Filters Documentation".