Accurate Image Manipulation for Desktop Publishing 
Calibration

Available Bit-Depth Resolution by Gamma Compensation Into 8-bit Data

    The below analysis shows the theoretical upper limit for bit-depth compression using the gamma function at different values into  8-bit data. It is the theoretical best case (assuming no errors in calculations, pre-conditioning nor in A/D conversion). It is not limited by technology choices like analog or digital gamma compressor.

    For mathematically inclined it is the first derivative of the inverse gamma function, x-axis is binary coded so that the value 1 of the derivative represents the 8-bit accuracy.  y-axis is coded to show the gray percentage K%.
     

      gamma_compensation         i =  I^(1/g) 
      d(gamma_compensation)   d(i) = (1/g)* I^((1-g)/g) 

      where: I=linear-light intensity 
             i=compensated intensity 
             g=gamma value 
       

     

    Please note that the gray swatch is gamma compensated for gamma space 2.2 viewing to enable direct comparison of the values on uncalibrated CRT monitor. 

    From the chart: 
     

    • Gamma compensation reduces accuracy in the range 0% to 75% black. For gamma spaces 2.2 and above only less than 7-bit accuracy is available in the highlights. For color images the 7-bit resolution is the same as color  reduction by 8 times since each of the color components (red, green and blue) are cut in half. This is approximate the same quality that the JPG format holds using middle compression setting.

    •  
    • Gamma compensation gains accuracy in the range 75% to 100% black.
      •  
        The 9th bit is gained only at 93%. 
        The 10th bit is gained only 97%. 

        There is practially no more "benefits" from the gamma, since the 11th bit is very very near to the 100% black.

        Note that without a cooled CCD device the S/N ratio (signal to noise ratio) of highest quality scientific acquire devices is typically about 60dB that is comparable to 10 bit (1 bit = 6.2 dB). Consumer devices have much more noise, they have usually less than 48dB S/N so gamma compression does not give any benefit at all, only degradation.

      This analysis is the theoretical best case, the real life the situation is even worse due to the inaccuracy of pre-conditioning and/or round-off errors.

Conclusions

    Acquiring gamma compensated images reduces gradation from 3/4 of the intensity range (wheremost of the important image information like skin tones are and it makes the gradation in the first 1/4 of the intensity range in the shadows very dense.
       
    In practise "the benefits" of gamma compensating the image data in digital photographic imaging is non-existent. Mathematically acquire time gamma compensation provides better shading towards black in the deep shadows as shown in the above chart. In reality the CCD noise and other imperfections of the acquire device overcomes that mathematical benefit many times plus the benefits occur only in the very deep shadows and the main image information is not there.

    On the other hand image manipulation operations that are performed on gamma compensated images create artifacts and large errors that are very difficult to correct. Please see the the comparison gallery it demonstrates some of the problems. 

    The shading comparison page shows the difference of the dreaded banding.


Accurate Image Manipulation for Desktop Publishing

Copyright Timo Autiokari, 1998-2007. Contact info