Local Lab build


Playing around with local lab I noticed it would be nice if one could copy the settings of one control point to another.
An example:
If I try to select the blie of the sky and it has a gradient I cannot select all with one control point, I will need two or three. But I’d like to do the same processing to all three, so it would be nice if I could copy the setting of one to the others.

Just an idea…

(Desmis) #402

I think you should wait a long time :slight_smile:



As I said it was jsut an idea…
btw…has anything been decided wether and how Local Lab will be included into the main branch?

(Morgan Hardwood) #404


(Alberto) #405

Indoor i often use a speedlight on camera and following my subject sometimes i take pictures with the camera near a wall., the result is something like this (subject cropped):
The subject is underexposed and the wall is burnt but it’s easy to recover subject and wall with the graduated filter function:
I’ve tried to do this with the locallab, because there is only one graduated filter tool but many locallab, but i can’t get good results.
The wall has a bluish circle and is still burnt at the edge:.
Do i make something wrong? Is there a problem? Hints?

(Desmis) #406

Difficult to make a diagnosis with so little informations

Is the spot “exposure” the only one, or are there other settings ?

At a minimum can provide you the file (raw …) and the pp3

Can it be enough to increase “scope” ?


(Alberto) #407

with scope = 100 a yellow circle inside the blue one appears. :smiley:
I can’t provide this raw file but i will make a test image.
Theese are the two rw2, the first use graduated filter and vignetting, the second one only locallab.
P2030356.RW2.pp3 (13.6 KB)
P2030356LocalLab.RW2.pp3 (13.6 KB)



These are two pp3’s, did you also have raws?

(Desmis) #409

I just push a change with “Spot duplicated”

  1. before “duplicate” you must increase “Control spot +1”
  2. then: click on “Duplicated current spot”
  3. a new spot with the same datas is open at x=200 y=200, of course you can (must) move it
  4. if there was datas in in the “spot duplicated” they are crushed !

I think it works, but perhaps not good with curves.

To test and verify :slight_smile:


I have noted some odd behaviour:

Here is the image from the playraw, everything set to neutral, only exposure +4:

Same image, everything set to neutral. Added one rectangular control point, made it huge (see screenshot at bottom of the thread) with a scope of 100. Set the exposure to +200. And I get this results:

  1. The value 200 seems to be quite arbitrary and not comparable with the eV scale of the normal exposure.
  2. and more surprisingly, the exposure is raised quite inhomogeneously. Bright parts got much brighter and not much happened to the dark parts. To my understanding a scope of 100 shoulg just select anything within the rectangle. But even if it would select tones in the spot more than outside, then the altar should have been brightened.
  3. There seems to be quite a strong desatiration going on.

Any ideas?
Is this a bug or did I set something wrong?

Screenshot of the spot:

(Desmis) #411


First, thank you for testing Locallab :slight_smile:

When you sent me a message for this image, I wanted to check and I found many bugs or malfunctions:

  • some were due to the many updates (merge), for example “vibrance” was no longer working by entering an endless loop;
  • others, and I do not know why, have made the curves no longer react in the same way - for example, the “exposure curve”, but also the “vibrance curve” or the f(H) or H(H) curves.
  • the third concerns the calculation of references (hue, chroma, luma…) for “exclude spots”.
    ** the method used until then, works correctly if the deviations of settings are not too important.
    ** In the present case, the adjustments provided by “exposure” or the curve, are very important and disrupt the values of the references. I changed the way of calculating


The last commit take into account all theses changes

(Alberto) #412

This is the test image. I used a warm light in the room and a speedlight light on the right. There isn’t any subject, it’s meant to play with the tools.

In the first png the room light is underexposed, in the second one the two lights are leveled using the gradient tool to recover some shadows, the third image is an attempt to do the same thing using locallab tools, as you can see a “gray cloud” appears on the right even if the highlights are not clipped. I have tried to change “global quality”,“scope”,“shape” but i can’t reproduce the gradient filter with locallab tools.

P2030652.RW2.pp3 (13.5 KB)
P2030652.RW2 (22.2 MB)

(Desmis) #413


First of all thank you for trying “locallab” :slight_smile:

First of all, admit that this case is particularly delicate, a mix of light sources, huge overexposure after +1 in "exposure"
Actually we see artefacts appear in the boundary intermediate area between the area with L = 100 and the colored area where L is less than 100.

I looked in the code of “locallab exposure” (curves, algorithm, …) and I did not find. This does not prove that there are no errors.

I tested “graduated filter” and it works well…

So why these differences in behavior ?

Graduated filter is before “Lab conversion”, and work in RGB mode, but before “exposure” (as white balance, fattal, Retinex…)
Locallab, works in “Lab” and after rgb mode, after “exposure”

This explain the differences of behavior. With “locallab exposure” it is quasi impossible to retrieve goods datas, because all is superior at L=100, all is burned.

I think, I am not sure, because Color management is a complex thing, that these artifacts are due to “out of gamut” for some colors (beyond Prophoto), when reducing Luminance, and this artifacts cannot be retrieve by “avoid color shift” - because this appears after creating artifacts and are not due to Locallab algo.

Consequently, for this image I tried 2 things :

  1. with the branch “autowblocal”, and “Local WB”, I change the temperture, of the overexposed area (the one you use a flash), then I exported a TIF, then I open the TIF and apply “locallab” correction, no artifacts

  2. without “autowblocal”, I change the settings of General White Balance - actually 5300K -, for example increase “temperature” about 5900K (you can also change “tint” or “equalizer”), artifacts disappears.

I do not say that there is nothing to do, but:
a) check with others developpers, during future work on “locallab” that I did not make coding errors
b) if these cases arise (they must be rare), it will be necessary to combine the actions (White Balance, WB local, locallab), or create a module in RGB mode (as for WB local, multi graduated filter, etc.)


(Alberto) #414

I don’t know RT code and i m’not a colour-space expert but I’m wondering why you can’t handle L>100.
You can’t render an L>100 of course, but this is the last phase. All the math before the render (when you save the image on disk or send it to the monitor) should work with these “out of the range” colours, the cut has to be at the end of the pipeline (or i’m missing something very important).

Multi graduated filter and multi vignetting are welcome!
Thanks for your work , i like RT.

(Desmis) #415

I think I am not clear enough :slight_smile:
At this place in the process, you cannot retrieve some datas, it is impossible.
Yes we can work above L=100, but datas that are lost, are lost, if not to be diviner, where to imagine a process of reconstruction in Lab mode

I have never said “Locallab” it the “solution”, as Lab adjustement is also limited, as Ciecam, as… It works in a majority of “normal” cases. :slight_smile:

(Desmis) #416

When you change settings and you put datas out of range, even prophoto, these datas are out of range…

Here a “cut” of prophoto for L=88

On your Image, we are in red-yellow.

And the final conversion, cannot retrieve, datas that are out of…


(Alberto) #417

ok, I surely don’t know a couple of things …
I have thought that if i have a point(80-0,5-0,5) and the first stage doubles it to (160-0,5-0,5) I get an invalid point but if the second stage subtract 70 the result is (90-0,5-0,5) and it’s valid again.

(Desmis) #418

I just push a commit with changes to algorithm exposure (change settings from 32678 tà 65535) and curves. I think the result in most cases is best :slight_smile:


(Desmis) #419

There was a bug in the previous “commit”, now I hope it’s resolved (5dded22):kissing_heart:

(Alberto) #420

RT Locallab 914: The residual image section in wavelet levels doesn’t work. Contrast slider does something but shadows and highlights sliders don’t. RT Locallab 893 is ok.