Local Adjustments

Local Adjustments


1 Introduction

Local editing in RawTherapee is based on RT-spots, which are similar in principle to the U-Point concept originally used in Nikon Capture NX2 and subsequently in the Nik Collection, DxO PhotoLab and Capture NXD. RT-spots use algorithms developed specifically for RawTherapee by Jacques Desmis.
This approach is completely different to the more familiar local editing methods used in applications such as GIMP, Photoshop, etc., which primarily use selection tools such as lassos, magic wands etc., associated with brushes, layers and blend masks. These methods can be time consuming and difficult to use accurately when complex shapes are involved.
An RT-spot consists of either an ellipse or a rectangle with a variable-diameter circle at the center. The shapes have four control points, which can be adjusted independently or symmetrically. The rectangle spot can also be used in full-image mode which automatically sets the control points outside the image preview area. Future developments will provide enhanced shape manipulation.

The RT-spot algorithm uses shape detection based on ΔE (the change in the visual perception of two given colors) to select the parts of the image to be modified inside the ellipse or rectangle. The reference values used for the shape detection algorithm are based on the average of the hue, chroma and luminance values inside the variable-diameter circle. This means that in full-image mode (and also in Normal or Excluding modes) these values and the subsequent shape detection can vary depending on the position of the circle.

The extent to which these modifications are applied can be finely controlled allowing for very precise selections. Further refinement is possible with additional parametric masks but the shape-detection algorithms should be sufficient for the vast majority of local editing requirements. RT-spots can also be used in Excluding mode to prevent the algorithm from influencing certain parts of the image. The modifications that can be carried out are extensive and incorporate most of the functions available in RawTherapee's global adjustment tools along with some additional tools available only in the Local Adjustments tab.

Note: provided the checkbox “Avoid color shift” in the Settings module has not been disabled, the following operations will be carried out on the data before and after any RT Spot is activated.

  • A relative colorimetric correction to keep the data within gamut.
  • A Munsell correction using LUTs to ensure that the data remains linear and avoid hue shifts.

The tools are grouped in the following modules (Tool name - position in pipeline):

1.1 Color & Light - 11

Adjust color, lightness, contrast and correct small defects such as red-eye, sensor dust etc. Other functions include a graduated filter, L*a*b* curves and blend modes.

1.2 Shadows/Highlights & Tone Equalizer - 6

Adjust shadows & highlights either with the shadows/highlights sliders or with a tone equalizer. Can be used instead of, or in conjunction with the Exposure module. Can also be used as a graduated filter.

1.3 Vibrance & Warm/Cool - 5

Adjust vibrance (essentially the same as the global adjustment). Carry out the equivalent of a white-balance adjustment using a CIECAM algorithm.

1.4 Log Encoding - 0

Adjust underexposed or high-dynamic-range images using a log-encoded algorithm.

1.5 Dynamic Range & Exposure - 10

Modify exposure in L*a*b* space using Laplacian PDE algorithms to take into account deltaE and minimize artifacts. Laplacian operators are used because they are particularly good at detecting fine details but you do not need to understand how they work to use this tool!

1.6 Common Color Mask - 12

A tool in its own right. Can be used to adjust the image appearance (chrominance, luminance, contrast) and texture as a function of Scope.

1.7 Soft Light & Original Retinex - 7

Apply a Soft-light blend (identical to the global adjustment). Carry out dodge and burn using the original Retinex algorithm.

1.8 Blur/Grain & Denoise - 1

Can be used to blur backgrounds, soften skin, add film grain and denoise.

1.9 Tone Mapping - 2

Same as the tone mapping tool in the main menu. The main menu tool must be deactivated if this tool is used.

1.10 Dehaze & Retinex - 3

Dehaze and Retinex (Advanced mode only). Useful for dehaze, local contrast with high values and simulation of "clarity".

1.11 Sharpening - 8

Uses RL deconvolution sharpening. View at 1:1

1.12 Local Contrast & Wavelets - 8

  • Local Contrast: basically the same functions as Local Contrast in the Detail tab.
  • Wavelets: based on Wavelet Levels in the Advanced tab with essentially the same features (clarity, contrast, blur, etc., see documentation). Its use in Local Adjustments provides additional possibilities such as the removal of large blemishes, grease stains etc.

1.13 Contrast By Detail Levels - 4

Contrast by detail levels. Can be used to remove sensor or lens marks.

Each tool module can be toggled between Basic, Standard & Advanced modes. The default mode can be set in RawTherapee's Preferences window.

The examples in the next section are designed to give an overview of some of the ways the various tools can be used for local adjustments. However, if you prefer to explore the possibilities by yourself, then try setting the “Default complexity for Local Adjustments” in the Preferences module to Basic and uncheck the "Show additional settings" checkbox at the top of the Local Adjustments module. This will give you a simplified yet powerful version of Local Adjustments.

Explore the capabilities of the Color & Light, "Shadows/Highlights & Tone Equalizer" and "Vibrance & Warm/Cool" tools to start with and don't hesitate to try out the additional functionality by manually setting the complexity mode to Standard (in the combobox in the module you are working on).

The Color & Light tool is extremely powerful and includes functions from both the "Color Toning > Color correction regions" module in the main-menu Color tab as well as the L*a*b* curves available in the Exposure tab.

1.14 Combining tools in a single spot

Most of the local-adjustment tools can be used together in the same RT-spot. However, combinations of Log Encoding, Tone Mapping and Retinex should be avoided. This is because the output TIFF or JPG may not correspond to the Preview particularly when the Preview has been magnified using the zoom function.

Associating any one of the above tools with the other local-adjustment tools such as Color & Light, does not pose a problem.

If you do wish to use combinations of the 3 tools mentioned above you can simply add another RT-spot in close proximity to the first one.

For example, the first RT-spot could be dedicated to Log Encoding, and the second dedicated to Tone Mapping or Retinex. Other tools can be added to either of the two RT-spots as required.

2 Getting started

Please note: the screenshots in the following examples are currently being updated to take into account the latest developments. Because of this, some of the slider and module names will be different from the text.

2.1 Activating Local Adjustments

  • In the Tab tool bar, select the "hand" icon (Local Adjustments tab).
  • Turn on the Local Adjustments power button (if it is not already activated) and expand the Settings module.
  • Select Add.

2.2 Preparation

Position the RT-spot at the desired location. In this case, we want to increase the saturation of the red flower and reduce the luminance (lightness) without affecting the rest of the image.

  • Move the center of the RT-spot so that it is located on an area representative of what you want to change.
  • Position the 4 delimiters well beyond the flower.
  • Select the Lockable Color Picker and locate 3 colors: a) one on the red flower, b) one on the blue sky, c) one on a green leaf.
  • In the example the 3 colors are:
    • Red flower L=48.6 a=74.4 b=47.0
    • Blue sky : L=68.6 a=-3.1 b=-16.6
    • Green leaf : L=48.3 a=-28.3 b=51.4

Raw file (Jacques Desmis - Creative Common Attribution-share Alike 4.0): [1]

2.3 Adding the Color & Light tool

In the settings menu, choose "Add tool to current spot".

  • You will see a list of choices: Color & Light, Shadows/Highlights & Tone Equalizer etc. For each RT-spot you can associate one or more tools from the list. The processing order in the pipeline corresponds to the number at the end of the tool description as described in the Introduction: "Log Encoding - 0" is first (if it is activated), "Color & Light -11" is the last. This is also the case for the associated masks.
  • Select Color & Light.
Adding the Color & Light tool

2.4 Adjusting luminance (lightness) and chrominance

  • Set Lightness to -70
  • Set Chrominance to 130
  • Review the results.
  • The red flower now has a new color L= 41.3, a = 66.0, b = 50.4
  • The sky is unchanged.
  • The green leaf is unchanged.
Adjusting luminance (lightness) and chrominance

2.5 Color Tool Scope and Transition Value

In the Settings module:

  • Observe the effect of moving the "Scope (color tools)" slider.
    • If you reduce the value (default 30) only a part of the reds will be affected.
    • If you increase the value, the sky, then the green leaf, then the whole image will be taken into account (Scope=100).

Leave the Scope value at 100 and in the Settings module select "Show additional settings".

  • Observe the effect of moving the "Transition value" slider:
    • Reduce the value to 5.
    • Increase the value to 100 and see the result.

2.6 Previewing the adjustment area using deltaE (ΔE)

You can preview the areas of the image that will be affected by any changes. The preview does not show the changes themselves or the transitions, but allows you to set the scope of any adjustments.

There are two possibilities.

  • Use the Preview ΔE button located in Settings. This will only work properly if you have activated one (and only one) of the color tools in "Add tool to current spot" menu.
  • Use the Preview ΔE option in the "Mask and modifications" menu associated with a particular tool (standard and advanced modes only). In this case the GUI takes into account any adjustments made with the tool and works regardless of the number of activated tools.

You can vary the intensity and color of this preview with "ΔE preview color " in the "Shape detection" section of the Settings module. The preview will also let you see the effect of varying the other sliders in the “Shape detection” section.

Previewing the modifiable area

2.7 Viewing the changes

To see the changes:

  • Go to "Mask and modifications" > "Show modifications without mask" (don't forget to select either Standard or Advanced in the Color & Light combobox) .
  • You can see the effects of any changes to luminance, contrast, color and saturation, as well as any changes to the texture or structure of the image.
  • You can also see the effect of the transition settings.
    • "Transition value": percentage of the area that will receive the full effect of any adjustments before dropping off to zero.
    • "Transition decay": the rate with which the zone of influence decreases.
    • "Transition differentiation XY": difference in coverage between abscissa and ordinate.

Try out the following and observe the effect.

  • Change the "Scope (color tools)". Remember that the scope slider acts on deltaE.
  • Transition settings.
  • Tool settings (luminance, chroma, etc.).
Viewing the modified areas

2.8 Work on the full image using an Excluding spot

Local adjustments are not limited to local touch-ups. You can also use the Local Adjustments tool to process the full image.

In Settings enable "Show additional settings":

  • Set the "RT-spot shape" to “Full image”
  • This will set the 4 delimiters outside of the preview
  • It will also set the transition to 100 (you can use another value if you wish to generate a gradient, bearing in mind that there are other tools for making gradients). You are now ready to use all the tools in full-image mode.
Working on the complete image - settings

2.9 Example: changing the color of all the green leaves, except for one

2.9.1 Changing the color of the leaves

  • You can use the "a" and "b" components of "Lab" in the "Color correction grid ", by choosing Direct (combobox under the grid) and a high value of Strength. Moving the dots on the grid as shown will change the color of all the leaves.
  • You can adjust if necessary with "Scope (color tools)".
  • The other colors in the flower, sky etc., are not modified.
Changing the color of the leaves

2.9.2 Restoring the green color to one of the leaves

  • Add a second RT-spot (Add in the Settings module).
  • Choose "Spot method" = "Excluding spot".
  • Move the RT-spot to the leaf to be changed and expand the spot well beyond the edges of the leaf.
  • Adjust Scope (under the Excluding heading in Settings) until you get the desired effect.
  • If you wish, you can use the Excluding spot in the same way as a normal RT-spot and add tools such as Denoise, Blur, etc. (i.e. it not only “excludes" the effect of the adjacent spot, but it also allows you to use it in the same way as normal spot for the area it encompasses).
Using the Excluding spot

2.10 Correcting red-eye and removing sensor defects

3 steps: preparation, RT-spot adjustment, red-eye removal.

2.10.1 Preparation

  • Choose a large area around the eye.
  • Put the RT-spot on the red area of the eye (pupil).
  • Set 4 Lockable Color Pickers so that you can see the changes.

2.10.2 Adjusting the RT-spot

  • Add the Color & Light tool.
  • Press the "Preview deltaE" button in Settings.
  • Adjust the RT-spot to obtain the desired level of selection.
    • In this example we have chosen to reduce the spot size to 14.
    • "Scope (color tools)" = 18.
Preview dE

2.10.3 Removing the red color

  • In the Color and Light tool, reduce the chrominance to -100.
  • Observe the result.
    • The pupil of the eye has almost no dominant color anymore.
    • The iris, cornea and facial skin are unchanged.
    • You may need to change the "Transition value" (lower it) and "Transition decay" (increase it) in "Settings" depending on the case.
Eye with red color removed

2.10.4 Removing sensor defects or spots

The principle is the same as above for removing small sensor faults but in this example we will use different tools.

  • Either CBDL (Contrast By Detail Levels),
  • or Wavelet Pyramid2 > “Contrast by level” (Advanced).
  • In both cases, reduce the contrast for the lower levels of decomposition.
  • Adjust "Blur levels" if necessary (Wavelet Pyramid1).
  • Use a low "Transition value" (less than 20) and high "Transition decay" (greater than 15) in the Settings module.
  • The minimum size of the RT-spot for the CBDL and Wavelet Pyramid2 decomposition to function is 32x32 pixels. There are workarounds such as the use of transitions and deltaE to deal with defects smaller than the spot.

Example: removing multiple spots using Wavelet Pyramid2.

  • Looking at the image below, we can see that it is blotchy.
Multiple blotches
  • A possible solution:
    • Activate the tool Local Contrast & Wavelets.
    • Choose Advanced in the first combobox and then Wavelets in the second combobox.
    • Adjust Scope to 20.
    • Go to Pyramid2 and activate "Contrast by level".
    • Set high values of "Attenuation response", Offset and "Chroma levels" (if necessary).
    • Activate the "Contrast by level" curve and reduce the contrast for the lower levels.
Fewer blotches

2.11 Dodging and Burning

In many portraits, or photos where light falls directly on the skin, an unpleasant contrast-enhancement phenomenon occurs. Some parts of the skin are slightly overexposed, while others are slightly underexposed.

  • Traditionally this problem is treated with masks and layers and there are numerous tutorials for doing this with the GIMP and Photoshop (c). You could probably use RawTherapee's Local Adjustments masks also.
  • Here we are going to use the Original Retinex concept (based on Ipol research). It was developed in the 1970s and was originally designed for this sort of application and not for the way it has been subsequently used in Rawtherapee and elsewhere. We are going to:
    • Use one or more adjustable-threshold Laplacian functions (see note below).
    • Solve the Poisson equation (PDE - Partial Derivative Equation).
    • Balance the luminance values.

Note: Laplacian operators are used because they are particularly good at detecting fine details and Poisson equations are used to solve the partial differential equation generated by the Laplacian and make the tool usable. But you do not need to understand how they work to use this tool!

There are 3 steps: Preparation, Laplacian settings and preview, Result

2.11.1 Preparation

  • The deltaE adjustment, the Scope (make sure you use the Original Retinex Scope) and the transition adjustment principles are identical to the previous examples and won't be repeated here.
  • The portrait we are going to use has had the eyes masked for confidentiality reasons.
  • Choose "Add tool to current spot" > Soft Light & Original Retinex > Advanced > Original Retinex.

2.11.2 Adjusting the Laplacian threshold and viewing the changes

  • Adjust the Strength slider (which takes into account the threshold of the first Laplacian operator).
  • Adjust the "Laplacian threshold deltaE" slider (which takes into account the deltaE of the image to act on a second Laplacian operator). This processing is upstream of the Scope algorithms and can take into account differences in the background.
  • View the modifications by choosing: "Show Fourier process" > "Show modifications without mask".
Show Modifications

2.11.3 Results


A similar algorithm is used in the Dynamic Range & Exposure tool. It can be used to process images with large differences in exposure that are often globally underexposed.

2.12 Making a graduated filter based on luminance, chrominance and hue (gradient filter)

2.12.1 Preparation

  • Choose the flower image that was used in the first example.
  • Identify 7 points with the "Lockable color picker".
  • Add the Color & Light tool to the current spot and select “Advanced” mode.

Raw file (Creative Common Attribution-share Alike 4.0): [2]

2.12.2 Making a graduated filter

Arbitrarily we have chosen the following settings:

  • Luminance gradient strength = -0.44
  • Chrominance gradient strength = -1.13
  • Hue gradient strength = 2.69
  • Gradient angle = -87.6
  • Scope (color tools) = 30
  • Feather gradient(settings) = 25
Luminance, Chrominance & Hue Gradient

2.12.3 Changing the default settings

  • Try to gradually change "Scope (color tools)" by increasing the value to 70 then 75, 80, 85, 90 and 100.
  • Change "Feather gradient" in the Settings > Transition Gradient module and note the variations.
  • You can also change the values of the gradients (L, C, H, angle) in the Graduated Filter section of the Color & Light tool).
  • If you wish, you can also change the values of Color & Light.
The settings for Transition, Gradient, Luminance, Chrominance, Hue, Scope & Feather

2.13 Five ways to change the exposure and lift the shadows

This example is for demonstration purposes only so that we can see the various (non-exhaustive) possibilities for adjusting exposure. The settings are arbitrary.

  • The image is a difficult one with deep shadows and a central area that is almost overexposed.
  • Five possible methods are shown with arbitrary settings:
    • Shadows/Highlights
    • Tone Equalizer
    • TRC (Tone Response Curve)
    • Log Encoding
    • Exposure (PDE algorithms & Exposure)

We could also have used:

  • Contrast curves,
  • or lifted the shadows with "Lightness" (Color and Light),
  • or used a graduated luminance filter.

2.13.1 Preparation

  • Add a spot as shown in the image below.
  • Set the "Scope (color tools)" slider to 50 (this value will be used by the Shadows/Highlights tool when it is added and we will use the separate Scope sliders for each of the Log Encoding and Exposure tools).
  • Try varying this value between 20 and 100
Lifting the shadows - preparation

Raw file (Rawtherapee - Creative Common Attribution-share Alike 4.0): [3]

2.13.2 Using Shadows/Highlights

  • “Add tool to current spot” > "Shadows/Highlights & Tone Equalizer" > "Standard"
  • Select Shadows/Highlights in the combobox.
  • Try changing "Shadows tonal width" and "Highlights".
Lifting the shadows - Shadows Highlights

2.13.3 Using the Tone Equalizer

  • “Add tool to current spot” > "Shadows/Highlights & Tone Equalizer".
  • Select Tone Equalizer in the combobox.
  • Try also sliders 2, 3 et 4.
Lifting the shadows - Tone Equalizer

2.13.4 Using the Tone Response Curve (TRC)

  • “Add tool to current spot” > "Shadows/Highlights & Tone Equalizer".
  • Select TRC.
  • Increase the "Slope" to 150 and then come back to 60.
  • Try reducing and then increasing the gamma and observe the effect.
Lifting the shadows - TRC

2.13.5 Using Log Encoding

  • “Add tool to current spot” > "Log Encoding".
  • Note that the Scope slider in this case is in the Log Encoding tool: set Scope to 50.
  • Click on the Automatic button.
  • Adjust the “Target gray point” (now called “Mean luminance (Yb%)” in the Viewing Conditions panel).
Lifting the shadows – Log Encoding

2.13.6 Using Exposure

  • “Add tool to current spot” > "Dynamic Range & Exposure".
  • Select Standard.
  • Adjust "Exposure compensation ƒ" (a Laplacian and a Fourier transform will be applied).
  • Set the Exposure Tools sliders to Black = -1500, Shadows = 50.
  • By default "Highlight compression" is 20. Vary it to see the effect.
  • Play around with the above settings to get a feeling for how the tool works.
Lifting the shadows - Exposure

2.13.7 Recommendations

For portraits and images with low color contrast:

  • Use the Exposure slider with care because the algorithm (which is similar to the one used in the Exposure tab) is not well adapted to cases such as portraits which have subtle color variations in skin tones. The algorithm was improved recently (July 5, 2020) by the addition of a Laplacian operator to resolve the differences in contrast but it is still not the best solution for these cases.
  • Try using the "Tone equalizer" or "TRC" instead.

If you do use Exposure, then it is recommended (but not mandatory) to change the parameters of "Shape detection" in Settings as follows:

  • Increase "ΔE-scope threshold".
  • Reduce "ΔE decay".
  • Set "ab-L balance (ΔE)" to L.
  • Adjust "Scope (color tools)" if necessary.

2.14 High dynamic range images - use Log Encoding or the "PDE" algorithms in the "Dynamic Range & Exposure" tool

2.14.1 Log Encoding and Ciecam02 Tutorial

Log encoding - Ciecam02 - Tutorial - Examples Chromatic Adaptation Example

The first step is to find an almost mathematically perfect white balance using White Balance > Auto > “Temperature correlation” (same example and settings as in the “Ciecam Advanced tab” tutorial).

Raw file (Rawtherapee - Creative Common Attribution-share Alike 4.0): [4]

White Balance - Temperature correlation Choose a suitable Local Adjustments setting - Preparation
  • Select the Local Adjustments tab.
  • Add a “Full image” spot.
  • Set some lockable color pickers as shown.
Chromatic Adaptation - Preparation Select Log Encoding

Choose: "Add tool to current spot" > Log Encoding

Chromatic Adaptation - Log encoding
  • Try changing the position of the center of the RT-spot.
  • Try changing the values of Scope e.g. 40 - 60 - 80 – 100.
  • Observe the results.
  • Note that the image still has a yellow cast. Modify Chromatic adaptation - cat02
Chromatic Adaptation - Log encoding - Cat02
  • Make the image cooler by moving the “Chromatic adaptation cat02" slider to the left.
  • Reducing the slider value by 10 units corresponds to a 300K drop in illuminant temperature.
  • Try with a value of -23. High dynamic range image + Ciecam

The image is a difficult one (the same that was used for the CIECAM example in the Advanced tab). It has very marked shadows and strong sunlit backlighting. Use the default RawTherapee settings and position the lockable color pickers as shown so that you can see the changes when processing.

Raw file (Pixls.us - Creative Common Attribution-share Alike 4.0): [5]

Ciecam Lighting Preparation Using Log Encoding + Ciecam

Create a full-image spot and then "Add tool to current spot" > Log Encoding. For this example, and for comparison with Lift the shadows, the following arbitrary settings are used:

  • Set the value of Scope = 79
  • Complexity = Advanced.
  • Press the Automatic button.
Log encoding
  • Move the RT-spot and observe the effect.
  • Change the Scope settings and observe the effect. Adjusting the Ciecam settings in the Log Encoding module
  • In the Scene Conditions panel choose Surround = Dim. The image will become lighter.
  • In the Image Adjustments panel, set the Saturation(s) = 30 and Contrast (J) = -10.
  • Observe the effect on the shadows.
Log encoding + Ciecam Saturation (s) - Contrast (J) - Dim

Now open the "All tools" expander.

  • Try Colorfulness (M) instead of Saturation (s).
  • Try Contrast (Q) instead of Contrast (J).
  • Adjust the Lightness. Log encoding - Dodge and Burn - Ciecam Preparation

This is another way to Dodge and Burn using Log Encoding and Ciecam. Position an Rt-spot on the face and set 2 "Lockable color pickers" as shown.

Raw file (Copyright - Jean Christophe Frisch - Creative Common Attribution-share Alike 4.0): [6]

Log encoding Dodge and Burn - Preparation Using Log Encoding in manual mode with Ciecam
  • "Add tool to current spot" > Log Encoding
  • Complexity = Advanced
  • Click on Automatic
  • Slightly increase the White Ev value until you get the desired effect (in this example from 3.0 to 5.0).
  • Slightly increase the Saturation (s).
  • Click on "All tools" and slightly reduce Brightness (Q).
  • Try the other settings e.g. Surround = Dim, Lightness (J), etc.
  • You can also adjust the Scope and move the RT-spot and observe the variations in the result.
Log encoding Dodge and Burn - Preparation

2.15 Other Examples

High dynamic range images are one of the recurring problems in image processing. There are already several algorithms that can be used in Rawtherapee to reduce the dynamic range, with more or less success: Dynamic Range Compression, Shadows/Highlights, Tone Equalizer, Tone Response Curve, etc.

  • In this example we are going to use the Log Encoding tool (derived from the darktable filmic module and adapted by A. Griggio for ART). The tool has undergone further adaptation by J. Desmis for use in RawTherapee Local Adjustments.
  • To demonstrate the possibilities of this module, we are going to use it to make a luminance gradient, without using the Graduated Filter in the Log Encoding menu.
  • There are three steps: preparation, automatic settings, adjustments.

2.15.1 Preparation

  • Set the RT-spot so that:
    • The center is at the bottom left corner of the image.
    • The upper right corner is at the limits of the image.
  • Go to "Add tool to current spot" then select Log Encoding (the tool has been deliberately disabled in the screenshot).

Raw file (Copyright - Roberto Posadas - Creative Common Attribution-share Alike 4.0): [7]

2.15.2 Automatic settings

  • Press the Automatic button.
  • The image will brighten.
  • Click the Automatic button again to see the settings more clearly.
  • The values Black Ev = -6.7, White Ev = 6.9, indicate a large dynamic range = 13.6 EV.
  • “Source gray point” = 1.2 (slider changed to “Mean luminance (Yb%)” in the Scene Conditions panel in the current interface) .
  • These settings (that you can change) are the result of calculations made upstream in the pipeline.

2.15.3 Adjustments

You can now adapt the image to taste:

  • Play with the diagonal gradient by adjusting the "Transition Gradient" in Settings: "Transition value" = 45. You can also adjust "Transition decay" and "Transition differentiation XY" (try it out to see how it affects the result).
  • Modify the way the adjustment is distributed inside the image by setting Scope (Log Encoding) = 50
  • Change the global luminance of the image by setting "Target gray point" = 22.0 (slider changed to “Mean luminance (Yb%)” in the Viewing Conditions panel in the current interface).
Gradient and adjustments

2.16 Log Encoding and Highlight Recovery

The use of Log Encoding can sometimes lead to unexpected results. If the image contains highlights that were overexposed during shooting, then they need to be recovered or reconstructed. However, if this is the case, the Log Encoding module will "overwrite" the reconstructed highlights, resulting in unpleasant effects (e.g. unexpected changes in luminosity, hue and saturation). We will use 2 methods to overcome this problem and preserve the highlights.

  • Using a mask and a recovery process.
  • Using excluding spots.

2.16.1 Preparation

Raw file (Pixls.us Jonathan Dumaine - Creative Common Attribution-share Alike 4.0): [8]

PP3 File [9]

Preliminary adjustments

  • Adjust the white balance (Color tab). Without the knowledge of the person who took this image we don't know anything about the lighting conditions. Are they LED or incandescent lamps? How was the foreground lit? In this case:
    • You can either leave the image as is,
    • or use the "Temperature correlation" automatic white balance method.
  • Reconstruct the highlights (Exposure tab). I have used the excellent Color Propagation algorithm designed by Emil Martinec.

Preparation of the RT-spot

  • Choose Rectangle.
  • Position the delimiters outside the preview area.
  • Set the transition to a fairly high value.
  • Position a series of Lockable Color Pickers on the image.
  • Ensure that the L*a*b* values of the Lockable Color Pickers match the actual values by setting Mask and Merge > "Background color/luma mask” = 0 in the Settings module.

2.16.2 Apply Log Encoding

  • Add the Log Encoding tool using "Add tool to current spot".
  • Select Advanced (or Standard).
  • Click on the Automatic button.
  • Set Scope to a high value i.e. 80 or more.

Log Encoding will automatically adjust the image and in particular the foreground, but the colors in the previously "reconstructed" highlights in the background will be desaturated and the brightness will be reduced.

Not only that, but the overall image is too saturated and the changes in exposure are badly distributed.

Log encoding

2.16.3 Elaboration of the mask

We will create a different sort of mask compared to what we normally use in RawTherapee. This mask will be used "live" to combine two images processed with and without Log Encoding.

Depending on the settings of "Recovery based on luminance mask":

  • The dark and black areas of the mask will result in a combined image that is as close as possible to the original.
  • The very bright or white areas of the mask will also result in a combined image that is as close as possible to the original.
  • The intermediate area will be modified by the settings of Log Encoding.

In this case I used the LC(H) curve but other images may require the L(L) curve. Note that the C(C) curve has no effect on the "mix" but can be used to improve the selection.


2.16.4 Partial recovery of highlights with mask

  • Make sure that the mask is enabled i.e. the "Enable mask" box is checked.
  • Open the expander "Recovery based on luminance mask".
  • Set "Recovery threshold". The closer the slider is to "2", the more the dark and very bright areas of the mask will be taken into account and restored to the original image values.
  • Use the "Dark area luminance threshold" and "Light area luminance threshold" sliders to include or exclude parts of the image. The corresponding values (in this case dark = 25.5 and Light = 98.3) are the two limits below and above which the effect of the mask will be progressively taken into account.
  • If necessary, use “Decay strength” to adjust the rate of decay.

2.16.5 Highlight Recovery using an Excluding spot

We can also use one of the strong points of Local Adjustments by using Excluding spots. The adjustments are arbitrary.

Excluding spots

2.16.6 Final adjustment with Ciecam16

Once the various parameters have been set, we can refine the result. In this case I have chosen several Ciecam settings (using Ciecam 2016 in this case) to:

  • Increase the contrast.
  • Reduce the saturation, especially for the skin.
  • Change the chromatic adaptation, to make the image a little "colder".

Of course, everything is quite arbitrary and depends on one's perception.

A final remark.

  • The image is particularly noisy and will need to be denoised. However, to keep things simple, I have excluded this from the example.

2.17 Processing a hazy image

We are going to process a very hazy image by first applying the global Haze Removal tool in the Detail tab and then touch up the sky and horizon using Retinex in Local Adjustments.

2.17.1 Original Image

Hazy image

Raw file :(Pixls.us - Creative Common Attribution-share Alike 4.0): [10]

2.17.2 Processing with the Haze Removal tool (Detail tab in the main menu)

We could have used the Dehaze tool in Local Adjustments but when you look at the image there is a lot of haze in the background and the hills so it is better to use a two-step approach.

Hazy image – result with the Haze Removal tool in the main menu (Detail tab)

2.17.3 Additional processing with local Retinex

  • Select "Add tool to current spot" > Dehaze & Retinex > Advanced.
  • Try varying the settings.
  • Adjust the "Transmission map" curve in Advanced Retinex Tools if necessary by increasing the attenuation on the right side of the curve.
  • Now look at the difference in the hills and the sky on the horizon!
Hazy image after using Haze removal + Retinex

2.18 Using the Denoise module

There are several ways of using this tool:

  • On selected areas to refine any denoising adjustments carried out with the Noise Reduction module in the Detail tab. In this case keep the Detail tab noise reduction to a minimum.
  • By processing the whole image using the Denoise module in Local Adjustments and excluding parts of the image with an Excluding spot.
  • By using it on its own to reduce noise in low-noise images. For example, to remove noise from the sky or a face.
  • By using it on its own to reduce the noise in a selected area and deliberately leaving the noise in the rest of the image for artistic purposes.

We are going to look at an example using this last case.

The image of the young girl is particularly noisy and has strong chromatic noise.

Denoise preparation

Raw file (Creative Common Attribution-share Alike 4.0): [11]

2.18.1 Zoom 100%

Denoise zoom 100%

2.18.2 Which settings should we use for denoising?

  • The position of the spot and its size are important. We are going to choose a part of the face with strong chromatic noise and use a large “Spot size” for the RT-spot .
  • The choice of the Scope parameter is also important. In this case, where the noise occupies almost the whole color spectrum (red, green, blue, yellow), a high Scope value must be chosen (90 in this case). If on the other hand the image to be processed has mainly luminance noise, then the "usual" Scope value should be chosen, i.e. around 30, to allow the algorithm to differentiate the action according to the colors.
  • There are several differences in the Local Adjustments denoise function compared to the global Noise Reduction module in the Detail tab.
    • You can use a curve to adjust the luminance noise level as a function of the level of detail (from 0 to 6 depending on the position on the abscissa of the curve).
    • A distinction is made depending on the level of detail i.e. if levels 3 and above are greater than 20% of the ordinate of the curve, the luminance noise reduction will be more aggressive.
    • The "white - black" differentiation for luminance is handled by an equalizer, rather than gamma.
    • There is the possibility to distinguish between "Fine chroma" (impulse noise and low chrominance noise for levels 0 to 4) and "Coarse chroma" (packets of noise, blotches for levels 5 and 6) .
    • There is a "red-green/blue -yellow" equalizer which can be useful for low-noise images.
    • There is an extra "Chroma detail recovery" slider using DCT (a Fourier-related discrete cosine transform).
    • There is an added "Luminance & chroma detail threshold (DCT)" slider to differentiate the action based on edges ("Edge detection").
Denoise settings

2.18.3 A complex noise reduction problem: how to differentiate between uniform areas and areas with texture or detail?

Isolating a subject against a background is a common problem in photography. The subject can be an animal, a plant, a person and the background the sky, grass, a forest, a wall etc. The problem is a complex one for noise reduction software because the algorithm usually "ignores" the difference between the subject and the background. This means that removing noise in the background will cause a loss of detail, contrast and color in the subject. An example using Andy Astbury's harvest mouse image

I chose this image, with the agreement of its author Andy Astbury, because not only is it excellent (the animal stands out very well against a gray background) but it is also slightly noisy. Removing the noise using only the Noise Reduction tool in the Detail tab will inevitably lead to a loss of detail and a reduction in contrast and saturation in the mouse.

Raw file : (Copyright Andy Astbury - Creative Common Attribution-share Alike 4.0) [12]

PP3 file [13] The pp3 file is provided as a guide to the tools and possible settings that can be used in cases like this. They are not necessarily the "right" settings.

Traditionally noise is removed in Rawtherapee using the Noise Reduction module (Detail tab). If we try to remove the luminance and chrominance noise in the background we end up with settings (not shown in the screenshot) in the order of:

  • Luminance slider = 65
  • Chrominance slider - Master = 20

Certainly the background will be perfect, but our little harvest mouse will become dull and washed out. So how can we go about denoising this image?

Method outline:

  • We will use a two-step approach.
    • In the first step we will remove the noise in the details that we want to preserve (the harvest mouse) using the Noise Reduction module in the Detail tab, paying particular attention to its eye and tail. Note that in other images this step may also reduce large noise packets.
    • Because the perception of noise is similar to the principles of color appearance models, it will be more visible on a gray background than on a darker background (especially the chrominance noise). The same principle applies for the brighter parts of the image. It is therefore advisable to adjust the tonal contrast in conjunction with noise reduction. This will enhance the image and reduce the perceived noise at the same time.
    • In the second step, we will treat the noise with some of the tools available in Local Adjustments and in particular, the five tools outlined below:
      • The mask, which will allow us to differentiate between the detailed parts of the image (mouse, vegetation) and the background.
      • The “Denoise hue equalizer” which will allow us to differentiate the denoising between the color of the mouse and the background.
      • The Scope slider (i.e. use deltaE) which allows us to differentiate the action based on differences in color.
      • The "Luminance detail recovery (DCT)" slider (abbreviated to “Luma detail recovery” in the current interface) and the “Luminance - Chroma detail theshold” (abbreviated to “Luma-chro detail threshold” in the current interface) slider in Edge Detection, which uses a noise reduction technique (Fourier) based on the difference between the original image and the image that has been denoised using wavelets.
      • Patch-based denoising (also called non-local means), is another denoising algorithm based on pixel and patch similarity. It allows you to differentiate the denoise between areas with detail and texture (e.g. field mouse, vegetation etc.) and uniform areas (background).
    • Finally we will adjust the saturation, local contrast, etc.

Note that this document is for didactic purposes and the settings are designed to clearly demonstrate the different steps rather than to produce a beautiful image. First step: noise reduction and tonal contrast adjustment

The image below only shows the tone equalizer settings and not the luminance and chrominance denoise settings that were made in the Noise Reduction module (Detail tab). Lockable Color Pickers have been placed on the eye, the fur, the vegetation, and the tail.

  • Add a new RT-spot and choose "Full image" in settings. Also in the Settings panel, go to "Mask and merge" and set "Background color/luma mask" to 0 (this will make it easier to distinguish the variations in luminance values).
  • Click on "Add tool to current spot" and select Shadows/Highlights & Tone Equalizer in the drop-down menu. Leave the tool in the default Basic mode.
  • Position the center of the RT-spot on the gray background.
  • Adjust the equalizer sliders to get the best compromise, while at the same time adjusting the two sliders in the "Noise Reduction" module (Detail tab). Here I used : luminance = 4, chrominance = 6.5 (Method: Manual > Chrominance-Master).
Noise Reduction + Tone Equalizer Second step: Local Adjustments, Blur/Grain & Denoise module
  • Click on "Add tool to current spot" and select Blur/Grain & Denoise and then Denoise. Set the tool to Advanced mode.
  • Use the "Luminance denoise" curve.
  • For educational purposes and in order to see the effectiveness of the various tools you can set this curve to maximum and activate Aggressive. You will of course have to bring it back to normal values afterwards before continuing.

Familiarize yourself with each of the 5 tools mentioned above, one by one. For example to see the action of the "Denoise hue equalizer", set Scope to 100, set the slider “Recovery threshold" to 1 in “Recovery based on luminance mask" and leave the 3 other sliders at their default values.

  • Adjust the "Denoise hue equalizer" by increasing the noise level for the background and decreasing it for the mouse.
  • Adjust "Fine chroma" slightly.
  • Review the results.
Luminance Denoise by levels & Denoise hue equalizer


  • Make a mask (Blur/Grain & Denoise> Denoise > Mask and modifications).

This mask will be used to differentiate the denoise between the background and the rest of the image i.e. the harvest mouse and the vegetation. In this case I used a simple L(L) curve, a gamma adjustment and the contrast curve, but other images may need to use the LC(H) curve, “Structure mask strength”, “Smooth radius”, etc...

Mask - contrast curve
  • Activate the mask.
  • Expand the "Recovery based on luminance mask" tool.
  • Adjust "Recovery threshold" to reveal detail. Note that this tool is inactive when set to its default value 1.0. As soon as you move the slider, you will see maximum detail and noise which can then be reduced by moving the slider to the right.

For other images it may be necessary to adjust:

  • "Dark area luminance threshold". The denoise is progressively increased from 0% at the threshold setting to 100% at the maximum black value (determined by the mask).
  • "Light area luminance threshold", The denoise is progressively decreased from 100% at the threshold setting to 0% at the maximum white value (determined by the mask). In this example, the adjustment will allow us to denoise the vegetation as a function of luminance.
  • Decay allows you to manage the progressiveness of any changes.
  • The two "Gray area" sliders allow you to reapply noise reduction if necessary in the "protected" mid-tone area of the mask.
  • Using Scope: here we are on familiar ground. In "Mask and modifications" you can use the two selections "Show modified areas with mask" and "Show modified areas without mask" to see the effect of Scope. Or you can simply adjust Scope and see the effect. In this image, with "Equalizer hue" disabled and "Recovery based on luminance mask" disabled (“Recovery threshold” set to 1) , the Scope action is sensitive between 50 and 100.
  • Use of the two sliders "Luminance detail recovery" (now labeled as “Luma detail recovery”) and "Luminance & chroma detail threshold" (now labeled as “Luma-chro detail threshold”).
    • Gradually increase "Luma detail recovery".
    • Adjust the "Luma-chro detail threshold"in parallel. You will see the details reappear.
    • 2 algorithms are possible. The first one uses an internal mask and the second one a Laplacian. Each one has its particularities: the Laplacian is more selective, but less progressive.
  • Using patch-based denoise (non-local means).
    • What is patch-based denoise? Contrary to the usual filters that reduce noise by averaging the values of groups of pixels located around a target pixel, non-local means filters average the values of all the pixels in the image and weight them according to their similarity with the target pixel. This type of filtering reduces the loss of detail compared to filters that use local averaging.
Non-local means

To familiarize yourself with this method it is recommended to:

  • Activate "Non-local means only" in Denoise > Mode.
  • Deactivate the mask.
  • Set Scope to 100.

In Advanced mode you have 5 sliders:

  • Strength
  • Detail recovery: allows you to make a preliminary selection between uniform and textured areas. The higher the values, the more the details will be selected.
  • Gamma: allows you to further refine the selection between uniform and textured areas. Lower gamma values will reveal more detail and texture.
  • Maximum patch size: allows you to adapt the size of the "patch" to the size of the objects. In theory, the more noisier the image, the larger this value should be. In practice, you should look for and minimize any artifacts in the transitions between the uniform and textured areas.
  • Maximum radius size: higher values will theoretically give better noise reduction at the expense of increased processing time. Final Adjustment - Saturation and Local Contrast

Add a new RT-spot, centered on the mouse.

Then add 2 tools.

  • “Add tool to current spot” > Vibrance & Warm/Cool > Basic.
    • Move the Vibrance slider until you get the desired increase in saturation.
  • “Add tool to current spot” > Local Contrast & Wavelets > Wavelets >Advanced.
    • Use "Contrast by level" in Wavelet pyramid 2 , giving priority to the first levels.
Wavelet Other methods and tools

Other methods can be used for the same purpose.

  • Using Local Adjustments
    • "Denoise based on luminance mask". Uses the same mask as "Recovery based on luminance mask" but increases or decreases the wavelet denoise. It acts prior to denoise (as does the "Denoise hue equalizer") whereas "Recovery based on luminance mask" acts after denoise by comparing the original noisy image and the denoised image.
    • "Equalizer white-black" and "Equalizer blue-yellow red-green"are the equivalent of the "Luminance curve" in "Noise Reduction" and not very efficient here.
    • Guided Filter in Blur/grain & Denoise > Blur & Noise uses the same mask and the same process as "Recovery based on luminance mask" with negative values of the Detail slider.
    • Excluding spots allow you to restore the image to the settings prior to activating the "Full image" RT-spot.
    • Median in Blur/Grain & Denoise > Blur & Noise is not very efficient here.
    • "Blur levels" in Local Contrast & Wavelets > Wavelets > Pyramid1: if you want to blur a part of the image according to the level of detail.
  • Other Rawtherapee methods (not developed here)
    • Noise Reduction: the "Luminance control" and chrominance curves allow some form of selection, but they are not sufficient in this particular case.
    • Wavelet levels noise reduction, which includes a "Denoise hue equalizer" and makes use of local contrast.

Comparison of Denoise tools Comparison of the 3 Rawtherapee noise reduction tools Summary

Thanks once again to Andy Astbury for this excellent image, which allows us to demonstrate 5 ways of differentiating noise reduction between uniform areas and areas with detail.

  • Denoise hue equalizer
  • Recovery based on luminance mask
  • Scope - deltaE
  • DCT - Edge detection
  • Non-local means

In a difficult image it will probably be necessary to activate all 5 methods to try and find the right balance. The result is a matter of individual taste and is quite subjective.

It also depends on:

  • The background, which is uniform in this example, but may pose problems if it contains detail or texture.
  • The colors, which are well separated here, but will be more difficult to distinguish if they are "mixed".
  • DeltaE, which can be affected by chromatic noise, or when the separation of the colors is less distinct.
  • "Edge detection" which will also be affected by high luminance noise.

2.19 A moment of madness - try wavelets!

2.19.1 An example … (don't run away, it isn't as difficult as all that)

Original image, with “Exposure compensation” = +1.5


Raw file (Rawtherapee - Creative Common Attribution-share Alike 4.0): [14]

2.19.2 The same image with Wavelet level tone mapping

  • Leave all settings at their default values.
  • Enable the Local Contrast & Wavelets tool (Advanced mode), select Wavelets in the combobox just under the “Overall strength” slider (the default is Unsharp Mask) and then select Pyramid2.
  • Set Scope (Wavelets) to 80.
  • Use the settings visible on the screenshot.
  • Of course the appearance is subjective so feel free to change the settings.
  • This version of tone mapping is different from the other algorithms implemented in Rawtherapee (Mantiuk for both Tone mapping and Log Encoding and Fattal for Dynamic Range Compression) and is specific to Rawtherapee Wavelets.
Amsterdam image with wavelet tone mapping

2.20 Three ways of increasing texture

For demonstration purposes we will use:

  • Tone Mapping (Mantiuk)
  • Retinex
  • Wavelets

2.20.1 Preparation – original image - Venice


Raw file (Copyright Sébastien Guyader - Creative Common Attribution-share Alike 4.0): [15]

2.20.2 Using Tone Mapping

  • Create an elliptical RT-spot as shown then “Add tool to current spot” > Tone Mapping.
  • Note that the option "Normalize luminance" is checked. This ensures that the average and variance of the luminance values are the same as in the original image.
  • Use Advanced mode and adjust "Edge stopping" and Scale.
Tone mapping using the Mantiuk algorithm

2.20.3 Using Retinex

  • Using the same RT-spot as above, turn off the Tone Mapping tool and then “Add tool to current spot” > Dehaze & Retinex > Advanced. Then use the settings in the screenshot.
  • Note that the option "Normalize luminance" is checked. This ensures that the average and variance of the luminance values are the same as in the original image.
  • Note also that you can enable the "Use Fast Fourier Transform".

2.20.4 Using Wavelets

  • Using the same RT-spot as above, turn off the Dehaze & Retinex tool and then “Add tool to current spot” > Local Contrast & Wavelets > Advanced > Wavelets > Pyramid2 and then use the settings in the screenshot.
  • Note the use of "Compression by level", the values of "Attenuation response", "Balance threshold" and "Compress residual image".
  • Try "Contrast by level".
  • Also try "Directional contrast",
  • or a combination of these parameters.
Wavelet tone-mapping

2.21 Merging layers using blend modes

You can use "Merge file" in the Color & Light tool (Advanced mode) to simulate the effect of merging layers. Each RT-spot can be thought of as a layer and the "Merge file" function allows you to merge up to 2 RT-spots with the original image.

  • The first "layer" is called Original and corresponds (in the same way as an Excluding spot) to the image data prior to any local adjustments being carried out.
  • When you stack RT-spots on top of each other, for example 6:
    • If the current Spot is number 6, "Merge file" will merge the 6th layer, either with the 5th (Previous Spot), or with the Original Image (the original data), or with a color defined in Background depending on the option chosen in the combobox.
    • If the current spot is number 3 out of the 6, then "Merge file" will merge spot 3 either with the 2nd spot (Previous Spot), or with Original (the original data) or with a color defined in Background.
    • For each of these merges you have 21 blend modes inspired by those of Photoshop© (Normal, Difference, Soft light, Overlay, etc.).
    • For each blend mode you can adjust the opacity, deltaE, and a Contrast Threshold (except in the case of Background).
    • The Graduated Filter (Luminance, Chrominance, Hue), which is located in Color & Light, also works with "Merge file".

As an example we will use these features to create a variable blur (of course this isn't the only application).

2.21.1 Preparation

Add an RT-spot as in the previous examples and then add the Blur/Grain & Denoise tool in Advanced mode using "Add tool to current spot".

  • Set the RT-spot to Inverse mode (using the checkbox which will appear when you click on the Blur & Noise expander).
  • Choose Scope = 90 or 100 depending on the desired effect.
  • Set Radius to a high value (2000 or more and check the FFTW option), set Blur mode to Luminance & Chrominance (in the combobox at the bottom of the tool panel). .

Raw file (Rawtherapee - Creative Common Attribution-share Alike 4.0): [16]

2.21.2 Adding a second RT-spot

Use "Add tool to current spot" to add the Color & Light tool and set it to Advanced mode.

  • Set "Scope (color tools) " to 100.
Second spot

2.21.3 First merge in Normal blend mode

  • Go to the "Merge file" expander in the Color & Light module.
  • In the combobox choose one of the options in the list that starts with None. The options are:
    • Original Image.
    • Previous Spot, which merges with the previous RT-spot (or the Original Image if there is only one RT-spot).
    • Background, which allows you to merge with a colored background.
  • Then choose the blend mode (under the heading "Merge with Original/Previous/Background") and adjust the settings : "Merge background", Opacity, Contrast Threshold.
  • The other parameters in the Color & Light module can also be used if you wish (e.g. Lightness, Contrast, Saturation etc.).
Blend mode "Normal"

2.21.4 Second merge using the Soft Light blend mode

In the list of merge modes try “Soft Light (legacy)" or a different mode if you wish.

  • Try adjusting the settings (e.g. Opacity, etc.) to see what difference they make.
  • Switch from the Original Image option to Previous Spot and see what difference that makes.
Blend mode "Soft Light (legacy)"

2.22 Using a simple mask to improve color selection

2.22.1 Preparation

  • We are going to use an image of the salt mountain in Pammukale (Turkey).
  • It is a difficult image to process, because of the subtle differences in color between the sky and the mountain. Moreover, the mountain contains many irregularities.
  • The preliminary steps are the same as for previous examples. Note the setting of "Scope (color tools)" to 40 which is a compromise but necessary if we are going to process the mountain correctly.
  • For the purposes of this example, we are going to strongly increase the luminance (lightness) and the chrominance of the mountain (this is not an artistic objective) and see if we can avoid affecting the sky in the process.
  • We could have used Excluding spots (or in a future GUI release, a polygon), but for now, we are going to use a simple mask. We could also have used several curves for the mask, or created several masks by duplicating the RT-spot.
  • 2 types of mask are available in Local Adjustments.
    • 1) Those that don't add or subtract the mask from the image. The aim in this case is to improve the quality of the deltaE selection.
    • 2) Those that make use of the resulting differences when they are added to, or subtracted from the image.
    • We are going to use the first case (selection improvement).

Raw file (Jacques Desmis - Creative Common Attribution-share Alike 4.0): [17]

2.22.2 Strongly increase Lightness and Chrominance

  • Observe the result: there is color bleed and the sky has been affected by the changes, which is what we wanted to avoid.
Increasing the lightness and chrominance

2.22.3 Creating a simple mask

  • We are going to use only one of the 3 LCH curves (in this case L).
  • Examine the L(L) curve closely. You will see that the point of inflection is located at the transition between the gray areas. This "transition" corresponds to the 3 references of the RT-spot (chroma, luma, hue) and is common to all the curves -- C(C), L(L), LC(H).
  • Avoid using Blend to ensure that only the shape detection is improved.
  • You can also use "Show modifications with mask" in "Mask and modifications".

Show the mask

2.22.4 Fine tuning the result

  • Set "Mask and modifications" to "Show modified image".
  • Activate "Enable mask".
  • If necessary, adjust the "Smooth radius" mask tool.
  • Retouch the "Contrast curve" mask and L(L) curves if necessary.
  • Switch to Advanced mode and try the Gamma, Slope, and Laplacian threshold masks (instead of the "Smooth radius" mask).
  • Certainly it is not perfect, but it is much better -- the goal is to discover how the masks work.

To improve the mask performance, you have 2 solutions:

  • Duplicate the RT-spot: if you duplicate the RT-spot, and place it alongside the previous one, the slight change in the position of the center (references), will allow the second mask to "correct" the "anomalies or incompleteness" of the previous mask. Moreover this option allows you to readjust certain parameters if necessary in the second spot (in this case Lightness & Chrominance) to give a more homogeneous result.
  • Use the mask of another open tool (if of course the tool is equipped with a mask). In this case you keep the same references (luma, chroma, hue) to create the masks and to take into account the deltaE (Scope).

DeltaE considerations:

  • You can disable the core function of Local Adjustments i.e. the Scope function, which takes into account deltaE, if you want to work entirely with masks and ignore Scope. In this case set Scope=100. You can see that the Scope function has been disabled and you will be able to use just the Blend function to combine the mask and the image.
  • When you use the Mask Tools sliders available in "Mask & modifications" (Contrast curve mask, chroma mask, gamma mask, etc.), you must remember that they are sensitive to the specific deltaE settings for the mask i.e. "deltaE Image mask" in the Mask & Merge panel in Settings.

2.22.5 Improved result with "Recovery based on luminance mask"

Normally we use masks in RawTherapee to:

  • Improve detection (without blend).
  • Improve detection and add or subtract the mask to or from the image (with blend).

In this example we will use the light and dark areas of the mask to select the parts of the image that will be modified by the Color & Light settings and then combine them with the unmodified image as follows:

  • The dark and black areas of the mask will remain as close as possible to the original image.
  • The very bright or white areas of the mask will also remain as close as possible to the original image.
  • The intermediate zone will correspond to the settings in the Color & Light tool.

The area between the dark and light areas can be adjusted with the "Recovery based on luminance mask" slider.


  • To ensure that the L*a*b* values of the Lockable Color Pickers correspond to the real values you need to set : Local Adjustments > Settings > Mask and Merge > "Background color/luma mask” = 0 (slider labeled as “Background color for luminance and color masks” in screenshot).

Image with Color & Light settings - without mask

File pp3; [18]

Color and Light Mask

Note the use of Blur Mask with "Contrast threshold" and Radius. This increases the gray value on the right-hand part of the salt mountain and reduces the effect of the Color & Light adjustments.

Mask Recovery of the original image characteristics
  • Make sure that the mask is enabled in "Mask and modifications" and that the "Enable mask" box is checked.
  • Open the "Recovery based on luminance mask" expander.
  • Set the "Recovery threshold": the closer the slider is to the value "2", the more the dark and very bright areas of the mask will be taken into account and brought back to the original image values.
  • Use the "Dark area luminance threshold" and "Light area luminance threshold" sliders to include or exclude parts of the image. The corresponding values are the two limits below and above which the effect of the mask will be progressively taken into account (in this case the dark-area threshold = 32.1 and the light-area threshold = 85).
  • If necessary, use “Decay strength" to adjust the rate of the decay.
  • Try disabling the mask in "Mask and modifications" ("Enable mask" box unchecked) to see the effect.
  • With the mask enabled ("Enable mask" box checked) try to reset the "Recovery threshold" slider to 1 in "Mask and modifications".
  • Try varying other mask settings as well as the four "recovery"settings.

2.23 Blending a mask with the original image

In this example, we want to increase the impression of perspective (relief) of the Pagodas.

2.23.1 Preparation

  • We could have used specific tools here to give a heightened impression of relief e.g. CBDL (Contrast by Detail Levels) or a Wavelet pyramid.
  • But for the purposes of this demonstration, we will use a mask with "blend".
  • The preparation is identical to previous examples with "Scope (color tools)" set to 40 (arbitrary), and Color & Light in "Advanced" mode.

Raw file (Creative Common Attribution-share Alike 4.0): [19]

2.23.2 Mask settings: what not to do

  • For the purpose of this demonstration we will use 2 features.
    • The LC(H) curve to select the colors.
    • A Blur Mask which combines a contrast threshold and a blur function.
  • Note the checkbox FFTW, which although it consumes resources, increases the quality of the results. Without FFTW the radius is limited to 100 whereas with FFTW it is increased to 1000.
The mask Results
  • Once again, activate "Enable mask".
  • Set the value of Blend to whatever you like.
  • Adjust the "Smooth radius" mask if necessary.
  • If you have enabled the non-mask settings of Color & light (lightness, contrast, etc.), the "Spot structure" slider will have an effect.
  • You can see that the image now has a dominant color. This is caused by using the Blend function with the LC(H) curve.
    • Switch the curve to Linear mode and you will see that the dominant color disappears.
    • To overcome this problem avoid combining several mask settings, irrespective of whether they use Blend or not.
    • If you need to combine these settings, it is advisable, as in the simple mask case above, to create either a second (or several) RT-spot(s) using the Duplicate function and setting one to Blend and the other without (or with different Blend values). You can also use another mask associated with another tool.

2.23.3 The right approach

As seen above, we need to take a two-step approach, for example by creating 2 spots.

  • The first one to take into account the LC(H) curve.
  • The second to act on the structure. Working on the structure

There are several mask-type tools (in Advanced mode) that allow you to modify the structure:

  • Blur Mask which includes a contrast threshold and a blur function.
  • Structure Mask which acts directly on the structure.
  • When using these two tools, make sure that the LC(H) curve has not been activated (i.e. no curve).
  • However if you wish to use the LC(H) curve, you can associate the L(L) curve with it.
  • The Blur Mask and Structure Mask tools can also be associated with each other.
  • "Local contrast” (by wavelet level) and "Wavelet level selection", can be associated with the L(L) mask curve and generate a local-contrast effect.


  • Activate “Enable mask”.
  • Set Blend to whatever value you like.
  • Adjust "Smooth radius" mask if necessary.

2.24 How to use the Common Color Mask and an example of how to blend 2 RT-spots

This mask does not work in exactly the same way the other Local Adjustments masks. It does not allow you to modify the behaviour of an existing tool like the mask in Color & light for example, but is a tool in its own right. You can use it to change the appearance of an image e.g. contrast, luminance, color, as well as its texture.

  • It consists of the 3 curves C(C), L(L), LC(H), (or in Advanced mode, 3 curves plus Structure Mask & Blur Mask), which will generate differences in the color or structure of the image when compared to the original image.
  • These "differences" are similar to the differences generated by the Lightness, or Chrominance functions in Color & Light.
  • The color differences between the mask image and the original image are taken into account by the deltaE (ΔE) and transition parameters.
  • Of course you can also use it in conjunction with other tools in the same RT-spot.
  • The simple example that follows allows you to understand how it works. It is based on the same ΔE principles as the other tools in Local Adjustments.

2.24.1 Preparation

Repeat the preliminary steps outlined in previous examples and add the tool to the RT-spot.

  • "Add tool to current spot" > Common Color Mask > Standard. For the purposes of the demonstration, do not open any other tools.
  • To create the mask, we will simplify the exercise as much as possible by using only 2 curves C(C) and L(L) to take into account the references of the RT-spot.
  • Note that the 2 sliders "Add/subtract luminance mask " and "Add/subtract chrominance mask" are not set to zero, so that the user is not confused by a lack of response from the system; the two values -10 are arbitrary and low.

Raw file (Creative Common Attribution-share Alike 4.0):[20]

2.24.2 Luminance Mask

The curve makes a small change to the luminance.

  • Note the position of the top of the curve on the gray transition. This means that the Luminance mask matches the reference value of the RT-spot.
Luminance mask

2.24.3 Chrominance Mask

  • Notice the position of the top of the curve on the gray transition. This means that the Chrominance mask matches the reference value of the RT-spot.
Chrominance mask

2.24.4 Preview ΔE

From here you can play with the deltaE (ΔE) between "Image + Mask" and Original Image.

  • Try increasing or decreasing the Scope (make sure you use the Common Color Mask slider and not the slider in the Settings module above).
  • Try adjusting the parameters in the Settings "Shape detection" panel: "Threshold ΔE-scope", "ΔE decay", "ab-L balance (ΔE)", "C-H balance (ΔE)".
Preview deltaE - ΔE

2.24.5 Show modifications

Go to "Show modifications with mask".

  • Adjust "Add/subtract luminance mask " and "Add/subtract chrominance mask " (these sliders could also have been called "opacity").
Show modifications

2.24.6 Result

You can:

  • Change the Scope (the Common Color Mask slider which acts on ΔE).
  • Activate the "Smooth radius" mask, which will try to reduce the artifacts caused by the fact that the mask has been generated by 3 different curves - C(C), L(L), LC(H).
  • Change the Chroma mask.
  • Adjust the "Contrast curve" mask.
  • Try "Scope (ΔE image mask)" in Settings: this slider acts on the mask and takes into account the deltaE of the mask compared to the center of the RT-spot. It is different from Scope (the first slider of the Common Color Mask), which acts on the difference between the original image and the mask you have created.

Switch to Advanced mode.

  • Adjust the Soft Radius slider which will reduce any artifacts arising from differences between the original image and the one obtained after "adding" the mask. The default value is 1 even in Standard mode and produces a small variation - even without the mask – which can be seen in "Show modifications".
  • Try the "Laplacian threshold" mask, and note the difference compared to the "Smooth radius" mask.
  • Try the Gamma and Slope masks.
  • Try to change the structure with one of the tools provided: Structure Mask, Blur Mask, "Local contrast” (by wavelet level) mask.
  • Try the Graduated Filter Mask.

Now we are going to enhance the Common Color Mask image with the "Merge file" tool in Color & Light.

2.24.7 Adding a new RT-spot Color & Light - Advanced mode

For demonstration (and not artistic) purposes, we will use 3 of the 21 possible blend modes.

  • Add a new RT-spot.
  • Add a Color & Light tool in Advanced mode.
  • Set the "Scope (color tools)" correctly (using Preview ΔE).
  • Choose 3 settings to increase the luminance, contrast and chrominance
Adding an RT-spot

2.24.8 Preparing the "merge"

  • Choose "Previous spot". We are now going to merge the new RT-spot (Color & Light) with the previous one (Common Color Mask).
Preparing the merge

2.24.9 First merge using Normal blend mode

  • Choose the Normal blend mode.
  • We arbitrarily choose 3 settings: “Merge background” = 54.2 (takes into account the deltaE between the 2 layers), Opacity = 54.2 (about 50% for each), Contrast Threshold = 12.5 (takes into account the differences between uniform and textured areas).
  • The two identical values of 54.2 are arbitrary and you can choose other values 43, 68, etc.
Merge with Normal blend mode

2.24.10 Second merge using "Soft Light (legacy)" blend mode

  • Change the blend mode and choose "Soft Light (legacy)".
Merge using Soft Light (legacy)

2.24.11 Third merge using Color Burn blend mode

  • Change the blend mode and choose Color Burn (the choice is completely arbitrary).
  • Note the differences in luminance and chrominance.
Merge using "Color Burn" blend mode

2.24.12 Additional information

Of course, you can create as many Common Color Masks as you want. Simply duplicate the mask and place it close to the previous one and use similar settings.

Some important points about the mask curves C(C), L(L), LC(H).

  • These curves are used to create the mask.
  • For each of the curves, the vertical dark-gray/light-gray separation line represents the 3 references of the RT-spot: luminance, chroma and hue.
  • For the first curve shown below (with the highest point of the curve on the selection – L in this case), the deltaE selection is improved.
  • For the second curve shown below, the hue used by the mask corresponds to the hue reference of the RT-spot (the peak of the curve is on the selection – H in this case). Pulling the curve downwards will progressively mask (or reduce the impact) of whatever adjustment has been applied to the selected hue (or L, or C depending on which of the curves you are using).
  • For the third curve shown below, the hue selection for the mask does not match the hue reference of the RT-spot. In this case, pulling the curve downwards will progressively mask whatever adjustment (luminance and chrominance) has been applied to that particular color.

Note that the effect of the combined LC (H) curve can be visualised by referring to the spatial representation of the Lch coordinates i.e. as you move up and down the vertical L axis, there will be a corresponding increase or decrease in the chroma values.

Mask selection
  • For this demonstration we used an image with two dominant colors: magenta (flower) and green (foliage). Images that have more varied color, luminance and chrominance (e.g. sky, sea, mountains, houses, fields, flowers, portraits etc.) would require more elaborate masks.
  • We stay with the "philosophy" of Local Adjustments, by only relying on the references of the RT-spot. We could of course have used just the curves outlined above but this would have given a completely different result.
  • Similarly, for the merge we chose the same color range as for the mask. We could have made another choice for the second RT-spot, by positioning it on the foliage but the result of the merge would have been different, with less variation in the flowers.

2.25 Correcting an underexposed portrait and improving grainy skin (Mairi)

The portrait of Mairi gives us the opportunity to use several local-adjustment tools. We are going to:

  • Increase the Exposure of the image to make it lighter.
  • Use CBDL to soften the skin and Clarity to lighten the face.
  • Make a Graduated Filter to open up the shadows of the face on the right-hand side of the image.
  • Use 3 Excluding spots to "exclude" the eyes and lips from the adjustments.
  • Use an LC(H) mask to "exclude" the hair from the softening adjustments (to avoid losing definition).
  • Compare the result "before" and "after".
  • Remark: the settings have been given as an indication and are a matter of individual taste.

Raw file (Copyright Pat David - Creative Common Attribution-share Alike 4.0): [21]

2.25.1 Increasing exposure

  • Exposure + 0.5
  • Note: we could have used an RT-spot to limit the exposure increase to a particular area instead of applying an overall increase in exposure.
Exposure increase

2.25.2 Using CBDL

  • Create an RT-spot with a large "Spot size" = 47
  • Make a gradual contrast reduction for levels 0 to 4
  • Set Clarity to 60
  • Set Scope to 40

2.25.3 Graduated Filter

  • Create another Color & Light RT-spot.
  • Graduated Filter settings: Luminance = -0.6; “Gradient angle” = 71.5
  • You can also play with the chrominance settings (Advanced mode).
Graduated Filter

2.25.4 Excluding the eyes and lips

  • Create 3 Excluding RT-spots on the eyes and lips.
  • Adjust the Scope (excluding) to obtain the desired result.

2.25.5 Hair exclusion mask

  • Go back to the first RT-spot.
  • Go to "Mask and modifications".
  • Select "Show mask".
  • Open the LC(H) curve.
  • Identify the color of the skin (the boundary between the light and dark gray areas on the graph).
  • Lower the curve as shown in the graph (or similar).
  • Adjust the "Smooth radius" mask.
  • Adjust the Gamma, Slope, Contrast-curve masks if necessary.

2.25.6 Result

  • Set the mask to "Show image with modifications".
  • Check the "Enable mask" checkbox.

2.25.7 Before and After Comparison

Before & After

2.25.8 An alternative - replace CBDL with Wavelets “Contrast by level".

  • The Wavelets module is more powerful than CBDL (Contrast By Detail Levels) and may seem more complex given the number of options.
  • However, it allows you to target the CBDL effect by using the "Attenuation Response" (Damper) and Offset sliders. This means that instead of applying the changes linearly to the wavelet decomposition signal, they will be adjusted depending on the actual value of the signal to avoid amplifying defects such as noise.
  • The wavelet option also has a Clarity function.
Wavelet contrast by level and Clarity

2.25.9 Using a mask with wavelets (yes it is possible!)

Wavelet mask