[Solved] darktable clipping indicator and sharpening methods

I noticed something today that seemed a little incongruous to me. Here’s the basic scenario:

  1. Set workflow defaults to scene-referred (sigmoid).
  2. Open a raw file.
  3. Toggle on the clipping indicator (I’m using red for highlights and blue for shadows). Results are described after the end of this procedure.
  4. Zoom in on the image to at least 100% and look at the clipping indicator on the display.
  5. Click on the history stack item before Sigmoid to see what the clipping indicator showed before Sigmoid did its work.
  6. Click on Sigmoid in the history stack again.
  7. Add a preset from Diffuse or Sharpen that does sharpening (sharpness strong gives dramatic results).
  8. Zoom out to “fit”.

Results:

  • After step 4, there are a few single pixel red (over-exposed) spots in the darkest shadows.
  • After step 5, the spots seen after step 4 are gone, and the actually clipped areas show up in red, the latter showing that Sigmoid did its job.
  • After step 6, we are in the same place as after step 4.
  • After step 7, there is a large number of red indicators in the shadows.
  • Upon zooming out to fit (step 8), the red indicators in the shadows are sometimes briefly visible, then they disappear.

Other observations:

  • Zooming way in to 1600% shows that the red indicators are not even on particularly bright pixels.
  • There was nothing weird about the final image.
  • I got similar but not identical results using Filmic instead of Sigmoid.

I recreated this on dt 5.0.0 on Ubuntu 24.04 LTS and on 4.6.2 on Win 11. The images I used were from a Fujifilm X-T20.

If anyone wants to play with one of my test images for this, I can upload one. Failing that, I’ll skip that step and save about 32 MB on the server.

I’d be interested to know whether this is a defect, or a known limitation, or simply working as designed. As I said above, I don’t see any big issues with the output images.

What preview mode are you using… default or HQR??

Maybe share that or a comparable image… I just tried a pretty high dynamic range playraw image of the snow and skier and I couldn’t get that to happen…

If you’re talking about high quality resampling in the Export module, I have that turned on. However, I never went to export the test images.

Here’s a raw file I used to document the situation, licensed CC0.
20240713-152347-1122-_DSF2165.raf (30.6 MB)

1 Like

No I mean for the preview…it’s a new mode added that doesn’t use a scaled preview… Also what have you set the clipping to show…just brightness or gamut

clipping:
image

I found and turned on high quality processing. That really slows things down! With that on, I get to see the residual red for a longer period of time before it disappears, after returning the zoom to “fit”.

When you use “full gamut”, it’s not only luminance that plays a role, it also takes into consideration hue and chroma. It’s easy enough to get out of gamut in deep shadows. As those are near black anyway, I’m not sure that would even be visible in any final image.

3 Likes

Confirmed that I get the red indicator for full gamut and saturation only, but not for any RGB channel or luminance only. And yes, there really isn’t much to see in the deep shadows. So it’s my user error as I suspected.

Any idea why the clipping indicator disappears when zoom is changed to small/fit/fill?

1 Like

It’s due to scaling I think…some raw files are 6 or 8 k pixels on the long edge and viewed on an hd screen so there is considerable scaling going on…you can often see it in the focus peaking indicators… they can come and go as you zoom scroll…

THere is s blown patch of snow in that recent playraw of the man taking his picture out on the ski slopes…if you zoom you can see the indicators change and when you zoom to 200 and then scroll down to I think it goes to 187 then a few increments until it gets to 100… in any case the indicators disappear all together and then come back…

I think its the same sort of thing with the clipping indicators… that would be my thought anyway…

When I open your image in the default sigmoid scene referred workflow…and add just the strong sharpen diffuse or sharpen module you can see what it says in the manual that it is likely only accurate at 100% or perhaps the multiples…

Here it is with that combination…sigmoid on


Nothing showing

Sigmoid off DSD off

DS turned on…

All images above at 200% zoom…now do one scroll click down which for my monitor is 182%
Indicators are gone… or much less obvious for the small change in zoom…

And then at 103% so just before we hit 100

THen at 100 more of them appear…

So the scaling math impacts what you see… this is what happens in the focus peaking indicators…

Dropping on click below 100 to 91% and then much less is marked…

I am marking in purple for highlights and green for black and disabling DS or enabling sigmoid corrects all those dark pixels created by the DS module…

So likely why this is included in the manual…

https://docs.darktable.org/usermanual/4.8/en/module-reference/processing-modules/diffuse/#notes-and-warnings

Seems like some other considerations are noted that will interact with this module as well…

https://docs.darktable.org/usermanual/4.8/en/module-reference/processing-modules/diffuse/#general-advice

1 Like

Marking this solved. Thanks for a lot of good info @priort and @rvietor !

1 Like