Trying to emulate Adobe's clarity in RawTherapee

I have been experimenting quite a lot with local contrast those days. The algorithm I am developing is still based on my “incremental guided filter” for the image smoothing, using the “ratio of values” approach I outlined above.

What I added on top of the basic algorithm is some code that protects highlights and dynamically adjusts the enhancement of the local contrast based on the tonality of the blurred image. Shortly speaking, in regions where the blurred image is bright the code emphasises more the dark details, and vice-versa in dark regions. Dark and light details are enhanced symmetrically around mid-tones.

Here is what I am obtaining with the house image (I need to post a full-res image because details here really matter):

I hope to be able to commit the code in PhF during this weekend. I can also explain the details of the algorithm is anyone is interested…

Please notice that this has nothing to do with LR’s clarity tool. In particular, it is clear that clarity introduces some “smart” local tone adjustment, using I guess a rather non-trivial logic. See for example the house image at clarity=100%, and how the bright areas at the bottom-left are darkened much more that the walls of the building on the right…

5 Likes