Bilateral Filter

Coded By: Rishabh Srivastava

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. The basic idea underlying bilateral filtering is to do in the range of an image what traditional filters do in its domain. Two pixels can be close to one another, that is, occupy nearby spatial location, or they can be similar to one another, that is, have nearby values, possibly in a perceptually meaningful fashion.

The bilateral filter can be formulated as :


As the range parameter 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. Thus, as increases, the image gets more blurred.

As the spatial parameter increases, the larger features get smoothened.

This repository includes code that applies a bilateral filter on the image MinaretLake.jpg.

The results are displayed below: