Removal of magenta highlight artefacts

I am not finding a way to remove the magenta highlights from my Lumix FZ1000. Highlight reconstruction doesn’t do it, regardless of whether I choose to clip or to reconstruct in LCh or color. I also tried filmic rgb: I set the threshold correcly (btw why does darktable not do this automatically when it knows the raw overexposed regions?) and tried every setting. But even when I chose gray reconstruction the highlights just got green instead of magenta. I even tried color zones, changed the color of magenta to yellow and decreased the saturation but that was pretty laborious and did not look good.
How do you deal with color artefacts in highlights and can you do better than me with the image?
I attached the edited raw and the jpg from the camera.
Thanks in advance!

The highlights:

The best I did: Here I didn’t use any highlight reconstruction. It does not look terrible because I increased the exposure until the hightlights are overexposed in rgb but it is not perfect and maybe I do not want the highlights to be white and maximally bright.

The camera did not have any issues with the hightlights:


P3050284.RW2 (19.1 MB)
P3050284.RW2.xmp (20.8 KB)

In this case, I would use these settings in filmic and turn off hl-reconstruction module. I almost never use it at all.

grafik

The threshold setting depends a on your previous editing. Lower it until the result pleases you.
grafik

Unfortunately there is no ultimate master solution for highlight handling in DT. There are a couple of options to be used in a couple of situations.

4 Likes

That’s awesome, thanks! I tried this before but left preserve chrominance on default which caused the green artifacts. Do you know, whether this option has other effects than just in the highlights? Can it damage the color in somewhere else in the image?

1 Like

I believe it it can slighty change some brightness here and there and mainly desaturate in hightlights - which is helpful in this case. But since filmic v6 It shouldn’t shift or damage any colors. For more in depth background, someone elso would have to join us here :smiling_face:.

1 Like

Check the dt raw white point on this image/camera based on your comment around the raw overexposed threshold.

1 Like

I think this could be at least part of the issue… DT is using 4095 so almost at sensor max probably. I could not find a white value in the exif but the max value for linearity was provided at 3277… I tried some white point reduction and for sure the image looks better and HLR works much better… At this point I think everyone should be checking the values used by DT just to confirm that it is not contributing to exaggerated issues in the highlights…

1 Like

It’s worth to take a look at some of the recent posts dealing with the same behaviour.
But the faster way: [Darktable] Broken 'Pink' highlights and how to fix them - YouTube
Short message: in darktable scene referred workflow there’s nothing like white that keeps being white when colors are manipulated (and color calibration manipulates colors)
So it‘s up to you to deal with those areas. You decide which highlights are allowed to clip to plain white

4 Likes

Or if you enjoy hilarious world weary profanity with your technical excellence like me, this is absolutely fabulous: [EN] Highlights reconstruction : the guided Laplacian - YouTube

3 Likes

I would maybe want to update that - with the settings in reconstruction tab - it should work with pretty much every preserve chrominance setting. But you should then set iterations of he reconstruct to 0 to prevent green color bleeding to the sky.

However, there are extreme cases where preserve: no is your friend.

1 Like

Version 4 of darktable no longer uses Adobe constants, I think, and that broke support for many cameras. I may well be mistaken.

Anyway:

  1. Turn on raw exposure indicator, and slowly lower the raw white point until the clipping indication suddenly show up where you have false colours in the highlights.
  2. After that, recovery in LCh is a fairly safe option.
2 Likes

I think it’s the reverse. Adobe constants are used now , not before :).

And that it doesn’t - although guessing here - seems unrelated to wrong white levels .

The theory seems that the white level is and was wrong for quite some time , but we only notice it now, since more color-preserving-in-highlights work has been done in filmic and more work to highlight reconstruction has been done.

Anyway, unless you are using a linear DNG (because highlight reconstruction is then not working and the UI is being weird) highlight reconstruction on clipped mode should always get rid of the purple . It may not look nice , but it should get rid of the purple :).
If not , that’s a good indicator that the white level is wrongly set for the file .

Trying one of the reconstruction methods but with the threshold lowered should work as well to be honest. But shouldn’t be needed if the white level is correct.

1 Like

At least for Olympus raws, rawspeed is doing something odd with the white level: rawspeed/OrfDecoder.cpp at d723728e02123a05fb0c10767535c8a8a32409b7 · darktable-org/rawspeed · GitHub

I’m not sure what the rationale for it is, but it usually increases the white level to something like 4100, even though the raw file is 12 bit and therefore can’t contain any value > 4095.

I’ve encountered the magenta highlights issue before and ususally find that simply switching the color science option in the Filmic RGB module to v5 will resolve or at least mitigate the problem.

Like apostel338, I would also recommend turning off the highlights reconstruction module. The reconstruction menu in the Filmic RGB module seems more robust for that purpose, and even that is unlikely to work any miracles for you.

One way I have learned to handle this problem in DT is to use reconstruct in LCh and reduce the clipping threshold until the magenta goes away. If anyone can see a flaw in this approach I am happy to be corrected from doing this method, but it seems to work fine for me.

image

1 Like

(At 4095 the highlights are correctly marked. When I use lower white points, healthy regions become white.) My mistake, I had set the clipping threshold in the raw overexposed indicator to 0.929…

(I checked it and the white point is already set perfectly by default. Recovery in LCh doesnt work here.) My mistake, I had set the clipping threshold in the raw overexposed indicator to 0.929…

Just a few comments from my side hoping to make some things a bit more clear - trying to explain in the most simply way.

  1. all algorithms trying to recover highlights in dt are working correct if the data they have as input have perfect correction coefficients in the white balance module. Due to changes in that module (we use corrected for D65 instead of “as shot”) we have color casts that can’t be fully corrected any more. Or in other words, after highlights algo the original magenta cast is not corrected to grey/white but to something close to grey/white. Sometimes a bit yellow, sometimes slightly blueish…
  1. In some images we have an incorrect upper level of linear data. That’s called the white point. The assumption you can correct the just described color cast by adopting this (mostly by lowering) is not true. The reason? Described in point 1

  2. Default filmic also makes some assumptions how to preserve color. So if you want to analyse highlights correction you have to turn it off to understand what data will by processed.

Solving point 1 is pretty difficult but something we must work on. Point 2 is lots of manual work or finding another way to get the white points.

2 Likes

(Reducing the threshold does help make reconstruct in LCh look good but I do not think this means that the white level is set incorrectly because the raw overexposure indicator exactly traces the magenta. Filmic seems to do a better job.) My mistake, I had set the clipping threshold in the raw overexposed indicator to 0.929…

1 Like

Yeah, new color callibration module is also a bit overwhelming for amateurs like me. It confuses me because for some pictures it says the color is invalid and in these cases you cannot easily change the color temperature anymore. But I am glad you’re working on it and sure it has its purpose.

I don’t really see this but I am talking about raw data… I don’t get an overexposed region until I lower the white point to 3845 then the sky toggles as overexposed… could be my raw overexposure settings (default I think) but nothing is marked when it is higher and so to me it seem this is why the reconstruction is not great out of the gate and things are amplified with certain filmic settings as well…

1 Like