Bayer
Interpolation
A pixel is
defined as a complete set of color data for a point in an image.
Some pixels may be colored red and others may be colored green,
but there are no such things as red pixels or green pixels. A pixel
is a complete pixel only when the red, green and blue values are
known for the unique location of that pixel.
Digital camera
makers all lie about megapixels. This is OK today,
because unlike other specs, all legitimate camera makers lie in exactly
the same way. This means it's easy to compare cameras from different
makers.
Digital Cameras
Digital camera
pixels aren't as sharp as scanned film pixels.
All digital
cameras, except for $30,000 scanning backs and the old Sigmas,
have only a third of their claimed pixels! Instead of having separate
R, G and B sensors for each pixel location, they only have a single
monochrome CCD with each pixel location painted with a R, G
or B filter. This alternating R, G and B filter matrix most
often follows the Bayer pattern
with twice as many G as R or B spots. This is named for Kodak scientist Bryce Bayer who invented this in 1976.
A special Bayer interpolation
algorithm is then used to create separate R, G and B values for every
pixel location. Remember that before this interpolation that each
location only had a R or G or B value; not a R value and a G value and a B value for each location.
The algorithm
creates values for each of the three colors at every location
by smearing (interpolating) each set of partial R, G and B values
to create values at every location.
These algorithms
are proprietary to each camera maker. They become more clever with
time to allow higher perceived sharpness more closely simulating
full resolution. As of 2006 these clever algorithms allow starting
with one-third the data and making it look about
as good as having one-half the number of pixels claimed.
Raw and JPG
These all start
from the same data. The sensor is unchanged regardless
of the mode you select in-camera.
RAW offers
no advantages here, except for one potential gamble. Bayer interpolation
takes place in the software opening the raw data. Future advances
in Bayer interpolation algorithms could be incorporated in future
raw software, if and only if your camera maker continues to support
yesterday's cameras in tomorrow's software. Just as likely, your
camera maker may no longer support your old camera in tomorrow's
raw software!
I shoot JPG.
Scanned Film
Scanned film
and images reduced to fit the web have full red, green and blue resolution
for every pixel. They look as sharp at 100% as they do reduced.
Scanners do this because they have three separate sets
of CCDs, one for each color.
Therefore, a scanned image can be sharper than a digital
camera image of the same resolution. Of course to do this the scanner's
optics and the image on the film being scanned must be sharp enough
to support it.
EXAMPLE

Roll your mouse over to see image without Bayer interpolation.
The original
image is cropped from a Nikon D200 at 100%. Like every other digital
camera, it is Bayer-interpolated. Roll your mouse over it to see
the same image, at full RGB resolution without the interpolation.
If still cameras used three CCDs like professional video cameras
we wouldn't need Bayer Interpolation.
The full resolution
image was also shot on my D200, but with a lens of twice the focal
length. I then downsampled it to half the size. By resizing the image
to half the linear pixel dimensions, Photoshop takes four pixels
and combines them into one. This has enough information to get full
RGB resolution for this example.
The base image was shot with a Zeiss
ZF 50mm lens at
f/5.6. The other image was shot with a 105mm
Micro lens at f/5.6. Obviously
the light and wind changed from shot to shot. The tripod wasn't
moved. Each lens has more resolution than my D200 at these apertures.
Of course you
could apply sharpening. That would make it sharper,
but not increase the resolution. Here's the Bayer-interpolated image
with added sharpening (150% at 0.3 pixels). Compare it to the non-interpolated
image.

|