4

What is the relationship between color spaces (RGB, XYZ) and the color matching function? Let's say we have some color matching function in the color space XYZ (3 row matrix). We also have the transformation matrix which translates from XYZ coordinates to RGB coordinates.

My understanding is that there is some visual input, which is made up of the color spectrum S(y). The human eye does not see the world - it only sees its interpretation of the world. The human eye has 3 cone types LMS, each of which is responsible for processing RED, GREEN, or BLUE. The human eye sees the spectral color only because it's eye sums over RED, GREEN, BLUE vector, and this sum matches the color of the input. In order to match the color, there is a color matching function, which takes the input spectrum and produces the weights by which to multiply the primary RED, GREEN, BLUE color vector. These then get added and their output visually matches the spectral input, even though the spectrum had many many frequencies added, while the human eye was only adding 3. So we went from HUGE space to space where we can describe all with 3 vectors, summed as dictated by the color matching function.

The spectral input, color primaries, and color matching functions behave as described above and can be summarized in this formula:

how primary color is summed with weights produced by the color matching function

where pi is the 3d vector of primary colors, c - color matching function is also a vector of 3 components, and finally s is the spectral input.

We have XYZ color space, and a corresponding color matching function which does what is described above. We are then given matrix T, which transforms XYZ coordinates to RGB coordinates. We already know T, and we need to use it to produce a new color matching function for the RGB color space.

I do not understand how the color space relates to choice of primaries pi(λ) and the choice of color functions ci(λ1).

RebeccaK375
  • 801
  • 2
  • 11
  • 25
  • "We already know T, and we need to use it to produce a new color matching function for the RGB color space." Do you mean a matrix that transforms from RGB to XYZ? – Michał Komorowski Dec 09 '16 at 08:39

2 Answers2

1

I have been trying to understand about colours from months and after some research, i believe I have some insights which probably can help me answer your question.

I do not understand how the color space relates to choice of primaries pi(λ)

Primaries are nothing but the wavelength of the colors that we choose to use for making all the other colors in space and that also defines the gamut of the colour space. So if you play with the applet provided in the link that is given below you can see that the whole gamut in the colour space changes when you change your primary.

Standard primary colours

Changed Primaries

Have a look at Alternative primaries and gamuts section.

Now I do not know how much you understand the RGB and XYZ or what do you mean when you say RGB here (assuming you are referring to sRGB gamut values); XYZ are actually Tristimulus values which are called rho, beta and gamma as shown in the image above and just for simplicity XYZ are converted to xy space from where you get your standard sRGB gamut.

CIE1931 xy space with sRGB and other gamuts

Please go through this if you are interested in understanding how colour sensors work and converting sensor values to XYZ matrix

Please comment if I have missed any information or answer needs editing.

Mayank
  • 354
  • 6
  • 20
0

I think lots of issues with color selection are due technical problems people had to solve. Usually you are not trying to reproduce colors as accurately as possible, but to make them pleasant looking, cheap, fast to calculate on cpu.... If someone watches plains of New Zealand on TV he is very unlikely to know they really look like, but almost certainly wants to enjoy the picture and pay little for it.

Several reasons why you might want to use different color matching functions might include:

  • You are taking pictures under non-white light and you want your picture to look natural.
  • You are taking underwater pictures and want to compensate for the fact that water attenuates different frequencies at different speeds.
  • Your sensor is not perfect and you want to compensate for that.

On the other hand you might want to change your primaries due to some reason. For example your images might be taking a picture of a scene with limited amount of colors. By nudging your primaries a little you might get a "fuller" picture.

Finally sometimes you just have to compensate for some of the limitations you have with your devices. Your phosphorus on CRT TV will impose some restrictions. So will the noise in air when transmitting using PAL. On the other hand if you go digital you might be forced to have less than 36 bits per pixel. In that case you will have to make compromises and this will give you opportunity to lose as little as possible.

If you want a short tutorial visit Cambridge in colour.

Here is a Szeliski's textbook on photography, look at chapters 1 2 and 10.

Poyton has list of common transformations.

vguberinic
  • 307
  • 1
  • 6