United States [change]
Join / Sign In | 

Fully Utilizing Photo CD Images
Adjusting the Balance of Photo CD Images - Article No.3

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

Contents

Introduction

This article is the third of a series in which we will discuss some of the unique imaging-science attributes of Photo CD disc images. It explains the correct way to adjust the density and/or color balance of Photo CD images as they are accessed from the disc. As with the past articles, the goal is to provide you with the information needed to achieve the maximum quality from each Photo CD image.

Scanning Photo CD images may be part of high-volume photofinishing operations. In such situations, an operator may not have time to adjust the original scan of each and every frame to its optimum color and density balance condition. Such adjustments are more likely to be needed with images scanned from negatives, since the negative/positive system is designed to have an extremely wide exposure latitude.

The Kodak Photo CD Imaging Workstation (PIW) currently uses sophisticated automatic density and color balance algorithms to estimate an optimum balance. However, they produce sub optimal results for negatives approximately 10% of the time. Nevertheless, if an adjustment is made to the encoded Photo CD image before it is displayed in its final form, the problems of sub optimal scans can be corrected. Fortunately, the unique extended dynamic range of the Photo CD permits a satisfactory adjustment to the density and/or color balance of virtually all images, even after they have been recorded on the Photo CD disc.

Density Balance Changes

A density balance change alters the lightness (or darkness) of an image. A lightness change corresponds to an increasing, or decreasing, light level in the original scene (without a corresponding change to the observer's adaptation level). If the light level in the original scene increased, everything would look lighter, or if it decreased, everything would look darker.

However, the ratio of reflectances from any two objects would not change. Thus, in order to change the lightness (up or down) of a Photo CD image correctly, the ratios of reflectances in the image must not be changed.

How the Density Balance may be Adjusted

When the Photo YCC image data is transformed back to RGB data, it approximates a power function of the scene reflectance. Thus, Photo CD images may be made lighter (or darker) by multiplying every RGB image value by a number greater (or smaller) than 1.0. In order to maintain a constant color balance, the same number must be used for all three values. For most images, the required multiplier will lie in the range 2.0 (lighter) to 0.50 (darker). A typical incremental change might be 1.1 (lighter) or 0.9 (darker).

(NOTE: Simply adding a constant to all image values would not constitute a density balance change even though the image would get lighter. Adding (subtracting) a constant to all image values would be more like adding (subtracting) flare light to the original scene.)

Color Balance Changes

Actual scenes can contain many different combinations of pure colors. Because the human visual system tends to adapt to the overall color of the prevailing illumination, the actual scene seldom looks as if it has an overall tint (or color cast). Because of the trichromatic nature of the human visual system, images of the scenes may be reproduced by combining differing amounts of only three primary colors. A tint in the reproduction represents an imbalance in the RGB intensities sensed by the eye relative to expectations. Whether we would notice the tint, if it occurred, depends both on the color of white to which we are adapted and on our knowledge of what elements of an image would likely be either neutral, or some other easily remembered color. A color balance adjustment alters the overall tint of an image. However, in modifying the color balance, the relative reflectances of each object in the scene being reproduced have not changed, and thus the ratio of the reflectances reproduced by each primary color also should not change. Thus in order to correct the color balance of a Photo CD image, the ratio of reflectances reproduced within each primary color must be preserved, while the ratio of reflectances between colors must be changed.

How to Adjust the Color Balance

You can alter the color balance of an image by multiplying the image values for each separate primary color by a different number. For instance, in order to make an image redder (less cyan) all the red image values may be multiplied by a number greater than 1.0. Or, in order to make an image less blue/cyan (sky colored) the red image values may be multiplied by a value greater than 1.0, while the blue image values would be multiplied by a number less than 1.0. Incidentally, there is never a case of a color balance change that requires multiplying the three primary colors by numbers either all greater than 1.0 or all less than 1.0.

Consider a case where an image's tint is too magenta. In this case you could multiply all the green image values by a number big enough so that the image's tint would then appear neutral. However, the added green light (say on a TV screen) would make the image look slightly lighter as well as less magenta. This could then require you to make a subsequent density balance change to compensate for this change in lightness. This problem can be avoided by changing all three primaries when making a color balance change to the image. In each case, one (or two) primary is multiplied by a number greater than 1.0 while the other two (or one) primaries are multiplied by numbers less than 1.0. The intent is to mutually counter balance the lightness changes that result from changing each primary color separately. The ratio of up-to-down changes depends on the color change intended.

The human visual system is most sensitive to lightness changes resulting from altering the green primary, and least sensitive to changes resulting from altering the blue primary. Table 1 gives some suggested ratios for a pure red, a pure green, or a pure blue color balance change. The magnitudes represent a typical small change in color balance. The ratios used in Table 1 are only approximate for any given set of RGB primary colors however, they are close enough to give good results (imperceptible lightness change) for most color balance changes that would be encountered in actual practice.

Table 1
Color Balance Change Scale Factors

  Multiply Image Values by
the following factors:
Type of Color Balance
Changes
Red
Image
Values
Green
Image
Values
Blue
Image
Values
Increasing:
Red 1.025 0.985 0.985
Green 0.980 1.020 0.980
Blue 0.995 0.995 1.035

Make color balance changes in the opposite color direction (i.e., cyan, magenta, and yellow respectively), by using the inverse of the numbers in each cell of Table 1. Changes of different sizes are made by using the factors in Table 1 repeatedly. This is the same as raising the factors to some power, for instance by squaring them or cubing them. Make combined color balance changes by multiplying each color image value by the factors for both colors. For instance, a color balance change of 1 unit yellow, 1 unit green could be made by using the values shown in Equation (1).

R' = (1.005 X 0.980)R
G' = (1.005 X 1.020)G (1)
B' = (0.966 X 0.980)B

The first column of numbers in Equation (1) come from the inverse of the numbers in the third row of Table 1, and represent the yellow part of the color balance change. The second column of numbers in Equation (1) come from the second row of Table 1 and represent the green part of the color balance change.

A color balance change of 1 unit red, 1 unit green, and 1 unit blue would result in no change (except for rounding error) to the image values. This is because by definition a red, green, blue change results in a neutral change, and because the changes in Table 1 are designed not to cause any change in the lightness of the image. Finally, the size of "1 unit" can be changed by raising the numbers in Table 1 to a power slightly more or less than 1.0.

Combined Density and Color Balance Changes

The scale factors for a density balance change and those for a color balance change may be multiplied together to accomplish the combined modification simultaneously.

The Advantage of the Photo CD Dynamic Range

The Photo CD color-encoding system encodes an extended range of luminance values. This is a great advantage for Photo CD images. Often, amateur photographers encounter high contrast lighting situations. (In properly lighted, professionally photographed scenes, this is not as likely to happen.) Close flash with a distant or dark background (the so-called "flash in the face"), and harshly backlit scenes are typical examples of high lighting contrast situations. These are the types of scenes for which the Scene Balance Algorithm, which is used to estimate the optimum balance, is most prone to error.

Fortunately, because of the design of the Photo CD system, balance problems arising from this type of situation are usually fully correctable in the final image. This is because the range of luminance values that encodes reflectances from 1.0 to 2.0 is also available to encode normal reflectances (those up to 1.0), illuminated by light levels at least twice as high as elsewhere in the scene. This added dynamic range is available to capture extra highlight (or highly illuminated) detail that might be lost to other imaging systems. Let's see how this works.

Table 2
Photo CD Image Values vs Original Scene Reflectance

% Reflectance Y R G B
1 8 11 11 11
2 16 22 22 22
5 34 46 46 46
10 53 72 72 72
15 67 91 91 91
20 79 107 107 107
30 98 134 134 134
40 114 156 156 156
50 128 175 175 175
60 141 192 192 192
70 152 207 207 207
80 163 221 221 221
90 173 235 235 235
100 182 247 247 247
107 188 255 255 255
120 199 271 271 271
140 215 292 292 292
160 229 311 311 311
180 243 330 330 330
200 255 347 347 347

The RGB values in Table 2 are the values required to produce a video signal according to the SMPTE digital specification. They are designed to encode the scene reflectances shown in the first column of the Table. The Y values are also intended to encode the luminance values of the original scene reflectances given in the first column. The RGB values are computed from the Y values in the table by multiplying them by about 1.36 (and then rounding). The scale factor 1.36 (actually 1.3584) is the expected conversion factor from Y to RGB if the original scan is balanced absolutely correctly.

As described above, occasionally the reflectances will be encoded with small, but correctable, errors in their Y values. Let's take an example. Suppose that the object in the scene that had a 30% reflectance was encoded with the Y normally used for 40% reflectance. This would mean that the image would look too light when displayed using the standard SMPTE derived scale factor, and that it would need a density balance correction before final viewing on the computer monitor (or TV screen). This correction could be made by multiplying the RGB values in Table 2 by about 0.86 (134/156). This would also correspond to converting the original YCC values by multiplying the Y values by about 1.175 (134/114 or about 0.86 x 1.36) instead of the standard scale factor of 1.36 and the C1 by about 1.918 (1.175 x 1.6327) and C2 by about 1.576 (1.175 x 1.3409).

(NOTE: The standard scale factors for C1 and C2 can be expressed as 2.2179 = 1.3584 x 1.6327 and 1.8215 = 1.3584 x 1.3409)

In order to darken the image properly, every YCC image value must be multiplied by the same set of scale factors. Thus for this particular image, with its modest error in its encoded density balance, Table 3 gives an example of the corrected conversion from Y to RGB.

Table 3
Photo CD Image Values vs Original Scene Reflectance after Correcting for a Too Light Density Balance

% Reflections Y R G B
<1 8 9 9 9
<2 16 19 19 19
4 34 40 40 40
8 53 62 62 62
15 79 93 93 93
23 98 115 115 115
30 114 134 134 134
37 128 150 150 150
45 141 166 166 166
52 152 179 179 179
60 163 192 192 192
67 173 203 203 203
75 182 214 214 214
 80 188 221 221 221
89 199 234 234 234
104 215 253 253 253
118 229 269 269 269
134  243 286 286 286
148 255 300 300 300

Examination of Table 3 shows that the image will be darker than before. However, there are still some potential image values above 255. Assuming that we made the correct adjustment to the image values, the correct reflectances are also shown in Table 3.

It shows that reflectances of up to 148% have been preserved for display. This means that the entire image now appears to have the correct lightness, except possibly for the loss of any extreme highlight detail corresponding to image elements with reflectances from 148% -- 200%. Thus, for all but the most demanding scene types, the corrected image will be fully satisfactory.

This corrected image can still profit from the remapping of the information beyond the 100% white point as discussed in Article 1. The limits to this process depend upon the image highlight details present. One might suspect that unsatisfactory results will be more frequent as the scale factor for Y to RGB gets down near 1.0, or that the darkening scale factor applied to the normally scaled RGB image data approaches 0.74 (1/1.36).

If the encoded data produces an image that is too dark on initial display, you can lighten it by multiplying it by a number greater than 1.0 (or by scaling Y to RGB by a number greater than 1.36.) Obviously, this could result in RGB values that exceed 347, and thus reflectances exceeding 200% had been recorded on the disc, but these would now be lost to the display. Since Photo CD was never designed to deliberately encode reflectances exceeding 200%, nothing promised would be lost. However, the gaps between values available for display will increase. Taken to an extreme limit, this could cause quantization problems, especially in the black elements of the image. However, most images will not require such an extreme degree of lightening that this would result in a visible quantization artifact (due to the grain noise present in the film-based original image).

The extended dynamic range advantage applies to color balance corrections as well. Since color balance corrections usually require smaller scale factors, the magnitude of the potential extreme highlight detail lost (or quantization introduced) will be smaller as well. Consider in particular the case where, say, the Red reflectances were all encoded with values that were too high. Then the image on initial display would look too red. To correct this problem, as suggested by Table 1, the red image values in particular would have to be multiplied by a factor less than 1.0. Thus the maximum R value would drop from 347 to some lower number while the green and blue image values, being multiplied by factor greater than 1.0, will potentially still have displayable image values as high as 347. This adjustment could result in correcting the tint in most of the image, but also introducing an opposite tint in the extreme highlight details. While this may seem bad, consider what would happen if the extended dynamic range were not present. Then the introduction of the opposite tint would occur in much more common image values from objects having reflectances of around 100% instead of those few which might have reflectances around 200%. Again, a big advantage for the Photo CD encoding system.

Summary and Conclusions

The Photo CD color encoding contains an extended range of luminance information. This information makes most color and density balance errors that might be introduced by an automated scanning operation fully correctable in the final displayed image. Many currently available Photo CD display packages do not fully utilize these capabilities. As a result, images may be displayed with unnecessary density and/or color balance errors still left in them. Other display packages may apply the standard scale factor of about 1.36, and then truncate the image data above 255. If this were done, optimum density and color balance corrections would be in jeopardy. However, optimum density and color balance can be achieved for all Photo CD images by using the techniques described in this article.

A version of these techniques is available in the KODAK ADOBE Photoshop Plug-in, and could be introduced into future releases of the Photo CD enable products. However, when using applications that do not employ these techniques, the YCC data should be accessed and processed as describe above to obtain the best balanced images possible.

References

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

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 044, July 1993
©Eastman Kodak Company