LMS color space

Last updated

Normalized responsivity spectra of human cone cells, S, M, and L types (SMJ data based on Stiles and Burch RGB color-matching, linear scale, weighted for equal energy) Cones SMJ2 E.svg
Normalized responsivity spectra of human cone cells, S, M, and L types (SMJ data based on Stiles and Burch RGB color-matching, linear scale, weighted for equal energy)

LMS (long, medium, short), is a color space which represents the response of the three types of cones of the human eye, named for their responsivity (sensitivity) peaks at long, medium, and short wavelengths.

Contents

The numerical range is generally not specified, except that the lower end is generally bounded by zero. It is common to use the LMS color space when performing chromatic adaptation (estimating the appearance of a sample under a different illuminant). It's also useful in the study of color blindness, when one or more cone types are defective.

Definition

The cone response functions are the color matching functions for the LMS color space. The chromaticity coordinates (L, M, S) for a spectral distribution are defined as:

The cone response functions are normalized to have their maxima equal to unity.

XYZ to LMS

Typically, colors to be adapted chromatically will be specified in a color space other than LMS (e.g. sRGB). The chromatic adaptation matrix in the diagonal von Kries transform method, however, operates on tristimulus values in the LMS color space. Since colors in most colorspaces can be transformed to the XYZ color space, only one additional transformation matrix is required for any color space to be adapted chromatically: to transform colors from the XYZ color space to the LMS color space. [3]

In addition, many color adaption methods, or color appearance models (CAMs), run a von Kries-style diagonal matrix transform in a slightly modified, LMS-like, space instead. They may refer to it simply as LMS, as RGB, or as ργβ. The following text uses the "RGB" naming, but do note that the resulting space has nothing to do with the additive color model called RGB. [3]

The chromatic adaptation transform (CAT) matrices for some CAMs in terms of CIEXYZ coordinates are presented here. The matrices, in conjunction with the XYZ data defined for the standard observer, implicitly define a "cone" response for each cell type.

Notes:

Hunt, RLAB

The Hunt and RLAB color appearance models use the Hunt-Pointer-Estevez transformation matrix (MHPE) for conversion from CIE XYZ to LMS. [4] [5] [6] This is the transformation matrix which was originally used in conjunction with the von Kries transform method, and is therefore also called von Kries transformation matrix (MvonKries).

Bradford's spectrally sharpened matrix (LLAB, CIECAM97s)

The original CIECAM97s color appearance model uses the Bradford transformation matrix (MBFD) (as does the LLAB color appearance model). [3] This is a “spectrally sharpened” transformation matrix (i.e. the L and M cone response curves are narrower and more distinct from each other). The Bradford transformation matrix was supposed to work in conjunction with a modified von Kries transform method which introduced a small non-linearity in the S (blue) channel. However, outside of CIECAM97s and LLAB this is often neglected and the Bradford transformation matrix is used in conjunction with the linear von Kries transform method, explicitly so in ICC profiles. [8]

A "spectrally sharpened" matrix is believed to improve chromatic adaptation especially for blue colors, but does not work as a real cone-describing LMS space for later human vision processing. Although the outputs are called "LMS" in the original LLAB incarnation, CIECAM97s uses a different "RGB" name to highlight that this space does not really reflect cone cells; hence the different names here.

LLAB proceeds by taking the post-adaptation XYZ values and performing a CIELAB-like treatment to get the visual correlates. On the other hand, CIECAM97s takes the post-adaptation XYZ value back into the Hunt LMS space, and works from there to model the vision system's calculation of color properties.

Later CIECAMs

A revised version of CIECAM97s switches back to a linear transform method and introduces a corresponding transformation matrix (MCAT97s): [9]

The sharpened transformation matrix in CIECAM02 (MCAT02) is: [10] [3]

CAM16 uses a different matrix: [11]

As in CIECAM97s, after adaptation, the colors are converted to the traditional Hunt–Pointer–Estévez LMS for final prediction of visual results.

physiological CMFs

From a physiological point of view, the LMS color space describes a more fundamental level of human visual response, so it makes more sense to define the physiopsychological XYZ by LMS, rather than the other way around.

A set of physiologically-based LMS functions were proposed by Stockman & Sharpe in 2000. The functions have been published in a technical report by the CIE in 2006 (CIE 170). [12] [13] The functions are derived from Stiles and Burch [1] RGB CMF data, combined with newer measurements about the contribution of each cone in the RGB functions. To adjust from the 10° data to 2°, assumptions about photopigment density difference and data about the absorption of light by pigment in the lens and the macula lutea are used. [14]

XYZ color matching functions, CIE 1931 and Stockman & Sharpe 2006. XYZ color matching functions, CIE 1931 and Stockman & Sharpe 2006.jpg
XYZ color matching functions, CIE 1931 and Stockman & Sharpe 2006.

The Stockman & Sharpe functions can then be turned into a set of three color-matching functions similar to the CIE 1931 functions. [15]

Let be the three cone response functions, and let be the new XYZ color matching functions. Then, by definition, the new XYZ color matching functions are:

where the transformation matrix is defined as:

The derivation of this transformation is relatively straightforward. [16] The CMF is the luminous efficiency function originally proposed by Sharpe et al. (2005), [17] but then corrected (Sharpe et al., 2011 [18] [lower-alpha 1] ). The CMF is equal to the cone fundamental originally proposed by Stockman, Sharpe & Fach (1999) [19] scaled to have an integral equal to the CMF. The definition of the CMF is derived from the following constraints:
  1. Like the other CMFs, the values of are all positive.
  2. The integral of is identical to the integrals for and .
  3. The coefficients of the transformation that yields are optimized to minimize the Euclidean differences between the resulting , and color matching functions and the CIE 1931 , and color matching functions.
    CVRL description for 'CIE (2012) 2-deg XYZ “physiologically-relevant” colour matching functions' [15]

For any spectral distribution , let be the LMS chromaticity coordinates for , and let be the corresponding new XYZ chromaticity coordinates. Then:

or, explicitly:

The inverse matrix is shown here for comparison with the ones for traditional XYZ:

The above development has the advantage of basing the new XFYFZF color matching functions on the physiologically-based LMS cone response functions. In addition, it offers a one-to-one relationship between the LMS chromaticity coordinates and the new XFYFZF chromaticity coordinates, which was not the case for the CIE 1931 color matching functions. The transformation for a particular color between LMS and the CIE 1931 XYZ space is not unique. It rather depends highly on the particular form of the spectral distribution ) producing the given color. There is no fixed 3x3 matrix which will transform between the CIE 1931 XYZ coordinates and the LMS coordinates, even for a particular color, much less the entire gamut of colors. Any such transformation will be an approximation at best, generally requiring certain assumptions about the spectral distributions producing the color. For example, if the spectral distributions are constrained to be the result of mixing three monochromatic sources, (as was done in the measurement of the CIE 1931 and the Stiles and Burch [1] color matching functions), then there will be a one-to-one relationship between the LMS and CIE 1931 XYZ coordinates of a particular color.

As of Nov 28, 2023, CIE 170-2 CMFs are proposals that have yet to be ratified by the full TC 1-36 committee or by the CIE.

Quantal CMF

For theoretical purposes, it is often convenient to characterize radiation in terms of photons rather than energy. The energy E of a photon is given by the Planck relation

where E is the energy per photon, h is Planck's constant, c is the speed of light, ν is the frequency of the radiation and λ is the wavelength. A spectral radiative quantity in terms of energy, JE(λ), is converted to its quantal form JQ(λ) by dividing by the energy per photon:

For example, If JE(λ) is spectral radiance with units of watts/m2/sr/m, then the quantal equivalent JQ(λ) characterizes that radiation with units of photons/sec/m2/sr/m.

If CEλi(λ) (i=1,2,3) are the three energy-based color matching functions for a particular color space (LMS color space for the purposes of this article), then the tristimulus values may be expressed in terms of the quantal radiative quantity by:

Define the quantal color matching functions:

where λi max is the wavelength at which CEλ i(λ)/λ is maximized. Define the quantal tristimulus values:

Note that, as with the energy based functions, the peak value of CQλi(λ) will be equal to unity. Using the above equation for the energy tristimulus values CEi

For the LMS color space, ≈ {566,541,441} nm and

J/photon

Applications

Color blindness

The LMS color space can be used to emulate the way color-blind people see color. An early emulation of dichromats were produced by Brettel et al. 1997 and was rated favorably by actual patients. An example of a state-of-the-art method is Machado et al. 2009. [20]

A related application is making color filters for color-blind people to more easily notice differences in color, a process known as daltonization. [21]

Image processing

JPEG XL uses an XYB color space derived from LMS. Its transform matrix is shown here:

This can be interpreted as a hybrid color theory where L and M are opponents but S is handled in a trichromatic way, justified by the lower spatial density of S cones. In practical terms, this allows for using less data for storing blue signals without losing much perceived quality. [22]

The colorspace originates from Guetzli's butteraugli metric, [23] and was passed down to JPEG XL via Google's Pik project.

See also

Related Research Articles

<span class="mw-page-title-main">Affine transformation</span> Geometric transformation that preserves lines but not angles nor the origin

In Euclidean geometry, an affine transformation or affinity is a geometric transformation that preserves lines and parallelism, but not necessarily Euclidean distances and angles.

<span class="mw-page-title-main">Primary color</span> Sets of colors that can be mixed to produce gamut of colors

A set of primary colors or primary colours consists of colorants or colored lights that can be mixed in varying amounts to produce a gamut of colors. This is the essential method used to create the perception of a broad range of colors in, e.g., electronic displays, color printing, and paintings. Perceptions associated with a given combination of primary colors can be predicted by an appropriate mixing model that reflects the physics of how light interacts with physical media, and ultimately the retina.

Ray transfer matrix analysis is a mathematical form for performing ray tracing calculations in sufficiently simple problems which can be solved considering only paraxial rays. Each optical element is described by a 2×2 ray transfer matrix which operates on a vector describing an incoming light ray to calculate the outgoing ray. Multiplication of the successive matrices thus yields a concise ray transfer matrix describing the entire optical system. The same mathematics is also used in accelerator physics to track particles through the magnet installations of a particle accelerator, see electron optics.

<span class="mw-page-title-main">Jordan normal form</span> Form of a matrix indicating its eigenvalues and their algebraic multiplicities

In linear algebra, a Jordan normal form, also known as a Jordan canonical form (JCF), is an upper triangular matrix of a particular form called a Jordan matrix representing a linear operator on a finite-dimensional vector space with respect to some basis. Such a matrix has each non-zero off-diagonal entry equal to 1, immediately above the main diagonal, and with identical diagonal entries to the left and below them.

Chromatic adaptation is the human visual system’s ability to adjust to changes in illumination in order to preserve the appearance of object colors. It is responsible for the stable appearance of object colors despite the wide variation of light which might be reflected from an object and observed by our eyes. A chromatic adaptation transform (CAT) function emulates this important aspect of color perception in color appearance models.

The RGB chromaticity space, two dimensions of the normalized RGB space, is a chromaticity space, a two-dimensional color space in which there is no intensity information.

In linear algebra, the Frobenius companion matrix of the monic polynomial

In mathematics, the matrix exponential is a matrix function on square matrices analogous to the ordinary exponential function. It is used to solve systems of linear differential equations. In the theory of Lie groups, the matrix exponential gives the exponential map between a matrix Lie algebra and the corresponding Lie group.

sRGB Standard RGB color space

sRGB is a standard RGB color space that HP and Microsoft created cooperatively in 1996 to use on monitors, printers, and the World Wide Web. It was subsequently standardized by the International Electrotechnical Commission (IEC) as IEC 61966-2-1:1999. sRGB is the current defined standard colorspace for the web, and it is usually the assumed colorspace for images that are neither tagged for a colorspace nor have an embedded color profile.

<span class="mw-page-title-main">Adobe RGB color space</span> Color space developed by Adobe

The Adobe RGB (1998) color space or opRGB is a color space developed by Adobe Inc. in 1998. It was designed to encompass most of the colors achievable on CMYK color printers, but by using RGB primary colors on a device such as a computer display. The Adobe RGB (1998) color space encompasses roughly 50% of the visible colors specified by the CIELAB color space – improving upon the gamut of the sRGB color space, primarily in cyan-green hues. It was subsequently standardized by the IEC as IEC 61966-2-5:1999 with a name opRGB and is used in HDMI.

<span class="mw-page-title-main">Color balance</span> Adjustment of color intensities in photography

In photography and image processing, color balance is the global adjustment of the intensities of the colors. An important goal of this adjustment is to render specific colors – particularly neutral colors like white or grey – correctly. Hence, the general method is sometimes called gray balance, neutral balance, or white balance. Color balance changes the overall mixture of colors in an image and is used for color correction. Generalized versions of color balance are used to correct colors other than neutrals or to deliberately change them for effect. White balance is one of the most common kinds of balancing, and is when colors are adjusted to make a white object appear white and not a shade of any other colour.

<span class="mw-page-title-main">Planckian locus</span> Locus of colors of incandescent black bodies within a color space

In physics and color science, the Planckian locus or black body locus is the path or locus that the color of an incandescent black body would take in a particular chromaticity space as the blackbody temperature changes. It goes from deep red at low temperatures through orange, yellowish, white, and finally bluish white at very high temperatures.

<span class="mw-page-title-main">CIE 1931 color space</span> Color space defined by the CIE in 1931

The CIE 1931 color spaces are the first defined quantitative links between distributions of wavelengths in the electromagnetic visible spectrum, and physiologically perceived colors in human color vision. The mathematical relationships that define these color spaces are essential tools for color management, important when dealing with color inks, illuminated displays, and recording devices such as digital cameras. The system was designed in 1931 by the "Commission Internationale de l'éclairage", known in English as the International Commission on Illumination.

<span class="mw-page-title-main">Tissot's indicatrix</span> Characterization of distortion in map protections

In cartography, a Tissot's indicatrix is a mathematical contrivance presented by French mathematician Nicolas Auguste Tissot in 1859 and 1871 in order to characterize local distortions due to map projection. It is the geometry that results from projecting a circle of infinitesimal radius from a curved geometric model, such as a globe, onto a map. Tissot proved that the resulting diagram is an ellipse whose axes indicate the two principal directions along which scale is maximal and minimal at that point on the map.

Relative luminance follows the photometric definition of luminance including spectral weighting for human vision, but while luminance is a measure of light in units such as , relative luminance values are normalized as 0.0 to 1.0, with 1.0 being a theoretical perfect reflector of 100% reference white. Like the photometric definition, it is related to the luminous flux density in a particular direction, which is radiant flux density weighted by the luminous efficiency function of the CIE Standard Observer.

<span class="mw-page-title-main">Standard illuminant</span> Theoretical source of visible light

A standard illuminant is a theoretical source of visible light with a spectral power distribution that is published. Standard illuminants provide a basis for comparing images or colors recorded under different lighting.

Grassmann's laws describe empirical results about how the perception of mixtures of colored lights composed of different spectral power distributions can be algebraically related to one another in a color matching context. Discovered by Hermann Grassmann these "laws" are actually principles used to predict color match responses to a good approximation under photopic and mesopic vision. A number of studies have examined how and why they provide poor predictions under specific conditions.

<span class="mw-page-title-main">CIECAM02</span> Color appearance model

In colorimetry, CIECAM02 is the color appearance model published in 2002 by the International Commission on Illumination (CIE) Technical Committee 8-01 and the successor of CIECAM97s.

In mathematics, every analytic function can be used for defining a matrix function that maps square matrices with complex entries to square matrices of the same size.

<i>ICtCp</i>

ICTCP, ICtCp, or ITP is a color representation format specified in the Rec. ITU-R BT.2100 standard that is used as a part of the color image pipeline in video and digital photography systems for high dynamic range (HDR) and wide color gamut (WCG) imagery. It was developed by Dolby Laboratories from the IPT color space by Ebner and Fairchild. The format is derived from an associated RGB color space by a coordinate transformation that includes two matrix transformations and an intermediate nonlinear transfer function that is informally known as gamma pre-correction. The transformation produces three signals called I, CT, and CP. The ICTCP transformation can be used with RGB signals derived from either the perceptual quantizer (PQ) or hybrid log–gamma (HLG) nonlinearity functions, but is most commonly associated with the PQ function.

References

  1. 2011 correction is taken into account with the CIE (2012) matrix.
  1. 1 2 3 Stiles, WS; Burch, JM (1959). "NPL colour-matching investigation: final report". Optica Acta. 6.
  2. "Stockman, MacLeod & Johnson 2-deg cone fundamentals (description page)". data retrieval page
  3. 1 2 3 4 5 6 Fairchild, Mark D. (2005). Color Appearance Models (2E ed.). Wiley Interscience. pp. 182–183, 227–230. ISBN   978-0-470-01216-1.
  4. Schanda, Jnos, ed. (July 27, 2007). Colorimetry. p. 305. doi:10.1002/9780470175637. ISBN   9780470175637.
  5. Moroney, Nathan; Fairchild, Mark D.; Hunt, Robert W.G.; Li, Changjun; Luo, M. Ronnier; Newman, Todd (November 12, 2002). "The CIECAM02 Color Appearance Model". IS&T/SID Tenth Color Imaging Conference. Scottsdale, Arizona: The Society for Imaging Science and Technology. ISBN   0-89208-241-0.
  6. Ebner, Fritz (July 1, 1998). "Derivation and modelling hue uniformity and development of the IPT color space". Theses: 129.
  7. "Welcome to Bruce Lindbloom's Web Site". brucelindbloom.com. Retrieved March 23, 2020.
  8. Specification ICC.1:2010 (Profile version 4.3.0.0). Image technology colour management — Architecture, profile format, and data structure, Annex E.3, pp. 102.
  9. Fairchild, Mark D. (2001). "A Revision of CIECAM97s for Practical Applications" (PDF). Color Research & Application. 26 (6). Wiley Interscience: 418–427. doi:10.1002/col.1061.
  10. Fairchild, Mark. "Errata for COLOR APPEARANCE MODELS" (PDF). The published MCAT02 matrix in Eq. 9.40 is incorrect (it is a version of the HuntPointer-Estevez matrix. The correct MCAT02 matrix is as follows. It is also given correctly in Eq. 16.2)
  11. Li, Changjun; Li, Zhiqiang; Wang, Zhifeng; Xu, Yang; Luo, Ming Ronnier; Cui, Guihua; Melgosa, Manuel; Brill, Michael H.; Pointer, Michael (2017). "Comprehensive color solutions: CAM16, CAT16, and CAM16-UCS". Color Research & Application. 42 (6): 703–718. doi:10.1002/col.22131.
  12. "CIE 2006 "physiologically-relevant" LMS functions (2-deg LMS fundamentals based on the Stiles and Burch 10-deg CMFs adjusted to 2-deg)". Color & Vision Research Laboratory/. Institute of Ophthalmology. Retrieved October 27, 2023.
  13. Stockman, Andrew (December 2019). "Cone fundamentals and CIE standards" (PDF). Current Opinion in Behavioral Sciences. 30: 87–93. Retrieved October 27, 2023.
  14. "Photopigments". Color & Vision Research Laboratory/. Institute of Ophthalmology. Retrieved November 27, 2023.
  15. 1 2 "CIE 2-deg CMFs". cvrl.ucl.ac.uk.
  16. "CIE (2012) 2-deg XYZ "physiologically-relevant" colour matching functions". Color & Vision Research Laboratory/. Institute of Ophthalmology. Retrieved November 27, 2023.
  17. Sharpe, Lindsay T.; Stockman, Andrew; Jagla, Wolfgang; Jägle, Herbert (December 21, 2005). "A luminous efficiency function, V*(λ), for daylight adaptation". Journal of Vision. 5 (11): 3. doi:10.1167/5.11.3. S2CID   19361187.
  18. Sharpe, L.T.; Stockman, A.; et al. (February 2011). "A Luminous Efficiency Function, V*D65(λ), for Daylight Adaptation: A Correction". COLOR Research and Application. 36 (1): 42–46. doi: 10.1002/col.20602 .
  19. Stockman, A.; Sharpe, L.T.; Fach, C.C. (1999). "The spectral sensitivity of the human short-wavelength cones". Vision Research. 39: 2901–2927. Retrieved November 28, 2023.
  20. "Color Vision Deficiency Emulation". colorspace.r-forge.r-project.org.
  21. Simon-Liedtke, Joschua Thomas; Farup, Ivar (February 2016). "Evaluating color vision deficiency daltonization methods using a behavioral visual-search method". Journal of Visual Communication and Image Representation. 35: 236–247. doi:10.1016/j.jvcir.2015.12.014. hdl: 11250/2461824 .
  22. Alakuijala, Jyrki; van Asseldonk, Ruud; Boukortt, Sami; Szabadka, Zoltan; Bruse, Martin; Comsa, Iulia-Maria; Firsching, Moritz; Fischbacher, Thomas; Kliuchnikov, Evgenii; Gomez, Sebastian; Obryk, Robert; Potempa, Krzysztof; Rhatushnyak, Alexander; Sneyers, Jon; Szabadka, Zoltan; Vandervenne, Lode; Versari, Luca; Wassenberg, Jan (September 6, 2019). "JPEG XL next-generation image compression architecture and coding tools". In Tescher, Andrew G; Ebrahimi, Touradj (eds.). Applications of Digital Image Processing XLII. Vol. 11137. p. 20. Bibcode:2019SPIE11137E..0KA. doi: 10.1117/12.2529237 . ISBN   9781510629677.
  23. "butteraugli/butteraugli.h at master · google/butteraugli". GitHub. Retrieved August 2, 2021.