United States [change]

Fully Utilizing Photo CD Images
Article No. 4 - PhotoYCC Color Encoding and Compression Schemes

[ICON] Download an ADOBE Acrobat version for printing (31K)

Contents

Introduction

This article is the fourth in a series in which we will discuss selected topics covering the imaging science of the KODAK Photo CD system. The goals of this series are to further your understanding of the photo CD technology and to provide you with information to help you maximize the quality of each Photo CD image.In response to reader requests, this article focuses on reviewing the KODAK PhotoYCC colorencoding and compression schemes used when we process images as they are written to the KODAK Photo CD disc.

Goals of the PhotoYCC Color-Encoding Scheme

Kodak developed the PhotoYCC color-encoding scheme to:

  • Provide a definition that enables the consistent representation of digital color images from negatives, slides, or other high- quality input;

  • Provide sufficient dynamic range and color gamut to allow for the processing of images for the output of highquality Photo CD images to current and future monitor displays, as well as to highquality hardcopy devices

  • Define a conversion from RGB color data to luma and chroma data to allow efficient image data compression

  • Use the RGB reference primaries recommended for video systems to allow rapid display of highquality photographic images on monitors and computer displays worldwide

  • Provide a scheme that works not only with the display and hardcopy technologies of today, but also with those that may emerge in the future.

Overview

To store and convey color and tone information for each individual image pixel, an imagestorage system must have a colorencoding scheme. Such a scheme can be based on the varying intensities of the three phosphors in a cathode ray tube (CRT) or on the amounts of colorants used to produce a print. This type of scheme requires values that are output devicedependent, because the values stored for a particular image pixel will depend on the targeted output device.

An output device based color encoding scheme enables straightforward image reproduction on the target device, without requiring complex signal processing to optimize image reproduction for the target device characteristics. However, such a scheme is limited by the color gamut and other parameters of the targeted device and cannot track future enhancements in output devices.

Regardless of the final output medium, most images are displayed and manipulated on some type of videobased device. Typically, the user of the device must wait for the system to display the image. The display time to a quality video device becomes a major factor in the design of the system. To make video display efficient, Kodak based the PhotoYCC scheme on video standards, notably on aspects of CCIR Recommendation 6011 and also on the international recommendation for high definition television production and exchange, CCIR Recommendation 709. As described later, the PhotoYCC definition is defined in a manner that is not constrained by the limitations of the actual video display.

Consistent, high quality image reproductions from Photo CD discs can be obtained by converting PhotoYCC color information into forms that are appropriate for other image reproduction systems.

Definition of the Reference Image-Capturing Device

The PhotoYCC colorencoding scheme is defined in terms of a reference imagecapturing device. This reference device can sense and quantify every scene color, including all colors recorded by traditional photographic media. Therefore, the colorencoding scheme is not limited by any physical output device.

A Photo CD image is encoded as if the original scene were illuminated by CIE Standard Illuminant D65 and captured by the reference image capturing device. The spectral sensitivities of the reference image capturing device are proportional to the colormatching functions for the CCIR Recommendation 709 reference primaries.

Note that the RGB values delivered by the reference imagecapturing device are not constrained to positive values. This allows the PhotoYCC scheme to include colors outside the CCIR 709 display primary gamut. Furthermore, the reference imagecapture device values may exceed the values for a 100% white in order to preserve important specular highlight information. In general, RGB values from "real world" devices such as film scanners must be converted through nonlinear transformations to the reference imagecapture device RGB values. In the KODAK Photo CD Imaging Workstation, these conversions utilize "film terms" which are derived considering the scanner and film properties. For more details, see the article in this series entitled: "Fully Utilizing Photo CD Images: Universal Film Terms for Reversal Films".

Formation of the RGB image signals for the reference imagecapturing device is expressed mathematically by the following equations:

R = kr * Integral|P(w)R(w)r(w) dw]
G = kg * Integral|P(w)R(w)g(w) dw]
B = kb * Integral|P(w)R(w)b(w) dw]

where:

w Specifies wavelengths in the region of the electromagnetic spectrum from 300 nm to 800 nm.

P(w) Specifies the spectral power distribution of the reference illuminant, D65.

R(w) Specifies the spectral reflectance of the scene element being recorded.

r(w), g(w), b(w) Specify the red, green and blue spectral sensitivities of the reference image-capturing device.

kr, kg, kb Specify normalizing constants defined by the following equations:

kr = 1 / (Integral]P(w)r(w) dw])
kg = 1 / (Integral]P(w)g(w) dw])
kb = 1 / (Integral]P(w)b(w) dw])

Converting from RGB reference capture values to PhotoYCC values

The RGB reference image-capture device signals are converted to PhotoYCC values in three steps:

  1. A nonlinear transformation is applied to the image signals.
  2. The resulting values are converted to one luma and two chroma components.
  3. These three components are converted to 8-bit data for storage.

To maximize the utility of the encoded pixel values and to maintain color compatibility with the most popular display devices, the PhotoYCC scheme employs a nonlinear transformation to the RGB image signals. This non linearity allows rapid, efficient conversion to video display metrics without sacrifice of gamut or color fidelity.

This nonlinear transformation is expressed mathematically by the following equations:

For R, G, B > 0.018:

R' = 1.099*(R**0.45) - 0.099
G' = 1.099*(G**0.45) - 0.099
B' = 1.099*(B**0.45) - 0.099


For R, G, B < -0.018:

R' = -1.099(|R|**0.45) + 0.099


G' = -1.099 (|G|**0.45) + 0.099
B' = -1.099 (|B|**0.45) + 0.099


For -0.018 < R, G, B < 0.018:

R = 4.5*R
G = 4.5*G
B = 4.5*B

If you are familiar with video broadcasting standards, you may recognize that for positive values of R, G, and B, the nonlinear transformation corresponds to the optoelectronic transfer characteristic defined in CCIR 709. As a result, colors that are outside of the gamut defined by the CCIR 809 primaries are encoded by the negative values.

The resulting nonlinear R' G' B' values are converted to one luma and two chroma components. The luma and chromaencoding equations correspond to CCIR Recommendation 6011 to allow maximum compatibility with existing equipment while maintaining full quality on devices capable of photographic performance. Further, this lumachroma conversion enhances the ability to compress image data, as described later.

The conversion is defined by the following equations:

Luma = 0.299R' + 0.587G' + 0.114B'
Chroma1 = -0.299R' - 0.587G' + 0.886B'
Chroma2 = 0.701R' - 0.587G' - 0.114B'

The last step in color processing is the quantization of the luma and chroma information to digital code values for storage. For the 8 bit encoding used in current Photo CD products, the resulting Luma, Chroma1, and Chroma 2 values are converted to integers between 0 and 255, inclusive.

The conversion is defined by these equations:

Luma(8-bit) = (255/1.402)*Luma
Chroma1(8-bit) = 111.40*(Chroma1) + 156
Chroma2(8-bit) = 135.64*(Chroma2) + 137

The scale factors and offsets for the C1 and C2 channels result from the distribution of real world colors. Consistent with the previous equation, scene elements which are neutral, regardless of their lightness, will be encoded with a Chroma18bit of 156 and a Chroma28bit of 137.

Thus, a 20% reference gray card would be recorded on a photo CD disc with the following values:

Luma(8-bit) = 79
Chroma1(8-bit) = 156
Chroma2(8-bit) = 137

and a 100% diffuse reflector in the scene would result in:

Luma(8-bit) = 182
Chroma1(8-bit) = 156
Chroma2(8-bit) = 137

Future extensions of the format will allow for greater than 8 bits per color channel.

Converting from PhotoYCC Values to Television Signal Encoder Voltages

Because the PhotoYCC encoding scheme preserves the extended dynamic range of film images, decoding usually requires the selection of a range that is appropriate for the capabilities of the output display. Hence, the decoding equations typically are not the exact inverse of the equations in the PhotoYCC encoding scheme.

The following equations convert the extended-range PhotoYCC image data to broadcast-compatible analog RGB voltages (above black level) used to drive an RGB encoder as used in devices that produce television compatible signals.

L = 1.3584*Luma(8-bit)
C1 = 2.2179*(Chroma1(8-bit) - 156)
C2 = 1.8215*(Chroma2(8-bit) - 137)


Rdisplay = (L + C2) / 353.2
Gdisplay = (L - 0.194(C1) - 0.509(C2)) / 353.2
Bdisplay = (L + C1) / 353.2


The 20% and 100% scene reference PhotoYCC values become:

  Rdisplay Gdisplay Bdisplay
20% reflector 0.3v 0.3v 0.3v
100% reflector 0.7v 0.7v 0.7v


Converting from PhotoYCC Values to 24 bit Digital Color Computer Code Values

The following equations convert the extended-range PhotoYCC image data to digital color computer code values used to drive a 24 bit display board:

L = 1.3584*Luma(8-bit)
C1 = 2.2179*(Chroma1(8-bit) - 156)
C2 = 1.8215*(Chroma2(8-bit) - 137)

Rdisplay = L + C2
Gdisplay = L - 0.194*(C1) - 0.509*(C2)
Bdisplay = L + C1

For neutral objects, these R-display, G-display and B-display code values can range from 0 to 346. If simply clipped to the eight bit per color code value range (i.e. 0 to 255), the displayed image would suffer a significant loss of highlight information.

To convert these values properly, you need to shape this extended range information through a look-up table. For more details on this technique, see the article in this series entitled "Fully Utilizing Photo CD Images: Information Beyond 100% White". This shaping should consider the setup and gamma of your display device and the image information desired.

If the phosphors of your display are quite different from the CCIR 709 reference primaries, some additional signal processing may be required to more accurately convert the PhotoYCC-based primaries to your display device's primaries.

The best overall technique is to use a color management system that can interpret PhotoYCC and convert the encoded data appropriately for the system's display and printing devices.

How Photo CD Images Are Stored

Before an encoded PhotoYCC image is written to a Photo CD disc, the KODAK PCD Data Manager decomposes it into a hierarchy of components which relate to the varying image resolutions that can be reconstructed. The names of these image components are referenced to the component with a luma resolution of 512 lines by 768 pixels, which is called the Base image.

The Base image is typically used for the home-entertainment NTSC and PAL systems. The higher-resolution image components may be used to support a proposed high-definition television system of 960 (or more) lines. The 4Base and higher images are used to create images for high-quality hard-copy output devices, such as the KODAK PCD 200, KODAK XLT7720 or XLS8300 thermal printers as well as graphic arts printing.

In addition, the Base and lower resolution images support rapid access and may be used for the simultaneous display of multiple images, for displaying or printing Overview Pacs, icons, and index prints, and for other features.

The names and resolutions of the standard image sizes that can be recomposed are:

Image Component Resolution Example Use
Base/16 128 lines by 192 pixels Index images
Base/4 256 lines by 384 pixels Image selection
Base 512 lines by 768 pixels TV viewing
4Base 1024 lines by 1536 pixels HDTV, small prints
16Base 2048 lines by 3072 pixels Hardcopy prints
64Base 4096 lines by 6144 pixels Large proofs/print

The components used to create the top five sizes are stored in a single file called an Image Pac. The Base, Base/4, and Base/16 images are stored uncompressed; therefore, rendering systems can use a simple recomposition scheme to deliver these images. The sixth component, 64 Base, is stored in separate files as part of the IMAGE PAC Extension (IPE) which is optionally available when writing Photo CD Pro Master discs.

Chroma Subsampling

The KODAK Photo CD System employs chroma subsampling. This technique takes advantage of the characteristics of human visual perception, allowing for a reduction in file size without a significant loss in perceived visual quality. In each image component except 4Base, the luma channel is accompanied by two chroma channels that have been subsampled by a factor of 2 in both the horizontal and vertical directions. Thus, only one pixel from each of the chroma channels is required for every four pixels from the luma channel.

Image Compression and Recomposition

Chroma subsampling reduces the size of the 2k x 3k or the 4k x 6k raw image to 9 or 36 megabytes respectively. An additional and significant reduction in size is achieved by decomposing the highest- resolution image data, and storing the 4Base, 16Base and 64Base components as residuals (differences from pixels at the previous level of resolution). The KODAK Photo CD System employs a form of quantization and Huffman encoding to further compress this residual data. When an application requests 4Base, 16Base or 64Base resolutions, the software that reads the image then decodes these residuals.

This compression scheme allows rendering software to perform decompression easily. It also allows image recomposition to occur in the display buffer, minimizing the need for additional storage allocation.

To recompose an image for display at a resolution of 1024 lines by 1536 pixels, the image recomposition scheme interpolates the 512-line by 768-pixel luma Base image to a 1024-line by 1536-pixel image. A 1024-line by 1536-pixel 4Base residual is then decompressed from its Huffman-encoded form, and its elements are added to each corresponding pixel. The resulting image contains detail for the full 1024-line by 1536-pixel sampled image. To recompose an image to a resolution of 2048 lines by 3072 pixels, the process is essentially repeated, using both the 4Base and 16Base residual. A similar operation is subsequently used to recompose the 4096 line by 6144 pixel resolution. In each step, an identical process is applied to the chroma channels.

Summary

The PhotoYCC color encoding scheme and the hierarchical image decomposition form the basic processing used to create the IMAG PAC file format. These two properties of the KODAK Photo CD system enable one to use the scanned image across multiple platforms for a variety of applications.

References

  1. Using Information Beyond 100% White, Article No. 1
    from the "Fully Utilizing Photo CD Images" series, Eastman Kodak Company, 1993, Photo CD Information Bulletin PCD042.

  2. Kodak Photo CD Products
    A Planning Guide for Developers, Eastman Kodak Company, Part No. DCI200R

  3. Universal Film Terms for Reversal Films, Article No. 2
    from the "Fully Utilizing Photo CD Images" series, Eastman Kodak Company, 1993, Photo CD Information Bulletin PCD043.

  4. Adjusting the Balance of Images, Article No. 3
    from the "Fully Utilizing Photo CD Images" series, Eastman Kodak Company, 1993, Photo CD Information Bulletin PCD044.

Photo CD Information Bulletins are Published by Marketing Technical Support. They provide information of limited or specific application. Responsibility for judging the applicability of the information for a specific use rests with the end user.

Kodak is a Trademark. The Photo CD symbol is for use by Kodak and its licensees only and may not be reproduced
without permission from Kodak.

PCD 045, April 1994
©Eastman Kodak Company, 1994