Chapter 4
Chapter 4
1
The Color of Objects
Here we consider the color of an object illuminated by white light. Color is produced by
the absorption of selected wavelengths of light by an object. Objects can be thought of as
absorbing all colors except the colors of their appearance which are reflected back. A
blue object illuminated by white light absorbs most of the wavelengths except those
corresponding to blue light. These blue wavelengths are reflected by the object.
Fig White light composed of all wavelengths of visible light incident on a pure blue
object. Only blue light is reflected from the surface.
Our perception of color arises from the composition of light - the energy spectrum of
photons - which enter the eye. The retina on the inner surface of the back of the eye
contains photosensitive cells. These cells contain pigments which absorb visible light.
Two types of photosensitive cells
Cones
Rods
Rods: are not sensitive to color. They are sensitive only to intensity of light. They are
effective in dim light and sense differences in light intensity - the flux of incident
photons. Because rods are not sensitive to color, in dim light we perceive colored objects
as shades of grey, not shades of color.
2
Fig cross-sectional representation of the eye showing light entering through the pupil
The color signal to the brain comes from the response of the three cones to the spectra
being observed. That is, the signal consists of 3 numbers:
o Red
o Green
o Blue
A color can be specified as the sum of three colors. So colors form a 3 dimensional
vector space.
For every color signal or photons reaching the eye, some ratio of response within the
three types of cones is triggered. It is this ratio that permits the perception of a particular
color.
The following figure shows the spectral-response functions of the cones and the
luminous-efficiency function of the human eye.
Eye responds differently to changes in different color and luminance.
Color Spaces
Color space specifies how color information is represented. It is also called color model.
3
Any color could be described in a three dimensional graph, called a color space.
Mathematically the axis can be tilted or moved in different directions to change the way
the space is described, without changing the actual colors. The values along an axis can
be linear or non-linear. This gives a variety of ways to describe colors that have an
impact on the way we process a color image.
Color images can be described with three components, commonly Red, Green, and Blue.
It combines (adds) the three components with varying intensity to make all other colors.
Absence of all colors (zero values for all the components) create black. The presence of
the three colors form white. These colors are called additive colors since they add
together the way light adds to make colors, and is a natural color space to use with video
displays.
4
Grey is any value where R=G=B, thus it requires all three (RGB) signals to produce a
"black and white" picture. In other words, a "black and white" picture must be computed
- it is not inherently available as one of the components specified.
CRT Displays
CRT displays have three phosphors (RGB) which produce a combination of
wavelengths when excited with electrons.
The gamut of colors is all colors that can be reproduced using the three
Primaries.
The gamut of a color monitor is smaller than that of color models, E.g. CIE
(LAB) Model
A color model used with printers and other peripherals. Three primary colors, cyan (C),
magenta (M), and yellow (Y), are used to reproduce all colors.
The three colors together absorb all the light that strikes it, appearing black (as contrasted
to RGB where the three colors together made white). "Nothing" on the paper is white (as
5
contrasted to RGB where nothing was black). These are called the subtractive or "paint"
colors.
In practice, it is difficult to have the exact mix of the three colors to perfectly absorb all
light and thus produce a black color. Expensive inks are required to produce the exact
color, and the paper must absorb each color in exactly the same way. To avoid these
problems, a forth color is often added - black - creating the CYMK color "space", even
though the black is mathematically not required.
YCbCr
This color space is closely related to the YUV space, but with the coordinates shifted to
allow all positive valued coefficients. It is a scaled and shifted YUV.
The luminance (brightness), Y, is retained separately from the chrominance (color).
Y-Luma component
Cb
Cr Chrominace
During development and testing of JPEG it became apparent that chrominance sub
sampling in this space allowed a much better compression than simply compressing RGB
or CYM. Sub sampling means that only one half or one quarter as much detail is retained
for the color as for the brightness.
CIE
In 1931, the CIE (Commite Internationale de E’clairage) developed a color model based
on human perception. They are based on the human eyes’ response to red green and blue
colors, and are designed to accurately represent human color perception. The CIE is a
device-independent color model and because of this it is used as a standard for other
colors to compare with. Device-independent means color can be reproduced faithfully on
any type of device, such as scanners, monitors, and printers (color quality does not vary
depending on the device).
There are different versions of CIE color model. The most commonly used are:
CIE XYZ color model
CIE L*a*b color model
6
Fig CIE color model
CIE XYZ
CIE XYZ color model defines three primaries called X, Y, and Z that can be combined to
match any color humans see. This relates to color perception of human eye. The Y
primary is defined to match the luminous efficiency of human eye. X and Z are obtained
based on experiment involving human observers.
7
Edges represent pure colors
Every color could be assigned a particular point on the coordinate plane
The spectral purity of colors decreases as you move from the edges to the center of
the diagram
Brightness is not taken into consideration in this model
By the November 1992 Group 4 color fax meeting in Tokyo, CIELAB 1976 was selected
as the primary color space, with YCbCr as one of several secondary options. Some of the
people involved argue that the particular meeting was dominated by people with special
interests, and don't believe that decision will stand.
If CIELAB becomes the fax standard, it would logically be our choice. However, YCbCr
is much more widely used, and preferred by many technical experts.
8
Beside the RGB representation, YIQ and YUV are the two commonly used in video.
YIQ is intended to take advantage of human color response characteristics. Eye is more
sensitive to Orange-Blue range (I) than in Purple-Green range (Q). Therefore less
bandwidth is required for Q than for I. NTSC limits I to 1.5 MHZ and Q to 0.6 MHZ. Y
is assigned higher bandwidth, 4MHZ.
9
Fig YUV color model
One neat aspect of YUV is that you can throw out the U and V components and get a
grey-scale image. Black and white TV receives only Y (luminanace) component ignoring
the otheres. This makes it black-white TV compatible. Since the human eye is more
responsive to brightness than it is to color, many lossy image compression formats throw
away half or more of the samples in the chroma channels (color part) to reduce the
amount of data to deal with, without severely destroying the image quality.
This image shows a slightly tilted representation of the YUV color cube, looking at the
dark (Y = 0) side. Notice how in the middle it is completely black, which is where U and
V are zero, and Y is as well. As U and V move towards their limits, you start to see their
10
effect on the colors.
This image shows the same cube, from the bright side (Y = 1). Here we have bright white
in the middle of the face, with very bright colors on the corners where U and V are also at
their limits.
11
Cyan, magenta, and yellow are used as subtractive primaries
The three RGB primary colors, when mixed, produce white, but the three CMY primary
colors produce black when they are mixed together. Since actual inks will not produce
pure colors, black (K) is included as a separate color, and the model is called CMYK.
With the CMYK model, the range of reproducible colors is narrower than with RGB, so
when RGB data is converted to CMYK data, the colors seem dirtier.
12
Fig HSL color space
The HSL color space stands for Hue, Saturation, Lightness (also luminance or
luminosity). HSL is drawn as a double cone or double hexcone. The two apexes of the
HSL double hexcone correspond to black and white. The angular parameter corresponds
to hue, distance from the axis corresponds to saturation, and distance along the black-
white axis corresponds to lightness.
13
Summary of Color
Color images are encoded as (R,G,B) integer triplet values. These triplets encode how
much the corresponding phosphor should be excited in devices such as a monitor.
Three common systems of encoding in video are RGB, YIQ, and YcrCb(YUV).
Besides the hardware-oriented color models (i.e., RGB, CMY, YIQ, YUV), HSB
(Hue, Saturation, and Brightness, e.g., used in Photoshop) and HLS (Hue, Lightness,
and Saturation) are also commonly used.
YIQ uses properties of the human eye to prioritize information. Y is the black and
white (luminance) image; I and Q are the color (chrominance) images. YUV uses
similar idea.
YUV is a standard for digital video that specifies image size, and decimates the
chrominance images (for 4:2:2 video)
A black and white image is a 2-D array of integers.
14