# Bilateral filter - edge preserving noise reduction and blur

## Recommended Posts

Download the plug-in and find installation instructions on the Codeplex project page.

Details on how the filter works, parameters and resulting images can be found in this blog post.

Bilateral filter seems to be a very underestimated image improving technique. It's not frequently met across internet. The filter may help with solving the following tasks:

• Noise reduction - pretty utilitarian & usual goal. When you have photos pictured with high ISO or within poor lighting conditions noise reduction will give them a more natural look
• Sharpen edges
• Great artistic effects - my favorite part, images processed with bilateral filter get an appealing glossy look

Edited by smax
##### Share on other sites

How does this compare with Reduce Noise and Surface Blur?

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

##### Share on other sites

Apparently Bilateral filter may produce similar results as Noise reduction or Surface blur effects. It's hard to draw direct comparison (I'm not aware of internal implemetation details of standard effects) but I may present my subjective comparison of images produced.

The first important thing is that Bilateral filter has 3 parameters (rather than 2 in case of standard effects):

• Kernel size - this can be treated as radius, it defines how many surrounding pixels take part in calculations for each specific pixel. Greater value is required for High-Res images.
• Color factor - this one can be treated as color tolerance, the greater the values is the larger would be areas blurred and more pixels would be grouped
• Spatial factor - this one defines how strong is blur within areas (domains) of similar colors

Normally a combination of great spatial factor and small color factor is used to achieve noise reduction; large values for both parameters are for fancy blurry effects.

The bellow example shows difference in noise reduction. I’ve tried to achieve similar looking results for both Bilateral and Noise reduction effects by playing with parameters.

Original:

Bilateral - left, Noise reduction(10, 0.80) - right:

Noise reduction effect changes luminosity (shaded passenger side of the car), Bilateral filter preserves more details (trees in the background) and in my opinion noise is higher on the second image (far lanterns, bonnet).

If we try to achieve blurry effect the difference is more distinctive.

Original:

Bilateral(15, 60, 100):

Surface blur(20, 50):

As you can see there're differences in the resulting images and the filter can be treated as an alternative to both standar Noise reduction and Surface blur effects.

##### Share on other sites

Apparently Bilateral filter may produce similar results as Noise reduction or Surface blur effects. It's hard to draw direct comparison (I'm not aware of internal implemetation details of standard effects) but I may present my subjective comparison of images produced.

Paint.Net's Surface Blur is, in fact, a variant of the classic bilateral filter.

It just uses different range functions, which (with an algorithmic sleight of hand) allow it to be calculated in roughly O(n) rather than O(n²)

##### Share on other sites
• 3 weeks later...

Good choice of cars, btw.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×