Unlock more dynamic range in darktable?

In a discussion yesterday, @priort posted a link https://www.fastrawviewer.com/blog/how-to-use-the-full-dynamic-range-of-your-camera. I decided to try it and see what I discovered. I had a color target and used that and shot in tungsten light with auto white balance, so please excuse the ugly yellow cast. I metered on the 18% gray and then shot 0, +1EV, +2EV, and +3EV. I loaded the raws in RawDigger and checked to see what was over exposed (sensor clipped). 0 and +1 were fine, +2 and +3 were over exposed. So I concentrated on +1 to +2 to find the “sweet spot”. Comments about the images are below the images.

This is +1.3 EV in RawDigger. The white patch, lower left is over exposed.

This +1.7 EV. The white patch is joined by the light yellow patch.

So then I took the images to darktable to check what ii considered over exposed.

This is +1 EV, with the over exposure indicator set to 1.0. The red splotched patches are what darktable thinks are over exposed and have clipped sensor information.

This is +1.7 EV. Compare this to the same image RawDigger.

If we assume (yes, I know) that RawDigger is correct and darktable is cautious then I should be able to adjust the level that darktable thinks clipping is occurring and use the information that is there. So…

+1.3EV adjusted to agree with RawDigger

+1.7 adjusted to agree with RawDigger. I actually used the +1.7 to make the adjustment and verified that the +1.3 agreed.

If we now go and white balance the image it looks like this…

Why is this? We haven’t told darktable to use the additional information. The highlight reconstruction is still clipping everything at 1.0, but we have the over exposure indicator adjusted to 1.8. So, if we adjust the highlight reconstruction to not clip until 1.8…

The colors look like they should :smiley:

I did look at the rawoverexposed iop and found this comment

// the clipping is detected as >1.0 after white level normalization

  /*
   * yes, technically, sensor clipping needs to be detected not accounting
   * for white balance.
   *
   * but we are not after technical sensor clipping.
   *
   * pick some image that is overexposed, disable highlight clipping, apply
   * negative exposure compensation. you'll see magenta highlight.
   * if comment-out that ^ wb division, the module would not mark that
   * area with magenta highlights as clipped, because technically
   * the channels are not clipped, even though the colour is wrong.
   *
   * but we do want to see those magenta highlights marked...
   */

IIRC in display referred processing values greater than 1.0 were bad. However now we are in scene referred processing where values greater than 1.0 are usable and get bounded back in when the image is displayed.

5 Likes

Very interesting I will certainly follow this……Wouldn’t you have to do the last part with filmic off and the 0.5 ev boost???