Bilateral Filter

Block Category: Filter

Input Image Format

Input Image Requirements: None

Description: The Bilateral Filter block reduces unwanted noise by blurring the input image while keeping the edges sharp. To achieve this, the Bilateral Filter finds the weighted average of the neighborhood around the pixel (Gaussian Blur), then considers blurring only nearby pixels and pixels with similar intensity to the central pixel. In doing so, the Bilateral Filter block preserves edges where pixels have large intensity.

Diameter: Specifies the diameter of the pixel neighborhood used during filtering. The value must be less than 30.

Filter: Determines the range of pixel values such that pixel value x will be replaced with similar pixel values. This results in large areas of semi-equal pixel values. The larger the filter value, the stronger the effect on the image, which makes the image appear smoother and more cartoonish.

Example

In this example, three bilateral filters are applied (15;50, 15;100, and 15;150) to the image. As the filter value increases, the fine textures are filtered away while the contours and shading are preserved.