• No results found

Comparisons of RGB Primaries and Encoding Standards It has been shown that an improper encoding scheme can severely damage the color

RGB Color Spaces

6.5 Comparisons of RGB Primaries and Encoding Standards It has been shown that an improper encoding scheme can severely damage the color

conversion accuracy.7 Therefore, we compare RGB primaries and standards to de-termine the most suitable RGB encoding with respect to the gamut size, gamma correction, encoding format (floating-point or integer representation, bit depth, etc.), and conversion accuracy.

A set of 150 color patches printed by an ink-jet printer, consisting 125 color patches from five-level combinations of an RGB cube and 25 three-color mixtures, is used to compare RGB primaries and encoding standards. The color patches are measured to obtain CIEXYZ and CIELAB values under D65 illuminant. These color patches are the outputs of the current printing technology, which are read-ily available and frequently encountered. Thus, these patches provide a realistic environment for assessing the color transform in the system environment.

To check conversion accuracy, we convert measured CIEXYZ values to a RGB encoding standard using the specified transfer matrix, gamma correction (if provided), and encoding range. We then convert the RGB-encoded data back to CIELAB via the inverse transform for the purpose of comparing to the initial

measured CIELAB. Transfer matrices from RGB to XYZ of twenty sets of RGB primaries under D65 are computed by using Eq. (6.6). The encoding matrices from XYZ to RGB are obtained via matrix inversion (see Appendix 1 for obtaining these matrices). Table 6.2 summarizes the results of the computational accuracy via RGB encoding; the second column gives the percentage of the out-of-range colors from a total of 150 colors, the third column gives the average color difference of 150 colors, and the fourth column gives the maximum color difference.

SMPTE-C/RGB is the smallest space; it gives 45 out-of-range colors (30%, see Fig. 6.4). The maximum error is 27.42 Eab and the average error is 2.92

Eab (see Fig. 6.5). Using sRGB encoding, we find that 38 color patches require clipping to put the encoded value within the range of [0, 1]. This is an alarming 25.3% of the population of out-of-range colors for such a common test target that could come from any color printer. Most clipped sRGB points give an error greater than 2 Eab with a maximum of 28.26 Eab, and an average of 2.22 Eab. Out-of-range colors appear in most color regions except the blue-purple region (see Fig. 6.6). Because of the clipping, these 38 points cannot be reversed back to their original CIELAB values (see Fig. 6.7). This indicates that the sRGB space is too small for printing. The increase in bit depth does not help either; errors of out-of-range colors remain the same regardless of the bit depth (see Table 6.3). Moreover,

Table 6.2 Computational accuracy of RGB encoding standards.

% out of range Average Maximum

RGB primaries color Eab Eab

SMPTE-C/RGB 30.0% 2.92 27.42

Figure 6.4 Color gamut of SMPTE-C/RGB for reproduction of printer colors.

Figure 6.5 Color differences between measured and computed out-of-gamut colors en-coded in SMPTE-C/RGB.

Figure 6.6 Color gamut of sRGB for reproduction of printer colors.

Figure 6.7 Color differences between measured and computed out-of-gamut colors en-coded in sRGB.

the average error improves very slowly with increasing bit depth because error is mostly contributed from those of-range colors. By removing the 38 out-of-range colors, we obtain a much smaller error as shown in row 4 of Table 6.3.

Also, the average and maximum errors decrease much faster with respect to bit depth.

There are several extensions of sRGB such as sRGB64 and e-sRGB. sRGB64 is a rather interesting standard; it is the same as sRGB but uses 16 bits per chan-nel, and is actually encoded in 13 bits with a scaling factor of 8192. As shown in Table 6.3, the bit-depth increase does not help much. e-sRGB removes the con-straint on the encoding range, allowing sRGB to have negative and overflow values.25Error distributions of the CIELAB→ sRGB transform without clipping are given in Table 6.4. The computation uses integer arithmetic with 8-bit ITULAB inputs. Compared to Table 6.3, average errors are smaller than the corresponding errors encoded by sRGB with clipping. Note that the maximum error of 9.22 Eab

Table 6.3 Computational errors of sRGB with respect to bit depth.

Average color difference, Eab Maximum color difference, Eab

Method 8-bit 9-bit 10-bit 12-bit 14-bit 8-bit 9-bit 10-bit 12-bit 14-bit 1 2.39 2.20 2.12 2.05 2.04 28.36 28.34 28.35 28.34 28.35 2 2.22 2.12 2.08 2.04 2.04 28.26 28.33 28.37 28.35 28.35 3 3.73 3.06 2.84 2.74 2.72 28.74 27.95 28.74 28.74 28.74 4 1.93 1.12 0.85 0.74 0.74 7.18 4.17 2.41 1.34 1.63

Method 1: Floating-point computation. Method 2: Floating-point computation and gamma correc-tion. Method 3: Integer computacorrec-tion. Method 4: Integer computation using 112 data points by remov-ing out-of-range colors.

Table 6.4 Error distribution of CIELAB→ sRGB transform without clipping.

Range 8-bit 9-bit 10-bit 11-bit 12-bit 13-bit 14-bit

0–1 27 65 99 118 116 116 119

1–2 61 72 48 32 34 34 31

2–3 38 7 3

3–4 8 4

4–5 8 2

5–6 3

6–7 1

7–8 1

8–9 2

9–10 1

Average 2.13 1.20 0.87 0.74 0.72 0.71 0.71

Maximum 9.22 4.17 2.41 1.42 1.34 1.42 1.63

at 8-bit depth is about a factor of three smaller than the value obtained by sRGB.

Moreover, both average and maximum errors decrease rapidly as the bit depth in-creases, but the improvement levels off around 11 bits. Two of the specified bit depths, 10 bits and 12 bits, give average errors of 0.87 Eab and 0.72 Eab, re-spectively. No clipping of out-of-range values means that it allows mathematical extrapolation from the triangle connected by the ITU-R.BT.709/RGB primaries.

This practically extends the color space to an unknown size—infinity if no limit is placed on the out-of-range value. Eliminated clipping takes care of output-referred images very well. The information is retained in storage for interchange. How-ever, the clipping still exists when converted to sRGB for display. This makes one wonder: why not use a primary set with a larger color gamut to eliminate the out-of-range colors? By so doing, all colors will be encoded by interpolation. Mathe-matically, the extrapolation is subjected to a higher uncertainty than interpolation;

not to mention the difficulty of dealing with negative values in the system environ-ment.

Sony-P22/RGB has a slightly larger gamut than ITU-R.BT.709/RGB; it has 35 out-of-range colors (23.3%). The average color difference of 150 patches with respect to the measured values is 2.67 Eab with a maximum of 33.59 Eab. EBU/RGB is slightly larger than Sony-P22/RGB; it has 33 out-of-range colors (22.0%). The average color difference of 150 patches with respect to the measured values is 2.28 Eab with a maximum of 30.23 Eab. Bruse/RGB gives 27 out-of-range colors (18%) with a maximum error of 19.31 Eab and an average error of 1.43 Eab. Similar to sRGB, SMPTE-C/RGB and Bruse/RGB spaces produce out-of-range colors that appear in most color regions (see Fig. 6.8).

Adobe/RGB98, having an enlarged green region, reduces the number of out-of-range colors to fifteen (10%) by eliminating the clipping error in the green region.

Therefore, the distribution of out-of-range colors is in the yellow, red, and purple regions (see Fig. 6.9). The maximum error is 19.83 Eab and the average error is 1.17 Eab.

Using NTSC/RGB encoding, we find that there are nine out-of-range colors (6%). These colors are clustered in the red region with one exception in yellow (see Fig. 6.10). The maximum color difference is 12.19 Eaband the average error is 0.87 Eab. NTSC/RGB primaries, having extended space in the green region, eliminate the clipping problem in the green region. However, the green primary is located too far left on the x-axis of the chromaticity diagram, such that it reduces the space in the red-magenta region. This causes many red colors to become out of range.

SMPTE-240M/RGB has a relatively large gamut; therefore, it has only 8 out-of-range colors or 5.3% (see Fig. 6.11). The average color difference of 150 patches is 0.74 Eab with a maximum of 9.60 Eab. Primaries of the Ink-jet/RGB are chosen to encompass all 150 experimental data. As expected, there is no out-of-range color (see Fig. 6.12). In 8-bit depth, the average error is 0.58 Eaband the maximum error is 2.94 Eab. Further improvements in computational accuracy can be realized by increasing the bit depth for encoding the integer RGB. The

Figure 6.8 Color gamut of Bruse/RGB for reproduction of printer colors.

average error becomes smaller and the error distribution becomes narrower as the bit depth increases. Practically, there is no visually detectable error at 12 bits or higher. Guild/RGB is almost as big as Ink-jet/RGB. However, Guild’s blue primary is a little toward the right-hand side of the Ink-jet’s blue; thus, the gamut is slightly smaller in the blue region. This causes it to have one out-of-range color (0.7%).

The average error is 0.60 Eab and the maximum error is 5.91 Eab. The results of Guild/RGB and Ink-jet/RGB demonstrate that it does not necessarily need a large gamut to minimize the clipping errors; a properly selected RGB set is more helpful in reducing out-of-range colors.

For Group 2 RGB sets, laser spectral primaries give a much larger color space, but we still get eight out-of-range colors (5.3%). The average error is 1.05 Eab

and maximum error is 28.26 Eab for 8-bit representation. This is because the positions of primaries are not in a proper wavelength to cover the real colors en-countered; in particular, the wavelength of the green primary at 514 nm is too low, such that the line connecting the green and red primaries exclude many yellow and green colors (see Fig. 6.13). This primary set demonstrates that a larger gamut size does not guarantee the results to be free of out-of-range color. Results from Guild/RGB, Ink-jet/RGB, and Laser/RGB suggest that the positions of primaries are more important.

CIE 1931 spectral primaries give eleven out-of-range colors (7.3%) in the green-blue region. The maximum error is 18.08 Eaband the average error is 1.08

Figure 6.9 Color gamut of Adobe/RGB98 for reproduction of printer colors.

Figure 6.10 Color gamut of NTSC/RGB for reproduction of printer colors.

Figure 6.11 Color gamut of SMPTE-240M/RGB for reproduction of printer colors.

Figure 6.12 Color gamut of Ink-jet/RGB for reproduction of printer colors.

Figure 6.13 Color gamut of Laser/RGB for reproduction of printer colors.

Eab. This is because the green primary at λ= 546.1 nm is too high in wavelength (see Fig. 6.14). Concerning the color gamut, the position of the CIE 1931 green primary is too far right, whereas the laser/green primary is too far left; a proper wavelength for the green primary is around 530 nm.

Other spectral primaries fare much better because the green primary is in the proper position of around 530 nm. Judd-Wyszecki/RGB, with green at 520 nm, has two out-of-range colors (0.74%). The maximum error is 11.54 Eab and the average error is 0.74 Eab. Adobe Wide-Gamut/RGB, with green at 525 nm, gives only one out-of-range color—the most saturated yellow. The maximum error is 3.53 Eaband the average error is 0.67 Eab. CIE1964/RGB, with green at 526.3 nm, gives the same out-of-range yellow with a maximum error of 3.68 Eaband an average error of 0.64 Eab(see Fig. 6.15).

An Extended/RGB space, having properly selected primaries (green at 532 nm) to encompass the commercial Scanner RGB, Monitor RGB, Duoproof RGB, Ink-jet CMYK, Printing offset press CMYK, and Hexachrome offset press, gives no out-of-range color (see Fig. 6.16).26

Error distributions for 150 data encoded by Extended/RGB are given in Table 6.5, showing that the error distribution becomes narrower as the bit depth increases. Also, both average and maximum errors become smaller with increas-ing bit depth. There is no visually detectable error at 12 bits and above. Like Ex-tended/RGB, Kress/RGB and Wright/RGB have no out-of-range color (both green primaries are at 530 nm). The average error is 0.64 Eab and the maximum error

Figure 6.14 Color gamut of CIE1931/RGB for reproduction of printer colors.

Figure 6.15 Color gamut of CIE1964/RGB for reproduction of printer colors.

Figure 6.16 The color gamut of Extended/RGB for reproduction of printer colors.

Table 6.5 Error distribution of Extended/RGB.

Range 8-bit 9-bit 10-bit 12-bit 14-bit

0–1 129 149 149 150 150

1–2 15 1 1

2–3 5

3–4 1

Average 0.61 0.31 0.16 0.04 0.01

Maximum 3.00 1.08 1.18 0.14 0.08

is 3.36 Eab for Kress/RGB. The maximum error is 3.30 Eab and the average error is 0.68 Eabfor Wright/RGB.

ROMM/RGB and ROM/RGB are believed to enclose most, if not all, real-world producible colors. To demonstrate the importance of the gamma correc-tion, we perform conversions with and without it to see the difference. Without gamma correction, ROMM/RGB gives an average of 0.71 Eaband a maximum of 4.29 Eab. With gamma correction, it gives an average of 0.43 Eaband a max-imum of 0.99 Eab. The gamma correction provides a significant improvement for ROMM/RGB; unlike sRGB, where there are only marginal improvements (see Table 6.3).

This study reveals that out-of-range colors give the biggest errors. Out-of-range colors cannot be brought into range by extending the number of bits for encod-ing. There are two ways of dealing with this problem: the first one is to remove the clipping (this is the approach used in e-sRGB) and the second one is to use a wide-gamut primary set. Using the first method, any out-of-range color is rep-resented by either a negative value or a value greater than the maximum range.

Negative values increase the complexity of the digital implementation. For ex-ample, one may need extra control logic for dealing with out-of-range values or one may not be able to use simple lookup tables. In addition, most electronic de-vices cannot render negative values. Therefore, some kind of mapping or clip-ping must be used. If mapclip-ping is used, the color fidelity will be in jeopardy. If a clipping is used, the same computational inaccuracy experienced in sRGB will resurface.7 Kress pointed out that any truncation of negative values would cause loss of image detail in highly saturated colors and color shifts in hue, saturation, and lightness.10

Another solution is to use a wide-gamut space. As we have shown in various RGB standards, the color space is controlled by the locations of primaries. The number, error magnitudes, and locations of out-of-range colors are dependent on the size and shape of the color space. Therefore, we can eliminate out-of-range colors by properly selecting RGB primaries; examples are Ink-jet/RGB and Ex-tended/RGB spaces. Kress has compared the gamut of monitors (ITU709, P22, NTSC, and SMPTE), photographic films (Agfa, Fuji Photo, Kodak, and Konica), and printer-paper outputs (SWOP, wax thermal transfer, dye diffusion, Kodak Q60, and graphic-arts proofing material). He concluded that there was no single encod-ing scheme that resulted in minimal computation time, absence of image artifacts, device independence, and optimal quantization.10To accommodate wider applica-tions at the system level, Kress proposed a spectral RGB space using primaries at 620, 530, and 460 nm (note that this primary set is very close to the Extended/RGB set). With this space, colors from photographic input materials and printer outputs could be encompassed. Süsstrunk, Buckley, and Swen derived a similar conclusion that no particular RGB space was ideal for archiving, communicating, compress-ing, and viewing of color images.27The correct color space depended on the appli-cation. They recommended that if the desired rendering intent is known, the use of a wide-gamut space is the best choice for the situation where more than one type of output is desired (this is the system environment). From our study, we draw the same conclusion that a wide RGB color space gives the best results in the system environment. Problems caused by using a wide RGB space are relatively minor compared to the problems caused by clipping or negative values. For example, the low numerical resolution can be overcome by using a higher bit depth and a proper gamma correction, and the mismatch between RGB encoding standard and real phosphor or CCD chromaticity becomes a device-characterization problem, which is a separate issue.

6.6 Remarks

Comparisons of RGB encoding standards revealed that out-of-range colors gave the biggest color errors. We showed that the out-of-range colors induced by im-proper color encoding could be eliminated. There are numerous problems for color reproduction at the system level; the most difficult one, perhaps, is color gamut mismatch. There are two kinds of color gamut mismatch: one stems from the physical limitation of imaging devices (for example, a monitor gamut does not match a printer gamut); another one is due to the color-encoding standard used, such as sRGB. The difference is that one is imposed by nature and the other one is a man-made constraint to describe and manipulate color data. We may not be able to do much about limitations imposed by nature (although we have tried and are still trying by means of the color gamut mapping). However, we should make every effort to eliminate color errors caused by the color-encoding standard. It is my opinion that at system level applications, we need a wide-gamut space, such as ROMM/RGB, Kress/RGB, or Extended/RGB, for preserving color information.

We should not impose a small, device-specific color space for carrying color in-formation. With a wide-gamut space, the problem is boiled down to have proper device characterizations when we move color information between devices. It is in the device color profile that the color mismatch and device characteristics are taken into account. In this way, any color error is confined within the device; it does not spread to other system components.

Furthermore, we should make gamma correction an option because not every transform requires it. For example, Scanner/RGB designed to meet the Luther con-dition does not need it.28In this case, the empty slot can be used for implementing gray-balance curves, such that an equal value for all three RGB components gives a gray. However, not all scanners are designed in this way. A check of two scanners (HP OfficeJet G95 and Microtek ScanMaker 5) showed that they are nonlinear with respect to luminance; thus, gamma correction is still needed. It can be combined to the gray balancing if the lookup-table approach is used.

References

1. Adobe Photoshop® 5.0, Adobe Systems Inc., San Jose, CA.

2. B. Fraser and D. Blatner, http://www.pixelboyz.com.

3. CIE, Colorimetry, Publication No. 15, Bureau Central de la CIE, Paris (1971).

4. A. Ford and A. Roberts, Colour space conversions, http://www.inforamp.

net/~poynton/PDFs/colourreq.pdf.

5. H. R. Kang, Implementation issues of digital color imaging, Color Image Sci-ence Conf. 2000, Derby, England, April 10-12, pp. 107–115 (2000).

6. J. Guild, The colorimetric properties of the spectrum, Phil. Trans. Roy. Soc.

London A230, p. 149 (1931).

7. H. R. Kang, Computational accuracy of RGB encoding standards, NIP 16, pp.

661–664 (2000).

8. IEC/3WD 61966-2.1: Colour measurement and management in multime-dia systems and equipment—Part 2.1: Default RGB colour space—sRGB, http://www.srgb.com (1998).

9. D. B. Judd and G. Wyszecki, Color in Business Science and Industry, 3rd Edition, Wiley Interscience, New York, pp. 190–192 (1975).

10. W. C. Kress, First considerations of default RGB database, Proc. TAGA, Sewickley, PA, pp. 67–84 (1993).

11. G. Starkweather, Colorspace interchange using sRGB, http://www.srgb.com (1998).

12. Color Encoding Standard, Xerox Corp. Xerox Systems Institute, Sunnyvale, CA, p. C-3 (1989).

13. Eastman Kodak Company, Reference output medium metric RGB color space (ROMM RGB) white paper, http://www.colour.org/tc8-05.

14. Eastman Kodak Company, Reference input medium metric RGB color space

14. Eastman Kodak Company, Reference input medium metric RGB color space