How to prevent further clipping when using flat-field?

How do I prevent additional clipping when applying the flat-field correction to an already somewhat overexposed photo?

Clip control works great when there is no clipping to begin with, but when there already is clipping, it will turn the clipped areas magenta. I would still like to prevent additional clipping from happening though. What is the best way to do this?

See here, http://rawpedia.rawtherapee.com/Raw_White_Points
It is a side-effect of flat-field that is not easily circumvented otherwise.

Thanks. I am not sure if I am using this correctly.

I am starting with a somewhat clipped photo, load the neutral profile, turn on HLR set to blend and load the camera profile. Then I load the flat field and the clipping gets worse.

Reducing the white point setting improves the clipping, but soon introduces a magenta color shift in some highlights.

Sample:
DNG:
IMG_20201102_161549.dng (96.1 MB)
FF:
p40 vignette main smeared long.dng (96.1 MB)
DCP:
ELS-NX9-HUAWEI-HUAWEI P40 Pro Main Adobe.dcp (26.9 KB)

The lowest I can here with the white point is about 0.90.

There are a few outstanding issues in the tracker related to this: https://github.com/Beep6581/RawTherapee/issues/2256
And
https://github.com/Beep6581/RawTherapee/issues/3361
And
https://github.com/Beep6581/RawTherapee/issues/5848

Maybe we’re not treating flat field images in the best possible way, but as far as I have read into it, it can be tricky business. And there are a few workarounds.
I’ll try to give your files a go asap.

1 Like

I looked at the issues you linked and what I am experiencing a bit more in depth. I think my problem is something different. But clearly, this is complex stuff.

I seem to get magenta highlights whenever using a white point correction sufficient to prevent extra clipping, regardless of whether HLR is on or what mode is used, so it is not 2256.

Flat-field itself works without magenta color cast (I am using a nightly build, the 5.8 stable was broken), so it is not 3361. I don’t use a dark frame, so it is not 5848 either.

I think it is just the same problem that stops you from using clip control on an already clipped photo. Color cast on already clipped highlights. So it appears there is no way around even more clipping from flat-field.

It could possibly also be the fact that RawTherapee doesn’t know the proper clipping point for your camera, but I’m not sure atm (not at home to check).
Could you provide a fully overexposed shot at lowest ISO, f/4.0 or f/5.6 and a shutter speed of maybe 1/10s?
If that looks magenta when the Neutral profile is applied, there’s work to do :wink:

Sure. It is a phone camera, so f/1.9 is the only aperture I can offer. ISO 50, 1/10 s. It looks magenta with the neutral profile and even worse with the DCP applied.IMG_20201105_133115.dng (96.1 MB)

What is weird that with neutral, None demosaicing, R, G1, G2 and B are all 3836, but AMaZE, it comes out as 255, 235, 235. I think that is a result of the embedded camera profile.

@Thanatomanic Did you have a chance to look at the DNG?