Encyclopedia of Color Science and Technology

2016 Edition
| Editors: Ming Ronnier Luo

CIELAB for Color Image Encoding (CIELAB, 8-Bit; Domain and Range, Uses)

  • Robert R. Buckley
  • Edward J. Giorgianni
Reference work entry
DOI: https://doi.org/10.1007/978-1-4419-8071-7_14

Synonyms

Definition

Using the L*, a*, and b* coordinates of the CIELAB uniform color space as the three component values of a 24-bit digital image.

CIELAB

Overview

CIE 1976 (L*, a*, b*) color space (or CIELAB) is widely used for image encoding and processing applications as diverse as color management, gamut mapping, color interchange, and color quality evaluation. What makes CIELAB attractive for these applications is its being an approximately uniform color space. A perceptually uniform scale generally enables the most efficient use of bits and the least visible artifacts when images are digitized for viewing by human observers.

CIELAB Color Space

In CIELAB color space a color stimulus is expressed in terms of L*, a*, and b* rectangular coordinates. The entry on CIELAB gives the formulas for calculating L*, a*, b* values from the X, Y, Z tristimulus values of the color stimulus and the X n , Y n , Z n tristimulus values of the reference white object color stimulus. CIELAB color space can be traced to the Munsell system, which was based on evaluating suprathreshold color differences of isolated reflective patches viewed against a gray background.

In the CIELAB color space, the L* value represents the lightness value of the stimulus. A stimulus that reflects no radiation over the visible wavelength band has an L* value of zero, while the perfectly diffusing reflector under the illuminant with tristimulus values X n , Y n , Z n has an L* value of 100. Stimuli with tristimulus values that are proportional to those of the reference white color stimulus will have a* and b* values of zero. This means that CIELAB is an opponent color space: a gray or achromatic stimulus with the same chromaticities as the normalizing white stimulus will lie on the L* axis, with black at one end and white at the other. The cube root formula for L* is a close approximation of the relationship between the Munsell value V and luminance factor Y/Y n , so L* is essentially the Munsell value scaled up by a factor of 10. The distance of a stimulus from the L* axis is given by the chroma value C* ab .

In an ideal perceptually uniform color space, the Euclidean distance between two color stimuli would correspond to the perceived difference between them. Ideally, then, pairs of color stimuli would look equally different if the three-dimensional distance between them in CIELAB color space, i.e., ΔE* ab , was the same, independent of the difference being along the L*, a*, or b* dimension or some combination of them. A ΔE* ab of 1 is generally considered a just perceptible difference, although the threshold depends on how the stimuli are compared and what part of color space they lie in because CIELAB is only approximately uniform. Since 1976, the CIE has published two extensions to the CIE 1976 L*a*b* color-difference formulas to improve perceptual uniformity in the calculation of color differences, i.e., CIE94 and CIEDE2000.

Figure 1 plots the a* and b* axes for CIE standard illuminants D50 and D65 on the x-y chromaticity diagram. In very rough terms, the a* axis runs from cyan to magenta and the b* axis, from blue to yellow. The range of a* and b* values is determined by the collection of samples at hand or that a given device can generate. Figure 2 shows selected L* planes of the volume generated in CIELAB color space by the MacAdam limits for reflectance materials with respect to CIE standard illuminants D50 and D65. For the L* planes shown in Fig. 2, the a* values range from −163 to 126.6 for illuminant D50 and from −168.2 to 145.6 for illuminant D65; the b* values range from −129.6 to 145.1 for illuminant D50 and from −127.7 to 145.3 for illuminant D65. These are theoretical limits on the values that can be obtained with reflectance materials.
CIELAB for Color Image Encoding (CIELAB, 8-Bit; Domain and Range, Uses), Fig. 1

a*, b* axes on a CIE x-y chromaticity diagram with (a) CIE standard illuminant D50 and (b) CIE standard illuminant D65 as normalizing illuminant

CIELAB for Color Image Encoding (CIELAB, 8-Bit; Domain and Range, Uses), Fig. 2

a* and b* values of the MacAdam limits for L* planes from 5 to 95 for (a) CIE standard illuminant D50 and (b) CIE standard illuminant D65 (Figure is based on data generously provided by Prof. Francisco Martinez-Verdú of the Colour & Vision Group at the University of Alicante)

The ranges obtained with object color stimuli encountered in practice with printed and photographic materials will be much less than the MacAdam limits. For example, Fig. 3 shows the Pointer colors measured with illuminant C, which has a correlated color temperature close to that of CIE illuminant D65. An update to the Pointer gamut with a revised set of stimuli and for CIE illuminant D50 is under development as this is being written.
CIELAB for Color Image Encoding (CIELAB, 8-Bit; Domain and Range, Uses), Fig. 3

a* and b* values of the Pointer colors for L* planes from 15 to 90

Quantization and Dynamic Range

A desirable property of a color space for image encoding is that it covers as large a gamut as needed with the fewest number of levels or digital values. Too many levels are wasteful; too few and an image will show visible contours or bands due to the lower precision in the quantization. Banding is most noticeable in areas with smooth gradients. If the sampling of values or quantization in color space is not fine enough, small differences in the original color values of adjacent pixels in such areas will become larger and potentially visible color differences after quantization. The usual solution is to ensure the quantization is fine enough, especially in the regions of color space where the human visual system is most sensitive to color differences. The addition of noise also can help. If the quantization is mathematically uniform, then quantizing the color space everywhere the same means that the quantization will be finer than it needs to be in regions of color space less sensitive to color differences, which is inefficient.

The optimum solution for a uniform color quantization of rendered images is to use a perceptually uniform color space. (Rendered images are defined here to mean images intended to be directly viewed by human observers.) This solution would use the fewest levels for a given limit on the maximum color error in the quantization or sampling process. This performance is achieved with a three-dimensional quantization based on a body-centered cubic lattice [1, 2], which would also give the minimum mean squared error if the input color stimuli were uniformly distributed [3]. A one-dimensional quantization based on a simple cubic lattice and that samples each CIELAB coordinate L*, a*, and b* independently would be suboptimal but more straightforward to implement. Another reason for less than optimal performance is that CIELAB is only approximately uniform. The divergence of CIELAB from true perceptual uniformity has led to extensions to improve upon various nonuniformities. Nevertheless, the original CIELAB color space is still widely used for many color imaging applications.

For one-dimensional quantization, 8 bits are sufficient to quantize the range of a* or b* values for reflection images typically encountered in practice. While 7 bits would be enough to represent numerical values from 0 to 100, the use of 8 bits generally would be more convenient in a digital system. Moreover, there are perceptual grounds for using a minimum of 8 bits to quantize the L* coordinate in color images. As mentioned earlier, isolated color patches were used in the development of the Munsell system to which CIELAB color space can be traced. When such patches abut along a sharp edge, smaller color differences are detectable. There are historical data [4] and more recent analysis [5] to justify scaling the L* value up to 8 bits so that the just noticeable differences along the L*, a*, and b* axes across a sharp edge are more nearly equal. Also, the greater weighting given to L* differences in color-difference equations in some applications recognizes a generally greater sensitivity to luminance differences compared to chromatic differences.

While there may be room for discussion and debate about the exact value of the scaling factor to use for the lightness coordinate, from the beginning standard engineering practice has been to use 8 bits when encoding L* in color images [2, 6]. Some CIELAB applications, especially those in which CIELAB-encoded images may later be subjected to significant amounts of additional image processing, may instead specify 12 or 16 bits per coordinate.

CIELAB image data is generated by converting linear tristimulus or image values. Since CIELAB is a nonlinear transform of (linear) XYZ tristimulus values, 12 bits of tristimulus values are needed to address all 256 levels in an 8-bit CIELAB system in order to minimize quantization errors and banding. Nonlinear 8-bit-per-coordinate RGB encodings such as sRGB can be converted to CIELAB using a combination of matrices and one-dimensional lookup tables as long as sufficiently greater bit precision is used in the intermediate conversion stages. Three-dimensional lookup tables are often used for such conversions.

Because CIELAB was developed to be a mathematical representation of the Munsell system – an approximately uniform space based on reflective color patches – it follows that CIELAB should be well suited for encoding images on reflection media having luminance dynamic ranges and chromaticity boundaries similar to those of the Munsell system color set. In practice, this often is the case. Color images on most reflection media can be encoded satisfactorily in terms of 24-bit (8 bits per channel) CIELAB values if those values are used judiciously. In particular, the luminance dynamic range of the image medium generally should not exceed a visual density range of about 2.50 (a luminance ratio of just over 300:1). The exact luminance dynamic range that can be encoded in terms of 8-bit CIELAB L* values will depend on a number of factors, most notably the amount of noise in the images. The greater the noise, the less visible quantization artifacts such as contouring will be. In many imaging systems, the noise inherent in the original images and the additional noise contributed by scanners, display devices, and media are sufficient to mask quantization artifacts. However, in other cases, such as virtually noise-free digitally created images, noise in the form of dithering may need to be computationally added in order to avoid unacceptable quantization when 8-bit-per-channel CIELAB encoding is used.

Encoding in terms of 8-bit-per-channel CIELAB values sometimes can be problematic even when applied to images on reflection media or other imaging media or devices having comparable luminance dynamic ranges. In particular, undesirable banding and other artifacts may result if the encoded images are subjected to significant additional image processing. For example, if an image encoded at 8-bit-per-channel CIELAB is appreciably lightened or darkened by subsequent signal processing, quantization effects that originally may have been subthreshold may become visible in image shadow or highlight areas of the processed image. In an extreme case, image processing might be used to reverse the sign of an image, e.g., to make a positive original image into a negative image. In that case, the L* quantization of the original image would no longer be appropriate for the transformed image, and undesirable quantization effects likely would result.

Another consideration for 8-bit-per-channel CIELAB encoding, as well as for virtually any other 8-bit-per-channel encoding, is its applicability for rendered images having luminance dynamic ranges or chromaticity gamuts significantly greater than those of the Munsell system. For example, imaging devices such as digital projectors and media such as photographic slide films and motion picture films have luminance dynamic ranges considerably greater than those of typical reflection media. When the perceived lightness of such images is first appropriately adjusted for observer general brightness adaptation and then expressed in terms of CIELAB values, the resulting L* values can range from well below 1.0 to well over 100 [7]. The luminance dynamic ranges of high dynamic range (HDR) digital projectors and other HDR display devices are even greater, and the primaries of such devices can be capable of producing chromaticity color gamuts much larger than that of the Munsell system. In addition, images to be encoded may be colorimetric representations of original scenes rather than of rendered reproductions. Unrendered scene colorimetric values may be in the form of camera RAW values from a digital camera, computationally derived values from scans of color negatives or other photographic media, or values produced by computer-generated imaging (CGI). Such values can greatly exceed those that can be adequately represented by virtually any 24-bit encoding metric, including 8-bit-per-channel color encodings based on CIELAB and other color spaces derived from the Munsell system.

CIELAB Encodings

Different image formats and the applications that use them have made different encoding choices for CIELAB. One of the first standards to define a CIELAB encoding for image and document processing applications was the Xerox Color Encoding Standard [8]. Since then the TIFF, PDF, and JPX formats also have defined CIELAB encodings.

An obvious way to digitally encode L*, a*, and b* values is to convert them to integer values. The TIFF CIELAB encoding [9] does this, using an unsigned integer value for L* and signed integer values for a* and b*. Other encodings have been designed that use unsigned integers and map the L*, a*, and b* values encountered in practice to match the 8-bit range so as to reduce quantization errors by making best use of the 8 bits available for encoding the values.

When CIELAB is used for image encoding, then the two main choices are:
  • What does the L* range represent?

  • What mapping should be used to encode the a* and b* values?

The following equations map L*, a*, and b* values to 8-bit encoded L, A, and B values:
$$ L={\mathrm{scale}}_L \times {L}^{*} + {\mathrm{offset}}_L = \frac{255}{\left({L}_{\max}^{*}-{L}_{\min}^{*}\right)}\ \left({L}^{*} - {L}_{\min}^{*}\right) $$
$$ A={\mathrm{scale}}_A \times {a}^{*} + {\mathrm{offset}}_A = \frac{255}{\left({a}_{\max}^{*}-{a}_{\min}^{*}\right)}\ \left({a}^{*} - {a}_{\min}^{*}\right) $$
$$ B={\mathrm{scale}}_B \times {b}^{*} + {\mathrm{offset}}_B = \frac{255}{\left({b}_{\max}^{*}-{b}_{\min}^{*}\right)}\ \left({b}^{*} - {b}_{\min}^{*}\right) $$
The encodings can be described using either scale and offset parameters or the minimum and maximum values that are mapped to the 8-bit values 0 and 255. In some formats, the encoding parameters are defined by the format; in others, the user can explicitly set them with default values usually available.

In most formats the L scale factor scale L is 255/100 and the L offset parameter offset L is 0. The equivalent minimum and maximum L* values are 0 and 100. This means that L* values of 0 and 100 are encoded as 0 and 255. This is the default L* encoding in TIFF and PDF. In these formats, an L* value of 100 corresponds to the perfect diffusing reflector under the specified illuminant. In the case of the TIFF CIELAB encoding, the illuminant is not part of the encoding specification. PDF requires that the diffuse white point be specified. Specifying the illuminant is optional in JPX, which uses CIE illuminant D50 as the default. A question sometimes asked is what illuminant should be used with CIELAB. The answer is the reference illuminant used to measure or calibrate the XYZ or RGB values from which the CIELAB values were derived.

The a* and b* values typically encountered in practice lie within the 8-bit range from −128 to 127 so they can be encoded using a scale factor of 1 and an offset of 0, which is what the TIFF CIELAB encoding does [9]. The encoded A and B values that result are signed 8-bit integers. The TIFF ICCLAB encoding [10] uses an offset value of 128 instead so that the encoded A and B values are unsigned 8-bit integers, as they are in the 8-bit encoding that the International Color Consortium (ICC) profile format standard uses when CIELAB is the profile connection space [11]. Figure 4 shows the encoded L, A, and B components for the TIFF ICCLAB encoding of a sample image, where a* and b* values of 0 are encoded as 128.
CIELAB for Color Image Encoding (CIELAB, 8-Bit; Domain and Range, Uses), Fig. 4

Clockwise from upper left, original color image and its L*, a*, and b*components encoded using the TIFF ICCLAB encoding

Since the ranges of typical a* and b* values are usually much less than 255, a scale factor greater than 1 (or equivalently a maximum-minimum difference of less than 255) would expand the range encountered in practice to fill the full range available with 8 bits. The TIFF ITULAB encoding [12] allows an application to specify the minimum and maximum values of a* and b* that map to the encoded values 0 and 255. This encoding matches the CIELAB encoding used by color facsimile [13]. PDF [14] provides the same CIELAB encoding for images. JPX [15], the extended version of the JP2 base file format for JPEG 2000, provides an equivalent capability by allowing an application to specify the ranges of a* and b* values that map onto the range of 8-bit values and the offsets to go with them.

Besides using the full range available with an 8-bit encoding, scaling the a* and b* values also reduces quantization errors, especially when image compression is used. This was important for color facsimile, where reasonable transmission times require the use of moderate to high levels of JPEG compression, which can lead to visible “blockiness” in the decompressed image. Scaling the a* and b* values reduces the effects of the quantization error caused by aggressive JPEG compression. The default scaling defined in the ITU color facsimile standards was based on the range obtained by measuring a wide range of hardcopy materials; the range was −85 to +85 for a* and −75 to +125 for b*. The default illuminant for the CIELAB encoding is CIE illuminant D50. The color facsimile standards allow color fax machines to negotiate the use of custom a* and b*ranges and other illuminants.

The case for scaling up the L* values encountered in practice to fill the full 8-bit range is less compelling since the values encountered in practice already cover most of the available range. For example, the minimum and maximum reflectance values for the reference medium defined by the ICC are 0.30911 % and 89 %, corresponding to a visual density range of about 2.46 (a luminance ratio of about 288:1) and minimum and maximum L* values of 2.79 and 95.58, using the perfectly diffusing reflector as the white reference. While higher dynamic ranges with L* values greater than 100 originating from scenes and photographic films can be modified to fit within an 8-bit range, the results can be loss of detail due to the tone compression and limited precision provided by 8 bits in those cases.

Table 1 compares 8-bit CIELAB encodings in terms of the defaults for minimum and maximum L*, a*, and b* values and whether the format allows an application to set the ranges for L*, a*, or b*. While the focus here is on 8-bit encodings, these formats also support 16-bit CIELAB encodings.
CIELAB for Color Image Encoding (CIELAB, 8-Bit; Domain and Range, Uses), Table 1

Default component ranges for 8-bit CIELAB encodings

Format – encoding

L*

a*

b*

Range settable

Min

Max

Min

Max

Min

Max

TIFF – CIELAB

0

100

−128

127

−128

127

No

TIFF – ICCLAB

0

100

−128

127

−128

127

No

TIFF – ITULAB

0

100

−85

85

−75

125

L*, a*, b*

PDF – Lab

0

100

−100

100

−100

100

a*, b*

JPX – CIELab

0

100

−85

85

−75

125

L*, a*, b*

In the CIELAB encodings described thus far, an L* value of 100 corresponds to the perfectly diffusing reflector under the specified illuminant. This is not always the case with the CIELAB encoding that the ICC defines for the profile connection space (PCS). The PCS is the color space to or from which input and output device coordinates can be transformed. (Besides CIELAB, the PCS may also use an XYZ encoding.) This makes it possible to connect an arbitrary input device to an arbitrary output device via the PCS in an ICC-based color management system, since a device only needs to know how to transform its coordinates to or from PCS coordinates. Such transforms are defined in device profiles. Transforms can have different intents such as perceptual, where the objective is a pleasing reproduction, or colorimetric, where the objective is a colorimetrically accurate reproduction of the tristimulus values.

Lookup table-based profiles for the perceptual rendering intent on input, output, and display devices all use CIELAB as the PCS; both 8- and 16-bit versions are defined. The CIELAB values of the PCS are calculated with XYZ tristimulus values that are normalized with respect to the media white point under CIE illuminant D50 rather than the perfectly diffusing reflector. (The PCS CIELAB values for the colorimetric intent are calculated with reference to the perfectly diffusing reflector.) In keeping with the orientation to graphic arts and desktop publishing applications, V4 of the ICC specification [11] defined the reference medium for calculating the PCS values of the perceptual rendering as a reflection print on a substrate with a neutral reflectance of 89 % and where the darkest printable color has a neutral reflectance of 0.30911 %. Therefore, the L* value of the unprinted substrate is 100 and of the darkest printable color is 3.1373. With the 8-bit CIELAB encoding used for the PCS, these values are scaled and encoded as 255 and 8, respectively. A scale factor of 1 and an offset of 128 are used for the a* and b* values, as in the TIFF ICCLAB encoding.

The adoption of a reference medium, and subsequently of a reference medium gamut, was designed to improve interoperability within an ICC-based workflow using the perceptual intent. Because a perceptual transform from source to destination media usually required gamut mapping, the gamut of the reference medium used for the PCS was explicitly defined. Besides specifying the endpoints of the L* scale of the perceptual reference medium, this meant specifying the a* and b* limits as well. For this the ICC used the reference color gamut defined in ISO 12640-3 [16] and shown in Fig. 5. As with the PCS, the L*, a*, and b* values in Fig. 5 were calculated using the reference medium (instead of the perfectly diffusing reflector) with CIE illuminant D50 as the reference white object color in the L*, a*, and b* equations. The ISO 12640-3 standard also specifies a set of TIFF (specifically TIFF/IT) images with 16-bit CIELAB values that use the ICC PCS encoding and are within the limits of the reference gamut in Fig. 5.
CIELAB for Color Image Encoding (CIELAB, 8-Bit; Domain and Range, Uses), Fig. 5

a* and b* values of the ISO 12640-3 reference color gamut for L* planes from 5 to 95

Conclusions

Based on this discussion, it can be concluded that 8-bit-per-channel CIELAB is appropriate and well suited for digitally encoding color images when all of the conditions below apply:
  • The images to be encoded are rendered reproductions.

  • The luminance dynamic range and overall color gamut of the images are consistent with those of the Munsell system.

  • Appropriate mathematical transformations, such as scale factors and offsets, are used to maximize the efficiency of the CIELAB encoding.

  • Relatively limited subsequent image processing is applied to CIELAB-encoded images.

Cross-References

References

  1. 1.
    Buckley, R.: The quantization of CIE uniform color spaces using cubic lattices. In: Colour 93; 7th Congress of the AIC. pp. 246–247. International Colour Association (AIC), Budapest (1993)Google Scholar
  2. 2.
    Buckley, R.: Color Image coding and the geometry of color space. Ph.D. thesis. Massachusetts Institute of Technology, Cambridge (1981)Google Scholar
  3. 3.
    Barnes, E.S., Sloane, N.J.A.: The optimal lattice quantizer in three dimensions. SIAM J. Algebraic Discrete Methods 4, 30–41 (1983)MathSciNetMATHCrossRefGoogle Scholar
  4. 4.
    Nickerson, D., Newhall, S.M.: A psychological color solid. J. Opt. Soc. Am. 33, 419–422 (1943)ADSCrossRefGoogle Scholar
  5. 5.
    Melgosa, M.: Testing CIELAB-based color-difference formulas. Color. Res. Appl. 25, 49–55 (2000)CrossRefGoogle Scholar
  6. 6.
    Schreiber, W.F., Buckley, R.R.: A two-channel picture coding system: II – adaptive companding and color coding. IEEE Trans. Commun. COM-29, 1849–1858 (1981)CrossRefGoogle Scholar
  7. 7.
    Giorgianni, E.J., Madden, T.E.: Digital Color Management: Encoding Solutions, 2nd edn, pp. 235–237. Wiley, Chichester (1998)Google Scholar
  8. 8.
    Xerox Systems Institute: Xerox Color Encoding Standard XNSS 288811, Sunnyvale (1989)Google Scholar
  9. 9.
    Adobe Systems Inc: TIFF, Revision 6.0, Mountain View (1992)Google Scholar
  10. 10.
    Adobe Systems Inc: Adobe Pagemaker® 6.0 TIFF Technical Notes, Mountain View (1995)Google Scholar
  11. 11.
    International Color Consortium: Specification ICC.1:2010 (Profile Version 4.3.0.0) Image technology colour management – Architecture profile format and data structure http://color.org/specification/ICC1v43_2010-12.pdf (2010). Accessed 2 Jan 2013.
  12. 12.
    Internet Engineering Task Force (IETF): RFC 3949, File Format for Internet Fax (2005)Google Scholar
  13. 13.
    International Telecommunication Union (ITU): ITU-T Recommendation T.42 Continuous tone colour representation method for facsimile (2003)Google Scholar
  14. 14.
    International Organization for Standardization (ISO): ISO 32000-1:2008, Document management – Portable document format – Part 1: PDF 1.7 (2008)Google Scholar
  15. 15.
    International Organization for Standardization (ISO): ISO 15444-2: 2004, Information technology – JPEEG 2000 image coding system: Extensions (2004)Google Scholar
  16. 16.
    International Organization for Standardization (ISO): ISO 12640-3:2007, Graphic technology – Prepress digital data exchange – Part 3: CIELAB standard colour image data (CIELAB/SCID)Google Scholar

Copyright information

© Springer Science+Business Media New York 2016

Authors and Affiliations

  1. 1.National Archives of the UAEAbu DhabiUAE
  2. 2.Department of Electrical and Computer EngineeringUniversity of RochesterRochesterUSA