What Is a Digital Raw File?

Fundamentally, a digital raw file is a record of the raw sensor data from the camera, accompanied by some camera-generated metadata (literally, data about data). I'll discuss metadata in great detail in Chapter 8, Mastering Metadata, but for now, all you need to know is that the camera metadata supplies information about the way the image was captured, including ISO setting, shutter speed and aperture value, white balance setting, and so on.

Different camera vendors may encode the raw data in different ways, apply various compression strategies, and in some cases even apply encryption, so it's important to realize that "digital camera raw" isn't a single file format. Rather, it's a catch-all term that encompasses Canon .CRW and CR2, Minolta .MRW, Nikon .NEF, Olympus .ORF, and all the other raw formats on the ever-growing list that's readable by Adobe Camera Raw. But all the various flavors of raw files share the same basic properties and offer the same basic advantages. To understand these, you need to know a little something about how digital cameras work.

The Camera Sensor

A raw file is a record of the sensor data, so let's look at what the sensor in a digital camera actually captures. A number of different technologies get lumped into the category of "digital camera," but virtually all the cameras supported by the Camera Raw plug-in are of the type known as "mosaic sensor" or "color filter array" cameras ("virtually all" because versions 2.2 and later of Camera Raw also support the Sigma cameras based on Foveon's X3 technologysee "The Foveon X3 Difference," later in this chapter). The first key point is that striped-array raw files are grayscale!

Color filter array cameras use a two-dimensional area array to collect the photons that are recorded in the image. The array is made up of rows and columns of photosensitive detectorstypically using either CCD (charge-coupled device) or CMOS (complementary metal oxide semiconductor) technologyto form the image. In a typical setup, each element of the array contributes one pixel to the final image (see Figure 1-1).

Figure 1-1. An area array

Each photosensor contributes one pixel to the image.

But the sensors in the array, whether CCD or CMOS, just count photonsthey produce a charge proportional to the amount of light they receivewithout recording any color information. The color information is produced by color filters that are applied over the individual elements in the array in a process known as "striping"hence the term "striped array." Most cameras use a Bayer pattern arrangement for the color filter array, alternating green, red, green, blue filters on each consecutive element, with twice as many green as red and blue filters (because our eyes are most sensitive in the green region). See Figure 1-2.

Figure 1-2. Bayer pattern

In a Bayer Pattern color filter array, each photosensor is filtered so that it captures only a single color of light: red, green, or blue. Twice as many green filters are used as red or blue because our eyes are most sensitive to green light.

Other color filter array configurations are possiblesome cameras use a cyan, magenta, yellow arrangement instead of the GRGB configuration in the classic Bayer pattern, while still others may use four colors in an attempt to improve color fidelity. But unless you plan on designing your own cameras, you needn't worry about the details of this or that filter setup.

Raw Files Are Grayscale

No matter what the filter arrangement, the raw file simply records the luminance value for each pixel, so the raw file is a grayscale image. It contains color informationthe characteristics of the color filter array are recorded, so raw converters know whether a given pixel in the raw file represents red, green, or blue luminance (or whatever colors the specific camera's filter array uses)but it doesn't contain anything humans can interpret as color.

Obtaining a color image from the raw file is the job of a raw converter such as Camera Raw. The raw converter interpolates the missing color information for each pixel from its neighbors, a process called demosaicing, but it does much more, too. Besides interpolating the missing color information, raw converters control all of the following.

  • White balance. The white balance indicates the color of the light under which the image was captured. Our eyes automatically adapt to different lighting situationsto oversimplify slightly, we interpret the brightest thing in the scene as white, and judge all the other colors accordingly. Cameraswhether film or digitalhave no such adaptation mechanism, as anyone who has shot tungsten film in daylight has learned the hard way, so digital cameras let us set a white balance to record the color of the light.

    But the on-camera white balance setting has no effect on the raw capture. It's saved as a metadata tag, and applied by the raw converter as part of the conversion process.

  • Colorimetric interpretation. Each pixel in the raw file records a luminance value for either red, green, or blue. But "red," "green," and "blue" are pretty vague terms. Take a hundred people and ask them to visualize "red." If you could read their minds, you'd almost certainly see a hundred different shades of red.

    Many different filter sets are in use with digital cameras. So the raw converter has to assign the correct, specific color meanings to the "red," "green," and "blue" pixels, usually in a colorimetrically defined color space such as CIE XYZ, which is based directly on human color perception, and hence represents color unambiguously.

  • Tone mapping. Digital raw captures have linear gamma (gamma 1.0), a very different tonal response from that of either film or the human eye. The raw converter applies tone-mapping to redistribute the tonal information so that it corresponds more closely to the way our eyes see light and shade. I discuss the implications of linear capture on exposure in the section "Exposure and Linear Capture," on the next page.

  • Noise reduction, antialiasing, and sharpening. When the detail in an image gets down to the size of individual pixels, problems can arise. If the detail is only captured on a red-sensing pixel or a blue-sensing pixel, its actual color can be difficult to determine. Simple demosaicing methods also don't do a great job of maintaining edge detail, so raw converters perform some combination of edge-detection, antialiasing to avoid color artifacts, noise reduction, and sharpening.

All raw converters perform each of these tasks, but each one may use different algorithms to do so, which is why the same image can appear quite different when processed through different raw converters.

The Foveon X3 Difference

Foveon X3 technology, embodied in the Sigma SD-9 and SD-10 SLR cameras, is fundamentally different from striped-array cameras.

The Foveon X3 direct image sensor captures color by exploiting the fact that blue light waves are shorter than green light waves, which in turn are shorter than red ones. It uses three layers of photosensors on the same chip.

The front layer captures the short blue waves, the middle layer captures the green waves, while only the longest red waves penetrate all the way to the third layer, which captures red.

The key benefit claimed by the X3 sensor is that it captures full color data, red, green, and blue, for every pixel in the image. As a result, .X3F filesFoveon X3 rawsdon't require demosaicing. But they do need all the other operations a raw converter carries outwhite balance, colorimetric interpretation, gamma correction, and detail controlso Camera Raw is as applicable to files from Foveon X3-equipped cameras as it is to those from the more common striped array cameras.

Real World Camera Raw with Adobe Photoshop CS2 Industrial-Strength Production Techniques
Real World Camera Raw with Adobe Photoshop CS2 Industrial-Strength Production Techniques
Year: 2006
Pages: 112

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net