Highlights has a cyan tint

Hi,

I have some issues with a cyan tint to blown highlights. I imported some CR2 images from my Canon 5D mkII.
I have zoomed in to a candle that has a blown highlight.
Its present in a lot of the images. In some cases its quite prominent, like when there is an overexposed sky.

I would expect that it would be white instead. I haven’t done any edits.
If I disable Highlights reconstruction, the cyan changes to magenta instead.
Why is this and how can I fix this?

Darktable 4.0.0

Have a look at [Darktable] Broken 'Pink' highlights and how to fix them - YouTube
You need to spend some effort to correct it.
If you’re using filmicrgb with „max rgb“ you’re reconstruction colors in an area where no valid colors are available.
You might use guided laplacian highlight reconstruction and play around with iterations to mitigate the effect, you can play around with highlight reconstruction in filmic to even mitigate more.
If you need an explanation why all that happens you might spend some time with [EN] Highlights reconstruction : the guided Laplacian - YouTube

The sensor has three color channels (R, G, B). When only one are two channels are overexposed (clipped), the result is a colored pixel and not white. Highlight reconstruction methods try to reconstruct the “true” color information either from the not clipped channels or from the surrounding not clipped area. Both mehods have their limitations.

One easy fix, although not without it’s own possible issues is to switch filmic to V5 and maybe power rgb. Both setting on the last tab of filmic. This ‘forces’ the highights to white, so covers up the problem.

And of course, there’s still the autodetection of the raw white level (which fails in a number of cases): if it’s set too high, highlight correction can’t do its job (as there are no clipped pixels according to the raw white point…)

You can check if that’s the case for you with exiftool (easiest), look for those lines:

Normal White Level              : 11765
Specular White Level            : 12277
Linearity Upper Margin          : 10000

(values can depend on your camera model, these are for a random .CR2 file I had available)
Compare these with what darktable picks in the raw black and white point module…

If the dt white point is wrong, correcting it will help solving part of the problem, and may make getting a decent result easier.

Canon changes white point depending on ISO and aperture.

For 5D II darktable has white=“12995” for ISO 160 320 640 1250
and
white=“15950” for everything else.

For black point darktable has a list but also analyzes the optical black field. The optical black field was wrong in darktable for my M5 and D60.

Why three white levels and which one should be used in darktable? Normal White level?

Thanks for all the replies!

@MStraeten Your video was very informative and helpful - thanks!

@Peter – which one should you use? I had Normal White Level : 14800, Specular White Level : 15312 and Linearity Upper Margin : 10000.

I’m still struggling to grasp why this is occurring. If the highlights are clipped, what is filling them with colour and why? And, from a usability perspective, is this happening with default settings?

The documentation of filmicrgb says

As filmic v6 is so far the best version to retain saturated colors at constant hue, it gets also much less forgiving to invalid colors like chromatic aberrations and clipped magenta highlights, that are much better hidden (albeit not solved ) by simple curves applied on individual channels (no chrominance preservation) with no care given to their ratios.

and goes on to say that this needs to be fixed earlier in the pipeline. And if I change to V5, the issue is gone. But unfortunately the documentation doesn’t provide any examples of which modules are suitable for fixing the issues with clipped magenta highlights, which I’m guessing is the issue?

It’s pretty strait forward …green often clips first so you get magenta left. It is desaturted in the v5 model of filmic but not so in V6 and it gets made worse if your white point is wrong. It very clearly explained here. [Darktable] Broken 'Pink' highlights and how to fix them - YouTube

if just one channel clips then the other channels contents remains but with changed relations. Then white balancing also affects those areas - and in an unbounded colourspace theres no white not affected by whitebalance. Then filmicrgb color preservation takes care that the color isn’t lost when bringing highlights back into the limited output colourspace
So you need to override filmic defaults since filmic doesn’t know about valid or invalid color input.

1 Like

Even if all 3 are clipped (e.g. shooting a landscape that has the Sun in the frame), and you read (100%, 100%, 100%) from the sensor, there comes white balance, scaling the channels (e.g. 1.9x, 1x, 1.8x), so you’ll get a non-white blown highlight. highlight reconstruction, as well as filmic’s algorithms, will then try to handle that somehow. For example, the simplest highlight ‘reconstruction’ mechanism will clip that such that the pixel has R=G=B after applying the white balance multipliers – not really recovering any detail, but at least avoiding coloured highlights.

1 Like

No idea. I took some pictures today with my 6D. I have Magic Lantern up running on it and with the module raw_diag I was able to get optical black fields, black level and white level. I just checked one picture before bedtime and the white level reported from Magic Lantern was a little bit higher than Specular White Level. Need to investigate further.

From watching Aureliens latest video about highlight reconstruction with guided laplacians, my understanding is that the old reconstruct algos (clip, reconstruct in lch) were designed according to the old workflow where white balance was actually set in white balance module. But modern workflow is to leave white balance module at d65 and do white balancing later in color calibration. This means clip highlights and reconstruct in lch are prone to producing weird colours. This might have been somewhat hidden before with filmic v5 desaturating highlights towards white, but is not hidden when using v6, which doesn’t do the desaturation.

So the solution is either

  1. Use guided laplacians, or
  2. Use filmic v5, or
  3. Do the white balance in white balance module, or
  4. Do the highlight reconstruction in filmic reconstruct tab
1 Like

Your camera records light levels. For R, G and B.

Now, you are clipping the sensor. That means that you get the maximum values your sensor can give you, and not more.

So you have a file, with values R: 100%, G: 100%, B: 100%.

But, here comes the surprise: White balance is not yet applied to this. That means most cameras will look horribly green and wrong at this point. To get the white balance correct, often the R and B needs to be pushed up to get a proper white balance. So your R gets multiplied and your B gets multiplied. Which multipliers, that depends on the white balance setting.

So imagine that for a proper white balance your R needs to be multiplied by 2.0, and your B needs to be multiplied by 1.5. So those 100%,100%,100% values, now turn to 200%,100%,150%. There is the magenta tint that everyone keeps talking about!

Now, you have a cyan tint, and that’s probably because of some indoor-lighting situation or a different white balance compared to ‘daylight’ (or just a camera that has different multipliers than most others).

So your sensor clips, and records ‘pure white’ because that is the maximum it can record. But this is before white balance. So that ‘pure white’ gets turned into another color by the white balancing step of ‘developing a raw file’.
Why you can still see things like cloud definitions but having them turn magenta or another color? Because then one or two of the channels are clipped, not all three. So there is one channel still providing details, while the others are ‘left behind’ and are causing a wrong color to appear.

‘highlight reconstruction’ tries to ‘fix’ the clipped data, so other algorithms can then work normally with it.

Or you can tell filmic (or whatever tone mapper you have in play) just not to use those extreme highlights (do not use them / do not ‘recover’ them), by leaving them clipped to white. Or use a tone-mapper that doesn’t try to preserve all the colors in the extreme highlights (filmic v5).

Or, you could desaturate them to get rid of the color.

Or, you can work with masks to target the clipped part and turn it into another color.

Often, the first two (reconstructing or just clipping it to white) are the easiest :slight_smile: .

6 Likes