Some news about RawTherapee’s Local Adjustments and recent Rawpedia updates

Hi all

In the continuation of the example with “Eagle” above, I propose you a tutorial on Rawpedia for “Denoise”

I used an image with Andy’s permission. @Andy_Astbury1 - “The harvest mouse”

But important:
This document is for educational purposes and the settings are designed to clearly demonstrate the different steps rather than to produce a beautiful image.

This tutorial has been realized with the collaboration of Wayne @Wayne_Sutton

Here the link



Could the LA Excluding Spot be made more flexible by allowing the handles to be re-positioned or perhaps the ability to add new handles. It would make it much easier to isolate odd shapes, I think.


I would be very happy if a GUI specialist could do that.

This is part of the things to do, in addition to ellipses and rectangles, having the possibility to make polygons or curves on demand. This is essentially a GUI problem (there is also to make the associated LUTs and modify the code of

You’re not the first to make this request…but personally I don’t know how to do it.



@stuntflyer Have you tried improving the selectivity of the spot by playing around with the Scope, Transition Gradient and Shape Detection tools? I find that RT Spots are already a vast improvement on the Nik Collection, which only had variable-diameter circles for the spots and no way of adjusting the scope or selectivity inside them. However, I agree that there are always some cases where being able to create a polygon would be useful.


I have and those tools are quite useful. Hopefully the future will bring further refinement in the form of more advanced shape manipulation.


Hi all
We add (Ingo and me) a new tool to “local adjustements” “denoise”…
It’s name “Non-local means”

Commit “dev” - 6ad419f - 5 February 2021

Local adjustments – Denoise – improvments with Non-local means

What is « Non Local Means » ?

Here Wikipedia definition : Non-local means is an algorithm in image processing for image denoising Unlike “local mean” filters, which take the mean value of a group of pixels surrounding a target pixel to smooth the image, non-local means filtering takes a mean of all pixels in the image, weighted by how similar these pixels are to the target pixel. This results in much greater post-filtering clarity, and less loss of detail in the image compared with local mean algorithms

In french this algorithm is named « Débruitage par morceaux » ou « Débruitage par patch » which seems to me more explicit.

Where it can be found ?

it seems that this alogorithm is used by DxO

The algorithm used here is close to the one implemented by IPOL in 2014

The work of Alberto and Ingo

I had thought of implementing this algorithm, but Alberto @agriggio was faster and made very good improvements with the help of Ingo @heckflosse . Thank you to them for this excellent work

These improvements can be achieved by :

  • used of OMP and SSE
  • used of Tiles
  • used Laplacian and mask to better improve edge detection and thus differentiate the action between solids and textures.
  • limit the use to luminance noise, because indeed the examination of other software shows that chromatic noise is often better processed by other algorithms (Wavelets, GuidedFilter…)

My choices

I made the choice to implement it in « LA », but it is possible to do it for the other denoise modules of Rawtherapee (Noise reduction, Wavelet levels)

What are the differences with the ART version ? For the code itself few deviations.

I used Lab instead of Yuv, because the base data are in L (Lab)…for this I applied a transformation to make Lab “variable”, by default I applied a gamma=3.0 and at the end inverse-gamma=0.3333, but, with the help of Ingo, you can vary the gamma and thus change the distribution of denoise according to solids and textures. . For recall Lab consists of a system with gamma=3.0 and slope=9.03

In «standard and advanced mode » I use “gamma” as above and I enable the 2 hiden variables in ART « max_patch_radius » and « max_search_radius » (advanced) which allows to better adapt the algo to the details of the image, but which resulted in an increase in the processing time for the 2nd.

And of course everything that will allow you to work with a spot…(the Laplacian has already been used for other applications).
To note that for “Non-local means” the minimum RT-spot size is 150*150 pixels which nevertheless is very small

How is it implanted here ?

I choose to be able to be used in conjunction with ‘Luminance denoise by level’ or on its own.

I also chose to be able to use all the particularities of LA : Scope (deltaE), Transitions, Excluding Spot, Mask and ‘Recovery based on luminance mask’, and of course for one or several RT-Spot or working in « Full image »

The GUI has been modified as a consequence, in particular by changing the selection combobox. It now offers 4 choices :

  • off
  • conservative
  • aggressive
  • Non-local means only

This modification could lead to difficulties with some pp3 - in this case it is better to clean the cache

« Non local means » is enable when slider « strength » is > 0.

Labels and tooltips have been improved with the participation of Wayne Sutton @Wayne_Sutton , thanks to him.

What memory usage and processing time ?

For memory, whatever the settings, the consumption is low, thanks again to Alberto and Ingo.

For processing time, here some comparisons (output TIF)

Image 4312 * 2860 (wavelet - conservative)

Full image : wavelet 3000ms – Nlmeans 3000ms

Spot 1200*800 wavelet 260ms – Nlmeans 220ms

Spot 150*150 wavelet 100ms – Nlmeans 20ms

Image 6000*4000 (wavelet - conservative)

Full image : wavelet 12000ms – Nlmeans 6000ms

What results ?

Like all noise treatments, the result is quite subjective and depends on individual taste. But personally I find the results very good, especially in conjunction with wavelet and DCT.

In the same manner Rawpedia is update



Hi all
I announce that following the request of many users, the code of “Local Adjustments” (LA) has been moved from “after RGB process” to “before RGB process”. This means that all RGB process algorithms (channel mixer, tone curve, highlight, shadows, RGB and HSV curves, Color toning, Film simulation, black and white,…) are executed after “LA” and therefore have no influence on “LA”.

The impact on the current usage is small, otherwise a slight slowdown in the execution of the zooms in preview mode.

Commit dev 7 february 2021 - d369efb



This is quite a big change in operation, so let me just add the following. There are probably just as many pros and cons for this change and not everybody may like it. You are now required to make your local adjustments before some of the commonly used global tools and you cannot make local adjustments afterwards.


It is true. But nothing forbids to retouch “LA” after the other treatments. This is true for all RT treatments and processes as well as for all software in the world…


But Jacques, because of the dE spot behavior, doing a local adjustment afterwards is actually very different now. Because what you see is not what you get because of the order of the pipeline.

No differences at all :slight_smile:
But it’s obvious…everything that is done before is not altered by the treatments afterwards.
Except if you change the settings

But I repeat as all treatments


@jdc I’m not understanding why you say no differences at all, sorry. People should be very aware of where LA is placed in the pipeline to have a meaningful editing experience. The effect of the LA tools are relative to the chosen spot. When you cannot see on which color/tone you put the spot, you have no reasonable reference to what you’re editing.

If somebody currently has a workflow where they like to play with curves and color toning and only then decide they want to make a local adjustment, they run into this unpredictable behavior. The color under the LA spot they place is not the color that the LA tools uses as input, because it has been changed afterwards. I think people need to be aware of this.

The deltaE “upstream” now allows to maintain the “settings” (contrast, saturation, …) on the selected area. Fortunately it is kept. That’s the goal.
That the final colors / contrasts / etc. are changed by the downstream treatments… it’s obvious, but it’s that the user wants it…For example black and white…But now BW does not suppress deltaE…

But, the settings made “upstream” remain… This is the goal, the purpose of having moved this treatment.
For me, everything works properly


Okay, I’m confused. Does this mean that all of my usual Exposure, Highlights and Shadows, Tone Curve and Lab Adjustments are now supposed to be done after LA are completed?


Yes, but this was already the case for the “Lab adjustments”.

But No, you can used “exposure, Highlight, shadows…”, etc…independently of LA…
When you change these process, no incidence on LA…
it is the same for any process upstream of "exposure, highlight…) (demosaicing, white balance, etc.). You are not “obliged” to change these processes to retouch “exposure”.

But with the Rawtherapee pipeline, it’s a choice, either before RGB process or after…As there were a lot of requests for before, which I think is globally preferable :slight_smile:


Yes, this was the choice that was made recently. Please see for some background discussion.

@stuntflyer I think everyone is at cross-purposes here. From a user point of view you can make local and global adjustments when you like as per your normal workflow. The only thing that changes is where the Local Adjustments occur internally in the processing pipeline.

That’s the point. You have to know at which point in the pipeline local adjustments are applied, because that can have a massive impact on what you think your local adjustment spot (which is a central concept of local adjustments in RT) picks up…


If I understand correctly global adjustments could change the masks before which isn’t the case any more. I like it.

1 Like

It would be helpful to see a photo retouch video with voice which incorporates LA and global adjustments using the Desmis’s changes. Is that possible?