Accurate Image Manipulation for Desktop Publishing
Calibration

Introduction

    All devices that are used in digital image manipulation like digital still cameras, video-cameras, scanners, monitors, video grabbers and printers each have their own transfer function or transmission characteristics. They alter the intensity distribution of the image data, some in a highly non-linear manner.

    These alterations are often uncontrolled, causing severe problems when the images are viewed or manipulated using some other system than the one the images were created with.

    Too dark, too light or flat images and missing details are the most common indication of uncontrolled transfer characteristics. The hue-shift that is a direct consequence of non-linear transformations is too often left without any consideration.

The Main Trouble Maker 

    In early days of the television industry it was decided that the non-linearity of the cathode ray tube (CRT) called gamma, would be taken into account in the video-camera by applying an inverse transfer function to the video-signal in order to compensate the CRT gamma. This way expensive non-linear signal processing was not needed in the TV receivers so the cost of the receivers was kept at minimum. At those days non-linear analog signal processing hardware was very expensive and difficult to realize.

The normalized gamma function is:

output_intensity=input_intensity ^ gamma

And for the common 8-bit/color system: output = 255*(input/255)^gamma


Gamma equation

This graph shows the effect of typical gamma of CRT monitors. Input range is the pixel values in the image data, output range is the intensities seen on the screen.

The non-linear intensity is not the only problem caused by the gamma. 

Remembering that all the hues on the screen are additive mixtures of the red, green and blue primary colors it is easily understood that gamma produces hue-shift also when these tri-color codes are edited.

Mac systems apply a partial gamma correction with 1/1.45 over the data stream that goes to the monitor so the CRT gamma appears to be 1.72 in Mac.

    Much of the design of the TV set was then adopted to the monitors, including their non-linear transfer characteristics. This was a really bad choice, but non-linear analog or digital signal processing was still pricey at the early days of the personal computers.

    Today the situation for desktop image manipulation is rather difficult. Because of the non-linearity of the CRT monitors, makers of other digital imaging devices like printers and even inherently linear devices like scanners and digital cameras feel the need to add gamma compensation into their products in the attempt to compensate or alleviate the monitor non-linearity.

    The fact that the viewing gamma varies greatly between different computing platforms (2.5 for PC, 1.72 for Mac) does not make things any easier. The gamma tweaking that is buried by the manufacturers into the printers, scanners and cameras varies and most often it is not even specified, so one has to first measure the transfer characteristic before any calibration can be done. Consumer grade digicams have a tranfer function that does not follw the gamma well.

The Minor Trouble Maker 

    The other problem aside the monitor gamma is the dot gain of printers. Dot gain is present in systems that use half-toning or dithering to produce different intensity levels. Dot gain for peripheral printers is below 10% but the gamma tweaking in their software make the situation much worse. 

How the Intensity Calibration and Gamma Compensation Relates to Color Management in General

    Actually the transfer function or linearity is the most important part of the color management. It is responsible for the too dark/light images and  for hue-shifts e.g. if the orange looks as orange or as red.   

    In the RGB (red, green, blue) mode that the monitors, scanners and cameras work there are given number of intensity levels for each primary color. In case of the common 3 * 8 bit = 24 bit True-Color mode there are only 256 levels of intensity for each of the three primary color. When mixed, these will make up all the other colors that are seen on the monitor, 256 ^ 3 = 16,7Mil colors.   

    If these 256 levels are not linearly calibrated then the whole color space (color gamut) is also un-calibrated and it will be hopelessly in vain to do any serious color work on such system. Only after the non-linearity of the intensity is corrected it is the time for color-space corrections, if needed at all. 

How to Acquire and Store Images Properly

    There is a lot of confusion around the issue of acquiring, storing and displaying digital images properly.  This is due to the current "official" ColorFAQ and GammaFAQ written by Mr. Charles Poynton. In these FAQs Mr. Poynton pushes the so called "more perceptional coding" that in plain English is the same as embedding the monitor gamma compensation into the image data. This approach is good for TV/video but it degrades the quality of images badly when they are manipulated or enhanced.

    For digital photographic imaging gamma compensated images causes the following problems: 
     

    • image enhancements operations e.g. color correction, black-point adjustment and sharpening are difficult or ineffective and they create errors and artifacts. 

    •   
    • the images have large quantization that limits the intensity and color -resolution.

    •   
    • images need to be compensated again for printing, this results more errors and degradation. Gamma compensation is not suitable for peripheral printers nor for press.

    •  
    Obviously linear acquire and storage is the best possible choice for digital photographic imaging. It is so for 8-bit devices and for any bit-depth higher than that.  This way the best possible image quality is preserved in the original image and copies of those originals can be published for any purpose, like for viewing on uncalibrated CRT and printing.

    The "more perceptual coding" has a benefit in TV/video where the images are not edited nor printed. In numerical quantities this benefit seems to be large, but in reality, for the eye, it is insignificant.

How to Present Images Properly

    In the real-life scene the transfer path of the light (the air) is linear. The air does not apply non-linear changes to the intensities, nor does e.g. the ordinary mirror, we see the linear light. The chemical photographic processes are also decently linear, the film has a non-linear response to the light but the paper has the inverse response of that so also this transfer path is (nearly) linear. The above can be generalized as: 
     
      Images have to linearly maintain the relations of physical light intensities that were present at the original scene in order them to appear normally, well, for the eye. There is no way around this.  

Non-linear adjustments to the intensity distribution of an image can often be preferred for artistic reasons. Sometimes the intensity range (max/min) of the display device can be very small compared to the range at the original scene, in such case some small non-linear adjustment may be preferred, it is the matter of taste more than anything else. Also some special viewing situation may call for small non-linear adjustments to the image, again a matter of taste. 


Accurate Image Manipulation for Desktop Publishing   

Copyright Timo Autiokari, 1997-2007. Contact info