Faster Bilateral Sharpening

Moderator: jsachs

jsachs
Posts: 4214
Joined: January 22nd, 2009, 11:03 pm

Faster Bilateral Sharpening

Post by jsachs »

For quite a while now I have been looking for a way to speed up bilateral sharpening which I use as my main sharpening tool and which is usually the slowest step by far in my processing workflow. I'm not sure how many of you use this transformation, but I recently added to its description in Transformations.pdf and plan to expand this further with more examples in the future to give more tips on how the get the most out of it.

Anyway, I ended up corresponding with the author a paper on fast bilateral filtering and he kindly pointed me to a more recent technique called guided filtering that produces similar if not better results than bilateral filtering and which can be implemented much more efficiently, especially for large radius settings. I have been experimenting with guided filtering and so far the results look very good, so expect this method as an option in Bilateral Sharpen very soon. For backward compatibility with existing scripts, I will retain the original bilateral filter method since it produces slightly different results, but I recommend using the guided filter method going forward and will make it the default for new transformations. Existing scripts will still reference the bilateral method until you change them explicitly.
Jonathan Sachs
Digital Light & Color
MarkT
Posts: 367
Joined: April 24th, 2009, 2:07 pm

Re: Faster Bilateral Sharpening

Post by MarkT »

Interesting, looking forward to trying this out.
pierrelabreche
Posts: 420
Joined: January 29th, 2019, 11:47 pm
What is the make/model of your primary camera?: Nikon Z8

Re: Faster Bilateral Sharpening

Post by pierrelabreche »

I was justly reading about bilateral sharpening in transformations.pdf. I certainly will try it !
tomczak
Posts: 1367
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

Re: Faster Bilateral Sharpening

Post by tomczak »

In a nutshell, how different is this new technique from BS, other than speed?
Maciej Tomczak
Phototramp.com
jsachs
Posts: 4214
Joined: January 22nd, 2009, 11:03 pm

Re: Faster Bilateral Sharpening

Post by jsachs »

The results are very similar -- I have not investigated thoroughly, but the Guided is supposed to reduce certain artifacts that show up when sharpening smooth gradients using Bilateral.
Jonathan Sachs
Digital Light & Color
tomczak
Posts: 1367
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

Re: Faster Bilateral Sharpening

Post by tomczak »

Out of curiosity, I just started reading about the Guided filter - I imagine it is the same or similar technique to the one that Jonathan is implementing. I figured I'd share the link to a slideshow that illustrates the technique:

http://kaiminghe.com/eccv10/eccv10ppt.pdf

In addition to the math of it, there are visual examples and comparisons to the Bilateral filter using photographic images.
Maciej Tomczak
Phototramp.com
jsachs
Posts: 4214
Joined: January 22nd, 2009, 11:03 pm

Re: Faster Bilateral Sharpening

Post by jsachs »

Yes, that is the primary journal article on guided filtering.
Jonathan Sachs
Digital Light & Color
Charles2
Posts: 226
Joined: November 24th, 2009, 2:00 am
What is the make/model of your primary camera?: Fuji X-Pro 2
Contact:

Re: Faster Bilateral Sharpening

Post by Charles2 »

Bilateral Sharpen is my preferred method of adding local contrast or what DxO PhotoLab calls microcontrast. I usually apply after RL deconvolution sharpening at the raw stage (Raw Therapee) and sometimes a bit of Advanced Sharpening with a radius just under or equal to 1.

Screen captures show my default settings. They are not carefully worked out, just stumbled into them and I welcome criticism.

So I'll be happy to use the new method.
Attachments
bilat1r.jpg
bilat1r.jpg (88.17 KiB) Viewed 3294 times
jsachs
Posts: 4214
Joined: January 22nd, 2009, 11:03 pm

Re: Faster Bilateral Sharpening

Post by jsachs »

I do something similar as well.

Along with the modifications to Bilateral Sharpen I am about to upload a new document that goes into considerable detail about how to get the most out of it. For example, I recommend the following changes to your settings for the large blur radius pass:

1) lower the blur threshold to 5-10%
2) Increase the Sharpen Factor to 2.0
3) reduce the Blur Threshold to 0%

I also usually set the Amount slider to 100%
Jonathan Sachs
Digital Light & Color
tomczak
Posts: 1367
Joined: April 25th, 2009, 12:56 am
What is the make/model of your primary camera?: Fuji X-E2
Contact:

Re: Faster Bilateral Sharpening

Post by tomczak »

Two questions regarding the new Guided technique:

Would it replace BS in other places where it is presently used (e.g. Brightness Curve, Adjust, and probably some others)?

Not that I understand how it actually works, but it appears that the 'guiding' image doesn't have to be the same as (or directly derived from) the image being processed. Would it be useful to consider such an option? (it's not my idea - I took it from the algorithm authors' slideshow above when they use the flash image as a guide to process the natural light image).
Maciej Tomczak
Phototramp.com
Post Reply