How Your Camera Makes a Raw Image


For your camera, making a raw file is substantially easier than making a JPEG file for the simple reason that, when shooting raw, your camera passes the hard work on to you. When shooting in raw mode, the camera does nothing more than collect the data from the image sensor, amplify it, and then write it to the storage card along with the usual EXIF information. It's your job to take that raw file and run it through some software to turn it into a usable image.

A raw converter is nothing more than a stand-alone variation of the same type of software that's built into your camera. With it, you move all of the computation that's normally done in your camera onto your desktop, where you have more control and a few more options.

Nevertheless, why do it yourself when you can get your camera to do it for you? Let's take a look at each image processing step to see why raw is a better way to go for many images.

Demosaicing

A raw file contains nothing more than the filtered grayscale information from your camera's sensor; it's up to your raw conversion application to apply demosaicing to create a full-color image.

As mentioned earlier, the quality of a demosaicing algorithm often has a lot to do with the final image quality that you get from your camera. Demosaicing is a complex process, and a poorly demosaiced image can yield artifacts such as magenta or green fringes along high-contrast edges, blue halos around specular highlights, poor edge detail, or weird Moiré patterns. Today, most cameras employ special circuits or digital signal processors designed specifically to handle the hundreds of calculations per pixel that are required to demosaic an image. However, though your camera may have a lot of processing power, it doesn't always have a lot of processing time. If you're shooting a burst of images at 5 frames per second, then the camera can't devote much time to its image processing. Therefore, because time is often short and the custom chips used for demosaicing are often battery hogs, in-camera demosaicing algorithms often take some shortcuts for the sake of speed and battery power.

Your desktop computer can afford to take more time to crunch numbers. Consequently, most raw conversion applications use a more sophisticated demosaicing algorithm than what's in your camera. This often results in better color and quality than your camera can provide when shooting in JPEG mode.

For example, earlier we discussed the problem of correctly identifying a thinly colored edge among a larger field of color. A more sophisticated demosaicing algorithm such as what you might find in a raw conversion application will employ edge detection and pattern recognition routines to improve the accuracy of its color interpolation. A camera shooting in JPEG mode doesn't have the time to execute these kinds of routines.

Colorimetric interpretation

Just as your camera does when shooting in JPEG mode, stand-alone raw converters must adjust the image to compensate for the specific colors of the filters on your camera's image sensor. This colorimetric information is usually contained in special camera profiles that are included with the raw software. If your software doesn't provide a profile for your camera, then it can't process that camera's raw files. As you'll see, some raw converters allow you to tweak this colorimetric information to improve the quality of your raw conversions.

Color space

Just as your image data must be mapped to a color space when your camera shoots a JPEG file, your raw processor must map the colors in your image to a particular color space. Your raw converter lets you specify which color space you want to use. In addition to the sRGB and Adobe RGB color spaces that your camera probably offers, most raw converters provide choices such as ProPhoto RGB. You'll learn more about color space choice in Chapter 5.

White balance

Achieving good white balance is a tricky process, both objectively and subjectively. Objectively, calculating accurate white balance in a difficult lighting situationsay, sunlight streaming into a room lit with fluorescent lightcan trip up even a good camera. Being able to adjust the white balance after the fact can often mean the difference between a usable and an unusable image (Figure 2.11).

Figure 2.11. These images are from the same raw file. The only change that I made from one image to the next was an adjustment to the white balance setting in my raw conversion software.


Subjectively, accurate white balance is not always the best white balance. Though you may have white balanced accurately and achieved extremely accurate color, an image that's a little warmer or cooler may actually be more pleasing. Altering the white balance of the image in your raw converter is often the best way to make such a change.

Though your camera doesn't perform any white balance adjustments when shooting in raw mode, it does still pay attention to the white balance setting you've chosen on your camera, storing it in the image's EXIF information. Your raw converter, in turn, reads this setting and uses it as the initial white balance adustment. You can start altering the white balance from there.

Gamma, contrast, and color adjustments

As discussed earlier, when shooting JPEG, your camera performs a gamma adjustment to convert the image so that the brightness values are closer to what our eye sees when we look at a scene. When shooting JPEG, you can't control the amount of gamma correction that your camera applies, but when processing a raw image, you can easily adjust and tweak the gamma correction to your heart's content.

Similarly, although your camera may provide contrast, saturation, and brightness controls for JPEG shooting, these controls probably offer only three to five different settings. Raw converters provide controls with tremendous range and far more settings.

These adjustments are not significantly different from some of the types of adjustments you can make in your image editing program. However, as you'll see in the next two chapters, there are tremendous advantages to performing these corrections in your raw converter, as opposed to in your image editor.

What's more, as you'll see later, raw converters such as Adobe's Camera Raw provide highlight-recovery tools that allow you to perform corrections that simply aren't possible using any other type of tool.

Noise reduction and sharpening

Just as your camera performs noise reduction and sharpening, your raw converter also includes these capabilities. However, like the gamma, contrast, and color adjustment controls, the noise reduction and sharpening controls of a raw converter provide much finer degrees of precision.

8-bit conversion

Although your camera must convert its 12-bit color data to 8 bits before storing it in JPEG format (since the JPEG format doesn't support higher bit depths), raw files aren't so limited. With your raw converter, you can choose to compress the image down to 8 bits or to write it as a 16-bit file. Although 16 bits provides more number space than you need for a 12-bit file, the extra space means that you don't have to toss out any of your color information. The ability to output 16-bit files is one of the main quality advantages of shooting in raw. You'll learn more about why in the next chapter.

File storage

When processing an image, your raw converter doesn't care what file format you ultimately will be using. It simply creates a big mess of colored pixels. How that image is saved is up to you. Obviously, you're free to save your image as an 8-bit JPEG file, just as if you had originally shot in JPEG mode, but you'll usually want to save in a noncompressed format to preserve as much image quality as possible. And if you've decided to work in 16-bit mode, you'll want to choose a format that can handle 16-bit images, such as Photoshop (.psd) or TIFF.

One of the great advantages of shooting in raw mode is that you can process your original image in many different ways and save it in many different formats. Just as you can choose to print a photographic negative using different exposures, chemistry, or printing processes, you can process a raw file using any number of settings, and each will create a separate file. Thus, there may be times when you do want to save your raw files in JPEG formatas part of a web production workflow, for instance. This doesn't mean that you've actually compromised any of your precious raw data, since you can always go back to your original raw file, process it again, and write it in a different format.

What's more, as raw conversion software improves, you can return to your original raw files and reprocess them and possibly get better results. Raw files truly represent the digital equivalent of a negative.

WHY NOT SHOOT IN TIFF MODE?

Before the development of raw, cameras got around the JPEG compression problem by offering an uncompressed TIFF mode. Many cameras still offer a TIFF option, but shooting in TIFF mode is a far cry from shooting in raw.

First of all, TIFF files don't offer the editing flexibility of raw files, and most cameras write 8-bit TIFF files, meaning that you don't get the high-bit advantage of raw. In addition, TIFF files are typically much larger than raw files. Whereas a raw file stores only one 12-bit number for each pixel, TIFF files are demosaiced into a three-channel color image, meaning that they have to store three 8-bit numbers per pixel.

Finally, the high-quality JPEG modes on most cameras are very good. In general, you probably won't be able to discern a difference between a well-compressed JPEG image and a TIFF image, so the storage space sacrifice will be of little value.





Getting Started with Camera Raw(c) How to make better pictures using Photoshop and Photoshop Elements
Getting Started with Camera Raw: How to make better pictures using Photoshop and Photoshop Elements (2nd Edition)
ISBN: 0321592131
EAN: 2147483647
Year: 2006
Pages: 76
Authors: Ben Long

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