So what’s all this hubbub about saving your pictures in RAW format? Why would anyone want to eat anything raw, for crying out loud? Well, fruits and vegetables, maybe, but data? Just what do they mean by RAW?
To answer that, let’s take a look at how an image is captured by your digital camera to start with. At the core of the process is the image sensor. Today’s cameras will fall under one of two categories. The older technology, and the one found on the less expensive cameras, makes use of a charge-coupled device (CCD). The more recent technology makes use of a complimentary metal oxide semiconductor (CMOS). Without going into a lengthy discussion of the whys and wherefores, for now, let it suffice to say that most serious photographers who know the field concur that the CMOS delivers superior images. But one thing they have in common is that they are both different types of a mosaic sensor.
A mosaic sensor is simply a light-sensitive device that consists of an elaborate array of very tiny photo-sensitive detectors laid out in rows and columns, sort of like in the picture below.
Each square in the grid above represents a single pixel, as seen by the sensor. How many different pixels you have in your sensor is how they measure the resolution of your camera. For example, I have a Canon EOS Rebel XT that is rated at an 8.1 megapixel camera. It has a 22.2mm x 14.8mm CMOS sensor that contains 3456 x 2304 effective pixels. 3456 x 2304 happens to equal 7,962,624. I don’t know how your math works, but 7,962,624 doesn’t look like 8.1 million to me! Where are my other pixels? The key is that word "effective". Not all the pixels on the sensor are useable for image making.
Now here’s the part you’re really going to love. All 7,962,624 of those little squares are capable of capturing as many as 12 bits of data for each pixel. This allows a single pixel to interpolate as many as 4,096 different shades of gray!
Wait a minute! you say. Did you say GRAY? My camera shoots WONDERFUL color?
Well, actually . . . no, it doesn’t. It shoots wonderful black and white. A complex filtering device sees to it that each sensor renders a gray-scale interpretation of a single color. Most cameras interpret on the basis of red, green and blue (RGB), but there are a few out there with cyan, magenta and yellow (CMY). Since the vast majority of cameras are RGB, I’ll stick to that in the rest of this discussion.
The most common algorithm used is called the Bayer pattern. The individual pixels are laid out in a specific pattern of four pixels per block. There are one each of red and blue and two green for each block. The reason for doubling up on the green sensors is that the human eye is more sensitive to green than the other two colors. To replicate this sensitivity electronically, it is necessary to "cheat" a little. A pixel that is filtered for red is generating a shade of gray that approximates the intensity of red at that point in the image.

The bits that are collected by those sensors are stored in a single large file of 0s and 1s, and this file is our RAW format. The RAW data file contains two different kinds of information. The first is obviously the rendition of the image as seen by the sensor. Along with the image data is something called metadata. Metadata is information that describes the information. Makes you wonder if the person who came up with this scheme didn’t work for the Department of Redundancy Department, doesn’t it?
Until recently, all cameras converted this raw data into some form of conventional graphics format, such as JPEG. A software algorithm in the camera converted the grayscale image data to color information the best it could and what you
got was what you got.
A RAW data converter has a lot of decoding to do. First of all, it has to describe to the application receiving the image data just how the image mosaic was laid out. What pixels represent red, which ones represent blue and which ones should be green? Then again, taking from the political scene, define red. Or green or blue, for that matter. Your idea of pure red is very likely going to be completely and totally different than my idea, or from Billy Bob’s idea. Computers and computer programs generally have a hexadecimal value that represents each color, and a couple of companies have sought to have a "center value" for each color defined. If they ever agree, there will be less discrepancy between how two different cameras record exactly the same image.
Another function of the converter has to determine relative "white balance". In other words, how white does white have to be before you call it white? Under a fluorescent light a piece of white paper will actually appear somewhat greenish. Under incandescent lights, it takes on a red cast, and outdoors, under an overcast sky it will look blue. But your eye automatically corrects for this because your brain knows that paper is white. Not green, red or blue. The camera can’t play that trick. So you set the white balance on the camera.
Setting white balance on the camera doesn’t affect how the sensor records the data one iota. It simply adds that information to the metadata so that the recipient application can process it accordingly. As colors are interpreted for each pixel, light balance is added to the color mix.
A key ingredient that all manufacturers CAN agree on is a value called gamma. Gamma is a term that defines how light or dark a particular color appears. Once a particular value has been defined as far as color is concerned, there is still the matter of how much light is falling on the color at any given moment in time. At dusk, there is far less light on the barn than there is at noon. But the barn didn’t change color, did it? Raising or lowering the density of a color without affecting its color balance is what gamma is all about. In another article, I hope to explain how to adjust your computer monitor so that gamma on your monitor agrees with that of your printer. You see, gamma doesn’t just affect the camera; it affects everything that touches the image.
Another trick a RAW converter must perform is a fancy one called antialiasing. And don’t worry. The camera doesn’t have a scheme for having you arrested for going under a different name. If you paid attention to the graphics I used earlier, you probably noticed that all the pixels were square. So what happens if you have a diagonal line going right through the middle of a solid color? What happens is that where the edges of the two colors meet, unless you perform some sort of trick, the edges of the line against the background are going to look like stair steps, like below.

Two problems the converter has in a situation like that are; what color do you choose for any given pixel along the edge and; where does the actual edge really occur? These problems are both particularly exacerbated when the two colors have similar densities and identical gamma. Some algorithms calculate a "middle of the road" color that becomes a band that separates the diagonal object from the background. This adds something graphics artists call the edge effect. Others simply make it up as they go.
Most cameras offer a feature they call the "sharpening" feature. Why is this? Are their lenses THAT crappy?
The truth is, no matter how sharp your lens is, when you’re dealing with a image comprised of perfectly square blocks that are all the same size, it’s all but impossible to get perfect edges on anything that isn’t a straight line up or down. This is the affect of adjacency. These imperfect edges translate into fuzziness. The more pixels there are to create the image, the less this effect impacts on image quality. An eight megapixel camera exhibits far less aliasing and adjacency than a two megapixel camera; but it still exhibits some. The RAW converter plays the same tricks on adjacency as it does aliasing.
So as you can see, the actual image that comes out of your camera is not the same data that created the image. A LOT of manipulating went on before it created the file that was exported to your image processor. And none of it was manipulation over which you had any degree of control. How fair is that? What if you had a different idea of how you wanted to handle sharpening? Maybe you LIKE the stair step effect!
A camera that exports the raw data as a file allows you to import that file into an application that uses its own RAW converter and you take over image control from there. While it’s true that there is a much higher learning curve for manipulating RAW data, the potential for significantly higher quality is something that appeals to most professional photographers.
For more information on making great digital photos, pick up a copy of the Digital Photography Pocket Guide by Derrick Story. It's full of great tips and fits right into your camera bag.