Professional Documents
Culture Documents
Color Models and Color Applications
Color Models and Color Applications
Applications
Topics :
Color Fundamentals
Chromaticity Diagram
Color Models
What is Color ?
To see color,
three essential
elements must
be present:
light,
an illuminated
object,
and an observer.
Visible Spectrum
We perceive electromagnetic energy having wavelengths
in the range 400-700 nm as visible light.
Violet light
Red light
The
photosensitive
part of the eye is
called the retina.
The retina is
largely composed
of two types of
cells, called rods
and cones. Only
the cones are
responsible for
color perception
The Fovea
Cones are most densely packed within a region of the eye called the
fovea.
The response of
each type of cone
as a function of the
wavelength of the
incident light is
shown in figure.
The peaks for each
curve are at 440nm
(blue), 545nm
(green) and 580nm
(red). Note that the
last two actually
peak in the yellow
part of the
spectrum.
Figure : Spectral response curves for each cone type. The peaks for
each curve are at 440nm (blue), 545nm (green) and 580nm (red).
Standard observer
Based upon psychophysical measurements, standard curves have been
adopted by the CIE (Commission Internationale de l'Eclairage) as the
sensitivity curves for the "typical" observer for the three "pigments" .
These are not the actual pigment absorption characteristics found in
the "standard" human retina but rather sensitivity curves derived from
actual data .
This function of wavelength is called
the luminance-efficiency function of
the eye.
For an arbitrary homogeneous region in an image that has an intensity
as a function of wavelength (color) given by I(), the three responses are
called the tristimulus values:
Color Matching
In order to define the perceptual 3D space in a "standard" way, a set
of experiments can (and have been) carried by having observers try
and match color of a given wavelength, lambda, by mixing three other
pure wavelengths, such as R=700nm, G=546nm, and B=436nm in the
following example. Note that the phosphorus of color TVs and other
CRTs do not emit pure red, green, or blue light of a single
wavelength, as is the case for this experiment.
We commonly
see colors
arrayed in two
dimensions.
This is a
useful, but
incomplete
representation.
Colors actually
occupy a threedimensional
space.
L*a*b Color Model
C XX YY ZZ
Figure : The CIE Chromaticity Diagram showing all visible colors. x and
y are the normalized amounts of the X and Y primaries present, and
hence z = 1 - x - y gives the amount of the Z primary required.
A complete
description of a color
is typically given
with the three values
x, y, and Y. The
remaining CIE
amounts are then
calculated as :
x
X Y;
y
z
Z Y
y
Definitions:
Spectrophotometer :A device to
measure the spectral energy
distribution. It can therefore also
provide the CIE xyz tristimulus
values.
Illuminant C : The point C is
plotted for a white-light source
known as illuminant C
Complementary colors : If the two
color sources combine to produce
white light, they are referred to as
complementary colors ( blue and
yellow; red and cyan. For example,
colors on segment CD are
complementary to the colors on
segment CB.
Definitions:
*dominant wavelength : The
spectral color which can be mixed
with white light in order to
reproduce the desired color. color
B in the above figure is the
dominant wavelength for color A.
* non-spectral colors : colors not
having a dominant wavelength.
For example, color E in the above
figure.
A color can be
specified by its
colorimetric
values. A
colorimeter is
an instrument
that measures
color using
numbers
derived from
CIE values.
A
spectrophotom
eter is another
instrument for
measuring
color. It
samples
wavelengths
across the color
spectrum
Color Models
Color models provide a standard way to specify a
particular color, by defining a 3D coordinate
system, and a subspace that contains all
constructible colors within a particular model. Any
color that can be specified using a model will
correspond to a single point within the subspace it
defines. Each color model is oriented towards either
specific hardware (RGB,CMY,YIQ), or image
processing applications (HSI).
The figure on the left shows the additive mixing of red, green and blue
primaries to form the three secondary colors yellow (red + green),
cyan (blue + green) and magenta (red + blue), and white ((red + green
+ blue). The figure on the right shows the three subtractive primaries,
and their pairwise combinations to form red, green and blue, and
finally black by subtracting all three primaries from white.
Color Gamuts
The chromaticity diagram can be used to compare the "gamuts" of
various possible output devices (i.e., monitors and printers). Note
that a color printer cannot reproduce all the colors visible on a
color monitor
Color Printing
Green paper is green because it reflects green and absorbs other
wavelengths. The following table summarizes the properties of
the four primary types of printing ink. dye
absorb reflects
color
cyan
sred
magenta
green
blue and
green
blue and red
yellow
blue
black
all
none
To produce blue, one would mix cyan and magenta inks, as they
both reflect blue while each absorbing one of green and red.
Unfortunately, inks also interact in non-linear ways. This makes the
process of converting a given monitor color to an equivalent printer
color a challenging problem.
Black ink is used to ensure that a high quality black can always be
printed, and is often referred to as to K. Printers thus use a CMYK
color model.
Color Conversion
To convert from one color gamut to another is a simple procedure. Each phosphor color
can be represented by a combination of the CIE XYZ primaries, yielding the following
transformation from RGB to CIE XYZ:
The transformation
yields the color on monitor 2 which is
equivalent to a given color on monitor 1. Conversion to-and-from printer gamuts is
difficult. A first approximation is as follows:
C=1-R
M=1-G
Y=1B
The fourth color, K, can be used to replace equal amounts of CMY:
K = min(C,M,Y) C' = C - K
M' = M - K
Y' = Y - K
The luminance (Y) component contains all the information required for
black and white television, and captures our perception of the relative
brightness of particular colors. That we perceive green as much lighter
than red, and red lighter than blue, is indicated by their respective
weights of 0.587, 0.299 and 0.114 in the first row of the conversion
matrix above. These weights should be used when converting a color
image to greyscale if you want the perception of brightness to remain
the same.
Figure : The HSI model, showing the HSI solid on the left, and the
HSI triangle on the right, formed by taking a horizontal slice through
the HSI solid at a particular intensity. Hue is measured from red, and
saturation is given by distance from the axis. Colors on the surface
of the solid are fully saturated, i.e. pure colors, and the greyscale
spectrum is on the axis of the solid. For these colors, hue is
undefined.
Conversion between the RGB model and the HSI model is quite
complicated.
See HSICalc.java
See ShowColors2.java
The gamut of colors is all colors that can be reproduced using the three
primaries
The Lab gamut covers all colors in visible spectrum
The RGB gamut is smaller, hence certain visible colors (e.g. pure yellow, pure
cyan) cannot be seen on monitors
The CMYK gamut is the smallest (but not a straight subset of the RGB gamut)
Each pixel requires at least 3 bytes. One byte for each primary
color.
Sometimes combined with a look-up table per primary
Each pixel can be one of 2^24 colors
Conclusions
color - in computer graphics we use an additive color
model
* colors are represented using Red, Green, and Blue
components
* the CRT has a mechanism for displaying these three
components
* a 24-bit RGB color model uses 8 bits for each of red,
green, and blue
* the human eye processes color similarly - there are
three kinds of cones
* RGB color model combines color and intensity
information in each component
* HSI color model separates intensity from color
information
* java.awt.Color provides a method to do conversion