Bilateral filter

A bilateral filter is a nonlinear filter, which is used in computer graphics and image processing to blur images, while preserving object edges. In bilateral filtering pixel colors to flow from the vicinity of an output pixel not only in dependence on the distance, but also on the color difference in the calculation. One possible application is the removal of skin impurities while maintaining the sharpness in a portrait photo.

Both the distance as well as for the color distance different filter kernels may also be used. Widely used are Gaussian filter for both values ​​. In this case, computes the color value of an output pixel as follows:

Is a normalization term with

The definitions of the variables are as follows:

To the pixel values ​​prior to treatment of the actual bilateral filter of the logarithm and then again the exponential function to be applied, since logarithmic pixel differences are proportional to the perceived contrast.

124170
de