Computer Graphics and Image ProcessingColor IPart 1 – Lecture 5
1
Today’s OutlineToday s Outline Colors in the Real WorldCo o s e ea o d Interaction of Light with Materials Human Perception of Light
2
COLORS IN THE REAL WORLD
3
Electromagnetic Radiation: WavesElectromagnetic Radiation: WavesPhysics theories of light:1. waves (classical mechanics)2. particles (quantum mechanics) wavelength, λ
frequency =cycles/sec.
4© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
Some Neighbors of Visible LightSome Neighbors of Visible Light1000 nm
Infrared
700 nmTV
Radio
Red
Infrared Invisible
TV
h Mi
RedOrange
Yellow Visible light a k a
elen
gth Microwaves
Visible Light
Yellow
GreenInfrared
Visible light, a.k.a.the “visible spectrum”
400 nmX-RaysUV Rays
Wav
e gBlue
IndigoViolet 400 nm
10
GammaRays
X RaysUltra-violet(UV)
Invisible
5
10 nmy (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
Ene
rgy
Ene
rgy
400 700Wavelength λ (nm)
E
400 700Wavelength λ (nm)
E
spike or “single” wavelength= “spectral colour”
uniform white/gray light
Ene
rgy
Ene
rgy
400 700Wavelength λ (nm) 400 700Wavelength λ (nm)
white light plus a dominant wavelength arbitrary SDF: blue plus orange/yellow
6© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
SDFs for Different Light SourcesSDFs for Different Light SourcesSome other light spectra: sunlight, tungsten lamp, fluorescent lampg p g g p p
http://www.micro.magnet.fsu.edu/optics/lightandcolor/sources.html
7© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
Describing Colors using the SDFDescribing Colors using the SDF• Hue: dominant wavelengthgy Hue: dominant wavelength• Luminance (brightness): total power(integral of SDF)
• Saturation (also purity): % of luminance
Ene
rg
Saturation (also purity): % of luminanceresiding in dominant component400 700Wavelength λ (nm)
gy hi h S gy high S
Ene
rg high Smed L
Ene
rg high Slow L
400 700Wavelength λ (nm) 400 700Wavelength λ (nm)
rgy
low Srgy
Ene
low Slow L
Ene low S
high L
400 700Wavelength λ (nm)400 700Wavelength λ (nm)8
INTERACTION OF LIGHT WITH MATERIALS
9
Interaction of Light with MaterialsInteraction of Light with MaterialsLight surface of some “body”: 3 possible results1. Absorption – energy of selected wavelengths retained within the body2. Transmission – energy of selected wavelengths travels through and exits
the body Refraction of light occurs at boundariesthe 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
10© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
Interaction of Light with MaterialsInteraction 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 lightperfect mirror surface: A = 0, T = 0, R = I transparent surface: A, R small, T ~= I
(clear glass)
Computer graphics: reflected (and refracted), transmitted light11
© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
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%
% E
ne
0%
% E
ne
0%
400 700Wavelength λ (nm)All pass filter (ideal , real )
400 700Wavelength λ (nm)low pass and high pass filters
ergy
100% ergy
100%
% E
ne
100%
0%
% E
ne100%
0%
400 700Wavelength λ (nm)Narrow band filter
400 700Wavelength λ (nm)Notch filter
12
Light Source SDF x SRF = Result SDFLight Source SDF x SRF = Result SDFSDF of result = product of SRF and light source SDF
i.e. at each wavelength, multiply SRF % times source energy
gygy
% E
nerg 100%
0%
ΧEne
rg
400 700Wavelength λ (nm)0%
Narrow band filter400 700Wavelength λ (nm)
Sunlight SDF
Ene
rgy
== Ene
rgy
400 700Wavelength λ (nm)E
400 700Wavelength λ (nm)
E
Filtered sunlight SDF
13© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
SDF x SRF = Result SDFSDF x SRF = Result SDFWhy 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 ytheir 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
14© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
HUMAN PERCEPTION OF LIGHT
15
The EyeThe Eye Four types of receptors (sensors): R/G/B cones + rods, each has unique SRF
http://webvision.med.utah.edu/imageswv/fovmoswv.jpeghttp://webvision.med.utah.edu/imageswv/Sagschem.jpeg
16
Colour “Blindness”Colour Blindness
http://members.aol.com/protanope/card2.htmlIf 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
17© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
Colors and the SDFColors 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 700Wavelength λ (nm)400 700Wavelength λ (nm)
18© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
SRFs for the Eye and a CameraSRFs for the Eye and a Camera
http://www.stanford.edu/class/ee392b/handouts/color.pdfp phttp://www.ecs.csun.edu/~dsalomon/DC2advertis/AppendH.pdf
19© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
Seeing Red Green and BlueSeeing 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 htenergy (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)
=
20© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
Seeing Red Green Blue (cont’d)Seeing Red, Green, Blue (cont d) Example L, M, S responses for various SDF’s
= =
Sunlight SDF Blue reflecting object SDFg g j
==
Yellow reflecting object SDFGreen 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 = whitee.g. red + green = yellow, red + green + blue = white
21
SUMMARY
22
SummarySummary1. Spectral Density Function (SDF): describes the wave
composition of light with power for each wave length segment2. Spectral Response Function (SRF): can be used to specify
h h % f h l th b b d fl t dhow 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 e3. 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
QuizQuiz1. 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 manydifferent colors?
24