What are the RAW file advantages
To better understand what these magic RAW file formats are, you must understand how the majority of today's digital cameras work. All new digital cameras capture color photos, right? Well, you ultimately get color prints, yet most modern digital cameras use sensors that only record grayscale values (the Foveon X3 sensor, digital scanning backs and multi-shot digital backs are exceptions).
Assume you want to photograph a box of Crayola crayons:
1 Figure 1.1: Full colored sample target
A gray scale sensor would see the picture as in the figure 1.3. You would never see any color photos at all.
Ol TO
1 Figure 1.2: >Grayscale picture< seen by the sensor
How do you use a grayscale sensor to capture color photos? Engineers at Kodak came up with the following method called Bayer Pattern. Dr. Bayer is a Kodak scientist who invented this novel Color Filter Array configuration back in the eighties. Hence the name Bayer pattern. There are also other pattern variations used):
- B-G-B-G-B-G G-R-G-R-G-R B-G-B-G-B-G G-R-G-R-G-R
1 Figure 1.3: Bayer pattern achieved by a matrix of color filters
1 Figure 1.3: Bayer pattern achieved by a matrix of color filters
First, it is interesting to note that 50 % are green and only 25 % for each red and blue. The reason for this is that the human eye can differentiate far more green shades than red or blue. Not really a surprise if you look at nature. Green also covers the most important and widest part of the visible spectrum.
Now our sensor captures gray values filtered by these color filters:
- 1 Figure 1.4: Color mosaic seen through the color filters
However, you want to have a photo with full-color information for every pixel. Here a software trick comes into play called Bayer Pattern demosaicing or color interpolation. What actually happens is that the missing RGB information is estimated from neighboring pixels.
A good demosaicing algorithm (the method of turning the RAW data into a full color image) is actually quite complicated, and there exist many proprietary solutions on the market. The problem is to resolve detail and maintain correct colors. To illustrate some of the challenges, think of capturing an image of a small black & white checker pattern, small enough to just overlay the sensor cells:
Ol TO
subject
color filter array
CCD-array response final image white black white color filter array
CCD-array response final image white black white
Figure 1.5: CCD/ color mosaic sensor with color interpolation errors blue green red sensitive sensitive sensitive layer layer layer final image
Figure 1.5: CCD/ color mosaic sensor with color interpolation errors subject blue green red sensitive sensitive sensitive layer layer layer final image
white
Figure 1.6: X3 sensor with no color interpretation errors white black white
Figure 1.6: X3 sensor with no color interpretation errors
As the neighboring green filtered photo site does not add new information, the algorithm would not know whether it would be some kind of "red" (if the white hits a red filter) or "blue" (if the white hits the blue filter). In contrast, for example, a Foveon sensor would capture white and black correctly as all three color channels are captured at the same photo site. The resolution captured by the Bayer sensors would drop if the subject only consists of red and blue shades, since the green channel could not add any information. For monochromatic Red/Blue (very narrow wavelengths) the green sites get absolutely no information. But such colors are rare in real life. In reality, there is information in both green, and to a much lesser extent, even blue, if the sensor samples very bright and saturated red colors. The problem in our example above is the fact that estimating the color correctly requires a certain amount of spatial information. If only a single photo site samples the red "information"
there will be no way to reconstruct the correct color for that particular photo site.
The above next cropped illustrations are from real samples that were made in a studio to show a practical effect. Of course, these test photos here show an extreme situation. In reality the failure is less dramatic but is still visible by our eyes and definitely not to be ignored.
Canon EOS 10D Sigma SD9 using the Foveon sensor
Figure 1.7: Fooling a Bayer sensor
Canon EOS 10D Sigma SD9 using the Foveon sensor
Figure 1.7: Fooling a Bayer sensor
Some of these challenges result in image artefacts like moirés and color aliasing (shown as unrelated green, red, blue pixels or resulting in discoloration). Most cameras fight the aliasing problem by putting an AA (Anti-Aliasing) filter in front of the sensor. This filter actually blurs the image and distributes color information to the neighboring photo sites. As you know, blurring and photography aren't compatible. To find the right balance between blurring and aliasing is a camera design challenge. In our experience, the Canon iDs does this job well. Finally the image needs stronger sharpening to re-create much of the original sharpness. To some extent AA filtering degrades the effective resolution of a sensor.
This appears as a complicated mission. Indeed it is, but works surprising well in the end. Every technology has to struggle with its
Ol TO
inherent limitations. In many aspects, digital photography can beat film today because film has its own limitation to contend with.
We can state what the RAW data are for any given digital camera. The RAW data are, in fact, all the data for gray values captured on a chip. To produce a final image, these RAW data require processing (including the demosaicing) by a RAW converter. To produce JPEG images, the camera must have a full RAW converter embedded within the camera's firmware.
What are the limitations of using camera-produced JPEGs:
► JPEG artefacts, due to lossy compression
1-10 r Although most sensors capture 10-14 bit color (grayscale) infor" mation only 8 bits are used in the final file o tj ► The in-camera RAW converter can only use limited computing
"g resources but good RAW conversion can be very complex and j= computer intensive. As software technology evolves, it is much
^ more efficient to have the conversion done on the host com-
Jy puter instead of the non-upgradeable ASIC commonly used js today.
► The in-camera set or estimated white balance (WB) is applied to the photo within the camera. The same is true for color processing, tonal corrections, and in camera sharpening. This limits the post-processing capabilities, because a previously corrected image must be corrected again. The more processing done on a photo (especially 8 bit) the more it can degrade.
Next we explain the different RAW files formats. The formats store only RAW data (plus additional metadata to describe properties of the RAW data in EXIF section of the file - the EXIF sections hold information, such as camera type, lens used, shutter speed, f-stop and more). All the processing previously done shooting JPEGs or TIFFs in the camera are now ready to be performed on a more powerful computing platform with:
► No JPEG compression
► Full use of the 12-bit color information (10-12 bit)
► Use of very sophisticated RAW file converters (as an example, Adobe Camera Raw, Phase One's Capture One DSLR or Pixmantec's Raw Shooter Essential)
► White balance, color processing, tonal/exposure correction, sharpening and noise processing can be processed later on in the computer
► The RAW files also resemble a digital version of an undeveloped film negative. Over time, there are improved RAW file converters that give better and better results from the same data.
This all confirms the fact, that shooting in RAW gives you much greater control while processing your images.
In-camera JPEGs are similar to shooting a Polaroid (where you simply shoot and receive your image processed immediately) while RAW is more like a film that can be developed and enhanced in the ^ dark room. Raw converters like Phase One's Capture One DSLR ■
mimic a magic formula for film developer. £
What is the advantage of 12-bit data? The main advantage g exists if you need to make major corrections to the white balance, < exposure and color corrections. During processing of an image, you ï lose bits of image data due to data clipping (accumulating over re multiple steps). The more bits you have in the beginning the more 5 data you have in your final corrected image. ^
What about using TIFF files in the camera? Actually TIFF files only solve the lossy compression issue, but are still converted to 8-bit inside the camera. Most TIFF files are larger than RAW files (remember RAW files only hold one 12-bit gray value per pixel) and don't have the other benefits of RAW. I would go so far as to say that an 8-bit in-camera processed TIFF file is only slightly better than a high-quality / high-resolution JPEG.
Post a comment