CS 445 / 645 Introduction To Computer Graphics: Color
CS 445 / 645 Introduction To Computer Graphics: Color
Morphing algorithm
Last Class
We discussed vision physiology and
perception of gradients
Today:
Color perception
Color representations
Halftoning
A
A technique
technique used
used in
in newspaper
newspaper printing
printing
Only
Only two
two intensities
intensities are
are possible,
possible, blob
blob of
of ink
ink and
and no
no
blob
blob of
of ink
ink
But,
But, the
the size
size of
of the
the blob
blob can
can be
be varied
varied
Also,
Also, the
the dither
dither patterns
patterns of
of small
small dots
dots can
can be
be used
used
Halftoning
Halftoning – dot size
Halftoning – Moire Patterns
Repeated
Repeated use
use of
of same
same dot
dot
pattern
pattern for
for particular
particular
shade
shade results
results in
in
repeated
repeated pattern
pattern
•• Perceived
Perceived as
as aa moire
moire pattern
pattern
•• Instead,
Instead, randomize
randomize halftone
halftone
pattern
pattern
Dithering
Halftoning
Halftoning for
for color
color images
images
Specifying Color
Color
Color perception
perception usually
usually involves
involves three
three quantities:
quantities:
•• Hue:
Hue: Distinguishes
Distinguishes between
between colors
colors like
like red,
red, green,
green, blue,
blue, etc
etc
•• Saturation:
Saturation: How
How far
far the
the color
color is
is from
from aa gray
gray of
of equal
equal intensity
intensity
•• Lightness:
Lightness: The
The perceived
perceived intensity
intensity of
of aa reflecting
reflecting object
object
Sometimes
Sometimes lightness
lightness is
is called
called brightness
brightness if
if the
the object
object is
is
emitting
emitting light
light instead
instead of
of reflecting
reflecting it.
it.
In
In order
order to
to use
use color
color precisely
precisely in
in computer
computer graphics,
graphics, we
we
need
need to
to be
be able
able to
to specify
specify and
and measure
measure colors.
colors.
Combining Colors
White Light
Figures 15.3-4 from H&B Orange Light
How well do we see color?
What
What color
color do
do we
we see
see the
the best?
best?
•• Yellow-green
Yellow-green at
at 550
550 nm
nm
What
What color
color do
do we
we see
see the
the worst?
worst?
•• Blue
Blue at
at 440
440 nm
nm
Flashback:
Flashback: Colortables
Colortables (colormaps)
(colormaps) for
for color
color storage
storage
•• Which
Which RGB
RGB value
value gets
gets the
the most
most bits?
bits?
Can
Can perceive
perceive color
color differences
differences of
of 10
10 nm
nm at
at extremes
extremes (violet
(violet and
and red)
red)
and
and 22 nm
nm between
between blue
blue and
and yellow
yellow
Metamers
Metamers –– different
different energy
energy radiations
radiations look
look like
like the
the same
same color
color
Color
Color perception
perception also
also affected
affected by
by surrounding
surrounding light
light and
and adaptation
adaptation
Just noticeable difference (JND)
128 fully saturated hues can be distinguished
Cannot perceive hue differences with less
saturated light.
Sensitivity to changes in saturation for a fixed hue
and brightness ranges from 16 to 23 depending
on hue.
Talked about representing intensities last lecture
Human Color Vision
Humans
Humans have
have 33 light
light sensitive
sensitive pigments
pigments in
in their
their cones,
cones,
called
called L,
L, M,
M, and
and SS
Each
Each has
has aa different
different
spectral
spectral response
response curve:
curve:
L L ( )E ( )d
M M ( ) E( ) d
S S( )E ( )d
This
This leads
leads to
to metamerism
metamerism
“Tristimulus”
“Tristimulus” color
color theory
theory
Color Spaces
Three
Three types
types of
of cones
cones suggests
suggests color
color is
is aa 3D
3D quantity.
quantity. How
How
to
to define
define 3D
3D color
color space?
space?
Idea:
Idea:
•• Shine
Shine given
given wavelength
wavelength ()
() on
on aa screen
screen
•• User
User must
must control
control three
three lasers
lasers producing
producing three
three wavelengths
wavelengths (say
(say
R=700nm,
R=700nm, G=546nm,
G=546nm, and and B=436nm)
B=436nm)
•• Adjust
Adjust intensity
intensity of
of RGB
RGB until
until colors
colors are
are identical
identical
•• Note
Note phosphors
phosphors of of TV
TV are
are not
not perfect
perfect RGB
RGB
emitters
emitters as
as the
the results
results to
to right
right demonstrate
demonstrate
A Problem Exists
Exact
Exact target match ((ll)) with
target match with phosphors
phosphors not
not possible
possible
•• Some
Some red
red had
had to
to be
be added
added toto target
target color
color to
to permit
permit exact
exact match
match using
using
“knobs”
“knobs” on
on RGB
RGB intensity
intensity output
output ofof CRT
CRT
•• Equivalently
Equivalently (theoretically),
(theoretically),
some
some red
red could
could have
have been
been
removed
removed from
from CRT
CRT output
output
•• Figure
Figure shows
shows that
that red
red
phosphor
phosphor must
must remove
remove some
some
cyan
cyan for
for perfect
perfect match
match
•• CRT
CRT phosphors
phosphors cannot
cannot
remove
remove cyan,
cyan, so
so 500
500 nm
nm
cannot
cannot be
be generated
generated
CIE Color Space
No
No standard
standard set
set of
of three
three wavelengths
wavelengths can
can be
be
combined
combined to
to generate
generate all
all other
other wavelengths.
wavelengths.
The
The CIE
CIE (Commission
(Commission Internationale
Internationale d’Eclairage)
d’Eclairage)
defined
defined three
three hypothetical
hypothetical lights
lights X,
X, Y,
Y, and
and Z
Z with
with
these
these spectra:
spectra:
Idea:
Idea: any wavelength can
any wavelength can
be
be matched
matched perceptually
perceptually x~R
y~G
by
by positive
positive combinations
combinations z~B
of
of X,
X, Y,
Y, and
and Z
Z
CIE Color Space
The
The gamut
gamut of of all
all colors
colors perceivable
perceivable is
is thus
thus aa three-
three-
dimensional
dimensional shape
shape inin X,
X, Y,
Y, ZZ
Color
Color == xX
xX ++ yY
yY ++ zZ
zZ
CIE Chromaticity Diagram (1931)
R ' X R XG XB R
G ' Y R YG Y B G
B ' Z R ZG Z B B
Y 0 . 30 0 . 59 0 .11 R
I 0 . 60 0 . 28 0 . 32 G
Q 0 .21 0 . 52 0 .31 B
•• IfIf you
you put
put cyan
cyan ink
ink on
on the
the page,
page, no
no red
red light
light is
is reflected
reflected
•• Add
Add black
black as
as option
option (CMYK)
(CMYK) to
to match
match equal
equal parts
parts CMY
CMY