If the CIE XYZ color model is a better representation of what humans see, then why don't CCD arrays in cameras capture data in a way that maps to it rather than the RGB model?

It seems especially weird to me since the RGB space is a proper subset of CIE XYZ, which means there are colors that humans can see that are not representable using RGB, right?

If the reason is displays, then the same question applies to displays. Why don't they display using the CIE XYZ model?

  • 1
    Most cameras used for still photography these days don't have CCD arrays - they have CMOS sensors. – Michael C Sep 12 '15 at 17:46
  • Using ARGYLL you can devellop your RAW file in the XYZ colourspace. – adrienlucca.wordpress.com Apr 1 '19 at 10:57

Currently XYZ filters are produced using thin film technology. It is not very cheap, and not very suitable for multi-megapixel sensors. It also results in somewhat spiky spectral response curves, especially problematic when the light source has spiky spectrum, like fluorescent tubes and some flashes. Yet another reason would be higher noise levels, as XYZ filters allow for very little transmittance in certain areas of the spectrum.

For displays, the problem is also the light source. To apply XYZ filters in an efficient manner, the light source needs to have very smooth spectral power distribution, and close to that of a black body at about 5500K, which is not an option currently.

| improve this answer | |
  • AFAIK, "XYZ FIlters" do not exist as XYZ are no colors; they are methematical constructs derived from CIE RGB. – U. Windl Jun 3 '19 at 9:41

Look at a copy of the chromaticity diagram. Notice that along either the X or Y axis there are no colors. XYZ represents imaginary colors, not real colors. It is impossible to make a XYZ sensor.

The origin of the XYZ space comes from the standard observer experiments. In combining the red, green and blue test colors to make the colors of the spectrum there were many cases where a match could not be made. To get a match one of the test colors was added to the spectral color and the other two test colors were adjusted to match. This is the same as adding a negative value of that test color. For CIE purposes the negative values were not a problem, but this was before computers when all the calculations were done by hand. The negative values resulted in human errors. The solution was to transform the RGB values into a different color space that did not contain negative values. This is the XYZ color space. Purely a mathematical construct to reduce human errors in math problems.

XYZ is used today since it is both a color model and a color space. A give set of numbers represents a specific color if it falls with the boundaries set in the chromaticity diagram. RGB is a color model, not a color space. ARGB and sRGB are color spaces.

| improve this answer | |
  • 1
  • 2
    Page 11. They are converting to XYZ – Alan P Sep 14 '15 at 3:15
  • To quote the datasheet, "The filter response curves are based on the CIE 1931 standard. For more information regarding the color matching function - please read for example: en.wikipedia.org/wiki/CIE_1931_color_space". Of course if you have a conversion matrix like "output to XYZ", and it is significantly non-unity, I would be glad to help you with your electronic design. – Iliah Borg Sep 14 '15 at 17:58
  • 1
    Downvote because XYZ being based on imaginary colours does not mean it is impossible to make XYZ sensor, a human eye being an example of that (google LMS space). – Euri Pinhollow Apr 8 '16 at 12:11

The capture uses the actual transmission curves of the pigments used to make the filters.

A raw file is that, with the implicit device "input color space". Turning that into meaningful values in some standard spqce is what raw converters do. You can calibrate using a a color checker and software from X-rite, or trust the manufacturer's profiles or Adobe's profiles are close enough.

See This Answer where I asked about that: not presuming they are RGB, but what are they?

I'm struck at the similarity between the sensor filters and the human eye. That's the real answer: to respond in the same way under different lighting conditions as we do, so as not to get funny color shifts under differing kinds of light.

| improve this answer | |

Actually, to capture accurate colors, cameras must filter to XYZ or LMS weight curves. Any other linear combination of LMS filters with non-negative weights is acceptable, if they give you a better signal-to-noise ratio than LMS.

It is the RGB filters that are impossible to realize, because they have some negative weights along the curves (wavelength). If you try to realize some RGB color space directly on the sensor (i.e. with the Bayer filters) then you are guaranteed to make colorimetric errors. You can't make optical filters with negative gain.

Our eyes have the LMS filters (long-medium-short, roughly equivalent to red-green-blue). CIE XYZ are derived from that to be just non-negative, and so that the Luminance is defined by only Y. This is more convenient for color science. ACES RGB is another perfect conversion, convenient for digital film production.

Data in any other RGB color space (like sRGB = Rec.709, Adobe, DCI P3, UHD = Rec.2020) can be derived computationally from XYZ or ACES by a 3x3 matrix in linear-light. Such matrix will have up to 6 negative coefficients, so any out-of-gamut colors will produce some negative RGB values. These cannot be processed by the OECF (gamma function), so unless you store signed linear-light values they will have to be eliminated by gamut mapping (or just clipping to 0). The in-gamut colors can still be exact, because the math is exact.

The larger the color space is in relation to the color gamut of your scene (most of the world is not so wide-gamut) the less problem you have with gamut clipping. For scientific purposes XYZ cameras exist, they can reproduce exactly what the eyes see. Multi-spectral cameras with more than 3 primary colors can even see more than the human eyes could distinguish. They literally reveal the unseen.

In short: an XYZ sensor is an excellent idea. I suspect that in RAW mode this is what you should get. Conversion to a limited RGB color space is then done during the raw processing, and that is when you may lose some color gamut.

PS: do not confuse camera design with color display design. An XYZ display is impossible, a very wide gamut display needs many primaries (e.g. 2 greens). A wide gamut camera is trivially easy, but it outputs weak-color signals so there may be some noise issues.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.