cs5600 computer graphics by rich riesenfeld spring 2006 lecture set 11

Post on 14-Jan-2016

214 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

CS5600 Computer Graphics

by

Rich Riesenfeld

Spring 2006

Lect

ure

Set

11

Spring 2006 Utah School of Computing 2

• Physical nature of color

• Eye mechanism of color

–Rods, cones, tri-stimulus model

• Brain mechanism of color

• Color spaces

• Aesthetic and physiological

Spring 2006 Utah School of Computing 3

• Color is complicated!–Highly nonlinear–No single model to explain all

• Many simplistic models, explanations

• Many myths• Much new knowledge

Spring 2006 Utah School of Computing 4

• Many phenomena to explain

–High light / low light

–Illusions

–Color blindness

–Metamers

Spring 2006 Utah School of Computing 5

Additive Primaries: (r,g,b)Additive Primaries: (r,g,b)

(1,0,1)(1,0,1)

(0,0,1 )(0,0,1 )

(0,1,0)(0,1,0)

(0,1,1)(0,1,1)

(1,0,0)(1,0,0)

(1,1,0)(1,1,0)

magentamagentamagentamagenta

blueblueblueblue

cyancyancyancyan

greengreengreengreenredredredred

yellowyellowyellowyellow

whitewhitewhitewhite(1,1,1)(1,1,1)

Spring 2006 Utah School of Computing 6

Additive Primaries: (r,g,b)Additive Primaries: (r,g,b)

…………...<www.jgiesen.de/ColorTheory/

RGBColorApplet/rgbcolorapplet.html>

Spring 2006 Utah School of Computing 7

Traditional, Artistic:• rgb• cmy• cmyk• hsv• hsl

Perceptually Based:• XYZ (Tristimulus)• Xyz• Hunter-Lab• CIE-L*ab• CIE-L*CH° • CIE-L*CH°• CIE-L*ab• CIE-L*uv

Spring 2006 Utah School of Computing 8

Additive Primaries: (r,g,b)Additive Primaries: (r,g,b)

(0,1,0)(0,1,0)(1,0,0)(1,0,0)

(1,1,0)(1,1,0)

greengreengreengreenredredredred

yellowyellowyellowyellow

Spring 2006 Utah School of Computing 9

Additive Primaries: (r,g,b)Additive Primaries: (r,g,b)

(1,0,1)(1,0,1)

(0,0,1 )(0,0,1 )

(1,0,0)(1,0,0)

magentamagentamagentamagenta

blueblueblueblue

redredredred

Spring 2006 Utah School of Computing 10

Subtractive Primaries: (c,m,y)Subtractive Primaries: (c,m,y)

(1,1,0)(1,1,0)yellowyellowyellowyellow

(0,1,0)(0,1,0)greengreengreengreen

(0,1,1)(0,1,1)cyancyancyancyan

(0,0,1 )(0,0,1 )blueblueblueblue

(1,0,1)(1,0,1)magentamagentamagentamagenta

(1,0,0)(1,0,0)redredredred

blackblackblackblack(0,0,0)(0,0,0)

blackblackblackblack

Spring 2006 Utah School of Computing 11

Additive Primaries: (c,m,y)Additive Primaries: (c,m,y)

(0,1,0)(0,1,0)greengreengreengreen

(0,1,1)(0,1,1)cyancyancyancyan

(0,0,1 )(0,0,1 )blueblueblueblue

Spring 2006 Utah School of Computing 12

(1,1,0)(1,1,0)(1,1,0)(1,1,0)yellowyellowyellowyellow

(1,0,1)(1,0,1)(1,0,1)(1,0,1)magentamagentamagentamagenta

(1,0,0)(1,0,0)(1,0,0)(1,0,0)redredredredblackblackblackblack

Subtractive Primaries: (c,m,y)Subtractive Primaries: (c,m,y)

Spring 2006 Utah School of Computing 13

(1,1,0)(1,1,0)yellowyellowyellowyellow

(0,1,0)(0,1,0)greengreengreengreen

(0,1,1)(0,1,1)cyancyancyancyan

Subtractive Primaries: (c,m,y)Subtractive Primaries: (c,m,y)

Spring 2006 Utah School of Computing 14

(1,0,1)(1,0,1)magentamagentamagentamagenta

(0,0,1 )(0,0,1 )bbllueuebbllueue

(0,1,1)(0,1,1)cyancyancyancyan

Subtractive Primaries: (c,m,y)Subtractive Primaries: (c,m,y)

Spring 2006 Utah School of Computing 15

Wavelength Spectrum

infrared light

ultraviolet light

Wavelength (nm)700 600 500 400

• Seen in physics, physical phenomena (rainbows, prisms, etc)

• 1 Dimensional color space

Spring 2006 Utah School of Computing 16

Wavelength Spectrum

Note that the rainbow does not contain any magenta. It is nonspectral.

Spring 2006 Utah School of Computing 17

• “Navigating,” moving around in a

color space, is tricky

• Many color representations (spaces)

• Can you get to a nearby color?

• Can you predictably adjust a color?

Spring 2006 Utah School of Computing 18

Color Cube: (r,g,b) is RHSColor Cube: (r,g,b) is RHS (0,0,1 )(0,0,1 )

blueblueblueblue

(1,0,1)(1,0,1)magentamagentamagentamagenta

(0,1,1)(0,1,1)cyancyancyancyan

(0,1,0)(0,1,0)greengreengreengreen

(1,1,0)(1,1,0)yellowyellowyellowyellow

(1,0,0)(1,0,0)redredredred

whitewhitewhitewhite(1,1,1)(1,1,1)

(0,0,0)(0,0,0)blackblackblackblack

graygraygraygray

Spring 2006 Utah School of Computing 19

(0,0,1 )(0,0,1 )blueblueblueblue

(1,0,1)(1,0,1)magentamagentamagentamagenta

(0,1,1)(0,1,1)cyancyancyancyan

(0,1,0)(0,1,0)greengreengreengreen

(1,1,0)(1,1,0)yellowyellowyellowyellow(1,0,0)(1,0,0)

redredredred

(1,1,1)(1,1,1)whitewhitewhitewhite

Spring 2006 Utah School of Computing 20

Complementary Colors Add to GrayComplementary Colors Add to Gray

(0,0,1 )(0,0,1 ) (0,0,1 )(0,0,1 )blueblueblueblue

magentamagentamagentamagenta(0,1,1)(0,1,1)

cyancyancyancyan

(1,1,1)(1,1,1)whitewhitewhitewhite(1,0,1)(1,0,1)

(0,1,0)(0,1,0)(0,1,0)(0,1,0)greengreengreengreen

((1,1,01,1,0))yellowyellowyellowyellow(1,0,0)(1,0,0)

redredredred

Spring 2006 Utah School of Computing 21

Complementary ColorsComplementary Colors

Looking at color cube along major diagonal

Spring 2006 Utah School of Computing 22

James Clerk Maxwell’s ColorJames Clerk Maxwell’s Color

magentamagentamagentamagentablueblueblueblue

cyancyancyancyan

greengreengreengreen

redredredred

yellowyellowyellowyellow

unsaturated cyan unsaturated cyan unsaturated cyan unsaturated cyan

whitewhitewhitewhite

Spring 2006 Utah School of Computing 23

Newton’s Color Wheel Newton’s Color Wheel

Replaced Aristotle’s color model based on light and darkness.

Spring 2006 Utah School of Computing 24

Color AppletsColor Applets

www.cs.brown.edu/exploratories/freeSoftware/catalogs/repositoryApplets.html

Spring 2006 Utah School of Computing 25

( H, S, V ) Color Space( H, S, V ) Color Space

• Introduced by Albet Munsell, late 1800s

– He was an artist and scientist

• Hue: Color

• Saturation/Chroma: Strength of a color

– Neutral gray has 0 saturation

• Brightness/Value: Intensity of light emanating from image

Spring 2006 Utah School of Computing 26

The hue of an object may be blue,

but the terms light and dark

distinguish the brightness of one

object from another.

(Hue, Saturation, Value/Intensity)(Hue, Saturation, Value/Intensity)

( H, S, V ) Color Space

Spring 2006 Utah School of Computing 27

SaturationSaturation

Spring 2006 Utah School of Computing 28

Other HSX Color Spaces (Cones)Other HSX Color Spaces (Cones)

120˚

V

SH

1.0

0.0

240˚

yellowyellowyellowyellowgreengreengreengreen

cyancyancyancyanredredredred

magentamagentamagentamagentablueblueblueblue

blackblackblackblack

Another HSX Color Space(double cone)

Another HSX Color Space(double cone)

1.0

S

L

29

0.0

H

whitewhitewhitewhite

blackblackblackblack

redredredred

Spring 2006 Utah School of Computing 30

Tristimulus Color TheoryTristimulus Color Theory

• Any color can be matched by a mixture of three fixed base colors (primaries)

• Eye has three kinds of color receptors called cones

• Eye also has rods (low light receptors)

Spring 2006 Utah School of Computing 31

Color Receptors in EyeColor Receptors in Eye

• ((RedRed, GreenGreen, BlueBlue))

• ((LongLong, MediumMedium, ShortShort))

• ((RedRed, GreenGreen, BlueBlue))

• ((LongLong, MediumMedium, ShortShort))

Fra

ctio

n of

ligh

t ab

sorb

ed

by e

ach

type

of

cone

Wavelength λ (nm)

0.20

0 .18

0 .16

0 .14

0 .12

0 .10

0 .08

0 .06

0 .04

0 .02

0 .00

600560440 520 640400 680480

Spring 2006 Utah School of Computing 32

Color Receptors in EyeColor Receptors in Eye

600550450 500 650400 700Wavelength λ (nm)

Rel

ativ

e se

nsiti

vity

0.0

1.0

Spring 2006 Utah School of Computing 33

• Why are runway lights blue?

• Why are console lights green?

• What color is the Kodak box?

• Why are green lasers directed toward pilots for destructive purposes?

• Why do soldiers read maps in the dark using dim red light?

Color Response Color Response

Spring 2006 Utah School of Computing 34

Color Matching ExperimentsColor Matching Experiments

• Given a reference color, try to match it identically

• What does “negative red,” or “negative color” mean??

Spring 2006 Utah School of Computing 35

CIE* Color SpaceCIE* Color Space

( X, Y, Z ) represents an imaginary basis that does not correspond to what we see

Define the normalized coordinates:x = X / ( X + Y + Z )

y = Y / ( X + Y + Z )

z = Z / ( X + Y + Z )

* Commission Internationale de l'Êclairage

Spring 2006 Utah School of Computing 36

CIE Color Space of Visible ColorsCIE Color Space of Visible Colors

x + y + z = 1

x = X / ( X + Y + Z )

y = Y / ( X + Y + Z )

z = Z / ( X + Y + Z )

z

y

x

The projection of the plane of the triangle onto the (X,Y) plane forms the chromaticity diagram that follows.

Spring 2006 Utah School of Computing 37

Color Gamuts: CIE Color ChartColor Gamuts: CIE Color Charty

x

1.0

0 .9

0 .8

0 .7

0 .6

0 .5

0 .4

0 .3

0 .2

0 .1

1.0 0 .2 0 .3 0 .4 0 .5 0 .6 0 .7 0 .8 0 .9 1.0

cyancyan

magentamagentaredredblueblue

green green

yellowyellow

400

490

500

510

520

600

700

580

560

540

whitewhitewhitewhite

Spring 2006 Utah School of Computing 38

Color Gamuts: CIE Color ChartColor Gamuts: CIE Color Chart

ideal redideal redideal redideal redideal blueideal blueideal blueideal blue

ideal greenideal green ideal greenideal green

redredredredblueblueblueblue

green green green green

cyancyanyellowyellow

whitewhitewhitewhite

400 nm

490 nm

500 nm

510 nm540 nm

560 nm

580 nm

700 nm

600 nm

520 nm

Spring 2006 Utah School of Computing 39

Color Gamuts: CIE Color ChartColor Gamuts: CIE Color Chart

www.cs.rit.edu/~ncs/color/a_chroma.html

400

490

500

510

520

600

700

580

560

540

Spring 2006 Utah School of Computing 40

Color Gamuts: CIE Color ChartColor Gamuts: CIE Color Chart

www.cs.rit.edu/~ncs/color/a_chroma.html

700 nm

510 nm

400 nm

500 nm

490 nm

600 nm

520 nm540 nm

560 nm

580 nm

Spring 2006 Utah School of Computing 41

Color Gamuts: CIE Color ChartColor Gamuts: CIE Color Chart

www.cs.rit.edu/~ncs/color/a_chroma.html

400

490

500

510

520

600

700

580

560

540

C2

C3

C1

The additive colors C1and

C2 combine to

form C3 on the

line connecting C1 and C2.

Spring 2006 Utah School of Computing 42

Color Gamuts: CIE Color ChartColor Gamuts: CIE Color Chart

www.cs.rit.edu/~ncs/color/a_chroma.html

400

490

500

510

520

600

700

580

560

540

R

B

G

The Color Gamuts of different displays and printers are not likely to match. Printers usually have smaller gamuts.

Spring 2006 Utah School of Computing 43

www.cs.brown.edu/exploratories/freeSoftware/repository/edu/brown/cs/exploratories/applets/

combinedColorMixing/combined_color_mixing_java_browser.html

Spring 2006 Utah School of Computing 44

CIE L*a*b* Color SpaceCIE L*a*b* Color Space

greengreengreengreen

--bb**

L*=0

L*=1

light

ness

redredredred

blueblue

blueblue

++aa**++aa**

-a*-a*-a*-a*

yello

wye

llow

yello

wye

llow

+b*+b*+b*+b*

Equal distances represent

approximately equal color difference.

whitewhitewhitewhite

blackblackblackblack

Spring 2006 Utah School of Computing 45

Important ConceptsImportant Concepts

• Adaptation–Slow process

• Constancy–Immediate process

Spring 2006 Utah School of Computing 46

Output to the Brain from Lateral Geniculate BodyOutput to the Brain from Lateral Geniculate Body

RRRR

GGGG

BBBB

+

+

-

+

-

B B - B B -

RR- GGRR- GG

BBBB

RRRR

GGGG

YYYY

YYYY

+

Color processing unit: lateral geniculate body

Spring 2006 Utah School of Computing 47

Eye’s MechanismEye’s Mechanism

+++ +++

+++

- --

+++

- --

+++

- --

+++

- --

- --

- --

- --

- --

- --

- --

- --

- --- -

-

---

- --

---

- --

---

- --

---

- --

---

- --

---

48

Lect

ure

Set

11

top related