Light and the EM spectrum The H.V.S. and Color Perception

75
1 Light and the EM spectrum The H.V.S. and Color Perception

description

Light and the EM spectrum The H.V.S. and Color Perception. Image Formation. What is an Image ?. An image is a projection of a 3D scene into a 2D projection plane . - PowerPoint PPT Presentation

Transcript of Light and the EM spectrum The H.V.S. and Color Perception

Page 1: Light and the EM spectrum The H.V.S. and Color Perception

1

• Light and the EM spectrum• The H.V.S. and Color Perception

Page 2: Light and the EM spectrum The H.V.S. and Color Perception

2

What is an ImageWhat is an Image? ? • An image is a projection of a 3D scene into a 2D

projection plane.• An image can be defined as a 2 variable function I(x,y) ,

where for each position (x,y) in the projection plane, I(x,y) defines the light intensity at this point.

Page 3: Light and the EM spectrum The H.V.S. and Color Perception

3

Camera trial #1

scene film

Put a piece of film in front of an object.

source: Yung-Yu Chuang

Page 4: Light and the EM spectrum The H.V.S. and Color Perception

4

Pinhole cameraPinhole camera

scene film

Add a barrier to block off most of the rays.• It reduces blurring• The pinhole is known as the aperture• The image is inverted

barrier

pinhole camera

source: Yung-Yu Chuang

Page 5: Light and the EM spectrum The H.V.S. and Color Perception

5

Page 6: Light and the EM spectrum The H.V.S. and Color Perception

6

X

Y

(x,y,z)

(x,y)

center of projection(pinhole)

d

d – focal length

The Pinhole Camera Model (where)The Pinhole Camera Model (where)

Z

10/100

0010

0001

Z

Y

X

dw

y

x

d

Page 7: Light and the EM spectrum The H.V.S. and Color Perception

7

The Shading Model (what)The Shading Model (what)

Shading Model: Given the illumination incident at a point on a surface, what is reflected?

Page 8: Light and the EM spectrum The H.V.S. and Color Perception

8

Shading Model ParametersShading Model Parameters

• The factors determining the shading effects are:

– The light source properties:• Positions, Electromagnetic Spectrum, Shape.

– The surface properties:• Position, orientation, Reflectance properties.

– The eye (camera) properties:• Position, orientation, Sensor spectrum sensitivities.

Page 9: Light and the EM spectrum The H.V.S. and Color Perception

9

Newton’s Experiment, 1665 Cambridge.Discovering the fundamental spectral components of light.(from Foundations of Vision: Brian Wandell, 1995.

The Light PropertiesThe Light Properties

Page 10: Light and the EM spectrum The H.V.S. and Color Perception

10

A prism

Page 11: Light and the EM spectrum The H.V.S. and Color Perception

11

Electromagnetic Radiation - SpectrumElectromagnetic Radiation - Spectrum

Wavelength in nanometers (nm)

Page 12: Light and the EM spectrum The H.V.S. and Color Perception

12

Electromagnetic WaveElectromagnetic Wave

Page 13: Light and the EM spectrum The H.V.S. and Color Perception

13

MonochromatorsMonochromators

Monochromators measure the power or energy at different wavelengths

Page 14: Light and the EM spectrum The H.V.S. and Color Perception

14

The Spectral Power Distribution (SPD) of a light is a function e() which defines the relative energy at each wavelength.

Wavelength ()

400 500 600 7000

0.5

1R

ela

tive

Pow

er

Spectral Power Distribution (SPD)Spectral Power Distribution (SPD)

Page 15: Light and the EM spectrum The H.V.S. and Color Perception

15

Examples of Spectral Power Distributions

Blue Skylight Tungsten bulb

Red monitor phosphor Monochromatic light

400 500 600 7000

0.5

1

400 500 600 7000

0.5

1

400 500 600 7000

0.5

1

400 500 600 7000

0.5

1

Page 16: Light and the EM spectrum The H.V.S. and Color Perception

• Interactions between light and matter depends on the physical characteristics of light as well as the matter.

• Three types of interactions:

– Reflection

– Absorption

– Transmittance

16

The Surface PropertiesThe Surface PropertiesIncoming Light

Transmitted Light

Reflected Light

Page 17: Light and the EM spectrum The H.V.S. and Color Perception

17

The Bidirectional Reflectance The Bidirectional Reflectance Distribution Function (BRDF)Distribution Function (BRDF)

• A BRDF describes how much light is reflected when light makes contact with a certain material

),,(

),,(

ii

ee

E

LBRDF

Spectral radiance: quantity of light reflected in direction (e,e)

Spectral irradiance: quantity of light arriving from direction (i,i)

Page 18: Light and the EM spectrum The H.V.S. and Color Perception

18

Specular reflection mirror like reflection at the surface

Diffuse (lambertian) reflection Reflected randomly between color particlesreflection is equal in all directions.

Incident light Specular reflection

Diffuse reflection

normal

Simplified ModelSimplified Model

Page 19: Light and the EM spectrum The H.V.S. and Color Perception

19

Different Types of Surfaces

Page 20: Light and the EM spectrum The H.V.S. and Color Perception

Simplified rendering models: reflectanceSimplified rendering models: reflectance

Often are more interested in relative spectral composition than in overall intensity, so the spectral BRDF computation simplifies a wavelength-by-wavelength multiplication of relative energies.

.* =

B. Freeman, and Foundations of Vision, by Brian Wandell,

Page 21: Light and the EM spectrum The H.V.S. and Color Perception

21

400 500 600 700

0.2

0.4

0.6

0.8

1

400 500 600 700

0.2

0.4

0.6

0.8

1

400 500 600 700

0.2

0.4

0.6

0.8

1

400 500 600 700

0.2

0.4

0.6

0.8

1

Surface Body Reflectances (albedo)

Yellow Red

Blue Gray

Wavelength (nm)

Spectral Property of Lambertian SurfacesSpectral Property of Lambertian Surfaces

Page 22: Light and the EM spectrum The H.V.S. and Color Perception

Forsyth, 2002

Some reflectance spectraSome reflectance spectra

Page 23: Light and the EM spectrum The H.V.S. and Color Perception

23

Optic NerveFovea

Vitreous

Optic Disc

Lens

Pupil

Cornea

Ocular Muscle

Retina

Humor

Iris

The Eye PropertiesThe Eye Properties

Cornea - קרנית Pupil - אישון Iris - קשתית Retina - רשתית

Page 24: Light and the EM spectrum The H.V.S. and Color Perception

24

Page 25: Light and the EM spectrum The H.V.S. and Color Perception

25

The Visual PathwayThe Visual Pathway

Retina

Optic Nerve

Optic Chiasm

LateralGeniculateNucleus (LGN)

Visual Cortex

Page 26: Light and the EM spectrum The H.V.S. and Color Perception

26

Eye v.s. CameraEye v.s. Camera

Yaho Wang’s slides

Page 27: Light and the EM spectrum The H.V.S. and Color Perception

27

light

rods cones

horizontal

amacrine

bipolar

ganglion

The Human RetinaThe Human Retina

Page 28: Light and the EM spectrum The H.V.S. and Color Perception

28

• Retina contains 2 types of photo-receptors– Cones:

• Day vision, can perceive color tone

– Rods: • Night vision, perceive brightness only

Page 29: Light and the EM spectrum The H.V.S. and Color Perception

29

Cones:• High illumination levels (Photopic vision)• Sensitive to color (there are three cone types: L,M,S)• Produces high-resolution vision• 6-7 million cone receptors, located primarily in the central

portion of the retina

Wavelength (nm)

Re

lativ

e s

en

sitiv

ity

Cone Spectral Sensitivity

400 500 600 7000

0.25

0.5

0.75

1ML

SM

A side note:• Humans and some monkeys have three types of cones (trichromatic vision); most other mammals have two types of cones (dichromatic vision).• Marine mammals have one type of cone.• Most birds and fish have four types. •Lacking one or more type of cones result in color blindness.

Page 30: Light and the EM spectrum The H.V.S. and Color Perception

30

Rods:• Low illumination levels (Scotopic vision).• Highly sensitive (respond to a single photon).• Produces lower-resolution vision• 100 million rods in each eye.• No rods in fovea.

Wavelength (nm)

Re

lativ

e s

en

sitiv

ity

400 500 600 7000

0.25

0.5

0.75

1

Rod Spectral Sensitivity

Page 31: Light and the EM spectrum The H.V.S. and Color Perception

31rods

S - Cones

L/M - Cones

Foveal Periphery photoreceptors

Photoreceptor DistributionPhotoreceptor Distribution

Page 32: Light and the EM spectrum The H.V.S. and Color Perception

32

Cone Receptor Mosaic(Roorda and Williams, 1999)

L-cones M-cones S-cones

Page 33: Light and the EM spectrum The H.V.S. and Color Perception

33

Distribution of rod and cone photoreceptors

Degrees of Visual Angle

Rec

epto

rs p

er s

quar

e m

m

-60 -40 -20 0 20 40 60

2

6

10

14

18x 104

rodscones

Cone’s Distribution:• L-cones (Red) occur at about ~65% of the cones throughout the retina.

• M-cones (green) occur at about ~30% of the cones.

• S-cones (blue) occur at about ~2-5% of the cones (Why so few?).

fovea

Page 34: Light and the EM spectrum The H.V.S. and Color Perception

34

The Cone ResponsesThe Cone Responses

Assuming Lambertian Surfaces

IlluminantSensors Surface

e() – Fixed, point source illuminantk() –surface’s reflectancel(),m(),s() – Cone responsivities

Output

)()()( kelL

)()()( kemM

)()()( kesS

Page 35: Light and the EM spectrum The H.V.S. and Color Perception

35

Metamer - two lights that appear the same visually. They might have different SPDs (spectral power distributions).

400 500 600 7000

400

800

400 500 600 7000

100

200

Wavelength (nm)

Pow

er

The phosphors of the monitor were set to match the tungsten light.

Tungsten light Monitor emission

Page 36: Light and the EM spectrum The H.V.S. and Color Perception

36

The Trichromatic Color TheoryThe Trichromatic Color Theory

Thomas Young (1773-1829) - A few different retinal receptors operating with different wavelength sensitivities will allow humans to perceive the number of colors that they do. Suggested 3 receptors.

Helmholtz & Maxwell (1850) - Color matching with 3 primaries.

Trichromatic: “tri”=three “chroma”=color color vision is based on three primaries (i.e., it is 3D).

Page 37: Light and the EM spectrum The H.V.S. and Color Perception

37

Color Matching ExperimentColor Matching Experiment

+ -

+ -

+ -

test match

Primaries

• Given a set of 3 primaries, one can determine for every spectral distribution, the intensity of the guns required to match the color of that spectral distribution.

• The 3 numbers can serve as a color representation.

bBgGrRT

R()

G()

B()

T()

Page 38: Light and the EM spectrum The H.V.S. and Color Perception

38

Color matching experiment 1

from: Bill Freeman

Page 39: Light and the EM spectrum The H.V.S. and Color Perception

39

Color matching experiment 1

p1 p2 p3 from: Bill Freeman

Page 40: Light and the EM spectrum The H.V.S. and Color Perception

40

Color matching experiment 1

p1 p2 p3 from: Bill Freeman

Page 41: Light and the EM spectrum The H.V.S. and Color Perception

41

Color matching experiment 1

p1 p2 p3

The primary color amounts needed for a match

from: Bill Freeman

Page 42: Light and the EM spectrum The H.V.S. and Color Perception

42

Color matching experiment 2

from: Bill Freeman

Page 43: Light and the EM spectrum The H.V.S. and Color Perception

43

Color matching experiment 2

p1 p2 p3 from: Bill Freeman

Page 44: Light and the EM spectrum The H.V.S. and Color Perception

44

Color matching experiment 2

p1 p2 p3 from: Bill Freeman

Page 45: Light and the EM spectrum The H.V.S. and Color Perception

45

Color matching experiment 2

p1 p2 p3 p1 p2 p3

We say a “negative” amount of p2 was needed to make the match, because we added it to the test color’s side.

The primary color amounts needed for a match:

p1 p2 p3

from: Bill Freeman

Page 46: Light and the EM spectrum The H.V.S. and Color Perception

46

Color matching experiment for Monochromatic lights

400 500 600 7000

0.5

1

400 500 600 7000

0.5

1

400 500 600 7000

0.5

1

Primary Intensities

Page 47: Light and the EM spectrum The H.V.S. and Color Perception

47

r()

g()b()

400 500 600 700

0

1

2

3

Wavelength (nm)

Pri

ma

ry In

ten

sity

Stiles & Burch (1959) Color matching functions. Primaries are: 444.4 525.3 and 645.2

Problems: Some perceived colors cannot be generated. This is true for any choice of visible primaries.

The The ColorColor Matching Functions (CMF) Matching Functions (CMF)

Page 48: Light and the EM spectrum The H.V.S. and Color Perception

48Foundations of Vision, by Brian Wandell, Sinauer Assoc., 1995 from: Bill Freeman

The superposition principle

Page 49: Light and the EM spectrum The H.V.S. and Color Perception

49

• Observation - Color matching is linear:– if (SP) then (S+NP+N) – if (SP) then ( S P)

• Let T()=c(-0)+d(-1) a double chromatic color: How should we adjust the 3 primaries?

101010 ;; bdbcbgdgcgrdrcr

0 1

cd

Page 50: Light and the EM spectrum The H.V.S. and Color Perception

50

• Outcome 1: Any T() can be matched:

• Outcome 2: CMF can be calculated for any chosen primaries U(), V(), W():

dbTbdgTgdrTr ;;

b

g

r

ccc

bbb

aaa

w

v

u

321

321

321

Page 51: Light and the EM spectrum The H.V.S. and Color Perception

51

• The CIE (Commission Internationale d’Eclairage) defined in 1931 three hypothetical lights X, Y, and Z whose matching functions are positive everywhere:

The CIE Color StandardThe CIE Color Standard

Page 52: Light and the EM spectrum The H.V.S. and Color Perception

52

TristimulusTristimulus

• Let X, Y, and Z be the tri-stimulus values.• A color can be specified by its trichromatic

coefficients, defined as

X

xX Y Z

Y

yX Y Z

Zz

X Y Z

X ratio

Y ratio

Z ratio

Two trichromatic coefficients are enough to specify a color (x + y + z = 1).

From: Bahadir Gunturk

Page 53: Light and the EM spectrum The H.V.S. and Color Perception

53

Input light spectrum

x

y

From: Bahadir Gunturk

CIE Chromaticity DiagramCIE Chromaticity Diagram

Page 54: Light and the EM spectrum The H.V.S. and Color Perception

54

Input light spectrum

x

y

From: Bahadir Gunturk

CIE Chromaticity DiagramCIE Chromaticity Diagram

Page 55: Light and the EM spectrum The H.V.S. and Color Perception

55

Input light spectrum

x

y

From: Bahadir Gunturk

CIE Chromaticity DiagramCIE Chromaticity Diagram

Page 56: Light and the EM spectrum The H.V.S. and Color Perception

56

Input light spectrum

Boundary

x

y

380nm

700nm

From: Bahadir Gunturk

CIE Chromaticity DiagramCIE Chromaticity Diagram

Page 57: Light and the EM spectrum The H.V.S. and Color Perception

57

Input light spectrum

Boundary

From: Bahadir Gunturk

CIE Chromaticity DiagramCIE Chromaticity Diagram

Page 58: Light and the EM spectrum The H.V.S. and Color Perception

58

Light composition

From: Bahadir Gunturk

CIE Chromaticity DiagramCIE Chromaticity Diagram

Page 59: Light and the EM spectrum The H.V.S. and Color Perception

59

CIE Chromaticity DiagramCIE Chromaticity Diagram

Light composition

Light composition

From: Bahadir Gunturk

Page 60: Light and the EM spectrum The H.V.S. and Color Perception

60

• The sRGB is a device-independent color space. It was created

in 1996 by HP and Microsoft for use on monitors and printers.

• It is the most commonly used color space.

• It is defined by a transformation from the xyz color space.

The sRGB Color StandardThe sRGB Color Standard

Page 61: Light and the EM spectrum The H.V.S. and Color Perception

61

Color matching predicts matches, Color matching predicts matches, not appearance not appearance

Page 62: Light and the EM spectrum The H.V.S. and Color Perception

62

Color AppearanceColor Appearance

Page 63: Light and the EM spectrum The H.V.S. and Color Perception

63

Color AppearanceColor Appearance

Page 64: Light and the EM spectrum The H.V.S. and Color Perception

64

Color AppearanceColor Appearance

Page 65: Light and the EM spectrum The H.V.S. and Color Perception

65

Color SpacesColor Spaces

Page 66: Light and the EM spectrum The H.V.S. and Color Perception

66

RGB Color Space (additive)RGB Color Space (additive)

• Define colors with (r, g, b) ; amounts of red, green, and blue

Page 67: Light and the EM spectrum The H.V.S. and Color Perception

67

CMY Color Space (subtractive)CMY Color Space (subtractive)

• Cyan, magenta, and yellow are the complements of red, green, and blue– We can use them as filters to subtract from white– The space is the same as RGB except the origin is white

instead of black

Page 68: Light and the EM spectrum The H.V.S. and Color Perception

Color names for cartoon spectraColor names for cartoon spectra

400 500 600 700 nm

400 500 600 700 nm

400 500 600 700 nm

red

gree

nbl

ue

400 500 600 700 nm

cyan

mag

enta

yello

w

400 500 600 700 nm

400 500 600 700 nm

From: B. Freeman

Page 69: Light and the EM spectrum The H.V.S. and Color Perception

Additive color mixingAdditive color mixing

400 500 600 700 nm

400 500 600 700 nm

red

gree

n

Red and green make…

400 500 600 700 nm

yello

w

Yellow!

When colors combine by adding the color spectra. Example color displays that follow this mixing rule: CRT phosphors, multiple projectors aimed at a screen, Polachrome slide film.

Page 70: Light and the EM spectrum The H.V.S. and Color Perception

Subtractive color mixingSubtractive color mixing

When colors combine by multiplying the color spectra. Examples that follow this mixing rule: most photographic films, paint, cascaded optical filters, crayons.

400 500 600 700 nm

cyan

yello

w

400 500 600 700 nm

Cyan and yellow (in crayons,called “blue” and yellow)

make…

400 500 600 700 nmGreen!gr

een

Page 71: Light and the EM spectrum The H.V.S. and Color Perception

71

Page 72: Light and the EM spectrum The H.V.S. and Color Perception

72

Red

Green Blue

Magenta

Cyan

Yellow

Page 73: Light and the EM spectrum The H.V.S. and Color Perception

73

HSV color spaceHSV color space

• Hue - the chroma we see (red, green, purple).• Saturation - how pure is the color (how far the color from

gray ).• Value (brightness) - how bright is the color.

Page 74: Light and the EM spectrum The H.V.S. and Color Perception

74

HSV color spaceHSV color space

Value

Saturation

Hue

Page 75: Light and the EM spectrum The H.V.S. and Color Perception

75

T H E E N D