In most digital cameras, each sensor pixel has a coloured filter. The filter pattern, or Bayer mask, usually consists of one red filter, two green filters, and one blue filter for each group of four pixels. Each pixel records incident light in a single band: red, green, or blue. For display or digital processing, the single-band raw pixels are converted to three-band RGB pixels by a de-mosaicing algorithm. For each pixel, the algorithm creates the missing bands by interpolating values from adjacent pixels of the required colour band.
When the RGB image is displayed on an LCD or CRT display at actual size (100% zoom), each RGB image pixel is displayed in three sub-pixels of a display pixel. One sub-pixel maps to a raw pixel and two sub-pixels map to interpolated pixels. This can be seen in the left-hand column of the following table, where the interpolated pixels are shown fainter. Sensor pixel counts have now overtaken display pixel counts, so images usually have to be down-scaled to fit on the screen. This entails more interpolation processing.
A case can be made that the natural size of a Bayer-masked image is half the size currently adopted. A half-size image has half the width and half the height of a full-size image, and a quarter of the number of pixels. It can be produced without interpolation by setting each RGB pixel to values from a group of four sensor pixels. The red and blue pixels are one-to-one, the two green pixels can be combined, or one can be discarded. This gives a very close correspondence between sensor pixels and display pixels when the image is displayed at actual size, as shown in the right-hand column of the following table.
|4 camera pixels
||4 camera pixels
|4 display pixels
|1 display pixel
It then becomes feasible to display the entire half-size image at actual size. A half-size image from an 8 mega-pixel camera needs 2 mega-pixels and fits comfortably in the 2.3 megapixels of a 24 inch LCD monitor with 1920 × 1200 resolution. The image displayed is a close rendition of what the sensor recorded, with minimal degradation or artefacts from digital processing. It can be regarded as a digital proof of the recorded image.
In the following on-screen crops from the same raw file processed at full size and half size, the full-size image has been zoomed to 50% to make it the same size on the screen as the half-size image. If anything, the half-size image shows slightly more detail: some of the book titles are more readable. This is consistent it having been subjected to less processing (no upscaling and downscaling). The only processing of the half-size image was scaling, white balancing, and colour-correcting the 12-bit raw pixel values and mapping them to gamma-corrected 8-bit values suitable for display. This was performed by Dave Coffin's admirable freeware program DCRAW. The -h option of DCRAW selects the half-size output image. With this option, the most recent version of DCRAW (v8.77) averages the two green pixel values—earlier versions discarded one green pixel value.
|dcraw -o 1 -T -w img_3072.cr2||dcraw -h -o 1 -T -w img_3072.cr2|
|23.0 MB 8-bit TIFF||5.75 MB 8-bit TIFF|
DCRAW can also output half-size 16-bit TIFF files containing linear values in various RGB or XYZ colour spaces. Values in the three colour bands can be combined in another program to produce a high quality black and white image free of interpolation artefacts. Each black and white pixel will have collected input from four sensor pixels, thereby reducing noise in the image.
If the half-size image is zoomed to 200% to match the full-size image at 100%, it falls behind in quality, but not by much. The quality depends on the interpolation algorithm used by the application to upscale the image. Reasonable quality is possible because the half-size image contains about 75% of the information in the full-size image.
The above half-size image was created from a 7.88 MB Canon raw file. Cameras such as the Canon 350D can also produce a half-size image in camera as a 'Small Fine' JPEG (about 1.2 MB). For full-screen display purposes this is almost as good as a 'Large Fine' JPEG (3.3 MB).
The current digital camera image processing paradigm dates from when sensor pixel counts were much lower than today. There was an incentive to upscale the raw sensor image to boost the pixel count of the displayed image. Perhaps it's time to change the mindset, and defer upscaling to when it is actually needed (if ever). This would have implications for digital camera design and digital darkroom workflow. A half-size approach can already be adopted, however, by the methods I have outlined.
Christopher B. Jones, Sydney, October 2007