Comparison between the two TRC (tone response curve) tools in RawTherapee and the impact of Ciecam.

There are two TRC tools in RawTherapee, one in the Abstract Profile module in Color Management, and the other in the Source Data Adjustments module in the Local Adjustments, Color Appearance tool.

The Abstract Profile and Source Data Adjustments modules are nearly identical except for an additional log-encoding function integrated into the latter. This tool should be reserved for extreme cases that can’t be solved any other way. This is because the way they are rendered can be unpredicatable and often disturbs the balance of light and colour.

They are both based on the use of a virtual profile to modify the data. They include:

  • A Tone Response Curve with a Gamma slider for adjusting the highlights and a Slope slider for the shadows.
  • Two additional sliders for adjusting the midtones and the highlights :
    ** Midtones
    ** Smooth highlights, which can be used to soften strong highlights with Ev values between 0 and +12.
  • Primaries & Illuminant, for adjusting the image colorimetry. The user can choose the illuminant and adjust the dominant colour.

Position in the pipeline:
The Abstract Profile is at the end of the process, just before Color Appearance & Lighting. The Source Data Adjustments module, which is integrated into the Color Appearance (CAM16 & JzCzHz) tool in Local Adjustments, is located just after white balance, near the beginning of the pipeline.

The difference in the respective positions of these two modules will lead to a difference in behaviour with regard to shadows and highlights:

  • Source Data Adjustments is located prior to Exposure, the Auto-matched Tone Curve, and the other sliders and curves located in the Exposure tab.

  • It uses demosaiced RGB data for internal and scene condition calculations.

  • The Abstract Profile uses RGB data values calculated at the end of the pipeline.

The shadow and highlight distribution will therefore depend on prior user adjustments and the action of the Auto-matched Tone curve, which will in turn vary with the type of image and camera.

The behaviour of the Gamma and Slope sliders will also be different in the two cases: In general, lower values will be needed in the Source Data Adjustments module compared to the Abstract Profile module. The choice of primaries and illuminants will also give different results, notably with respect to the dominant color.

The Influence of Ciecam:
The Abstract Profile is independent of the Ciecam module , which comes just after it in the pipeline (Color Apearance & Lighting in the Color tab). If you activate Ciecam, the parameters of the Abstract Profile module will be taken into account.

The Source Data Adjustments module is integrated into the Local Adjustments Ciecam module (Color Appearance). The Source Data Adjustment settings will therefore be affected by the ensuing colour appearance model (CAM).

What does Ciecam do?
We’re not going to repeat the Ciecam tutorial here, but in simple terms Ciecam, as used in both Color Appearance and Lighting and Local Adjustments, is a software model that tries to take into account the physiological aspects due to the perception of the eye and the brain.

Further information, albeit incomplete, on the effects taken into account by the two versions of Ciecam implemented in RT can be found here :
https://rawpedia.rawtherapee.com/CIECAM02#Introduction_-_history

Most of the effects are automatically taken into account by the software. Particularly in Source Data Adjustments.

The Stevens effect is a special case. It is produced by the two ‘surround’ comboboxes in the scene and viewing conditions modules. For example the options in ‘Scene conditions’ are: Average, Dim, Dark, Extremely Dark.

When these effects are taken into account, the image is modified in depth to bring it closer to the conditions in which it was shot and viewed. Of course, only the person who took the shot can fully recreate the context.

A few comments on the impact of some of the effects that are taken into account:

  • Surround (Stevens effect) will lighten the shadows. The higher the surround effect (e.g. Dark), the more it will be necessary to reduce the action of the Tone Response Curve and in particular, the Slope.
  • Simultaneous contrast, which is all the more important when the luminance differences in the image are large, will be taken into account automatically and will increase color saturation. This means that images where there is an imbalance between highlights and shadows - whether natural or artificially obtained by a mismatch between gamma (highlights) and slope (shadows) - will result in an exaggerated increase in saturation.
  • The Hunt effect will (if Exif data is taken into account) be based on Absolute Luminance values.

The settings in the Cam16 Image Adjustments module (in Local Adjustments) also take these effects into account. For example:
To summarise for Source Data Adjustments:

  • The more you act on Surround (Scene), the more you need to reduce the Slope and Gamma parameters compared with those in the Abstract Profile module.
  • Colour saturation will be directly affected by large values of Slope and Gamma. You can adjust this if necessary using the Saturation slider (Cam16 Image Adjustments). The system is under your control, there is no AI (Artificial Intelligence).
  • The fact that CAM effects are taken into account when adjusting the parameters in the Source Data Adjustments module means that there will be an impact on the distribution of light and shadow and on the colours. It is impossible to transpose Abstract Profile settings (at least those relating to luminance: gamma, slope, midtones, etc.) to Source Data Adjustments and vice versa other than reducing their overall values.

Summary
Ciecam, particularly in its latest version Cam16 (2020, 2022) is a very high quality tool (even if it’s not perfect). To my knowledge, it’s the only one to combine almost all the concepts of Colour Appearance Models (CAM), which is not the case with other systems such as CieLab, OKLab, Jzazbz, etc.:

  • Separation into 3 processes: Scene conditions, Image Adjustments, Viewing conditions;

  • Tools and processes to take into account the physiological aspects of the human eye-brain pair: simultaneous contrast, surround, chromatic adaptation, etc. ;

  • Use of the 6 variables required for a CAM: lightness (J), brightness (Q), chroma (C), saturation (s), colourfulness (M), hue (h).

However, it does have one shortcoming, which can be a handicap in the case of difficult images (with high dynamic range, for example): it doesn’t take into account the overall mapping of the image, because Cam16 works pixel by pixel.

The Source Data Adjustments module provides a partial solution to this problem. It performs a global analysis of tones and colours using the associated tools (Log encoding, Tone Response Curve with Midtones, etc.).

It is partially associated with Cam16. In other words, changes induced by Source Data Adjustments will be taken into account by Cam16, but without any judgement being made as to their relevance. For some images, Source Data Adjustments settings or downstream processes (exposure, etc.), may mean that the image becomes too contrasty in certain areas, or too saturated, particularly in the shadows.

It is up to the user to use the tools available in Image Adjustments (saturation, brightness, etc.) either on the entire image, or with the help of an additional RT-spot on the areas concerned. Similarly, the extensive processing of shadows often leads to an increase in noise, which needs to be controlled. The denoise tool in Blur/Grain & Denoise should help to remedy this.

Thanks to @Wayne_Sutton for this english version.

Some additional information next page

Jacques

2 Likes

Following

Rawpedia (English) is update:
https://rawpedia.rawtherapee.com/Local_Adjustments#Comparison_between_the_two_TRC_(tone_response_curve)_tools_in_RawTherapee_and_the_impact_of_Ciecam

You can choose - in Cam16 - Local Adjustments Color Appearance - to not use Ciecam - either to “see” the difference, or to ignore it, or to reserve it for a 2nd spot,…
If you select in “Scene conditions” - “Surround” - Disable ciecam : the GUI will be hidden and Ciecam not taken into account (or very partially)
image

I also added, only for “Log encoding” in Cam16, a “Saturation control” checkbutton

Executable (lacam16n)
https://github.com/Beep6581/RawTherapee/releases/tag/pre-dev-github-actions

Jacques

2 Likes