Lab color space

From Wikipedia, the free encyclopedia

Jump to: navigation, search
The L*a*b* color space, showing only colors that fit within the sRGB gamut (and can therefore be displayed on a typical computer display).  Each axis of each square ranges from -128 to 128.
The L*a*b* color space, showing only colors that fit within the sRGB gamut (and can therefore be displayed on a typical computer display). Each axis of each square ranges from -128 to 128.

A Lab color space is a color-opponent space with dimension L for luminance and a and b for the color-opponent dimensions, based on nonlinearly-compressed CIE XYZ color space coordinates.

The coordinates of the Hunter 1948 L, a, b color space are L, a, and b.[1][2] However, Lab is now more often used as an informal abbreviation for the CIE 1976 (L*, a*, b*) color space (also called CIELAB, whose coordinates are actually L*, a*, and b*). Thus the initials Lab by themselves are somewhat ambiguous. The color spaces are related in purpose, but differ in implementation.

Both spaces are derived from the "master" space CIE 1931 XYZ color space, which can predict which spectral power distributions will be perceived as the same color (see metamerism), but which is not particularly perceptually uniform. Strongly influenced by the Munsell color system, the intention of both “Lab” color spaces is to create a space which can be computed via simple formulas from the XYZ space, but is more perceptually linear than XYZ.[3] Perceptually linear means that a change of the same amount in a color value should produce a change of about the same visual importance. When storing colors in limited precision values, this can improve the reproduction of tones. Both Lab spaces are relative to the whitepoint of the XYZ data they were converted from. Lab values do not define absolute colors unless the whitepoint is also specified. Often, in practice, the whitepoint is assumed to follow a standard and is not explicitly stated (e.g., for absolute rendering intent ICC L*a*b* values are relative to CIE standard illuminant D50, while they are relative to the unprinted substrate for other rendering intents).[4]

CIELAB is calculated using cube roots, and Hunter Lab is calculated using square roots.[5][clarify] Except where data must be compared with existing Hunter L,a,b values, it is recommended that CIELAB be used for new applications.[5]

Contents

[hide]

[edit] Advantages of Lab

Unlike the RGB and CMYK color models, Lab color is designed to approximate human vision. It aspires to perceptual uniformity, and its L component closely matches human perception of lightness. It can thus be used to make accurate color balance corrections by modifying output curves in the a and b components, or to adjust the lightness contrast using the L component. These transformations are difficult or impossible in the RGB or CYMK spaces, which model the output of physical devices, rather than human visual perception.

Because Lab space is much larger than the gamut of computer displays, printers, or even human vision, a bitmap image represented as Lab requires more data per pixel to obtain the same precision as an RGB or CMYK bitmap. In the 1990s, when computer hardware and software was mostly limited to storing and manipulating 8 bit/channel bitmaps, converting an RGB image to Lab and back was a lossy operation. With 16 bit/channel support now common, this is no longer such a problem.

Additionally, many of the “colors” within Lab space fall outside the gamut of human vision, and are therefore purely imaginary; these “colors” cannot be reproduced in the physical world. Though color management software, such as that built in to image editing applications, will pick the closest in-gamut approximation, changing lightness, colorfulness, and sometimes hue in the process, author Dan Margulis claims that this access to imaginary colors is useful going between several steps in the manipulation of a picture.[6]

[edit] Which "Lab"?

Some specific uses of the abbreviation in software, literature etc.

[edit] CIE 1976 (L*, a*, b*) color space (CIELAB)

CIE L*a*b* (CIELAB) is the most complete color model used conventionally to describe all the colors visible to the human eye. It was developed for this specific purpose by the International Commission on Illumination (Commission Internationale d'Eclairage, hence its CIE initialism). The asterisk (*) after L, a and b are part of the full name, since they represent L*, a* and b*, to distinguish them from L, a and b. Because the Red/Green and yellow/blue opponent channels are computed as differences of Munsell-value-like transformations of (putative) cone responses, CIELAB is an Adams Chromatic Value Space.

The three basic coordinates represent the lightness of the color (L*, L* = 0 yields black and L* = 100 indicates white), its position between red/magenta and green (a*, negative values indicate green while positive values indicate magenta) and its position between yellow and blue (b*, negative values indicate blue and positive values indicate yellow).[clarify]

The L*a*b* color model has been created to serve as a device independent model to be used as a reference. Therefore it is crucial to realize that the visual representations of the full gamut of colors in this model are never accurate. They are there just to help in understanding the concept, but they are inherently inaccurate.

Since the L*a*b* model is a three dimensional model, it can only be represented properly in a three dimensional space. [8]

The "L*a*b*" model can also be expressed as"L*C*h(a*, b*)", which transforms a* and b* to a radial representation. [9]

[edit] Measuring differences

CIE 1976 L*a*b* is based directly on the CIE 1931 XYZ color space as an attempt to linearize the perceptibility of color differences, using the color difference metric described by the MacAdam ellipse.[clarify] The non-linear relations for L*, a*, and b* are intended to mimic the logarithmic response of the eye. Coloring information is referred to the color of the white point of the system, subscript n.[10]

Uniform changes of components in the L*a*b* color model aim to correspond to uniform changes in perceived color. So the relative perceptual differences between any two colors in L*a*b* can be approximated by treating each color as a point in a three dimensional space (with three components: L*, a*, b*) and taking the euclidean distance between them.[10] This Euclidean distance in L*a*b* space is ΔE (often called “Delta E,” and more precisely ΔE*ab).

Using ({L_1}^*,\ {a_1}^*,\ {b_1}^*) and ({L_2}^*,\ {a_2}^*,\ {b_2}^*), two colors in L*a*b*:

\Delta {E^*}_{ab} = \sqrt{ ({L_2}^*-{L_1}^*)^2+({a_2}^*-{a_1}^*)^2 + ({b_2}^*-{b_1}^*)^2 }\,

A related color space, the CIE 1976 (L*, u*, v*) color space, which follows the same principles as L*a*b* but has a different representation of the u* and v* components (preserving the same L*).

[edit] RGB and CMYK conversions

There are no simple formulas for conversion between RGB or CMYK values and L*a*b*, because the RGB and CMYK color models are device dependent. The RGB or CMYK values first need to be transformed to a specific absolute color space, such as sRGB or Adobe RGB. This adjustment will be device dependent, but the resulting data from the transform will be device independent, allowing data to be transformed to the CIE 1931 color space and then transformed into L*a*b*.

[edit] XYZ to CIE L*a*b* (CIELAB) and CIELAB to XYZ conversions

[edit] The forward transformation

L^* = 116\,f(Y/Y_n) - 16
a^* = 500\,[f(X/X_n) - f(Y/Y_n)]
b^* = 200\,[f(Y/Y_n) - f(Z/Z_n)]

where

f(t) = t^{1/3}\, for  t > 0.008856\,
f(t) = 7.787\,t + 16/116 otherwise

Here Xn, Yn and Zn are the CIE XYZ tristimulus values of the reference white point.

The division of the f(t) function into two domains was done to prevent an infinite slope at t = 0. f(t) was assumed to be linear below some t = t0, and was assumed to match the t1 / 3 part of the function at t0 in both value and slope. In other words:

t_0^{1/3}\, =\, a t_0 + b\, (match in value)
1/(3t_0^{2/3})\, =\, a\, (match in slope)

The value of b was chosen to be 16/116. The above two equations can be solved for a and t0:

a\, =\, 1/(3\delta^2)\, = 7.787037\cdots
t_0\, =\, \delta^3\, = 0.008856\cdots

where δ = 6 / 29. Note that 16 / 116 = 2δ / 3

[edit] The reverse transformation

The reverse transformation is as follows (with δ = 6 / 29 as mentioned above):

  1. define f_y\ \stackrel{\mathrm{def}}{=}\  (L^*+16)/116
  2. define f_x\ \stackrel{\mathrm{def}}{=}\  f_y+a^*/500
  3. define f_z\ \stackrel{\mathrm{def}}{=}\  f_y-b^*/200
  4. if f_y > \delta\, then Y=Y_nf_y^3\,   else Y=(f_y-16/116)3\delta^2Y_n\,
  5. if f_x > \delta\, then X=X_nf_x^3\,   else X=(f_x-16/116)3\delta^2X_n\,
  6. if f_z > \delta\, then Z=Z_nf_z^3\,   else Z=(f_z-16/116)3\delta^2Z_n\,

[edit] Hunter Lab Color Space

L is a correlate of Lightness, and is computed from the Y tristimulus value using Priest's approximation to Munsell value:

L=100\sqrt{Y \over Y_n}

where Yn is the Y tristimulus value of a specified white object. For surface-color applications, the specified white object is usually (though not always) a hypothetical material with unit reflectance and which follows Lambert's law. The result will be Ls scaled between 0 (black) and 100 (white); roughly 10 times Munsell value. Note, however, that a mid-range Lightness of 50 is produced not by a Y of 50, but rather of 25.[citation needed]

a and b are termed opponent color axes. a represents, roughly, Redness (positive) versus Greenness (negative), and is computed:

a=K_a\left(\frac{X/X_n-Y/Y_n}{\sqrt{Y/Y_n}}\right)

where Ka is a coefficient which depends upon the illuminant (for D65, Ka is 172.30; see approximate formula below) and Xn is the X tristimulus value of the specified white object.

The other opponent color axis, b, is positive for yellow colors and negative for blue colors. It is computed as:

b=K_b\left(\frac{Y/Y_n-Z/Z_n}{\sqrt{Y/Y_n}}\right)

where Kb is a coefficient which depends upon the illuminant (for D65, Kb is 67.20; see approximate formula below) and Zn is the Z tristimulus value of the specified white object.[11]

Both a and b will be zero for objects which have the same chromaticity coordinates as the specified white objects. Usually this is the case for neutrals.

[edit] Approximate formulas for Ka and Kb

In the previous version of the Hunter Lab color space, Ka was 175 and Kb was 70. Apparently, Hunter Associates Lab discovered that better agreement could be obtained with other color difference metrics, such as CIELAB (see below) by allowing these coefficients to depend upon the illuminants. Approximate formulae are:

K_a\approx\frac{175}{198.04}(X_n+Y_n)
K_b\approx\frac{70}{218.11}(Y_n+Z_n)

which result in the original values for Illuminant C, the original illuminant with which the Lab color space was used.

[edit] The Hunter Lab Color Space as an Adams Chromatic Valance Space

Adams Chromatic Valance spaces are based on two elements: a (relatively) uniform lightness scale, and a (relatively) uniform chromaticity diagram.[12] If we take as the uniform lightness scale Priest's approximation to the Munsell Value scale, which would be written in modern notation:

L=100\sqrt{Y \over Y_n}

and, as the uniform chromaticity coordinates:

c_a=\frac{X/X_n}{Y/Y_n}-1=\frac{X/X_n-Y/Y_n}{Y/Y_n}
c_b=k_e\left(1-\frac{Z/Z_n}{Y/Y_n}\right)=k_e\frac{Y/Y_n-Z/Z_n}{Y/Y_n}

where ke is a tuning coefficient, we obtain the two chromatic axes:

a=K\cdot L\cdot c_a=K\cdot 100\sqrt{Y/Y_n}\frac{X/X_n-Y/Y_n}{Y/Y_n}=K\cdot 100\frac{X/X_n-Y/Y_n}{\sqrt{Y/Y_n}}

and

b=K\cdot L\cdot c_b=K\cdot k_e\cdot 100\sqrt{Y/Y_n}\frac{Y/Y_n-Z/Z_n}{Y/Y_n}=K\cdot k_e\cdot 100\frac{Y/Y_n-Z/Z_n}{\sqrt{Y/Y_n}}

which is identical to the Hunter Lab formulae given above if we select K = Ka / 100 and ke = Kb / Ka. Therefore, the Hunter Lab color space is an Adams Chromatic Valance space.

[edit] References

  1. ^ Richard S Hunter, abstract, Journal of the Optical Society of America, 38:661 (1948).
  2. ^ Richard S Hunter, abstract, Journal of the Optical Society of America, 38:1094 (1948).
  3. ^ handprint.com explanation of this history: http://www.handprint.com/HP/WCL/color7.html#CIELUV
  4. ^ a b International Color Consortium, Specification ICC.1:2004-10 (Profile version 4.2.0.0) Image technology colour management — Architecture, profile format, and data structure, (2006).
  5. ^ a b Hunter L,a,b Versus CIE 1976 L*a*b* (PDF)
  6. ^ a b Dan Margulis. Photoshop Lab Color: The Canyon Conundrum and Other Adventures in the Most Powerful Colorspace, ISBN 0321356780. 
  7. ^ TIFF: Revision 6.0. Adobe Developers Association, 1992
  8. ^ See here for 3D representations of the L*a*b* gamut.
  9. ^ See [1] for information on L*C*h and conversion formulas.
  10. ^ a b "Anil K. Jain" (1989). "Fundamentals of Digital Image Processing". New Jersey, United States of America: Prentince-Hall Inc., p. 68, 71, 73. ISBN 0-13-336165-9. 
  11. ^ Hunter Labs (1996). "Hunter Lab Color Scale". Insight on Color 8 9 (August 1-15, 1996). Reston, VA, USA: Hunter Associates Laboratories.
  12. ^ Adams, E. Q. (1942). "X-Z planes in the 1931 I.C.I. system of colorimetry". JOSA 32 3: 168-173.

[edit] External links

Personal tools