CGhiComputer Graphics and Image Processingand Image ... · Integg,, pp gral of R, G, or B cone...
Transcript of CGhiComputer Graphics and Image Processingand Image ... · Integg,, pp gral of R, G, or B cone...
C G hiComputer Graphics and Image Processingand Image ProcessingColor IColor IPart 1 – Lecture 5
1
Today’s OutlineToday s OutlineColors in the Real WorldInteraction of Light with MaterialsHuman Perception of Lightp g
2
COLORS IN THE REAL WORLDCOLORS IN THE REAL WORLD
3
Electromagnetic Radiation: WavesElectromagnetic Radiation: WavesPhysics theories of light:1. waves (classical mechanics) frequency =
frequency * wavelength = 2. particles (quantum mechanics) wavelength, λ
frequency =cycles/sec.
speed of light f * λ = c = 3.0 × 108 m/sec
4© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
Some Neighbors of Visible LightSome Neighbors of Visible Light1000 nm
RadioInfrared Invisible
700 nmTV
Radio
RedOrange
ngth Microwaves
Orange
Yellow
GreenInfrared
Visible light, a.k.a.the “visible spectrum”
“ROYGBIV”
UV Rays
Wav
elen Visible Light
Green
BlueIndigoViolet
Infrared ROYGBIV
400 nmGamma
Rays
X-RaysW VioletUltra-violet(UV)
Invisible
5
10 nmRays (UV)
© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
Spectral Density Function (SDF): S(λ)Spectral Density Function (SDF): S(λ)S(λ) = power / unit wavelength = energy
y y
Ene
rgy
Ene
rgy
400 700Wavelength λ (nm)
spike or “single” wavelength“ t l l ”
400 700Wavelength λ (nm)
uniform white/gray light= “spectral colour”
nerg
y
nerg
y400 700Wavelength λ (nm)
E
400 700Wavelength λ (nm)E
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 lamp
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 wavelength• Luminance (brightness): total powerer
gy
• Luminance (brightness): total power(integral of SDF)
• Saturation (also purity): % of luminanceresiding in dominant component400 700Wavelength λ (nm)
En
400 700Wavelength λ (nm)
Ener
gy high Smed L
Ener
gy high Slow L
400 700Wavelength λ (nm)
E
400 700Wavelength λ (nm)
Eyy
Ene
rgy
low Slow L
Ene
rgy
low Shigh L
400 700Wavelength λ (nm)400 700Wavelength λ (nm)8
INTERACTION OF LIGHT WITHINTERACTION 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 bodyp gy g y2. Transmission – energy of selected wavelengths travels through and exits
the body. Refraction of light occurs at boundaries.3 Reflection – energy of selected wavelengths “bounces” off surface3. 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: humansemi translucent body, scatters, and some light reflects back out: human skin, Shrek’s skin
R = reflected energy
I = incident (incoming)energy
T = transmitted energy
A = absorbedenergy
10© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
Interaction of Light with MaterialsInteraction of Light with MaterialsIncident (incoming) light energy
= absorbed energy + transmitted energy + reflected energygy gy gy= retained + passed through + bounced off
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)
perfect 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
d h t t b b d t itt d fl t dand what amount are absorbed, transmitted, or reflectedCan be measured with a spectral response function (SRF) or filter function
% E
nerg
y
100%
% E
nerg
y
100%
400 700Wavelength λ (nm)
%
0%
All pass filter (ideal , real )400 700Wavelength λ (nm)
%
0%
low pass and high pass filters
gy gy
% E
nerg 100%
0%
% E
nerg 100%
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 energyi.e. at each wavelength, multiply SRF % times source energy
nerg
y
100%
Χnerg
y
400 700Wavelength λ (nm)
% E
0%
Χ
400 700Wavelength λ (nm)
En
Narrow band filter
ergy
=
Sunlight SDF
ergy
400 700Wavelength λ (nm)
En==
400 700Wavelength λ (nm)
En
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 SDF1. All light sources can be defined by their SDF
Natural light source: sun, fireArtificial light source: light bulb, laser, LED, computer displayg g , , , p p y
2. All light absorbers, transmitters, or reflectors can be defined by their SRF
Sensing devices: absorbed light SRFCamera (digital photocell, film), human eye (retina)Definition of “color”Definition of “color” =
integral of (light source SDF × sensor’s SRF) Glass, still water, cellophane: transmitted light SRF, , p gSurface material of an object: reflected light SRF
14© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
HUMAN PERCEPTION OF LIGHTHUMAN PERCEPTION OF LIGHT
15
The EyeThe EyeFour 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.jpeghttp://webvision.med.utah.edu/imageswv/fovmoswv.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: 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 SDFMany different SDFs are perceived by us as the same color!When describing a color (as seen by the eye) exactly weWhen describing a color (as seen by the eye) exactly, we do not need to know full SDFThree parameters are enoughThree parameters are enoughFor example: just use hue, luminance and saturation
Ene
rgy
Ene
rgy
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.pdfhttp://www.ecs.csun.edu/~dsalomon/DC2advertis/AppendH.pdf
19© 2004 Lewis Hitchner, Richard Lobb & Kevin Novins
Seeing Red, Green and BlueSeeing Red, Green and BlueA cone cell in the retina measures amount of red, green, or blue wavelength 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.Integral of R, G, or B cone response produces a single valueg , , p p gNote: 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).
=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 SDF
== =
Yellow reflecting object SDF
=
Green reflecting object SDF
Resulting L, M, and S SRF responses are independent valuesThe 3 SRF response values are interpreted as hues by our brain,
Yellow reflecting object SDFGreen reflecting object SDF
e.g. red + green = yellow, red + green + blue = white
21
SUMMARYSUMMARY
22
SummarySummary1. Spectral Density Function (SDF): describes the wave
composition of light with power for each wave length segmentcomposition of light with power for each wave length segment2. Spectral Response Function (SRF): can be used to specify
how much % of each wave length are absorbed or reflected or t itt dtransmitted
3. Light with different SDFs can have the same color for our eye
References:References:Light and Colors: Hill, Chapter 11.1Dominant 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?2. In what ways can light interact with a material?3. How can we describe this interaction?4 What are hue luminance and saturation?4. What are hue, luminance and saturation?
How manydiff t l ?different colors?
24