02 color

27
CS-184: Computer Graphics Lecture #2: Color Prof. James O’Brien University of California, Berkeley V2008-F-02-1.0 2 Today Color and Light 1 2

Upload: njoubert

Post on 07-Dec-2014

572 views

Category:

Education


3 download

DESCRIPTION

 

TRANSCRIPT

Page 1: 02 Color

CS-184: Computer Graphics

Lecture #2: Color

Prof. James O’BrienUniversity of California, Berkeley

V2008-F-02-1.0

2

Today

Color and Light

1

2

Page 2: 02 Color

3

What is Light?

Radiation in a particular frequency range

4

Spectral Colors

Light at a single frequency

Bright and distinct in appearance

Reproduction only, not a real spectral color!

3

4

Page 3: 02 Color

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!

5

Other Colors

Most colors seen are a mix light of several frequencies

Image from David Forsyth

4

5

Page 4: 02 Color

6

Most colors seen are a mix light of several frequencies

Other Colors

Image from David Forsyth

7

Most colors seen are a mix light of several frequencies

Other Colors

Image from David Forsyth

6

7

Page 5: 02 Color

8

White

Image recorded by Adam Kirk

“Full Spectrum” Compact Fluorescent

White light bulbs

9

Perception -vs- Measurement

You do not “see” the spectrum of lightEyes make limited measurements

Eyes physically adapt to circumstance

You brain adapts in various ways also

Weird psychological stuff happens

8

9

Page 6: 02 Color

10

Everything is Relative

11

Everything is Relative

10

11

Page 7: 02 Color

12

Adapt

13

Adapt

12

13

Page 8: 02 Color

14

It’s all in your mind...

15

Mach Bands

14

15

Page 9: 02 Color

15

Mach Bands

16

Everything’s Still Relative

15

16

Page 10: 02 Color

16

Everything’s Still Relative

17

Eyes as Sensors

The human eye contains cells that sense lightRods

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

16

17

Page 11: 02 Color

18

Cones

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

Long, medium, short

Ratio: L10/M40/S1

Also called by colorRed, green, blue

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

Image from David Forsyth

Note: Rod response peaks between S&M

19

Cones

Response of a cone is given by a convolution integral :

Images from David Forsyth

r(L,S) =ZL(λ) ·S(λ)dλ

18

19

Page 12: 02 Color

20

Cones

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

Images from David Forsyth

21

20

21

Page 13: 02 Color

22

Cones (repeat)

Response of a cone is given by a convolution integral :

Images from David Forsyth

r(L,S) =ZL(λ) ·S(λ)dλ

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!

22

23

Page 14: 02 Color

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) =ZL(λ) ·S(λ)dλ

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

24

25

Page 15: 02 Color

26

Additive Color

Show color on left

Mix “primaries” on right until they match

The primaries need not be RGB

27

Color Matching Functions

For primaries at 645.2, 526.3, and 444.4 nm

Note negative region...

26

27

Page 16: 02 Color

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

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?

28

29

Page 17: 02 Color

30

CIE XYZ

Imaginary set of color bases

Match across spectrum with positive values

X, Y, ZNormalized:

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

31

CIE Color Horseshoe Thinggy

30

31

Page 18: 02 Color

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.

33

Dynamic Range

Max/min values also limited on devices“blackest black”

“brightest white”

Jack Tumblin

32

33

Page 19: 02 Color

34

Tone Mapping

“Day for night”(not the best example, done in Photoshop)

35

Color Spaces

RGB color cube

34

35

Page 20: 02 Color

36

Color Spaces

RGB color cube

HSV color cone

37

Color Spaces

RGB color cube

HSV color cone

CIE

MacAdam Ellipses (10x)Colors in ellipses indistinguishable from center.

36

37

Page 21: 02 Color

38

Color Spaces

RGB color cube

HSV color cone

CIE (x,y)

CIE (u,v)

Scaled to be closer to circles.

++=

YX

ZYXvu

94

3151

x,y

u,v

39

Color Spaces

RGB color cube

HSV color cone

CIE (x,y)

CIE (u,v)CMYK

Many others...

38

39

Page 22: 02 Color

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

41

Reflection

Light strikes object

Some frequencies reflect

Some adsorbed

Reflected spectrum is light times surface

Recall metamers...Unknown?

40

41

Page 23: 02 Color

42

Transmission

Light strikes object

Some frequencies pass

Some adsorbed (or reflected)

Unknown?

43

Scattering

Interactions with small particles in medium

Long wavelengths ignore

Short ones scatterUnknown?

42

43

Page 24: 02 Color

44

Interference

Wave behavior of lightCancelation

Reinforcement

Wavelength dependent

Unknown?

45

Iridescence

Interaction of light withSmall structures

Thin transparent surfaces

Unknown?

44

45

Page 25: 02 Color

46

Iridescence

47

Iridescence

46

47

Page 26: 02 Color

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

49

Fluorescence / Phosphorescence

48

49

Page 27: 02 Color

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

1exp hc kλT( )−1

51

Black Body Radiation

HyperPhysics

50

51