openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] f-stops and steps. How are they related?


From: Chris Cox
Subject: Re: [Openexr-devel] f-stops and steps. How are they related?
Date: Mon, 10 Jan 2005 11:38:53 -0800



First of all, I think it is important to understand why we work with a linear representation of light levels. The reason is that most processing is mathematical, and the math only works correctly with linear data.

That is incorrect.   Math can work in any domain.
For example: c = a*b works in the linear domain just as well as c = a + b works in the log domain.

And many image processing algorithms are designed to work on gamma or log encoded images (relying on the perceptual uniformity of the encoding).

In many cases, it is far more efficient (processing and storage wise) to use images encoded as perceived brightness (gamma near 2.5) rather than something related to photon counts (gamma 1.0).


The same functions are applied to every pixel, regardless of light level, so therefore
the mapping from perceived light level to numeric code should be linear.

That is also incorrect (and really bad logic).

How the function is applied has nothing to do with the data encoding.

The end to end (photons -> sensor -> ADC -> storage ->DAC -> CRT -> photons) transfer function can be close to linear - but since most images need to have dynamic range compression applied before going to a display or print device, the result is usually far from linear.


Next, it is important to understand how a CRT works. The digital codes (usually 8 bits per component) are sent to DACs (Digital to Analog Converters) which convert to voltage. In a CRT, these voltages drive electron guns aimed
at phosphors.  The issue is that phosphor does not react linearly.

I believe the dominating factor is the electron gun, not the phosphor.



Remember that you may be dealing with images that are truly linear, or you may be working with images that already have gamma applied so they will look good on the average display attached to the average operating system.

That's only one reason to apply gamma encoding.
Storage efficiency is another important reason. Without gamma encoding you'd need more bits to get the same quality of appearance - and thus larger file size.



There have been standards proposed for TIFF to document the embedded gamma with a tag.

It is better to document the appearance with an ICC profile - which includes the transfer function (generalization of gamma) as well as color information about the image.


Please read http://www.poynton.com/GammaFAQ.html


Chris





reply via email to

[Prev in Thread] Current Thread [Next in Thread]