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.
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 is also useful in the study of color blindness, when one or more cone types are defective.
The cone response functions
\bar{l}(λ),\bar{m}(λ),\bar{s}(λ)
J(λ)
L=
infty | |
\int | |
0 |
J(λ)\bar{l}(λ)dλ
M=
infty | |
\int | |
0 |
J(λ)\bar{m}(λ)dλ
S=
infty | |
\int | |
0 |
J(λ)\bar{s}(λ)dλ
The cone response functions are normalized to have their maxima equal to unity.
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.
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.
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:
The Hunt and RLAB color appearance models use the Hunt–Pointer–Estevez transformation matrix (MHPE) for conversion from CIE XYZ to LMS.[2] [3] [4] 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).
\beginL\\M\\S\end_\text=\left[\begin{array}{lll} \phantom{-}0.38971 & \phantom{-}0.68898 & -0.07868\\ -0.22981 & \phantom{-}1.18340 & \phantom{-}0.04641\\ \phantom{-}0 & \phantom{-}0 & \phantom{-}1 \end{array}\right]\beginX\\Y\\Z\end
\beginL\\M\\S\end_=\left[\begin{array}{lll} \phantom{-}0.4002 & \phantom{-}0.7076 & -0.0808 \\ -0.2263 & \phantom{-}1.1653 & \phantom{-}0.0457 \\ \phantom{-}0 & \phantom{-}0 & \phantom{-}0.9182 \end{array}\right]\beginX\\Y\\Z\end
The original CIECAM97s color appearance model uses the Bradford transformation matrix (MBFD) (as does the LLAB color appearance model).[1] 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.[6]
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.
A revised version of CIECAM97s switches back to a linear transform method and introduces a corresponding transformation matrix (MCAT97s):[7]
The sharpened transformation matrix in CIECAM02 (MCAT02) is:[8] [1]
CAM16 uses a different matrix:[9]
As in CIECAM97s, after adaptation, the colors are converted to the traditional Hunt–Pointer–Estévez LMS for final prediction of visual results.
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).[10] [11] The functions are derived from Stiles and Burch 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.[12]
The Stockman & Sharpe functions can then be turned into a set of three color-matching functions similar to the CIE 1931 functions.[13]
Let
l{P}i(λ)=(\bar{l}(λ),\bar{m}(λ),\bar{s}(λ))
l{Q}i(λ)=(\bar{x}F(λ),\bar{y}F(λ),\bar{z}F(λ))
l{Q}i(λ)=\sum
3 | |
j=1 |
Tijl{P}j(λ)
Tij
For any spectral distribution
J(λ)
Pi=(L,M,S)
J(λ)
Qi=(X,Y,Z)F
Qi=
infty | |
\int | |
0 |
J(λ)l{Q}i(λ)dλ=
infty | |
\int | |
0 |
J(λ)
3 | |
\sum | |
j=1 |
Tijl{P}j(λ)dλ=
3 | |
\sum | |
j=1 |
TijPj
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
J(λ)
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.
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
E=h\nu=hc/λ
JQ(λ)=JE(λ)(λ/hc)
For example, if JE(λ) is spectral radiance with the unit W/m2/sr/m, then the quantal equivalent JQ(λ) characterizes that radiation with the unit photons/s/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:
CEi=
infty | |
\int | |
0 |
JE(λ)CEλ(λ)dλ =
infty | |
\int | |
0 |
JQ(λ)(hc/λ)CEλ(λ)dλ
Define the quantal color matching functions:
CQλ(λ)=(CEλ(λ)/λ)/(CEλ(λimax)/λimax)
CQi=
infty | |
\int | |
0 |
JQ(λ)CQλ(λ)dλ
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
CEi=(hc/λimax)CEλ(λimax)CQi
For the LMS color space,
λimax
CEi/CQi=\{3.49694,3.1253,0.144944\} x 10-19
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.[14]
A related application is making color filters for color-blind people to more easily notice differences in color, a process known as daltonization.[15]
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.[16]
The colorspace originates from Guetzli's butteraugli metric,[17] and was passed down to JPEG XL via Google's Pik project.