Outback Fine Art Photography Handbook
© Bettina & Uwe Steinmueller
10 RAW File Processing
10.2 RAW interpolation
10.3 Color Depth
10.4 White Balance (WB)
10.6 Noise Removal
10.7 Levels / Curves
10.8 Want to Learn More?
|10.1 Introduction |
Most consumer digital cameras produce
images in JPG format. This JPG format uses a so-called lossy compression
which is not the best format if image quality matters (i.e., if you
want to print the image and not just use it on the web). Higher end
consumer cameras also give the photographer the option to use a lossless
TIFF format but with this there is a high price to pay: these files
take up a lot of space on the Compact Flash card, and it takes forever
to write the image to the card.
Let us use some numbers to show how this works (these numbers are
not precise, we are only using them to show the magnitude of what is
involved). For a 3 MP (Mega Pixel) camera, a fairly low compression
JPG image might be 2MB of size while a TIFF file will be about 7.5MB
in size. By selecting a lossless compression option for the TIFF file
we might even get the file size down to about 5MB but to do so we would
need more processing power to perform the compression in the camera.
This results in a slower write speed to the Compact Flash card.
It is here where the different proprietary RAW formats come into play.These
RAW formats provide even more information in a smaller 3-4MB file!
Except cameras with the forthcoming
Foveon chip (not shipped at the time of this writing April 2002) and
some high end three color scanning backs most digital cameras (all we
have used so far) use Sensors which comply the the so called Bayer Pattern
in one form or another. We think it is necessary to understand the Bayer
pattern and the limitation it brings to digital photography.
Lets try to understand how most photo camera CCDs (or CMOS sensors)
see a photo.
The sensors are capable of only seeing gray values. The
better sensors see them at 12bit (or more) bit depth, or in 4096 (more)
shades of gray. Some new designs like the Foveon camera feature sensors
to capture full RGB images.
How does this translate into an RGB image? "On top of
the CCD's array of pixels (also called photo sites) is fixed a colored
filter which has millions of little colored cells, each aligned with
a single CCD pixel. In most cameras these filters are arranged in alternating
rows, every other row with the filter colors (Red, Green, Red, Green,
Red, ...), and the remaining rows as (Green, Blue, Green, Blue, Green,
...). Green appears twice as often because our eyes are most sensitive
to differences in green for the detail in images" (from an article by
Still we don't have a RGB image at this point. To get
this we need to interpolate the RGB values from the information we have
on the neighboring pixels. This interpolation, which nearly all of today's
digital cameras perform, might seem simple up front but it is not simple
at all (i.e., how to resolve details, minimize noise, interpret color,
|10.2 RAW interpolation |
| RAW conversion is then defined as the way
to interpolate the missing other colors in the RGB image. |
For JPG and TIFF files this interpolation
is done by the processor chip in the camera and also, to save processing
time, it is done for 8 bits of the available 12 bits of pixel information.
In this process the other 4 bits are discarded unused.
Now we can explain why the RAW file can be compact and still keep all
12 bits of color information. The RAW file is a dump of the gray scale
data that the CCD captures, and it is then compressed by a mostly lossless
compression scheme.This is what gives us a compact file and even more
color information than the JPG/TIFF files produced inside the camera.
But there is no free lunch. The RAW files cannot be directly opened
What otherwise happens in-camera with JPG and TIFF files now has to
be done by an external RAW conversion program. For the D1/D1x we have
at minimum 3 different commercial programs which can perform this task
(Nikon's own program Capture 2, Bibble and Qimage). These are all quite
different without a clear winner and many updates. For other cameras
like Canon, Kodak and Olympus other tools are available (see end of
|10.3 Color Depth (8-bit, 12-bit, 16-bit)
You might be wondering why someone would
go through these hassles instead of just using JPG or TIFF file formats.
There are three important reasons for this: first,12 bit color information
is only available with RAW files; second, computer-powered external
RAW file conversion enables more complex conversion algorithms; and
third, post-capture processing of contrast, saturation, WB (white balance),
sharpening, and exposure give the photographer many more options and
tools to work with.
- 12 bit color would not be necessary if, indeed, everything was perfect
at the time of capturing the photo: exposure, saturation selection,
WB and contrast would all be optimal for the captured image. The problem
arises when everything is not perfect at the time of capture. As soon
as you need to correct any of these parameters then 12 bit RAW files
give your more data to work with it, which is also true in the world
- You can access the full power of a computer to perform the interpolation
task instead of a small in-camera processor.
- You can change all these parameters later and so get better results.
That the image is represented inside other applications (like Photoshop)
not in 12bit but in 16bit is related how computers work. They are far
more efficient working in multiples of 8bit).
|10.4 White Balance (WB) |
Also the RAW files allow you to change
the WB later while processing the image.
All the current RAW conversion tools support one or the other way to
|10.5 Sharpening |
As one might expect the Bayer pattern
introduces some typical digital artifacts. As the full RGB color is
not really captured it is impossible to completely recreate the missing
information. Just assume a one pixel wide blue line crosses a photo
site which uses a red filter. Only the red part of the blue color would
be captured (of value 0 = black) and the neighboring pixels would not
help to recreate the blue.
This effect is called aliasing. Aliasing can be treated later in software
of by using an anti aliasing filter. Both do a good job but not all
the time and have their price.
- Pure software solutions have to fight sometimes strong moire patterns
and some images might even be lost for good.
- The use of an AA (anti aliasing) actually blurs the image to distribute
some color information to the neighboring photo sites. This results
in loss of detail/sharpness. Sharpness lost that way can not be fully
recreated. The later necessary sharpening can only prevent that the
final image does not have an overall blury look
Now you might understand why many photographers hope that the Foveon
sensor (which captures full RGB for each pixel) solves this dilemma.
We keep you posted.
|Sharpening of digital files is more an art
form than a science. There is no one fits all scheme. We will discuss
our approach in the chapter "Digital
|10.6 Noise Removal |
|The noise in digital files is most often
in the red and blue color channel. This might not surprise as the images
has only half the original information on red or blue compared to the
green channel. |
Also the noise removal can be very tricky.
Best would be to remove all noise even before the tone curve is applied
and in 16bit. Some tools can do this but may have other side effects
like too much blurring.
|10.7 Levels / Curves |
|Many RAW file converters also provide you
with options to correct levels and curves. We do not use this so much
as here Photoshop is a good tool to work with. |
|10.8 Want to learn more?|
|Get one of our inexpensive
E-Booklets. RAW File workflow is one of our core competencies.
|Our series "The
Art of RAW Conversion"|
|© Bettina & Uwe Steinmueller |