Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and...

29
1 Einführung in Visual Computing 186.822 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception l i t colorimetry device color systems color ordering systems color symbolism Werner Purgathofer 1

Transcript of Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and...

Page 1: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

1

Einführung inVisual Computing

186.822186.822

Color and Color Models

Werner Purgathofer

Color

problem specification

light and perception

l i tcolorimetry

device color systems

color ordering systems

color symbolism

Werner Purgathofer 1

Page 2: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

2

Color - Why Do We Care?

Computer Graphics is all about the generation and the manipulation of color images

proper understanding and handling of color isproper understanding and handling of color is necessary at every step

Werner Purgathofer 2

What is Light?

“light” = narrow frequency band of electromagnetic spectrumred border: 380 THz ≈ 780 nmviolet border: 780 THz ≈ 380 nm

M r

adio

M r

adio

nd T

V

icro

wav

es

frar

ed

trav

iole

t

-ray

s

visible

Werner Purgathofer 3

frequency(Hz)

102 104 106 108 1010 1012 1014 1016 1018 1020

AM

FM

an m inf

ult

X-

1016 1014 1012 1010 108 106 104 102 100 10-2wavelength

(nm)

… …

Page 3: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

3

Light - An Electromagnetic Wave

light is electromagnetic energymonochrome light can be described either by frequency f or wavelength q y gc = f (c = speed of light)

shorter wavelengthequals higherfrequency

Et

frequency

red 700 nmviolet 400 nm

Werner Purgathofer 4

Light – Spectrum

normally, a ray of light contains many different waves with individual frequencies

the associated distribution of wavelengthgintensities perwavelength isreferred to asthe spectrumof a given rayof a given rayor light source

Werner Purgathofer 5

Page 4: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

4

Dominant Wavelength | Frequency

white lightenergy energy greenish lightED

dominant wavelength | frequency (hue color)

wave-length

700 nm400 nm

wave-length

dominantwavelength

EW

dominant wavelength | frequency (hue, color)

brightness (area under the curve)

purity

Werner Purgathofer 6D

WD

E

EE ED...dominant energy densityEW...white light energy density

The Human Eye

retina containsrods: b/w

cones: color

aqueous[Augenkammer]

cornea[Hornhaut]

iris [Regen-bogen- cones: color

rods

lens

visual axisoptical axis

bogenhaut]

vitreous humor[Glaskörper]

optic disc

Werner Purgathofer 7

conesfovea

macula lutea[gelber Fleck]

nerve

retina[Netzhaut]

p[Papille]

Page 5: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

5

The Human Eye

3 types of cones

diff tdifferentwavelengthsensitivities:

red

green

fraction of absorbed light

2%4%8%16%

green

blue

Werner Purgathofer 8

1%

400 440 480 520 560 600 640 680

λ

Color Blindness

red/green blindnessred & green cones too similar

fraction of absorbed light

2%4%8%

16%

Werner Purgathofer 9

1%

400 440 480 520 560 600 640 680

λ

Page 6: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

6

Color Blindness

red/green blindnessred & green cones too similar

blue blindnessno blue cones

other

fraction of absorbed light

2%4%8%16%

othercones missing

cones too similar

Werner Purgathofer 10

1%

400 440 480 520 560 600 640 680

λ

Color Blindness Tests

Werner Purgathofer 11

5 = normalnothing = red/green blind

2 = red/green weaknothing = normal

Page 7: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

7

Color Blindness Tests

Werner Purgathofer 12

8 = normal3 = red/green weaknothing = r/g blind

8 = red/green blind12 = blue/yellow blind182 = normal

Color Spaces (CS)

Color Metric Spaces (CIE XYZ, L*a*b*)used to measure absolute values and differences - roots in colorimetryy

Device Color Spaces (RGB, CMY, CMYK)used in conjunction with device

Color Ordering Spaces (HSV, HLS)used to find colors according to some criterion

the distinction between them is somewhat obscured by the prevalence of multi-purpose RGB in computer graphics

Werner Purgathofer 13

Page 8: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

8

What is our Goal?

to be able to quantify color in a meaningful, expressive consistent and reproducible wayexpressive, consistent and reproducible way.

problem: color is a perceived quantity, not a direct, physical observable

Werner Purgathofer 14

Color - A Visual Sensation

light nerveobject lightstimulus

eye brainnervesignal

electromagneticrays

color sensation

Werner Purgathofer 15

realm of direct observables

realm of psychology

Page 9: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

9

Colorimetry

CM is the branch of color science concerned with numerically specifying the color of a physically defined visual stimulus in suchphysically defined visual stimulus in such manner that

stimuli with the same specification look alike under the same viewing conditions

stimuli that look alike have the same ifi tispecification

the numbers used are continuous functions of the physical parameters

Werner Purgathofer 16

Colorimetry Properties

Colorimetry only considers the visual discriminability of physical beams of radiation

f th f C l i t l “ ifor the purposes of Colorimetry a „color“ is an equivalence class of mutually indiscriminablebeams

colors in this sense cannot be said to be “red”, “green” or any other “color name”green or any other color name

discriminability is decided before the brain - Colorimetry is not psychology

Werner Purgathofer 17

Page 10: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

10

observers had to match monochromatictest lights by combining 3 fixed primaries

Color Matching Experiments

green test

test

R+

G+

B

Werner Purgathofer 18

goal: find the unique RGB coordinates for each stimulus

0 10 10 1

Color Matching Experiments

observers had to match monochromatictest lights by combining 3 fixed primaries

R = 700.0 nmG = 546.1 nmB = 435.8 nm

viewer controls

independentlyvariable primary

Werner Purgathofer 19

viewingscreen

testsource

maskingscreen

p ysources

Page 11: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

11

Tristimulus Values

the values RQ, GQ and BQ

of a stimulus Q that fulfillgreentest

test

R+

G+

B

are called the tristimulus values of Q

i h f h i i l

Q RQ R GQ G BQ B

Werner Purgathofer 20

in the case of a monochromatic stimulus Q, the values R, G and B are called the spectral tristimulus values

Color Matching Procedure

(1) test field = 700 nm-red with radiance Pref

observer adjusts luminance of R (G=0, B=0)

(2) test light wavelength is decreased in(2) test light wavelength is decreased in constant steps (radiance Pref stays the same)

observer adjusts R, G, B

(3) repeat for entirevisible range

Werner Purgathofer

visible range

400 450 500 550 600 650 700 nm350

Page 12: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

12

Color Matching Result !?

100

nomatch

possible!?!?

0400 450 500 550 600 650 700 nm350

Werner Purgathofer 22

400 450 500 550 600 650 700 nm350

observers want to „subtract“red light from the match side...!?

for some colors observers want to reduce red light to negative values…!?but there is no negative light…!

Color Matching Experiment Problem

g g

green test

test

+G

+B

Werner Purgathofer 23

0 1

t

R+

0 10 1

?

Page 13: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

13

“Negative” Light in a Color Matching Exp.

if a match using only positive RGB values proved impossible, observers could simulate a subtraction of red from the match side bysubtraction of red from the match side by adding it to the test side

green test st

+ R

G+

B

Werner Purgathofer 24

tes G

0 10 10 10 1

100

CIE RGB Color Matching Functions

r(λ)b(λ)

?

g(λ)

Werner Purgathofer 25

350 400 450 500 550 600 650 700 nm0

435.

8 n

m

546.

1 n

m

700.

0 n

m

Page 14: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

14

CIE XYZ

problem solution: XYZ color system

tristimulus system derived from RGB

b d 3 i i i ibased on 3 imaginary primaries

all 3 primaries are imaginary colors

only positive XYZ values can occur!

Y

values can occur!

1931 by CIE (CommissionInternationale de l’Eclairage)

Werner Purgathofer 26

X

Z

RGB vs. XYZ

negative component disappears

y() is the achromatic luminance sensitivity

r(λ)

g(λ)b(λ)

x(λ)y(λ)

z(λ)

1

RGB system XYZ system

Werner Purgathofer 27

350 400 450 500 550 600 650 700 nm 350 400 450 500 550 600 650 700 nm0

amounts of RGB primaries needed to display spectral colors

amounts of CIE primaries needed to display spectral colors

Page 15: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

15

CIE Color Model Formulas

XYZ color model C() = XX + YY + ZZ(X, Y, Z are primaries)

normalized chromaticity values x ynormalized chromaticity values x, y

( z = 1 – x – y )

ZYXXx

ZYX

Yy

1

Y

complete descriptionof color: x, y, Y

Werner Purgathofer 28

11 X

Z

CIE Chromaticity Diagram

identifying complementary colors

spectral colors

determining dominant wavelength, puritycomparing color gamuts

Werner Purgathofer 29

spectral color positions are along the boundary curve

purple line

Page 16: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

16

Properties of CIE Diagram (2)

representing p gcomplementary colors on the chromaticity diagramC1

C

Werner Purgathofer 30

C2

Properties of CIE Diagram (3)

determining dominant wavelength and purity with the

Csand purity with the chromaticity diagram

C1 → Cs

C2 → Cp?

C1

C

Csp

Werner Purgathofer 31

2 p

→ complement CspC2

Cp

Page 17: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

17

Color Spaces (CS)

Color Metric Spaces (CIE XYZ, L*a*b)used to measure absolute values and differences - roots in colorimetryy

Device Color Spaces (RGB, CMY, CMYK)used in conjunction with device

Color Ordering Spaces (HSV, HLS)used to find colors according to some criterion

the distinction between them is somewhat obscured by the prevalence of multi-purpose RGB in computer graphics

Werner Purgathofer 32

RGB Color Model

primary colors red, green, blue

white

yellow(1,1,0)

green(0,1,0)

cyanadditive color model (for monitors)

white(1,1,1)

red(1,0,0)

cyan(0,1,1)

blue(0,0,1)

black(0,0,0)

Werner Purgathofer 33

C(C() = R) = RRR + G+ GGG + B+ BBB

magenta(1,0,1)

Page 18: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

18

RGB Color Model Images

Werner Purgathofer 34

3 views of the RGB

color cube

Gamuts of RGB Monitors

monitor gamuts can be very different

no monitor canno monitor can display all colors

Werner Purgathofer 35Werner Purgathofer 35

Page 19: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

19

CMY Color Model

primary colors cyan, magenta, yellowred

(0 1 1)

magenta(0,1,0) blue

(1,1,0)

black yellow

subtractive color model (for hardcopy devices)

C=G+B, using C yellow(0,0,1)

(0,1,1)

cyan(1,0,0)

black(1,1,1)

white(0,0,0)

“subtracts” R

Werner Purgathofer 36

BGR

YMC

111

green(1,0,1)

CMY Color Model Images

Werner Purgathofer 37

3 views of the CMY

color cube

Page 20: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

20

Gamuts of CMY(K) Printers

printer gamuts can be very different

no printer canno printer can display all colors

Werner Purgathofer 38Werner Purgathofer 38

Color Spaces (CS)

Color Metric Spaces (CIE XYZ, L*a*b)used to measure absolute values and differences - roots in colorimetryy

Device Color Spaces (RGB, CMY, CMYK)used in conjunction with device

Color Ordering Spaces (HSV, HLS)used to find colors according to some criterion

the distinction between them is somewhat obscured by the prevalence of multi-purpose RGB in computer graphics

Werner Purgathofer 39

Page 21: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

21

Colour Ordering Systems (COS)

primary aim: enable theuser to intuitively choose colour values according tocolour values according to certain criteria

choice can yield single or multiple colour values

examples: HSV, HLS,Munsell, NCS, RAL Design, Coloroid

used in bottom-up parts of a design process

sometimes physical samples are provided

Werner Purgathofer 40

HSV Color Model

more intuitive color specificationderived from the RGB color model:

when the RGB color cube is viewed along the diagonal from white to black, the color cube outline is a hexagon

Werner Purgathofer 41RGB Color Cube Color Hexagon

Page 22: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

22

HSV Color Model Hexcone

color components: hue (H)( ) [0°, 360°]

saturation (S) [0, 1]

value (V) [0 1] [0, 1]

Werner Purgathofer 42

HSV hexcone

HSV Color Model Hexcone

color components: hue (H)( ) [0°, 360°]

saturation (S) [0, 1]

value (V) [0 1] [0, 1]

Werner Purgathofer 43

HSV hexcone

Page 23: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

23

HSV Color Definition

color definitionselect hue, S=1, V=1add black pigments,p g ,i.e., decrease V add white pigments,i.e., decrease S

ti f th HSV

Werner Purgathofer 44

Shades

S

cross section of the HSV hexcone showing regions for shades, tints, and tones

HLS Color Model

color components: hue (H) ( ) [0°, 360°]

lightness (L) [0, 1]

saturation (S) [0 1]

Werner Purgathofer 45

HLS double cone

[0, 1]

Page 24: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

24

Color Model Summary

Colorimetry:CIE XYZ: contains all visible colours

Device Color Systems:RGB: additive device color space (monitors)CMY(K): subtractive device color space (printers)YIQ: television (NTSC)(Y=luminance I=R Y Q=B Y)(Y=luminance, I=R-Y, Q=B-Y)

Color Ordering Systems:HSV, HLS: for user interfaces

Werner Purgathofer 46

Color Symbolism: Some Aspects

6 to 11 basic colors

categories, hierarchies

d d t t t / li tidependent on context / application

large variation in usewhat is red?

what is blue?

what is white? !what is white? !

Werner Purgathofer 47

Page 25: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

25

Color in Religion

Islam: green

Buddhism:yellow orangeyellow, orange,red & purple

Hinduism:orange, blue& blue-violet

Christs:liturgical colors withouttheological connex

Werner Purgathofer 48

Political Symbol Colors

parties

revolutions / movements

flflags

Werner Purgathofer 49

Page 26: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

26

at homewater pipes

electrical wires

Color Labeling

electrical wires

waste separation

traffictraffic signs

traffic lightstraffic lights

parking concepts

public transport

...Werner Purgathofer 50

Color Labeling

technologyresistors

thermochrome colorsthermochrome colors

naturecourtship [Balz]

warning colors

protective mimicryprotective mimicry[Tarnfarben]

Werner Purgathofer 51

Page 27: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

27

Color Effect: BLUE

distance

faithfulness, loyality

d idesire

phantasy

male

devine

peace

cold

Werner Purgathofer 52

Color Effect: RED

blood

energy

llove

female

rich, noble

labor movement

warm

corrections

Werner Purgathofer 53

Page 28: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

28

Color Effect: GREEN

profit

young love

hhope

prematurity, unripe

poison

nature

lneutral

environment protection

Werner Purgathofer 54

Color Effect: YELLOW

sun

optimism

li ht tenlightenment

jealousy [Neid]

stinginess [Geiz]

warning color

warm

Werner Purgathofer 55

Page 29: Einführung in Visual Computing - TU Wien · 1 Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception coli

29

Color Effect: BLACK

end, death

sadness

ti tinegative emotions

bad luck

elegance

emptiness

ldcold

Werner Purgathofer 56

Einführung inVisual Computing

186.822186.822

Color and Color Models

The End