CIELab-gamut-tools / gamut-volume-m

CIELab gamut volume calculation and visualisation in matlab/octave
MIT License
25 stars 1 forks source link

D50, and not D65, being used to perform Chromatic adaption from XYZ to L*a*b*? #16

Closed bendoswell closed 1 year ago

bendoswell commented 1 year ago

If we want to see the Colour volume of a D65 display, would we not want to convert XYZ in to Lab* using the D65 white point [0.95047, 1, 1.08883] - line 116 of CIELabGamut.m

Changing this variable to D65 causes a change in ring shape if plotted in isolation. Then, when using the intersection view of BT.2020, which uses D65 white, this again distors the ring shape of the test gamut, leaving the reference Synthetic gamut outline unchanged.

euan-smith commented 1 year ago

So the point is that the normalisation of Lab is now deemed to be wrong. The chromatic adaptation used by CIELab, that is just ratioing to the white point, causes inconsistencies. So, the approach generally adopted to get around this, including by the CIE themselves (see CIE168), but also the IEC and the ICDM (disclaimer - I'm both an IEC expert and a member of the ICDM), is to first chromatically adapt the XYZ points using Bradford adaptation (generally considered the most appropriate chromatic adaptation transform, or CAT), and then to convert to CIELab, in order to try and ensure apples-to-apples comparisons. The consensus was to use D50 as the reference white point (it didn't really matter so long as everybody agrees to use the same one) for comparative assessments of gamut, in particular colour gamut volume (this was set by CIE168, and everybody else followed).

So, if you want to get a measure of gamut volume which can be compared to other reproduction media, first use Bradford CAT to adapt the XYZ to D50, then shift to CIELab space and measure the volume.

euan-smith commented 1 year ago

See the Wikipedia color appearance model page, particularly the section on CIELab

One of the limitations of CIELAB is that it does not offer a full-fledged chromatic adaptation in that it performs the von Kries transform method directly in the XYZ color space (often referred to as “wrong von Kries transform”), instead of changing into the LMS color space first for more precise results. ICC profiles circumvent this shortcoming by using the Bradford transformation matrix to the LMS color space (which had first appeared in the LLAB color appearance model) in conjunction with CIELAB. Due to the "wrong" transform, CIELAB is known to perform poorly when a non-reference white point is used, making it a poor CAM even for its limited inputs. The wrong transform also seems responsible for its irregular blue hue, which bends towards purple as L changes, making it also a non-perfect UCS.

euan-smith commented 1 year ago

@bendoswell I'm happy to discuss this further, however this is intentional behaviour and follows all standards, both for colour gamut volume and for gamut rings, and is also the approach the original author of Gamut RIngs, Dr Masaoka of the NHK, follows.

I'll close the issue in a week or so.

bendoswell commented 1 year ago

Thanks for taking the time to respon Euan. This makes sense now.

It converts to D50 because that is what was standardised. And while it would technically be possible to produce rings where measured data is adapted to D65 XYZ, the rings / volume calculations wouldn't be all that helpful if you wanted to compare to another set of published rings / volume percentage, which were produced using the reccommended / agreed D50 adaptation...

euan-smith commented 1 year ago

@bendoswell no problem, glad to help. I'll close this issue now.