CS-184: Computer Graphics Lecture #2: Color Prof. James OBrien - - PowerPoint PPT Presentation

cs 184 computer graphics
SMART_READER_LITE
LIVE PREVIEW

CS-184: Computer Graphics Lecture #2: Color Prof. James OBrien - - PowerPoint PPT Presentation

CS-184: Computer Graphics Lecture #2: Color Prof. James OBrien University of California, Berkeley V2008-F-02-1.0 Today Color and Light 2 What is Light? Radiation in a particular frequency range 3 Spectral Colors Light at a single


slide-1
SLIDE 1

CS-184: Computer Graphics

Lecture #2: Color

  • Prof. James O’Brien

University of California, Berkeley

V2008-F-02-1.0

slide-2
SLIDE 2

2

Today

Color and Light

slide-3
SLIDE 3

3

What is Light?

Radiation in a particular frequency range

slide-4
SLIDE 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!

slide-5
SLIDE 5

5

Other Colors

Most colors seen are a mix light of several frequencies

Image from David Forsyth

slide-6
SLIDE 6

6

Most colors seen are a mix light of several frequencies

Other Colors

Image from David Forsyth

slide-7
SLIDE 7

7

Most colors seen are a mix light of several frequencies

Other Colors

Image from David Forsyth

slide-8
SLIDE 8

8

White

Image recorded by Adam Kirk

“Full Spectrum” Compact Fluorescent White light bulbs

slide-9
SLIDE 9

9

Perception -vs- Measurement

You do not “see” the spectrum of light

Eyes make limited measurements Eyes physically adapt to circumstance You brain adapts in various ways also Weird psychological stuff happens

slide-10
SLIDE 10

10

Everything is Relative

slide-11
SLIDE 11

11

Everything is Relative

slide-12
SLIDE 12

12

Adapt

slide-13
SLIDE 13

13

Adapt

slide-14
SLIDE 14

14

It’s all in your mind...

slide-15
SLIDE 15

15

Mach Bands

slide-16
SLIDE 16

16

Everything’s Still Relative

slide-17
SLIDE 17

17

Eyes as Sensors

The human eye contains cells that sense light

Rods

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

slide-18
SLIDE 18

18

Cones

Each type of cone responds to different range of frequencies/wavelengths

Long, medium, short Ratio: L10/M40/S1

Also called by color

Red, green, blue Misleading:

“Red” does not mean your red cones are firing...

Image from David Forsyth

Note: Rod response peaks between S&M

slide-19
SLIDE 19

19

Cones

Response of a cone is given by a convolution integral :

Images from David Forsyth

r(L,S) =

Z

L(λ)·S(λ)dλ

slide-20
SLIDE 20

20

Cones

You can see that “red” and “green” respond to more more than just red and green...

Images from David Forsyth

slide-21
SLIDE 21

21

slide-22
SLIDE 22

22

Cones (repeat)

Response of a cone is given by a convolution integral :

Images from David Forsyth

r(L,S) =

Z

L(λ)·S(λ)dλ

slide-23
SLIDE 23

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!

slide-24
SLIDE 24

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) =

Z

L(λ)·S(λ)dλ

slide-25
SLIDE 25

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

slide-26
SLIDE 26

26

Additive Color

Show color on left Mix “primaries” on right until they match The primaries need not be RGB

slide-27
SLIDE 27

27

Color Matching Functions

For primaries at 645.2, 526.3, and 444.4 nm Note negative region...

slide-28
SLIDE 28

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

slide-29
SLIDE 29

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?

slide-30
SLIDE 30

30

CIE XYZ

Imaginary set of color bases Match across spectrum with positive values X, Y, Z Normalized:

x = X / ( X+Y+Z ) y = Y / ( X+Y+Z )

slide-31
SLIDE 31

31

CIE Color Horseshoe Thinggy

slide-32
SLIDE 32

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.

slide-33
SLIDE 33

33

Dynamic Range

Max/min values also limited on devices

“blackest black” “brightest white”

Jack Tumblin

slide-34
SLIDE 34

34

Tone Mapping

“Day for night”

(not the best example, done in Photoshop)

slide-35
SLIDE 35

35

Color Spaces

RGB color cube

slide-36
SLIDE 36

36

Color Spaces

RGB color cube HSV color cone

slide-37
SLIDE 37

37

Color Spaces

RGB color cube HSV color cone CIE

MacAdam Ellipses (10x)

Colors in ellipses indistinguishable from center.

slide-38
SLIDE 38

38

Color Spaces

RGB color cube HSV color cone CIE (x,y) CIE (u,v)

Scaled to be closer to circles.

⎥ ⎦ ⎤ ⎢ ⎣ ⎡ + + = ⎥ ⎦ ⎤ ⎢ ⎣ ⎡ ʹ ʹ Y X Z Y X v u 9 4 3 15 1

x,y u,v

slide-39
SLIDE 39

39

Color Spaces

RGB color cube HSV color cone CIE (x,y) CIE (u,v) CMYK Many others...

slide-40
SLIDE 40

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

slide-41
SLIDE 41

41

Reflection

Light strikes object Some frequencies reflect Some adsorbed Reflected spectrum is light times surface Recall metamers...

Unknown?

slide-42
SLIDE 42

42

Transmission

Light strikes object Some frequencies pass Some adsorbed (or reflected)

Unknown?

slide-43
SLIDE 43

43

Scattering

Interactions with small particles in medium Long wavelengths ignore Short ones scatter

Unknown?

slide-44
SLIDE 44

44

Interference

Wave behavior of light

Cancelation Reinforcement

Wavelength dependent

Unknown?

slide-45
SLIDE 45

45

Iridescence

Interaction of light with

Small structures Thin transparent surfaces

Unknown?

slide-46
SLIDE 46

46

Iridescence

slide-47
SLIDE 47

47

Iridescence

slide-48
SLIDE 48

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

slide-49
SLIDE 49

49

Fluorescence / Phosphorescence

slide-50
SLIDE 50

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 ⎛ ⎝ ⎞ ⎠ 1 exp hc kλT

( )−1

⎛ ⎝ ⎜ ⎞ ⎠ ⎟

slide-51
SLIDE 51

51

Black Body Radiation

HyperPhysics