newlocallab masks

Hi, can someone explain me what the gray regions which change when I move around the spot mean?



These differences in grey regions display the position of the spot references (the small circle center of the spot)

There are 3 references which are useful for optimizing the deltaE

  • hueref (for hue - H)
  • chromaref (for chroma - C)
  • lumaref (for luminance - L)

For the 3 curves, I recommend (but you can do otherwise) putting the top of the curves on the limit of the transition between the 2 gray areas.
Thus the mask (the parts excluded or included) will be optimized

Note that the mask is not for me the main tool, it should only be used when the principle of selection is insufficient.

this selection for almost 4 years now is based on 2 principles :slight_smile:

  • difference with deltaE between the spot reference and each pixel
  • for “Color and light” and “exposure” a structure detection is used in complement (Sobel canny algorithm)

Of course you can “play” with deltaE (settings) and with transitions


1 Like

Thanks , Jacques I’ll study the matter more…

One question… when does newlocallab will be merged into dev ? :roll_eyes:


It is a good question :slight_smile:

Jacques, in light of this, perhaps it would be useful to exclude masks (with the exception of the 'preview deltaE function) from the ‘normal’ interface option?

Actually i wrote that and i think it’s true.
Thank you for your participation :slight_smile:

Originally, 4 years ago, I wanted “Locallab” similar (in general principles) to Nikon Upoints… (the same principle we found in DxO)
Note that I was only inspired by the principle, not having the code of Nik Software.

It is based on 3 basic principles :

  • deltaE betwen a reference (the Rt-spot center) ane each pixel
  • in some cases a Sobel-canny to detect Structure
  • a variable transition
    And many parameters in Settings to adjust these 3 principles

Certainly what I present here is very simplified, but it translates the real operation, with a principle (the same as Capture NX2). You point (U point) and the software does what you want.

But, because there is many but.
First, I think, 3 years ago, to be able to see the changes made:
So 2 additions:

  1. show modifications
  2. show structure
    To note, even if it looks like a mask it is not one, it is only an accentaution of the changes by changing background color and changed details.
    And in 90% cases these functionnalities are more than enough

Second, 2 years ago, we ask me to add “mask”
Indeed in some cases, where the natural deltaE is not sufficient to be discriminating, mask may be usefull.
I was inspired by the principle of the masks used in color-toning (by Alberto), but change the manner to do, incorporating the functioning into that of “Upoint”
It may seem odd, see complex, but the assembly of the 2 works very well.
You can just use one mask, or a series of masks taken from each module, or duplicate Rt-spot to used several mask…as much as you want.

These masks needs of course to be seen (its obvious, but needs GUI…)
These masks have several possibilities

  • mask LCH
  • structure mask
  • blur mask
  • using a specific deltaE
    Possibilities to merge add or substract to the current image
    And several tools : contrast curve, gamma, chroma, slope, shadows, highlight, Laplacian, Hue curve, local wavelet contrast, etc.
    These tools and possibilities are function of the level of compexity (normal…expert).
    In some cases thes mask can be used after “locallab” (Tone mapping, Retinex…)whereas normally it is before.

For me, maks, add complexity, of course, when you use “Upoint” + “Mask” you have more discriminating possibilities, but this only concerns at most 10% of cases.
Obviously complexity is something relative, see what i wrote here…

Now after this tune-up it’s almost impossible just to split the GUI in half…it is the same combobox which conditions the functioning of both, and “cut in two” will complexify the code and GUI.

So it’s up to the user to make the right choices

Thank you :wink:


1 Like

Thank you @jdc for explaining the rationale behind the implementation. I am only just becoming familiar with the locallab version but I am familiar with the Nik U points and the DxO PhotoLab implementation of U points. So far I find that the locallab implementation works extremely well and the only slightly confusing aspect for me was the menu option to preview the deltaE masking - you have to scroll down out of the Settings module to the Mask & Modifications module to toggle the ‘Preview Selection deltaE’ option. I can understand why it is where it is I guess, but ‘intuitively’ (if I may say so), I would have expected to find it in the Settings/ShapeDetection menu. However from your explanation above, I can see that this isn’t practical.

When work on GUI will be finished by @Pandagrapher, I will test a modification

I will add in setting a checkbutton “Force preview deltaE”
This button will shortcut GUI and Process to always show “Preview deltaE”.
If you change the combobox “Mask and mofications” with another choice than “none”, this setting will be ignored.

it complicates the GUI and the process but if a majority of users want it, why not !


I agree with @Wayne_Sutton, there should be a way to quickly view the delta E selection, so this change would be welcome.

Is the GUI work by @Pandagrapher what we are waiting for before it gets merged into the main branch? It seems a shame that all the hard work that @jdc has put in, isn’t available to more users.

1 Like

@jdc As I mentioned above, my initial suggestion was to simply omit the Masks & Modifcations module from the ‘Normal’ setting in the ‘Complexity Local Adjustments’ menu in the Preferences module and keep only the ability to preview the deltaE mask, preferably in the Settings module. If that is not possible then I’m not sure whether it is worth increasing the GUI complexity as you suggest, especially since the original idea was to try and simplify things a bit :slight_smile:


the easiest way, when it’s time, is to try the new feature…I have not writen one line of code (of course) :slight_smile:
But no problem !


1 Like

About the GUI. My main beef (except figuring out how to show what areas are selected) is that I haven’t found a way of moving only the center point of the spot. If you set up the extent with the ellipse or rectangle tool I frequently find I need to move the center point. It’s cumbersome to adjust all the edges when all you want to do is move the spot.

1 Like

@Wayne_Sutton Again I agree with you! The masks adds a lot of extra baggage to the menu which perhaps only advanced users will use. If it can be moved to ‘advanced user’ but still retain the ability to preview the selection quickly, in simple menu that would be ideal.

1 Like

It’s complex (for the GUI and the GUI code - not for algorithm) to do what you want !

But I think it’s easy to add a checkbutton in settings…

With this button, the use of “mask and modifications” will become of little use…If you don’t want to:

  • use mask
  • preview modifications - this feature is the “sum” of “preview deltaE” and “transition”
  • view structure
    so it will be enough not to use, in those cases

But we are not there @Pandagrapher is currently doing a very big job, thanks to him, to improve GUI with number of request :slight_smile:

1 Like

@jdc I appreciate that things that seem easy to ask for may not be easy or practical to do, especially when I have no idea of how it all works…

1 Like

But, why i want to keep access to the menu “Mask and modifications”

I take an example, of course after create a RT-spot…

Go to “local contrast & wavelet pyramid”
Go to “Pyramid2”
and enable “Contrast by level” and change the curve

Now, go to “mask and modifications”
first : try “preview selection deltaE”, you will see the area concerned, but not the real changes
Second: try “show modifications without mask”, you will see the “wavelet change” to image

Summary, there are several different headings in “mask and modifications”, each of which has its purpose, on the other hand some users find the masks easy to use, so why deprive them…

So, when it’s time, I would add this button, which will be activated for an RT-spot (if of course enable), and when the user use some heading in “mask and modifications”, the button will be disabled.

Excuse my very bad english