Base curve interference with (clipped) highlights?


(Roel) #1

Here I am again, posting about something related to highlight recovery. This time, something in combination with adjusting the base curve, and some behavior I don’t quite understand. (possibly somehow related to this: Highlight recovery artifacts)

Take this _DSC2906.NEF (26.3 MB) and _DSC2906.NEF.xmp (6.6 KB). Can someone explain why, if I pull the output level of the base curve hard to the middle, I get this? Why do all normally exposed pixels turn white (as I would expect), but the pixels that were initially already overexposed and then clipped turn yellow/purple? I would assume they also should turn white.

Edit: actually, something really interesting I just found. If you slightly lower the clipping threshold from 1.000 to 0.950 virtually all purple/yellow disappears and things appear white. So I really think the highlight recovery module does something not quite right.


Darktable base curve
(Mica) #2

Is the highlight reconstruction also on? Try turning it off.


(Roel) #3

Yes, as can be seen in the xmp. Turning it off makes matters much worse actually. Sorry, on mobile now so I cannot post the resulting image.


(Roel) #4

This is the result when I switch off the highlight clipping:


(Mica) #5

How about other modules such as tone mapping?


(Roel) #6

I have uploaded the XMP I used, so that anyone may check if this is even reproducible. So as you can see, no, I do not use anything other than these options:
image
and this base curve:
image


(Mica) #7

Sorry, I haven’t been at a computer this weekend. I see artifacts like this when I have too many modules effecting a blown out highlight.


(Roel) #8

I now suspect this may have something to do with it:

image

You can draw the left-ended control point upwards and it will show a hard cut, but moving the right-ended control point downward doesn’t so something similar. The line keeps going. However, it does influence the image.

Compare for example this:


and this:

While the apparent curve is (virtually) identical, the output most certainly is not.


(Roman Lebedev) #9

Which method is selected in highlight reconstruction module?
It should be anything other than the reconstruct color, which is just broken.

Otherwise, the white level is likely simply wrong.
I’d simply create a preset for highlight reconstruction module with method = LCh + clipping threshold = 0.950


(Roel) #10

Only the default clipping mode here, no reconstruction. Adjusting the white balance does not resolve the issue, or just makes matters worse.

Doing what you suggest with LCh reconstruction and a slightly lower threshold doesn’t get rid of the artifacts. Only when I go to really low values for the threshold. If I use the clip highlights mode and a slightly lower threshold I do get rid of most artifacts. But that seems to defy the entire purpose of having a clipping mode when things don’t appear to get clipped - at least not in conjunction with a modified base curve.

Please, I would really appreciate if you would try to investigate a little further what is going on here. My NEF and XMP are provided in the original post, but I think I can safely claim this behavior is not specific to my camera.
I really suspect the base curve is actually the culprit here (as I tried to show in my last post).


(Roman Lebedev) #11

No way. It just happens to aggravate the issue to the point of being noticeable.


(Roel) #12

Maybe not, I have no clue about the inner workings of Darktable. :slight_smile:

So let’s assume the base curve works as it should. How would you explain the result in my previous post then? Am I doing something nonsensical there? I am misunderstanding some basic principle behind the base curve, like “don’t touch the upper right point”?