Updated August 2025: An alternative method of adjusting tonal contrast & dynamic range in Rawtherapee

I guess this is still relevant (saw a significant difference – with respect to Inpaint Opposed – on an extreme case right now) but I have no idea why that matters so much. :laughing: Also, such “cross-modules dependencies” can make the tool a bit hard to use for newcomers. :hot_face: The same goes for:

(Thanks for the precision, by the way.)
(Almost sure I completely overlooked this while trying to reduce highlights via the abstract profile on one pic. :sweat_smile:)

(But perhaps all this is made clearer by tooltips and whatnot on the dev version; I’m still sticking to 5.12.)

Edit: I dunno if there’s anything I should be particularly wary of once “Clip out-of-gamut colours” is unchecked, or if the abstract profile takes care of handling any pixel going haywire anyway. That’s the first time I uncheck that stuff.

@alicem

These are just recommendations… sometimes that recommendation won’t be optimal.
See the same type of comments in the last thread on GHS and tone-mappers.

There are various points of view regarding photo processing, but the main point isn’t technical, mathematical, algorithmic, or cartesian, but rather linked to the communication and information provided through various media (various forums, videos, tutorials, etc.): the more we talk about it, the better it is perceived… It’s human.
And it must be recognized that on these points, Rawtherapee is more than lagging behind… We no longer have an up-to-date help system.

1 Like

OK, thanks. The “ensure” occurrences made it sound like absolute requirements, so I freaked out a little. :laughing: Sorry if that came out as blunt complaints.

I continued my experiments, and stumbled on something that made me come up with another question. :thinking:

Are there interactions between the abstract profile – in particular when using its “Highlight attenuation” feature – and the Local Contrast module? Am I supposed to keep Local Contrast off and rely on the abstract module’s “Contrast Enhancement” only instead of both? The reason I ask is this (see notes below):

On that picture with “Highlight attenuation” on:

  • Local Contrast seems to lower highlights and make them mushy.
  • I expected clipping to get worse when activating Local Contrast (especially with this high Lightness Level), but the opposite happens. :face_with_monocle:
  • Re-enabling “Clip out-of-gamut colors” makes Local Contrast behave more predictably, but also makes the whole picture mushy due to the “Highlight attenuation”.

… so it seems that I have to ditch either the attenuation or the Local Contrast to get a non-weird result. :thinking:
(Still 5.12.)

@alicem and others
I’m going to take a quick detour through Rawtherapee’s history and compatibility.

Rawtherapee was developed in 2006 by Gabor Horwatz, and the apparent order of the modules dates from that time. For example, almost all RGB (non-Raw) actions are performed using ‘Tiles’ to reduce memory usage - this was useful 15 years ago, much less so now. This is a significant constraint that effectively excludes certain algorithms from this part of the code, for example, local contrast with wavelets.

Similarly, a significant body of code was created by Emil Martinec in 2010/2011. This is very good code, such as “Color Propagation,” which, in my opinion, is rarely found wanting. He also initiated the denoising module (wavelets + Fourier), the Wavelet Levels module (with Ilia Popov), as well as an ultra-simplified version of wavelet (based on the Haar method) which he called “Contrast by Detail levels”.

Partly in cooperation with Ingo Weirich (the author of Capture Sharpening) I have significantly improved the “denoise”, “Wavelets levels”, and “Contrast by detail Levels” modules. I have also created, with the help of Pierre Cabrera @Pandagrapher for the GUI, the “Selective Editing” part which contains many new modules (Tone mappers, denoise, etc.).

After this “detour” essential for understanding, we must ensure compatibility with old modules, which considerably complicates the code and the GUI interface. Hence my proposal to only display the essential and optional modules that are old, little used or a little obsolete. See Pull Request
PR

The “Local Contrast” module (Detail tab) generates artifacts in some cases… although it’s not always possible to remove them.

The “Contrast by Detail Levels” module, by design, is necessarily limited and can also generate artifacts. As I said, it’s an “ultra-simplified wavelet”, which has nothing to do with Wavelet Levels or Selective Editing > Wavelets. Here again, some users compare it (Wavelet levels) to Gimp, which is “simpler”, but we’re comparing fish and rabbits. Gimp decomposes and processes layers, Wavelet Levels does signal processing. You can’t have it all.

To answer your question indirectly, the “Contrast enhancement” module (which is 100% wavelet signal processing, with a simplified interface) should be suitable in most cases, on its own.

If you want another type of local contrast, which acts on the texture, choose “Tone Mapping” (Exposure Tab) or Selective Editing, with very soft settings.

You also have the option to use it in Selective Editing > Local contrast & wavelet > Wavelets. This module is similar to Contrast enhancement (Color Tab) but more sophisticated.
This module has, instead of “Contrast profile” (Color Tab), a double slider “Wavelet levels” that allows you to choose the progressive extent of the wavelets’ action. In addition, this module contains the possibility of “Clarity” which roughly acts on the midtones.

Jacques

3 Likes

Thanks again. :bowing_woman:

Wow, there, I see “one of the major tools is Capture Sharpening, which is completely isolated”. Indeed, since it was in “Raw” and active by default, I never changed its settings. Perhaps I’ll try fiddling with it some time… But if you put it alongside “Sharpening”, you’ll probably need more specific names to explain the difference. :laughing:

I assume “Denoise” is the “Noise Reduction” from the “Details” tab? Or is that something better, hidden in the depths of the advanced modules or selective editing? :thinking:

AH. For the past few weeks, I used, on all pictures, a combination of:

  • The contrast enhancement from the abstract profile (generally level 1 or 2, sometimes 3).
  • Local contrast (Amount generally around 0.11).
  • Contrast by detail levels (Rarely any value above 1.4 or below 0.75).
  • Tone mapping (Strength generally below 0.10).
  • A little bit of CAM16 local contrast via a global spot, but not much as it quickly creates weird halos.

Everything seems to have a slightly different effect, so I use all of them, but with low settings. :sweat_smile: I did not notice prohibitive artifacts, outside of the case I showed earlier – which was one of the rare times when I used the “Highlight attenuation” checkbox.

Perhaps it’s an heresy to use all that stuff at once? :thinking: The fact is, I notice a gradual “improvement” (that’s subjective, of course) when each of those tools comes into play, one at a time. Each seems to cover some blind spots of the others. :thinking:

Typically, “Contrast by detail levels” is valuable to me because I sometimes lower contrast for the two smallest levels while boosting it for others (and sometimes also lowering it for the coarsest level), but I also appreciate the fact that “Local Contrast” has dedicated sliders for Darkness and Lightness levels. And as you mentioned, “Tone Mapping”, even with a ridiculously low strength, has a stunning impact on textures and makes everything feel much more “alive”. Etc. If I leave one of those tools behind, I immediately have a significant “fear of missing out”. :sweat_smile:

:information_source: To be perfectly transparent:

  • The concept of wavelets is obscure for me, even if I guess I used it without knowing through some tools that don’t explicitly mention them. I’ll bookmark you message to try out the wavelet stuff from “Selective Editing” later, but it looks scary. :rofl: (I suppose you generally use that in a global spot?)
  • I never touched the “Advanced” tab.
  • The only thing I touch in the “Raw” tab is the hot pixel filter.

By the way: For my specific picture, I ended up toggling “Highlight attenuation” off, readjusting the tone curve accordingly, and re-clipping out-of-gamut stuff (basically reverting to my “default” way of doing things). I think it was not necessarily a good sample for that feature anyway. The highlights were just a minor part of the scenery, and the shooting conditions were disastrous.

Yes "Denoise is “Noise reduction”

As for the other points, it’s all a matter of taste and subjectivity. The important thing is that you’re satisfied with the result.

“but it looks scary”… There’s no need to be afraid, in fact it’s quite simple once you understand it (like many things in life).

In advanced tab… There are 2 concepts (I’m neglecting Retinex) that are specific to Rawtherapee:

  • CIECAM
  • Wavelets

Rawpedia has extensive documentation on these two topics. I give the 2 main links…

  • CIECAM takes into account the physiological effects of vision (eye/brain pair), in different scene situations (as scene referred) and viewing (display referred).CIECAM
  • Wavelets does signal processing (obviously it sounds impressive) but you can do a lot of things with it wavelets

The difficulty is making oneself understood by a population with very varied training. Anyone who says that image processing is simple is using a paradox. Yes, it can be simple to use… if we understand at least what is “behind” it; but the “behind” is in the majority of cases complex.

Thank you :slight_smile:

Jacques

1 Like

Thanks again. Bookmarked the wavelets stuff. (I think I once started taking a peek at it but probably gave up or whatever.)

Sure, but as it can get quite time-consuming, feel free to tell me if you think that one of those tools mathematically entirely subsumes another one. :laughing: (Alas, the one that I spend the most time fine-tuning is generally Tone Mapping, and I highly doubt I can ditch it.)

I guess that’s why my global spots with (relatively simple) CAM16 tweaks often give a strange impression of “making the picture more real than real”. :laughing:

1 Like

I had this Pull Request checked (several times) by Copilot, who didn’t find any critical errors. These are often recommendations (my code is complex and long…). I also cleaned up the code and made small changes.

Text cam16slope

1 Like

I just merged the commit into ‘dev’ of ‘ghsimprov’ in this Pull Request.
Can you check that everything is working normally[Text cam16slope]

Executables
(Release Pre-dev Builds · RawTherapee/RawTherapee · GitHub)

Thank you

Jacques

I’ve had a quick look at the three modules (Abstract Profile, GHS and CAM16) and haven’t managed to break anything so far :wink:
The label “Evaluation Symmetry point” in GHS could perhaps be changed to either “Estimated symmetry point” or “Symmetry point estimation”. I haven’t looked at the tooltips yet.

1 Like

@Wayne_Sutton

Done :slight_smile:

Thank you

Jacques

1 Like

Hello

I just merged “dev” into “cam16slope”… I hope there are no errors.
The pull request is up to date.
Pull request

The executables (still with the Windows issue) are available
Text cam16slope

Can you please check that everything is working correctly (at least as I intended). Of course I remain open to any suggestion, whether it be on Labels, Tooltips, History msg, but also on the operation itself…(sliders, checkbox, algorithm, etc.)

Here, a file with the differences of labels, tooltips, history_msg between ‘dev’ and the Pull Request
cam16slope-diff.zip (1.5 KB)

Jacques

2 Likes

Hello @jdc

First off, thanks a lot for all your efforts with RawTherapee! :slight_smile:

It looks like RawPedia is basically broken ringht now in that it is not possible, for you developers, to update its documentation. , When you download the whole PDF it dates back to 2020.

So, here my question:
It will be possible to download “somewhere” (Dropbox link etc) all your recent explanations regarding all your improvement done these past months, in a single comprehensive file?
I do not mean nothing over elaborated (images, link with samples etc) or time consuming for you (i.e. a simplified “RawPedia”).
Just a simple file (.txt, .doc) with all your suggestion regarding you recent updates (noise reductions etc).
In short, having all the notes and suggestion you post on this forum.

Thanks again!

@Silvio_Grosso

This is more or less what I intended to do. But there are two problems (one major).
The major problem is explaining the new features (in any language). For me, the easiest (by far) is to do it in French.

There are at least four major innovations concerning:

  • the contribution of GHS, which goes far beyond what one might imagine. It’s not just another ‘tone mapper’ - in the same vein as Filmic, Sigmoid, Agx, TRC, etc - but a completely different way of approaching the problem, which, in my opinion, is quite “revolutionary.” I’m not saying the others aren’t good, but the approach is radically different. If we don’t understand GHS, we miss out on innovation.
  • the improvement of Capture-sharpening in RAW, but also its introduction in Selective Editing. I think the limitations of this wonderful product (thanks to Ingo) are now ‘behind’.
  • The improvement of the “blur” and “denoise” part of Selective Editing, which is far from a gimmick…
  • And finally, the Cam16slope part, which gives Abstract Profile (at least I think so) what was missing to make it: a) a complement to GHS and/or b) provides it with missing features (control of HL and saturation). This PR also allows for similar modifications to SE CAM16, as well as another way to handle negative images.

The second problem is translating it into good English and knowing where to put this document (in the repo?) and how to update it.

These texts could be created dynamically alongside user testing in Pixls.us (either in the RT thread or in playraw).

All of this is not simple.

jacques

Hello @jdc

I do understand your concerns…
As an Italian, I am forced myself to write in English :slight_smile:
In the very long past (80s), at least in the North-West of Italy, the French language was exentively taught at school whereas, now, English is predominant everywhere.

Due to the AI and the available web Engine translators (by Google, DeepL) I have read that in the future it will be more and more difficult to hire good “human translators”. At the university, it looks like there are fewer and fewer students who wish to follow this path since the future for this career looks bleak.

The major problem is explaining the new features (in any language). For me, the easiest (by far) is to do it in French.

Yeah. But in all truth, all translations from French into English (thanks to Google translate - DeepL) you posted on this forum, so far, are extremely good (IMHO).

In my view, the code you write with your algorithms is so good that there will be always someone willing to try them even though their English translation might be not completely perfect :slight_smile:

Thanks again!

One can make commits to the repo, but we aren’t rendering it to a site yet.

@paperdigits

Which ‘repo’ are you talking about? The one from the current Rawpedia that users have access to and that I can edit, or the one based on Hugo that I don’t have access to and don’t know how to use…

Thank you

Jacques

This Pull Request will maintain its primary focus on improvements to Selective Editing CAM16 and Abstract Profile.

But since it’s the only one that combines the latest ‘dev’ updates (GHS, Capture sharpening, SE Capture and denoise, etc.), small changes found during ‘dev’ testing related to small GUI modifications (tooltips, etc.) will be included in this Pull Request, whose title I’ve changed.
Pull request

For example, when using Selective Editing > Shadows/Highlights, Equalizer & GHS, certain parts of the GHS GUI would appear, or feedback is requested on the format (space before text) of Capture-sharpening tooltips.
I’ve also added the (hopefully temporary) disabling of ‘Inverse GHS’ made in ‘dev’.
All of this is intended to simplify updates.

Updated executable.
Text cam16slope

Thank you

Jacques

Hello @jdc

I have just tried to download, on Windows 11, this build to no avail.
When I click on the .exe to start RawTherapee an error appear

Not possibile to find:
SSL_set_quic_tls_cbs into the dynamique link C:\Users\gross\Download\RawTherapee_RawTherapee_cam16slope_win64_release\RawTherapee_7471merge_5.12-200-gc87f8c6ae_win64_release\libngtcp2_crypto_ossl-0.dll.

I suppose it might be related to:

If I understand it correctly, all dev builds are not working on Windows right now.

Those two missing files, libcrypto-3-x64.dll and libssl-3-x64.dll, can be copied from an earlier release of Raw Therapee and pasted into the new one.

1 Like