Color Correction in the Sony and Olympus Digital Cameras

Scott Atwood
Psychology 221
Professor Brian Wandell
March 13, 1998

Introduction

The purpose of this experiment was to examine the color correction characteristics of the Sony and Olympus digital cameras. The human visual system can mostly compensate for an overall color cast in a scene caused by a colored light source. Colors remains more or less constant whether they are viewed under incandescent tungsten light sources, which have a strong yellowish tinge, or normal daylight, which has a bluish tinge, or even florescent lighting with a greenish tinge. To reproduce this innate human ability, traditional cameras rely on the use of different formulations of the film emulsion, which can compensate for the most commonly encountered types of illumination, or through the use of filters in front of the camera lens or lights. Both of these techniques have the disadvantage that they require active intervention on the part of the photographer. Digital cameras ideally could recognize the current lighting conditions and adjust the colors in the final image to correct for any overall color cast caused by the light source.

The Experiment

The purpose of this experiment was to qualitatively and quantitative examine the behavior of the cameras in response to various illuminations.

Each camera was mounted to a copy stand, and a MacBeth color checker chart was placed on a matte black background beneath the camera. The height of the camera was adjusted so the MacBeth chart filled the frame in the camera. All the lights in the room except the incandescent lamps attached to the copy stand were extinguished. One picture was taken of the chart under unmodified illumination. The a series of photographs was taken with the illumination modified with filters. For each photograph in this series, matching pairs of filters were placed in front of the lamps while the photographs were taken. There were four color series: blue, amber, green, and magenta. In each color series there were several progressively darker filter levels, varying from three levels for magenta to five for blue and amber. The blue color was chosen to approximate blue rich daylight illumination, amber for incandescent tungsten illumination, green for florescent illumination, and magenta because it doesn't match any normally encountered illumination. These filter choices allowed us to approximate the three most common types of illumination encountered in photography, as well as a illumination that is probably extremely rare in practice. One hypothesis we had was that cameras would be able to correct better for the more common cases that for the very uncommon cases.

In addition to photographing the MacBeth chart with each camera under each illumination, we also used the photospectrometer to measure the spectral power distribution of the light reflected from the white patch under each illumination. We chose to make only a single measurement under each illumination to save time. Because we know the surface reflectance functions of each of the patches in the MacBeth chart, a single measurement is sufficient to determine the spectral power distribution of the light source that would result in the observed reflected spectral power distribution. Measuring the white patch made the most sense, since it reflects more of the light than any other patch, and it reflects it fairly evenly across the spectrum.

Because our base illumination was provided by incandescent bulbs, we could not hope to exactly duplicate the spectral power distribution of types of lighting that we wanted to test. The spectral power distributions of the filtered lamps was actually quite different than the light sources we wanted to emulate. For instance, here is a graph that compares the SPDs of standard D65 illumination and the SPD produced by the tungsten lamps filtered with different amounts of blue filter:

Even worse, none of the colors produced by the filtered lamps are metamers of the target color. A graph that compares the chromaticity coordinates of D65 and each of the blue filtered lamps was generated with chromaticity.m:

Even if one or more of the blue-filtered illuminants were metamers of D65, the cameras might behave differently under our test illuminations than under D65, since the spectral response curves of the red, green, and blue sensors in the cameras are almost certainly different the response curves for the human L, M, and S cones. The same argument applies to the other test illuminations.

The Results

Subjective and qualitatively speaking, there was a vast difference in the ability of these two cameras to correct for the color cast introduced by the filtered lighting. The Olympus did an admirable job of color correction. Even with most extreme blue or amber filters applied, the pictures had little or no discernable color cast, and the photographs in each series were hardly distinguishable from the unfiltered photograph. The camera did not do as well with the green and magenta filters, but that is not unexpected, as daylight and tungsten, which are bluish and amberish respectively, are by far the most commonly encountered light sources.

Maximum Green Filter
Maximum Amber Filter
No Filter
Maximum Blue Filter
Maximum Magenta Filter
Olympus Camera

The Sony did quite poorly. Even moderate amounts of blue or amber filter produced pronounced overall color casts. Likewise, minimal to moderate amounts of green and magenta filtering produced noticeable color casts.

Maximum Green Filter
Maximum Amber Filter
No Filter
Maximum Blue Filter
Maximum Magenta Filter
Sony Camera

In order to get a more objective measurement of the accuracy of the color correction, one could calculate the deltaE values between the colors as measured with the spectrophotometers and the colors displayed on a monitor.

First the XYZ values for each color patch under each illumination needs to be calculated. As noted above, since we know the reflectance functions of the MacBeth color checker and we measured the spectral power distribution of the light reflected from the white patch, we can then calculate the spectral power distribution of the source illumination. This calculation can be carried out for each of the test illuminations. Once we have the spectral power distribution for each illumination, we can then calculate the XYZ coordinates for each color patch in the MacBeth chart with the following matlab code:

macbethXYZ = XYZ' * diag(test_light_spd) * macbethChart

Once we have the XYZ values for each patch on the MacBeth Chart under each illumination, we can then calculate the LAB values using the xyz2lab function in Matlab.

To calculate the delta E values for each patch under each illumination we will next have to convert the RGB values returned by the camera to LAB. First, an inverse gamma correction should be applied to the RGB values returned by the camera so that we may use linearized RGB values. Since we are assuming that these images are being viewed on a standard computer monitor, we convert the RGB values to XYZ by using the phosphor matrix from the tutorials directory:

patch_xyz = XYZ' * phosphors * patch_rgb

Once we have the XYZ values for each patch, we apply the same lab2xyz transformation we used above. Now determining the delta E values is simply a matter of subtracting one set of LAB values from the other.

These calculations can be found in deltaE.m. However, there seems to be a bug somewhere, because the results I completely wrong. The XYZ values I calculated from MacBeth chart reflectivity functions and illuminant SPDs are completely different from the XYZ values I calculated from the RGB values output from the camera. I believe the basic idea is sound for generating a more objective measure of color correction, but something just went wrong in my calculations.