Bit Depth of Raw Converter

Moderator: jsachs

Charles2
Posts: 226
Joined: November 24th, 2009, 2:00 am
What is the make/model of your primary camera?: Fuji X-Pro 2
Contact:

Re: Bit Depth of Raw Converter

Post by Charles2 »

Thank you, Jonathan, for the basic facts about gamma in photography - much better intro than Wikipedia at http://en.wikipedia.org/wiki/Gamma_correction . However, that article has a helpful chart of grayscale levels about halfway into the text. It shows two gray spectra, with gamma applied and without gamma adjustment.

The chart also reminds us that 256 levels of intensity will be more than enough for the human eye. You explained, "The eye does not respond linearly - it is much more sensitive to small changes in dark values that to light values as measured on a linear brightness scale." The chart suggests this means something like: the eye is more sensitive to the difference between 0 and 24 on a scale of 0..255 than to the difference between 231 and 255. ... But whose eye perceives a difference between 0 and 0.0625 on this scale, that is, one bit in a twelve-bit number?

And when we view digital black and white, we look at something with 256 shades of gray or less. Do any of us feel these images look posterized? (FastStone viewer will count the "colors" in a grayscale image.) The miracle of color is that with three values at each point (R,G,B), 256 tones becomes 16.7 million different colors.

Some day I hope to see a few photos on someone's Eizo monitor. It is an expensive item with lots of calibration features. Still, "Eizo measures every color tone from 0 – 255 [8 bits!] to produce a gamma curve of 2.2 and includes an adjustment certificate." (product brochure)

The importance of 16 bits is in calculation. Long sequences of transformations will not become posterized as quickly when 16 bits per channel are carried along rather than 8 bits.

Another dramatic way to see what gamma is about: Open a raw file. On the Gray tab in the Raw dialog, the gamma slider will probably be at 2.2. Reduce it to 1.0. Huge portions of the image will go black. If you wish, you can accept that from the raw dialog then raise the shadows with various transformations in PWP proper.
jsachs
Posts: 4222
Joined: January 22nd, 2009, 11:03 pm

Re: Bit Depth of Raw Converter

Post by jsachs »

Once an image is gamma corrected, the perceived difference between adjacent brightness levels should be more or less uniform over the full range - for gamma 1.0 (linear) images, the eye sees much more difference between 0 and 10 than between 245 and 255.

Overall, the eye can barely distinguish 100 gray levels so 8 bits is normally adequate to represent images as long as the levels are set according to the correct gamma.

The main advantage of have a monitor with more than 8 bits is that if its response needs to be corrected to correspond to gamma 2.2, there are extra bits to accommodate correction curves that are normally generated by calibration software.
Jonathan Sachs
Digital Light & Color
Robert Schleif
Posts: 340
Joined: May 1st, 2009, 8:28 pm

Re: Bit Depth of Raw Converter

Post by Robert Schleif »

Additional searching on the web and analysis has yielded the following. Also see http://www.normankoren.com/makingfineprints1A.html for explanations that cover some of the following points. An amplification of all of the following can be found at
http://gene.bio.jhu.edu/gamma_and_perception.pdf.
Many web sites misleadingly imply that the use of a power law (Brightness)^(1/gamma) encoding between brightness and the value stored in a file directly results from properties of the human visual system. More likely, the use of this functional form for the digital encoding results from the fact that the apparent brightness of CRT tubes varies as the 2.2 power (gamma=2.2) of an input voltage. Originally, visual brightness signals for display on CRT tubes were transformed before storage or transmission by the power law relationship (Brightness)^(1/2.2) and upon use of the files or receipt of the transmitted signal, the signal was directly applied to the CRT tube, yielding ((Brightness)^(1/gamma))^gamma = Brightness.
Another important consideration is that if brightness information is to be encoded with a relatively small bit depth or transmitted through a narrow channel, then, the optimal (in the sense of minimizing the detectability of a relatively small number of discrete gray levels over the entire range of brightnesses being used) encoding utilizes a series of gray levels, each differing from the next by a fixed, small, percentage. This "ideal" encoding-decoding is logarithmic-exponential and not the power law functional form.
The gamma = 2.2 power law approximation to the ideal encoding for a 100-fold range of brightness information (the typical maximum that can be represented on paper or on a computer monitor) ends up using less than optimal sizes of gray levels for both the very darkest parts of an image and for the brightest parts. For the darkest parts, the separation between adjacent gray levels is three times optimal, and for the brightest parts, the separation is one half of optimal. Thus, it is not surprising that when using 8 bit files, posterization most often shows up in the shadows. The use of 16 bit files eliminates the posterization problems in files, but may not always eliminate posterization on computer monitors since most monitors can display no more than 10 bits worth of grayness.
Post Reply