Computer Graphics and Image Processing Color I
Part 1 – Lecture 5
1
Today’s Outline Today s Outline
Colors in the Real World Co o s e ea o d
Interaction of Light with Materials
Human Perception of Light
2
COLORS IN THE REAL WORLD
3
Electromagnetic Radiation: Waves Electromagnetic Radiation: Waves
Physics theories of light:
1. waves (classical mechanics)
2. particles (quantum mechanics) wavelength, λ frequency = cycles/sec.
© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins 4
Some Neighbors of Visible Light Some Neighbors of Visible Light
1000 nm
Infrared
700 nm TV
Radio
Red
Infrared Invisible
TV
h Mi
Red Orange
Yellow Visible light a k a
elengt h Microwaves
Visible Light
Yellow Green
Infrared
Visible light, a.k.a.
the “visible spectrum”
400 nm X-Rays
UV Rays
Wa ve
g BlueIndigo Violet
400 nm 10 Gamma
Rays X Rays
Ultra- violet (UV)
Invisible
5
10 nm
y
(UV)© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
Spectral Density Function (SDF): S(λ) Spectral Density Function (SDF): S(λ)
S(λ) = power / unit wavelength = energy
S(λ) power / unit wavelength energy
Energy Energy
400 Wavelength λ (nm) 700
E
400 Wavelength λ (nm) 700
E
spike or “single” wavelength
= “spectral colour” uniform white/gray light
Energy Energy
400 Wavelength λ (nm) 700 400 Wavelength λ (nm) 700
white light plus a dominant wavelength arbitrary SDF: blue plus orange/yellow
© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins 6
SDFs for Different Light Sources SDFs for Different Light Sources
Some other light spectra: sunlight, tungsten lamp, fluorescent lampg p g g p p
http://www.micro.magnet.fsu.edu/optics/lightandcolor/sources.html
© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins 7
Describing Colors using the SDF Describing Colors using the SDF
• Hue: dominant wavelength
gy Hue: dominant wavelength
• Luminance (brightness): total power (integral of SDF)
• Saturation (also purity): % of luminance
Energ
Saturation (also purity): % of luminance residing in dominant component 400 Wavelength λ (nm) 700
gy hi h S gy high S
Energ high S
med L
Energ high S
low L
400 Wavelength λ (nm) 700 400 Wavelength λ (nm) 700
rgy low S
rgy Ene
low S low L
Ene low Shigh L
400 Wavelength λ (nm) 700 400 Wavelength λ (nm) 700
8
INTERACTION OF LIGHT WITH MATERIALS
9
Interaction of Light with Materials Interaction of Light with Materials
Light surface of some “body”: 3 possible results
1. Absorption – energy of selected wavelengths retained within the body
2. Transmission – energy of selected wavelengths travels through and exits the body Refraction of light occurs at boundaries
the body. Refraction of light occurs at boundaries.
3. Reflection – energy of selected wavelengths “bounces” off surface.
Angle of reflection = angle of incidence.
Also combinations of these 3, such as “internal reflection” when light enters a semi-translucent body, scatters, and some light reflects back out: human skin, Shrek’s skin R = reflected energyR = reflected energy
A = absorbed I = incident (incoming)
energy
T = transmitted energy energy
© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins 10
Interaction of Light with Materials Interaction of Light with Materials
Incident (incoming) light energy
= absorbed energy + transmitted energy + reflected energy
= retained + passed through + bounced off
Chemical properties of the body determine the % of each
Chemical properties of the body determine the % of each.
opaque coloured surface: A > 0 , T = 0, R > 0 opaque black surface: A = I ,T = 0, R = 0 (black felt cloth)
(black felt cloth)
Comp ter graphics reflected (and refracted) transmitted light
perfect mirror surface: A = 0, T = 0, R = I transparent surface: A, R small, T ~= I (clear glass)
Computer graphics: reflected (and refracted), transmitted light
© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins 11
Spectral Response Function (SRF) Spectral Response Function (SRF)
Molecular structure of a body determines which wavelengths of light
Molecular structure of a body determines which wavelengths of light and what amount are absorbed, transmitted, or reflected
Can be measured with a spectral response function (SRF) or filter
( )function
ergy 100% ergy 100%
% Ene
0% % Ene
0%
400 Wavelength λ (nm) 700 All pass filter (ideal , real )
400 Wavelength λ (nm)700 low pass and high pass filters
ergy 100% ergy 100%
% Ene 100%
0% % Ene 100%
0%
400 Wavelength λ (nm) 700 Narrow band filter
400 Wavelength λ (nm)700 Notch filter 12
Light Source SDF x SRF = Result SDF Light Source SDF x SRF = Result SDF
SDF of result = product of SRF and light source SDF
i.e. at each wavelength, multiply SRF % times source energy
gygy % Energ
100%
0%
gEner
Χ
400 Wavelength λ (nm) 700
0%
Narrow band filter 400 Wavelength λ (nm) 700
Sunlight SDF
Energy
=
Energy=
400 Wavelength λ (nm) 700
E
400 Wavelength λ (nm) 700
E
Filtered sunlight SDF
© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins 13
SDF x SRF = Result SDF SDF x SRF = Result SDF
Why is this relevant for computer graphics?
1.
All light sources can be defined by their SDF
Natural light source: sun, fire
Artificial light source: light bulb, laser, LED, computer display
2.
All light absorbers, transmitters, or reflectors can be defined by g y their SRF
Sensing devices: absorbed light SRF
Camera (digital photocell, film), human eye (retina)
Definition of “color” =
integral of (light source SDF sensor’s SRF)
Glass, still water, cellophane: transmitted light SRF
Surface material of an object: reflected light SRF
© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins 14
HUMAN PERCEPTION OF LIGHT
15
The Eye The Eye
Four types of receptors (sensors): R/G/B cones + rods, each has unique SRF
http://webvision.med.utah.edu/imageswv/fovmoswv.jpeg http://webvision.med.utah.edu/imageswv/Sagschem.jpeg
16
Colour “Blindness”
Colour Blindness
http://members.aol.com/protanope/card2.html
If you didn’t see both a yellow circle and a faint brown square, you are somewhat “colour blind” (in USA 5 0% of males 0 5% of females) To find out more visit:
blind (in USA 5.0% of males, 0.5% of females). To find out more, visit:
http://www.kcl.ac.uk/teares/gktvc/vc/lt/colourblindness/cblind.htm
© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins 17
Colors and the SDF Colors and the SDF
Many different SDFs are perceived by us as the same color!
When describing a color (as seen by the eye) exactly, we do not need to know full SDF
Three parameters are enough
For example: just use hue, luminance and saturation
For example: just use hue, luminance and saturation
ergyrgy Ene
Ene
400 Wavelength λ (nm) 700 400 Wavelength λ (nm) 700
© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins 18
SRFs for the Eye and a Camera SRFs for the Eye and a Camera
http://www.stanford.edu/class/ee392b/handouts/color.pdfp p http://www.ecs.csun.edu/~dsalomon/DC2advertis/AppendH.pdf
© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins 19
Seeing Red Green and Blue Seeing Red, Green and Blue
A cone cell in the retina measures amount of red, green, or blue wavelength (3 SRF’ ) R d l i b i ht li ht
energy (3 SRF’s). Responds only in bright light.
SRF of a rod cell covers all wavelengths (measures “gray level” or intensity) Responds in low light, but not in bright light.p g , g g
Integral of R, G, or B cone response produces a single value
Note: SRF’s really L, M, S wave responses (long, medium, short), not R, G, B.
Note: low response of short (blue) is scaled up by vision system (after retina) Note: low response of short (blue) is scaled up by vision system (after retina).
= =
Χ
Short (blue) (scaled)
=
=
SDF of source
Χ
Medium (green)
= =
SRF’s of eye (L, M, S)
=
Long (red)
=
© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins 20
Seeing Red Green Blue (cont’d) Seeing Red, Green, Blue (cont d)
Example L, M, S responses for various SDF’s
= =
Sunlight SDFg Blue reflecting object SDFg j
=
=
Yellow reflecting object SDF Green reflecting object SDF
Resulting L, M, and S SRF responses are independent values
The 3 SRF response values are interpreted as hues by our brain, e g red + green = yellow red + green + blue = white
e.g. red + green = yellow, red + green + blue = white
21
SUMMARY
22
Summary Summary
1.
Spectral Density Function (SDF): describes the wave composition of light with power for each wave length segment
2.
Spectral Response Function (SRF): can be used to specify
h h % f h l th b b d fl t d
how much % of each wave length are absorbed or reflected or transmitted
3
Light ith different SDFs can ha e the same color for o r e e
3.
Light with different SDFs can have the same color for our eye
References:
Li ht d C l Hill Ch t 11 1
Light and Colors: Hill, Chapter 11.1
Dominant Wave Length: Hill, Chapter 11.2.1
23
Quiz Quiz
1.
What is a spectral density function (SDF)?
2.
In what ways can light interact with a material?
3.
How can we describe this interaction?
3.
How can we describe this interaction?
4.
What are hue, luminance and saturation?
How many different colors?
24