Trying to emulate Adobe's clarity in RawTherapee

Lightroom Classic 8.2 (latest release)

Adobe Color Profile
00, 25, 50, 75, 100 Clarity in:

Prophoto JPEGS
Prophoto 16bit TIFFS

1 Like

As an appetiser, here is the blue horse image with some shadows and local contrast adjustment, using the latest PhF tools. The local contrast mask is based on the guided filter at radius=50 and a very low threshold:


And here is the clarity with values from -100 down to -25

Prophoto RGB
Lightroom 8.2

1 Like

Ah, I forgot to mention - please include in your post which exact version of the program you used.

For those who don’t know, you can use the gratis Adobe DNG converter as a poor man’s camera raw processor. It turns out that the DNG converter reads ACR settings from an xmp sidecar when generating the (full-size) jpeg preview for the DNG. Therefore, it’s enough to “craft” the proper xmp sidecar and then extract the embedded jpeg to sort of emulate what ACR would do (actually, I assume it’s accurate, since I don’t have ACR/Lightroom so I cannot cross-check).

I have a script for doing that which I sometimes use for curiosity. I’m attaching it here, I don’t think it violates any license. It assumes you have dcraw installed and the Adobe DNG converter working under wine (though it shouldn’t be too hard to adapt to other scenarios). (6.7 KB)

Example usage (use --help for the full set of options):

$ -j -o blue_horse_default.jpg blue_horse.nef

$ -j -o blue_horse_clarity100.jpg blue_horse.nef --clarity 100

Hope this helps


Here’s the raw file from my original post (licensed under CC BY-NC-SA):
DSCF1337.RAF (24.8 MB)

1 Like

Uploading huge 137 MB files to filebin fails every time.
Alternatives ?

I sometimes use this French service:

Or try and make sure to adjust the settings so they’re appropriate for multiple people to download.

Ok here is Firefox Send

In Lightroom - from -100 up to +100

Dear all,
first of all, thanks a lot @DxO-user and @Nick_Auskeur for the samples!

From a first look, it seems the result of some kind of histogram equalization… maybe an edge-preserving CLHAE derivative?

Look for example how the contrast on the horse gets enhanced much more than the contrast in the building walls…

Some slight halo is also visible, for example where the horse leg is brightened near an already bright road patch:

There is also some uneven brightening where the bright road patches are smaller:

Halo is a known side effects if you push the Clarity too much.
Reduce the Clarity , or use it as a part of local adjustment.

As I may have said in another thread, it is a combination of techniques. The newest iterations use machine learning as well. In general, they tweak the formula once in a while.

I try to open the link “Firefox send”, but it tells me that the link has expired. I tried tuesday,…today


I uploaded it one more time. I even included +25%
house -100
house -50
house 0
house +25
house +50
house +75
house +100

@DxO-user I am assuming that you are using the latest process version (which is at 5 right now; see:

The reason that I bring this up is because post Version 2 (2010), the default processing is quite developed, even when sliders are at neutral.

Although clarity is probably a completely different beast in version 2 in comparison to 5, it would be great if you could provide version 2 clarity samples.


Thank you, now I can upload :slight_smile:

But very big files


Yes I’m using the latest version in Lightroom 8.2 ( the same as in Adobe Camera RAW)
I was getting the latest update a few weeks ago.

I think, of course, I do not have the code, that adobe uses an “EPD” (edge preserving decomposition).

You can see this effect, in the “blue horse” image and also (less) in the Venezia image.

With Rawtherapee you have now several ways to perform a function “clarity”…I don’t speak to “copy” Adobe, which for me does not make much sense, every software has its algorithms, its process.

Branch “wavelenh” - function “Clarity” - by using Residual image…and others effetcs

Branc “newlocallab”, several “local” tools, combining with “scope”, transition, etc…that can be used alone or in combination

  • CBDL - in fact it’s simplify wavelet (Harr), with Clarity
  • Tone-mapping (edge prererving decomposition)
  • Local contrast
  • Retinex - which is using an algo close to “local contrast” but more complex and for much larger radius values
  • masks to change gamma


1 Like

Inspired by the clarity version of the blue horse image, I have started experimenting with “adaptive contrast stretching” techniques, and the result are rather promising:

I still do not like the way the algorithm handles the bright areas, but I find that the horse gets instead a very nice pop.

What do you think?

Of course I will share the details as soon as I have something reasonably good at hand!