Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 5.5 KB

2024-10.md

File metadata and controls

42 lines (33 loc) · 5.5 KB

October 2024

Colorimetry

Source: A Beginner's Guide to Colorimetry

Key points to note:

  • Our eyes have 3 types of cone photoreceptors: Long (reds), Medium (greens) and Short (blues)
  • 1924 Luminous Efficiency Function V(λ) represents the spectral sensitivity of human visual perception. It shows how the perceived brightness varies relatively to equally-radiant light sources differing in wavelengths.
  • The perception of color from a light composed of a single wavelength ("pure") is called a spectral color.
    • Note: We rarely see spectral colors. A color-perception produced by a mixture of different wavelengths is almost never a spectral color. Such colors that can only be formed by a mixture of "monochromatic" lights are called non-spectral colors (e.g. white/grey).
    • Side note: The visible spectrum is not represented by the range of colors, but the range of wavelengths.
  • 1931 RGB Color Matching Functions (RGB CMFs) shows how one could pereptually match any spectral color using a mixture of 3 light sources of fixed wavelengths: red (700 nm), green (546.1 nm) and blue (435.8 nm).
    • Note that at 500 nm, the contribution of red is negative. This means, to match the perception of color from a 500 nm wavelength light source (the reference), the red component had to mixed with the reference light (!!) in order to make a match (i.e., 0.08 "green" + 0.05 "blue" = L "500 nm" + 0.06 "red", where L is the luminance of the reference light)
  • Tristimulus values: (kinda) the luminance of primary lights (R G B) needed to make a color-perception match.
  • Chromaticity values: (kinda) tristimulus values normalized on intensity (R+G+B), such that the 3 components add up to 1.0. This can now be projected on to a 2D plane (say the red-green plane) without loss of information since the 3rd value is determinable from the other two.
  • Spectral locus: The line formed by the spectral colors on the chromaticity space.
    • If we draw a straight line between any two points on the spectral locus, all points in that straight line is a "realizable" color. Points that are "outside" this surface enclosed by the spectral locus are "non-realizable" (imaginary)!
    • Pick any 3 points on the spectral locus. The area inside the triangle formed by those points are realizable using light sources of only those 3 wavelengths.
  • CIE XYZ color space is a linear transformation of the RGB color space in order to bring all realizable chromaticities to have positive component values, and have the Y component's CMF closely match the Luminous Efficiency Function. This effectively makes the Y component approximately match the luminance of the color.
  • CIE xyY color space is a CIEXYZ-derived color space by normalizing XYZ components on intensity (X+Y+Z; see "chromaticity values" above) to form xyz and replacing z component (since z = 1 - x - y) with the original Y component. This conveniently separates chromaticity (xy values) and a measure of luminance (Y value).
    • Note: The chromaticity plane here (xy plane) has become the de-facto standard for showing chromaticity diagrams.
    • Note: Do not confuse XY values with xy values. A pair of XY values doesn't really convey any concrete meaning without the missing Z value, while a pair of xy values is enough to convey the chromaticity.
    • Note that even within the plane defined by equations (0 <= x, y, z) and (x + y + z = 1), a significant portion of it are unrealizable/imaginary chromaticities. (e.g. (x=0, y=0, z=1) is unrealizable)
    • Also note that in XYZ space, there's no theoretical upper limit for realizable XYZ values. It's only the chromaticity values (x y z) that have realizable bounds, not X Y Z values. This means if you fix a component, say X = 10000, then Y and Z are very much constrained in order to have a realizable chromaticity (x y z).

Color Models

A color model is a way to describe colors and how they interact and transform. Some of the popular color models are:

  • RGB model: An "additive" model that represent colors by 3 components -- red, green and blue. Each component value represent the intensity at which the associated colored light should be emitted.
  • CMY(K) model: A "subtractive" model that represent colors by 3 components -- cyan, magenta and yellow. Each component value represent the intensity at which the associated color's complementary light should be absorbed. I.e., the value of cyan-component basically denotes how much of red (cyan's complementary color) should be absorbed. Often used in printing, where the canvas is white, and we take away the reflected light by adding pigments to the canvas. "K" in CMYK stands for black which is often used due to practical reasons (imperfect dyes, cost of dyes etc.)

Color Space

A color space is defined by primarily 2 features: color primaries and transfer functions.

  • Color primaries: Usually defined as 3 points in the xy plane (see XYZ above).
  • Transfer functions:
    • The opto-electronic transfer function (OETF) maps the scene light as input into the color space values as output. This is typically done within a camera.
    • The electro-optical transfer function (EOTF) maps the color space values as input into the linear light output of the display. This is typically done within a display device.
  • Note: EOTF is often not the inverse of OETF due to the difference in viewing conditions (e.g. ambient light) and other reasons I don't fully understand.