Scene-referred and L*aburves are aded

So, I guess that the tone equalizer is not the module best suited for holding onto a and b when different tone curves are used?

As explained in the parallel thread, if you want to change L while keeping a and b, you’ll have to use a module that works in Lab. Afaik, none of the “scene-referred” modules work in Lab. Otoh, many of the “scene-referred” modules have been designed to minimise unwanted hue and chroma changes.

You may want to read up on the introduction of filmic to see why Lab was dropped. In short: Lab isn’t designed for the dynamic ranges of modern cameras, and using it outside its domain of validity causes issues/artifacts.

(Lab is designed to describe the colour of diffuse surfaces under a standard light source, where you cannot get L values outside the range 0…1, or 0%…100%).

I’m not sure why this thread was added to my original post “Scene-referred and L*ab”. Anyway. .

My interest in maintaining color is related to my in home hobby photography. Prior to making these shots I calibrated a Sekonic chart and then made a style inside of darktable.

These are not anywhere near high dynamic range. They have a specific red color within them which I was hoping to maintain when I raised the level of brightness (lightness) in the photo. I tried using the tone curve in “L” only instead of the tone equalizer and that worked very well.

My question is whether or not this approach is wrong and should be done in a different way when working within a scene-referred workflow specific to these kinds of shots?

Lab and scene-referred are not compatible.

But if your images are low dynamic range, I’m not sure a scene-referred workflow is necessary. There are some advantages when you use blurs (as in masks!), but we worked for years in display-referred with good results…

And, there is no “right” or “wrong” way to use the tools in darktable, although some ways will give better results than others. E.g. some use brilliance sliders to brighten their image. Nothing wrong with that, untill the highlights go nova and you want to use highlight correction in filmic…

How about this idea? I could setup a display-referred workflow preset to handle the low dynamic range hobby photos. That way I could maintain accurate colors via L*ab for the hobby shots. I could switch back to the scene-referred preset when working on all of my other photos which have more dynamic range.

Overcomplicating it in my opinion…just use it with the knowledge that if you have HDR it may have consequences, however if you move it after the tone mapper ie filmic or sigmoid…if it is not already there in the pipeline I really don’t see how there is a massive issue…

1 Like

Todd, the tone curve tweak is very small so I would have to agree with you. It is after sigmoid/filmic just below local contrast in scene-referred.

I would only need to use the tone curve for these low dynamic range hobby shots where I would want to maintain color accuracy.

I thought it was. I didn’t have access to DT so I was going from memory. And as well you are not looking to introduce a curve or contrast likely if its just to brighten the image via the L channel…

The manual does a decent job of putting the tone curve in context…

“Some modules (levels , rgb levels , tone curve , rgb curve ) are inherently incompatible with a scene-referred workflow, because their graphical interface implicitly suggests RGB values that are bounded within the 0-100% range. While the pixel operations they perform can be used in either scene-referred or display-referred workflows because they are unbounded internally, their controlling interface does not allow pixels to be selected outside of the 0-100% range.”

In fact I think now DT really only has a full display referred pipeline if you use the legacy order. The updated pipeline moved the basecurve to the same place as sigmoid and filmic so those early operations are not done in non-linear space as they were in legacy… you would still have the 0-100% issue once to get to the basecurve module but if the image is low to normal DNR or you use exposure to manage the data it see’s then I see the display pipe in DT now as a sort of hybrid pipeline that is not truly 100% display referred

Did you observe a colour shift when you used tone EQ / exposure? See here – linear exposure changes alter Lab readings, even though they increase the channel values proportionally: Scene-referred and L*ab - #10 by kofa

@kofa Yes, both display a color shift. So far I see a very slight color shift when using the tone curve in independent channel an using “L”. Much less than when using exposure or EQ.

If you take a photo of the same object, with 3 EV difference (making sure you don’t overexpose the shot), do you see the same ‘a’ and ‘b’ values (does only ‘L’) change (with no curves of any kind, just white balancing and demosaicing)? Do you observe a colour change with your eyes?

@kofa I would have to setup the shot and get back to you.

I’ve done it. ‘a’ and ‘b’ change. All shots: ISO 125, f/2.8, only time is varied; shots were taken in rapid successon, between 16:28:50 and 16:30:14; outside is heavy rain, the table was lit by a mixture of the outside light and some household LED lamp. I turned off color calibration, set one of the shots to white balance: as shot, and copied those settings over to the other images. No filmic or other curve, no color balance rgb.
1/50s:


1/25s:

1/6s:

1/5s:

1/3.2s:

No, I don’t observe a color change with my eyes as exposure is increased. Does this suggest that should just increase exposure values on the hobby shots if I want to brighten them instead of bothering with the tone cure?

So let’s try to brighten the 1/6 s shot to the same average ‘L’ value as that of the 1/3.2s shot, using a Lab curve:

1/3.2 s:


1/6 s, with a Lab curve:

I got the Lab L value quite close, but the ‘a’ and ‘b’ changed. But…

1/6 s, with the Lab curve off:

Notice that the ‘a’ value changed a bit (off: 1.63 → on: 1.65), and the ‘b’ changed a bit more (off: 1.50 → on: 1.71).

Using the exposure module to apply +1EV (1.007, to get the same L reading as the 1/3.2 s shot):


The ‘a’ value matches that of the brighter shot almost exactly, the ‘b’ does not.

I think you should trust your eyes and use the tool that works best for you. :slight_smile:
Tone EQ is also a masked exposure adjustment (linear RGB channel multiplication), as far as I know.

3 Likes

I’m sure that what @rvietor says is true. That “Lab and scene-referred are not compatible”. However, for now, I’m finding that the best tool so far for lightening the hobby shots while maintaining color is the tone curve. I’m using “L” independent.

I would happy to see if there was a better solution than the tone curve. The goal would be to lighten and add a little contrast with as little change in color as possible within a scene-referred.

Speedwell-PS_0826.NEF (14.6 MB)

Speedwell-0826.NEF.xmp (7.8 KB)

As usual internet compression has darkened the photo considerably.

You are adding some contrast and compression when you do a curve…pure lightening would be closer to the way @kofa showed…just dragging 100% across the top of graph but I think its your eyes you have to please not the pipeline gods… :slight_smile:

Todd, you are correct, I just tried it.

1 Like