The gamma is sometimes
a bit difficult to understand because there are a many different terms
in use but most importantly because of the over an half-century old
convention:
Most often
the higher than 1 value is mentioned even if the reciprocal value
is actually meant.
This is done simply
because it is easier to speak about the higher than 1 values than their
reciprocal value and there is usually no possibility for confusion.
So, for people
who are new to the wonderful world of digital imaging the below table
may offer some help.
After the table
there is some examples about calculating the with gammas, but first
one needs to know what a gamma value in various places means.
| This: |
Means: |
|
Gamma
function or
gamma
equation or
gamma formula
|
In the normalized
form the gamma function is:
output
= input ^ gamma
Gamma
is the exponent of the above power-law function.
When gamma=1.0
the function returns output=input, so there is no changes to the
image, gamma 1.0 is the same as linear.
When gamma > 1.0 image turns more dark.
When gamma < 1.0 image turns more light.
Normalized
form means a range from 0...1. So e.g. for the 8-bit/color images
the levels are divided by 255.
|
| Gamma
correction |
an image processing
system or a display is said to be gamma corrected when it has been
calibrated linearly (to gamma 1.0).
Note that the
term "gamma correction" is sometimes incorrectly used
where "gamma compensation" should be used.
|
| The
native gamma of CRT monitor is 2.50 |
the CRT monitor
applies the gamma function with gamma=2.5 over the data (makes
images darker). This is the electrical property of the CRT tube,
all of them.
In order to
show images properly on the CRT monitor the gamma function
with gamma=1/2.5 has to be applied over the data, somewhere in the
imaging path. The look up table in the display driver is usually
used for CRT calibration but an application can also modify the
image data itself.
CRT monitors
are said to be in gamma-space 2.5.
|
| Gamma-space |
the
gamma value is told but the user needs to understand how to take it,
either as it is or as the reciprocal value. There usually is no problem
in understanding this. |
|
Image-gamma
or
File-gamma
|
it is said
that an image has an image-gamma when the image data has been gamma
compensated, in other words the gamma function with some
gamma value is applied over the data.
When the
gamma function with gamma=1/2.5 is applied over the image data
(makes image lighter) that image is said to have image-gamma or
file-gamma of 2.5. Also that image is said to be in gamma-space
2.5.
|
| Gamma
compensation |
Same as the
file-gamma. Image is said be gamma compensated when the gamma
function is applied over the image data.
When the
gamma function with gamma=1/2.5 is applied over the image data
then the image is said to be gamma compensated for gamma-space 2.5
viewing.
|
| The
gamma value in the acquire dialog of scanners |
the scanner
applies the gamma function with gamma=1/gamma over
the data.
If the gamma
value in the scanner acquire dialog is 1.0 then it applies the
gamma function with gamma=1/1.0 (does not change the image data,
provides linear images).
If the gamma
value in the scanner acquire dialog is 2.5 then it applies the
gamma function at gamma=1/2.5 (makes the images lighter).
|
| The
Desired Gamma in AdobeGamma utility |
The look up
table in the display driver is adjusted so that the monitor (or
the system) appears to have the Desired Gamma instead the
native CRT Gamma 2.5.
When the Desired
Gamma is 1.0 then the system is calibrated (linearly).
When the Desired
Gamma is 1.72 then the system is calibrated to the Mac default
gamma space.
|
| The
gamma value in Photoshop RGB setup |
Photoshop is
set into that gamma-space instead of the native CRT gamma-space
or to the Desired Gamma space that is set by AdobeGamma utility.
Gamma 1.0 in
Photoshop RGB setup means that Photoshop is linearly calibrated
no matter how the system is calibrated by the AdobeGamma utility.
(be aware fo the slope limiting issue).
Gamma 2.5 in
Photoshop RGB setup means that Photoshop in set to the native gamma-space
of CRT monitors no matter how the system is calibrated by AdobeGamma
utility.
|
Since the gamma
function is power law fucntion it is easy to calculate with it. Subsequent
gamma transformations can be combined by simply multiplying all the
the gammas on the workpath. But, one needs to use the correct,
actual values, not the colloquially mentioned greater than one values.
The product of
all the gammas in any imaging path must produce linear representation
of light intensity in order the images to appear naturally. So the result
must be 1.0. We will now see how it goes by examples:
| Typical
gamma space workflow on uncalibrated Mac. Not recommended
please see the gamma
errors section |
| 1. |
Acquire
with gamma 1.8 in scanner driver |
The
scanner driver applies gamma 1/1.8. |
| 2. |
edit
in the uncalibrated Mac gamma space (1.72) |
the
gamma-space of the image is changed to 1.72 by image editing since
Mac gamma actually is 1.72. |
| 4. |
apply
output compensation |
since
it is going to CRT on PC system gamma 1/1.45 is applied over the image
data. |
| 3. |
output to CRT
monitor on PC
|
CRT
monitor applies gamma 2.5. |
|
|
Product
= 1/1.72 * 1/1.45 * 2.5 = 1.0 |
| Typical
Linear Space workflow |
| 1. |
Acquire
with gamma 1.0 in scanner driver |
The
scanner driver provides linear (gamma 1.0) images. |
| 2. |
edit
in Linear Space (gamma 1.0 space) |
the
gamma-space of the image is not changed due to the editing. |
| 3. |
apply
output compensation over a copy of the final image |
since
it is going to CRT on PC system gamma 1/2.5 is applied over the image
data. |
| 3. |
output to CRT
monitor PC
|
CRT
monitor applies gamma 2.5. |
|
|
Product
= 1.0* 1/2.5 * 2.5 = 1.0 |
| Accurate
and actual Linear Space Workflow in General |
| 1. |
Acquire
linear images (when ever possible). |
Some
acquire devices particularly the consumer grade digicams do not provide
linear images (they do not provide any possibility to change their
transfer function). In addition they do not provide images in any
gamma space either, their transfer function is arbitrary. Such images
are linearized in step 2. |
| 2. |
Apply
input calibration to bring the image accurately into the working-space
(gamma, color-space and color-temperature). |
This
could happen automatically by an ICC/ICM profile but is most often
applied by an Action (with predefined Curves, Channel-Mixer and Hue-Saturation
operations that are created with a Color Input Target). |
| 2. |
Edit
in The Linear Space (gamma 1.0, known color-space and known color-temperature)
like Trinitron, D6500. |
The
gamma-space of the image are not changed due to the editing. |
| 3. |
Save
the final original. |
Important
for re-use and sending to a different output device, for further editing
etc. |
| 4. |
Apply
output compensation over a copy of the final image. |
if it is going
to CRT on PC then gamma 1/2.5 is applied over the image data. If
the working-space is Trinitron, D6500 then color-space and color-temperature
need no conversion because Trinitron, D6500 is what most of the
the monitors use/have.
if it is going
to CRT on uncalibrated Mac then gamma 1/1.72 is applied over the
image data. If the working-space is Trinitron, D6500 then again
color-space and color-temperature need no conversion.
If it is going
to a peripheral printer then output compensation could happen automatically
by an ICC/ICM profile but is most often applied by an Action (with
predefined Curves, Channel-Mixer and Hue-Saturation operations that
are created with a Color Input Target).
|