0
\$\begingroup\$

How can one deterine the calibrated white point of the image sensor of a digital color camera? That one certainly exists is evident from the following considerations—

  1. that the temperature control in raw processors sets an absolute termperature value (in kelivn), rather than a relative one.

  2. that there should seem to exist a light spectrum producing voltage of equal magnitude on red, green, and blue sensor cells. The temperature of this spectrum will be the one I seek.

  3. that color film is calibrated to a certain white point, and so by analogy should be digital sensors.

  4. that exposure adjustments in both film and digital affect the amount of total light energy admitted to the medium, while retaining the spectum, and consequently the relative proportions between the red, greeen, and blue components. The said proportions should be available in the raw image without specifying the temperature—the values are already there, whereas the temperature setting specifies their interpretation in the flat raster image.

  5. that dcraw, the most honest and straighforward raw processor out there, can accept white balance not as an absolute temperature value, but in relative form, as a set of per-channel multipliers, the unity values yielding sensor bulit-in WB—what is it?

I, however, have found nary a mention of this fundamental parameter of a color CCD sensor.

A sensor's whitepoint (including both temperature and tint) can be determined in a simple experiment, by taking a picture of a gray card illumined by a light source with known characteristics, e.g. direct sunlight or a high-quality photographic light. The sensor's native rendition of the light can be generated by demosaicing the raw file with dcraw:

dcraw -r 1 1 1 1

Now that both the input spectrum and the (unadjusted) output color are known, the whitepoint can be easily calculated. Another option is to use a high-quality adjustable light source to determine the parameters that make the demosaiced photo netural gray.

\$\endgroup\$
1

2 Answers 2

1
\$\begingroup\$

Almost every assumption is wrong...

  1. The temperature set by a raw converter is read from the image exif... it is whatever was set in the camera. Or it can otherwise be set arbitrarily to any other fixed reference.

  2. It is impossible for there to be a single wavelength (spectrum) that equally affects each set of photosties; which are filtered to reject certain wavelength. Even if you considered the "spectrum" to be visible light, each color of photosite has a different response curve... partly because different wavelengths have different energies.

  3. Film and digital are not calibrated to a white point; they all vary. That is why you will often hear "I prefer the colors of (x-brand/film)". If they were calibrated they would all generate (nearly) the same colors in all situations. The only semi-standard is the white balance of the light source for viewing images after being rendered/printed.

  4. Close... the relative intensities are in the raw file. But the raw exposure data itself is monochrome and contains no color; it has no white balance.

  5. White balance adjustments are always on a per channel basis. Just because you might set the WB as a simple kelvin setting, the demosaicing process behind the scenes makes per channel corrections.

What is know are the individual photosite response curves to various wavelengths, such as for this Sony sensor. To get this information a known/standardized/calibrated light source is used. But it is still somewhat general in nature due to response non-uniformity if nothing else.

enter image description here

That information is included in the image exif as a per channel correction based on the WB setting set in the camera. Also included in the exif is the pixel array sequence (color sequence), device color space, and demosaicing process.

With just the raw data you get an image something like this. Just the voltages converted to ratiometric luminance values. Because it has no color, and no white balance, the white balance of the output image can be set to anything you want; without requiring changes to the raw data behind it... one of the benefits of raw files.

enter image description here

With the other information in the file applied you get an image as intended by the manufacturer; at least when demosaiced with the manufacturer's software (or in-camera). But it is still far from standardized/calibrated.

\$\endgroup\$
1
1
\$\begingroup\$

that the temperature control in raw processors sets an absolute temperature value (in Kelvin), rather than a relative one.

It looks to YOU like it's absolute because all raw developing programs use either built-in (pre-defined in the code) camera profiles or use camera profile from the DNG file itself. Using relative colour balance makes no sense for end user apart from scientific applications.

The temperature of this spectrum will be the one I seek.

There's no guarantee that this spectrum will be anywhere on the temperature curve. Black body temperature curve have 1 dimension only.

enter image description here

and so by analogy should be digital sensors.

Digital imaging has a magnitude more possibilities for post-processing and linear response, so there's no "should" in this regard. For a sensor to comply to some arbitrary white balance means losing light if it's done by CFA or lose information if it's done by camera when it saves the file.

If a film was not calibrated for some specific white balance it would shift the colours significantly. No such issue for digital sensors!

The said proportions should be available in the raw image without specifying the temperature

DCRaw and Libraw's DCRaw both have the argument to output raw image in TIFF or PNG or whatever you wish, both in grayscale (without debayerization) and only with debayerization applied.

DCRaw ... can accept white balance not as an absolute temperature value, but in relative form ... what is it?

Judging by documentation:

By default, DCRaw uses a fixed white balance based on a color chart illuminated with a standard D65 lamp. ... -r mul0 mul1 mul2 mul3
Specify your own raw white balance. These multipliers can be cut and pasted from the output of dcraw -v.

This option accepts white balance in relative form. You can know what relative white balance corresponds to D65 for this specific camera from DCRaw's output.

\$\endgroup\$
3
  • \$\begingroup\$ Yes, color temperature is but half of the white balance, which is bidimensional, and I should have asked about the precise location of the white point instead of its temperature. Yet bear in mind even a highly tinted light spectrum has a measureable temperature. Silly of me to fail to correlate -v and -r options of dcraw. So, it can report gain values for D65, as well as produce a unity-gain image. Well-observed! I still fail to understand how and why compliance to an arbitrary white balance means losing light or information. Color filters absorb light in order to produce information... \$\endgroup\$ Jul 30 at 0:31
  • 1
    \$\begingroup\$ @AntonShepelev the CFA absorbs optimal amount of light to produce colour data. Absorbing more light means gaining literally nothing (as I described) and having more noise. \$\endgroup\$ Jul 30 at 6:10
  • \$\begingroup\$ @AntonShepelev Actually, on a second thought I see how pre-balancing sensor could be better... If CFA was more balanced for typical lighting conditions it would allow slightly more details in highlights. For example, green colour would not clip as easily. But again it would not be possible without slight increase of noise. \$\endgroup\$ Jul 30 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.