02 color
DESCRIPTION
TRANSCRIPT
CS-184: Computer Graphics
Lecture #2: Color
Prof. James O’BrienUniversity of California, Berkeley
V2008-F-02-1.0
2
Today
Color and Light
1
2
3
What is Light?
Radiation in a particular frequency range
4
Spectral Colors
Light at a single frequency
Bright and distinct in appearance
Reproduction only, not a real spectral color!
3
4
4
Spectral Colors
Light at a single frequency
Bright and distinct in appearance
R o y G. B i v
Reproduction only, not a real spectral color!
5
Other Colors
Most colors seen are a mix light of several frequencies
Image from David Forsyth
4
5
6
Most colors seen are a mix light of several frequencies
Other Colors
Image from David Forsyth
7
Most colors seen are a mix light of several frequencies
Other Colors
Image from David Forsyth
6
7
8
White
Image recorded by Adam Kirk
“Full Spectrum” Compact Fluorescent
White light bulbs
9
Perception -vs- Measurement
You do not “see” the spectrum of lightEyes make limited measurements
Eyes physically adapt to circumstance
You brain adapts in various ways also
Weird psychological stuff happens
8
9
10
Everything is Relative
11
Everything is Relative
10
11
12
Adapt
13
Adapt
12
13
14
It’s all in your mind...
15
Mach Bands
14
15
15
Mach Bands
16
Everything’s Still Relative
15
16
16
Everything’s Still Relative
17
Eyes as Sensors
The human eye contains cells that sense lightRods
No color (sort of)
Spread over the retina
More sensitive
Cones
Three types of cones
Each sensitive to different frequency distribution
Concentrated in fovea (center of the retina)
Less sensitive
Image from Stephen Chenney
16
17
18
Cones
Each type of cone responds to different range of frequencies/wavelengths
Long, medium, short
Ratio: L10/M40/S1
Also called by colorRed, green, blue
Misleading:“Red” does not mean your red cones are firing...
Image from David Forsyth
Note: Rod response peaks between S&M
19
Cones
Response of a cone is given by a convolution integral :
Images from David Forsyth
r(L,S) =ZL(λ) ·S(λ)dλ
18
19
20
Cones
You can see that “red” and “green” respond to more more than just red and green...
Images from David Forsyth
21
20
21
22
Cones (repeat)
Response of a cone is given by a convolution integral :
Images from David Forsyth
r(L,S) =ZL(λ) ·S(λ)dλ
Rods
Rods are not uniform across visible spectrum
Explains why red light is good for night visions
23
Note the non-uniform
scaling on axis!
22
23
24
Cones (repeat)
Response of a cone is given by a convolution integral :
Different light inputs (L) may produce the same response (r) in all three cones
Metamers: different “colors” that look the same
Can be quite useful...
Odd interactions between illumination and surfaces can be odd...
r(L,S) =ZL(λ) ·S(λ)dλ
25
Trichromaticity
Eye records color by 3 measurements
We can “fool” it with combination of 3 signals
Consequence: monitors, printers, etc...
PS: The cone responses are linear
24
25
26
Additive Color
Show color on left
Mix “primaries” on right until they match
The primaries need not be RGB
27
Color Matching Functions
For primaries at 645.2, 526.3, and 444.4 nm
Note negative region...
26
27
28
Additive Mixing
Given three colors we agree on
Make generic color with
Negative not realizable
Color now described by
If we match on
Example: computer monitor [RGB], paint
α, β, γ
A, B, C
M = αA+βB+ γC
29
M =W ! (αA+βB+ γC)
Subtractive Mixing
Given three colors we agree on
Make generic color with
Max limited by
Color now described by
If we match on
Example: ink [CMYK]
α, β, γ
A, B, C
W
Why 4th ink for black?
28
29
30
CIE XYZ
Imaginary set of color bases
Match across spectrum with positive values
X, Y, ZNormalized:
x = X / ( X+Y+Z )y = Y / ( X+Y+Z )
31
CIE Color Horseshoe Thinggy
30
31
32
Gamuts
Constraints on additive/ subtractive mixing limit the range of color a given device can realize.
Devices may differ.
Matching between devices can be difficult.
33
Dynamic Range
Max/min values also limited on devices“blackest black”
“brightest white”
Jack Tumblin
32
33
34
Tone Mapping
“Day for night”(not the best example, done in Photoshop)
35
Color Spaces
RGB color cube
34
35
36
Color Spaces
RGB color cube
HSV color cone
37
Color Spaces
RGB color cube
HSV color cone
CIE
MacAdam Ellipses (10x)Colors in ellipses indistinguishable from center.
36
37
38
Color Spaces
RGB color cube
HSV color cone
CIE (x,y)
CIE (u,v)
Scaled to be closer to circles.
++=
′
′
YX
ZYXvu
94
3151
x,y
u,v
39
Color Spaces
RGB color cube
HSV color cone
CIE (x,y)
CIE (u,v)CMYK
Many others...
38
39
40
Color Phenomena
Light sources seldom shine directly in eye
Light follows some transport path, i.e.:Source
Air
Object surface
Air
Eye
Color effected by interactions
41
Reflection
Light strikes object
Some frequencies reflect
Some adsorbed
Reflected spectrum is light times surface
Recall metamers...Unknown?
40
41
42
Transmission
Light strikes object
Some frequencies pass
Some adsorbed (or reflected)
Unknown?
43
Scattering
Interactions with small particles in medium
Long wavelengths ignore
Short ones scatterUnknown?
42
43
44
Interference
Wave behavior of lightCancelation
Reinforcement
Wavelength dependent
Unknown?
45
Iridescence
Interaction of light withSmall structures
Thin transparent surfaces
Unknown?
44
45
46
Iridescence
47
Iridescence
46
47
48
Fluorescence / Phosphorescence
Photon come in, knocks up electron
Electron drops and emits photon at other frequency
May be some latency
Radio active decay can also emit visible photons
49
Fluorescence / Phosphorescence
48
49
50
Black Body Radiation
Hot objects radiate energy
Frequency is temperature dependent
Moderately hot objects get into visible range
Spectral distribution is given by
Leads to notion of “color temperature”
€
E λ( )∝ 1λ5
1exp hc kλT( )−1
51
Black Body Radiation
HyperPhysics
50
51