[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Openexr-devel] f-stops and steps. How are they related?
From: |
Brian Willoughby |
Subject: |
Re: [Openexr-devel] f-stops and steps. How are they related? |
Date: |
Sat, 8 Jan 2005 18:50:33 -0800 |
Hello all,
I hope the list members do not mind if I reply to Yves' questions, even
thought the discussion is not purely related to EXR.
Considerations of gamma can get quite complicated when you consider all the
input devices, standards for file formats and image transfers, and all the
output devices. For the sake of simplicity, I find it easiest to break it down
to two elements: a computer display buffer and a CRT. Understanding that
relationship allows extrapolation to the other elements.
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. 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.
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. When given
a voltage that represents light levels in a linear mapping, the phosphor does
not produce a linear light output. The curve that relates input voltage to
output light level is exponential. Gamma, at least for a CRT, is a means to
correct for this exponential curve. I believe that most phosphor responds with
a gamma of 2.2, which is why you see that value recommended.
After you understand the basics, then you have to consider that not all
displays are CRTs, especially not now. New display cards have digital output,
so the monitor itself must have the DACs and must apply gamma if needed. Plus,
there has never been a universal standard for gamma, so many people who
produce computer images will put a gamma curve into their image (hopefully
*after* all processing is finished for the image). Then, you also have the
issue of non-linearity from input devices, unless you're dealing with purely
rendered images.
I tend to scan without gamma, but the images look really dark on the average
monitor, unless the display card and monitor are set to 2.2 gamma. If I scan
with the default gamma (which is 2.2 on my scanner), then images are blown out
if I also set my system to 2.2 on output.
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. If the image
has less than 2.2 gamma, and you're viewing it on a CRT, you'll have to apply a
gamma of less than 2.2 to make up the difference. Applying 2.2 gamma (with
the display card and monitor settings) to image data that already has some
gamma will be too bright.
There have been standards proposed for TIFF to document the embedded gamma
with a tag. I'm not sure how widespread this is. Also, many advanced
operating systems have API that will gamma correct individual windows or even
individual images within a window for gamma. Apple had ColorSync. The OmniWeb
web browser will gamma correct each image on a web page based upon information
found in the image file. If any of these technologies are manipulating your
image on the way to the framebuffer and monitor, than gamma correction can
easily get out of control.
P.S. One thing to be aware of is that many display cards only have 8-bit
DACs. If your framebuffer is also 8-bit, and the display card is mapping the
gamma, then you will have lost some codes. In other words, you will have fewer
than 256 steps of voltage. Better display cards have a 10-bit DAC, and the
RAMDAC lookup tables are 8-bit input, 10-bit output, so you will retain 256
unique steps even after conversion to the exponential gamma curve.
Brian Willoughby
Sound Consulting
- [Openexr-devel] f-stops and steps. How are they related?, Yves Poissant, 2005/01/05
- Re: [Openexr-devel] f-stops and steps. How are they related?, Florian Kainz, 2005/01/05
- Re: [Openexr-devel] f-stops and steps. How are they related?, Kevin Wheatley, 2005/01/06
- Re: [Openexr-devel] f-stops and steps. How are they related?, Yves Poissant, 2005/01/06
- Re: [Openexr-devel] f-stops and steps. How are they related?, Florian Kainz, 2005/01/06
- Re: [Openexr-devel] f-stops and steps. How are they related?, Yves Poissant, 2005/01/07
- Re: [Openexr-devel] f-stops and steps. How are they related?, Florian Kainz, 2005/01/07
- Re: [Openexr-devel] f-stops and steps. How are they related?, Yves Poissant, 2005/01/08
- Re: [Openexr-devel] f-stops and steps. How are they related?, Yves Poissant, 2005/01/08
- Re: [Openexr-devel] f-stops and steps. How are they related?, Yves Poissant, 2005/01/08
- Re: [Openexr-devel] f-stops and steps. How are they related?,
Brian Willoughby <=
- Re: [Openexr-devel] f-stops and steps. How are they related?, Chris Cox, 2005/01/10