Processing RAWs for HDR displays in Darktable

Due to the differences between display and capture, this isn’t actually true. If a display element “leaks” other colors (e.g. red emitter outputs some green and blue), it pulls that primary inwards towards the white point, shrinking the gamut triangle.

Meanwhile because CFA elements “leak” on capture (e.g. red stimulates the green/blue), the primaries turn out to wind up outside of the range of physically possible colors. The layman’s way of thinking of this:

A pure green single-wavelength stimuli will create nonzero R and B values in the capture. As a result, this “pure green” point is inside the triangle, not at its border.

As an example, Sony’s S-Gamut primaries all lie outside of the realm of physically possible colors - in S-Gamut, you’ll NEVER capture a fully saturated primary.

A basic color matrix (e.g. treat the camera colorspace as a triangle) does come reasonably close though. Of course, having a LUT helps a LOT for handing some of the colors where the graph you posted is exceptionally misshapen. Of course you can’t fix metamerism where two physically distinct colors result in the same capture values.

1 Like

I’ve wondered for a while if cameras could improve their colour discrimination by swapping out the dual green pixels for either two different greens, or an unfiltered pixel to compare against. I’ve also wondered what would happen if you had 4 compliment filters which each pass a narrow band rather than block a narrow band and thus let more light though.

This has been tried already (RGBW, RGBE, RYYB, etc.), and so far none od the alternatives really stuck.

2 Likes

That’s interesting. I didn’t see anything when I searched, but you’ve given me some words to try…

Most humans have three color receptors. We can trivially build cameras with more color discrimination, but to what end? Displays use three subpixels for the same reason.

Good printers have more inks, but subtractive color (in printers) works somewhat differently than additive color (in displays and cameras).

I would hope for better performance with odd light sources and for inverted filters, more light gathering capability.

I just got a Samsung Frame TV, which has an “art mode” where it’ll display images in a psudeo sleep mode. Its really cool. It uses dci-p3, so I’ll be giving this a go from darktable sometime soon.

1 Like

Interestingly, nearly ALL of those replace CFA positions with “leakier” elements to try and improve light sensitivity. This always comes at the cost of color rendering.

I haven’t seen anyone try to do something involving narrower-band filters with the two greens having different centers. Of course this would reduce color sensitivity which would have a negative impact marketing-wise, and also make the color math much more… fun…

The closest I’ve seen was that one of the medium format manufacturers (Phase One?) marketed a narrowband RGB CFA that was supposed to improve color rendering. Actual results were questionable - Phase One IQ3 100MP Trichromatic vs Standard Back Linear Color, Part I | Strolls with my Dog

I’d be curious to see the comparison of Phase One IQ3 and a traditional CFA in DCamProf which gives a much more detailed report than a set of patch delta-Es

These are some of my attempts generating HDR output from single RAW captures in darktable. My workflow:

  • Open RAW
  • Develop normally
  • Use sigmoid module or or set filmic target brightness to 150-400% (depending on the image)
  • Add a second -1 EV exposure module on top
  • Set output color space to HLG Rec2020 RGB
  • Export 12-bit Jpeg XL with HLG Rec2020 RGB color profile, perceptual intent

From what I’ve read >0.5 in HLG maps to highlights, so the theory is that the -1 EV exposure at the end of the history stack pulls most of the image into the SDR range. Because HLG is backwards compatible, it falls apart less severely when viewed without HDR.

On the right monitor (a MacBook Pro) and with the right image, the highlights punch through and deep 12-bit color is visible. On Linux the tev image viewer is able to display the photo in HDR, but my 500-nits-peak monitor isn’t as good as a 1000+ nits display.

P1070648_01.jxl (167.5 KB)
P1070467.jxl (700.4 KB)
P1070378_01.jxl (507.3 KB)
P1070308_05.jxl (1.1 MB)

If this is like the other DT profiles they are matrix profiles and don’t support rendering intent…

What is the difference between a profile that supports rendering intent, and one that does not? Does the intent setting on export do anything at all?

All ICC profile support some rendering intent, that’s the algorithm that maps out-of-gamut values to in-gamut. Simplistically, what’s different regarding a particular profile is what rendering intents it supports; while relative_ and absolute_colorimetric rendering intents use the 3x3 matrix, perceptual rendering intent requires a LUT.

A better explanation: https://www.argyllcms.com/doc/iccgamutmapping.html

1 Like