Neha Patil (Editor)

Bilateral filter

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Bilateral filter wwwcoldvisioniowpcontentuploads201601bilat

A bilateral filter is a non-linear, edge-preserving and noise-reducing smoothing filter for images. The intensity value at each pixel in an image is replaced by 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 by systematically looping through each pixel and adjusting weights to the adjacent pixels accordingly.

Contents

Bilateral filter R96944043 Bilateral Filter

The bilateral filter is defined as

I filtered ( x ) = 1 W p x i Ω I ( x i ) f r ( I ( x i ) I ( x ) ) g s ( x i x ) ,

Bilateral filter R96944043 Bilateral Filter

where the normalization term

W p = x i Ω f r ( I ( x i ) I ( x ) ) g s ( x i x )

Bilateral filter image Understanding the parameters for a Bilateral Filter Signal

ensures that the filter preserves image energy and

  • I filtered is the filtered image;
  • I is the original input image to be filtered;
  • x are the coordinates of the current pixel to be filtered;
  • Ω is the window centered in x ;
  • f r is the range kernel for smoothing differences in intensities. This function can be a Gaussian function;
  • g s is the spatial kernel for smoothing differences in coordinates. This function can be a Gaussian function;

  • Bilateral filter Shell amp Slate Fast Median and Bilateral Filtering

    As mentioned above, the weight W p is assigned using the spatial closeness and the intensity difference. Consider a pixel located at ( i , j ) which needs to be denoised in image using its neighbouring pixels and one of its neighbouring pixels is located at ( k , l ) . Then, the weight assigned for pixel ( k , l ) to denoise the pixel ( i , j ) is given by: w ( i , j , k , l ) = e ( ( i k ) 2 + ( j l ) 2 2 σ d 2 I ( i , j ) I ( k , l ) 2 2 σ r 2 )

    Bilateral filter bilateral filter 012 for Linux Ftparmycom

    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 ) = k , l I ( k , l ) w ( i , j , k , l ) k , l w ( i , j , k , l )

    Bilateral filter Bilateral Filtering

    where I D is the denoised intensity of pixel ( i , j ) .

    Parallel bilateral filtering using opencl


    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 [1]
  • Gradient reversal - introduction of false edges in the image [2]
  • There exist several extensions to the filter that deal with these artifacts. Alternative filters, like the guided filter [3], have also been proposed as an efficient alternative without these limitations.

    Implementations

    Adobe Photoshop implements a bilateral filter in its surface blur tool. GIMP implements a bilateral filter in its Filters-->Blur tools; and it is called Selective Gaussian blur.

    The Bilateral filter was shown to be an application of the short time kernel of the Beltrami flow . See also.

    With similar goal as the Bilateral filter, the class of edge-preserving smoothing filters also includes: anisotropic diffusion, the Weighted Least Squares framework, the Edge-Avoiding Wavelets, Geodesic editing, Guided filtering, and the Domain Transform framework.

    References

    Bilateral filter Wikipedia