1 of 75

Nima Kalantari

CSCE 441 - Computer Graphics

Color

Some slides from Ren Ng and Scott Schaefer

2 of 75

Outline

  • Physics of color
  • Human visual system
  • Color reproduction
  • Color models

3 of 75

The Visible Spectrum of Light

  • Electromagnetic radiation
    • Oscillations of different frequencies (wavelengths)

Visible electromagnetic spectrum

380

750

4 of 75

Spectral Power Distribution (SPD)

  • Any patch of light can be completely described by its spectrum
    • Power of photons (per unit area) at each wavelength 400 - 700 nm

© Stephen E. Palmer, 2002

Power per unit area (W/m2)

400 500 600 700

Wavelength (nm.)

5 of 75

Examples

Blue sky

Solar disk

[Brian Wandell]

6 of 75

Examples

Figure credit:

7 of 75

Superposition (Linearity) of SPD

[Brian Wandell]

8 of 75

What is Color?

  • Color is a phenomenon of human perception; it is not a universal property of light
  • Colors are the perceptual sensations that arise from seeing light of different spectral power distributions
  • Technically speaking, different wavelengths of light are not “colors”

9 of 75

Outline

  • Physics of color
  • Human visual system
  • Color reproduction
  • Color models

10 of 75

Anatomy of The Human Eye

11 of 75

Main Parts of the Eye

  • Cornea

12 of 75

Main Parts of the Eye

  • Cornea
    • Provides most refraction

13 of 75

Main Parts of the Eye

  • Cornea
  • Iris

14 of 75

Main Parts of the Eye

  • Cornea
  • Iris
    • Opens/Closes to let in more/less light

15 of 75

Main Parts of the Eye

  • Cornea
  • Iris
    • Opens/Closes to let in more/less light
    • Hole is the pupil

16 of 75

Main Parts of the Eye

  • Cornea
  • Iris
  • Lens

17 of 75

Main Parts of the Eye

  • Cornea
  • Iris
  • Lens
    • Flexible - muscles adjust shape

18 of 75

Main Parts of the Eye

  • Cornea
  • Iris
  • Lens
    • Flexible - muscles adjust shape
    • Allows fine-detail focus

19 of 75

Main Parts of the Eye

  • Cornea
  • Iris
  • Lens
  • Retina

20 of 75

Main Parts of the Eye

  • Cornea
  • Iris
  • Lens
  • Retina
    • Layer of receptor cells at back of eye

21 of 75

Main Parts of the Eye

  • Cornea
  • Iris
  • Lens
  • Retina
    • Layer of receptor cells at back of eye
    • Center of focus is the fovea

22 of 75

Main Parts of the Eye

  • Cornea
  • Iris
  • Lens
  • Retina
    • Layer of receptor cells at back of eye
    • Center of focus is the fovea
    • Optic nerve transfer information from retina to brain
      • Causes a blind spot!

23 of 75

The Retina

24 of 75

Retinal Photoreceptor Cells: Rods and Cones

  • Rods
    • Very sensitive
    • Operate in low light
    • Grayscale vision
  • Cones
    • Less sensitive
    • Color vision
    • Operate in high light

Rod cells

Cone cells

25 of 75

Different Types of Cones

© Stephen E. Palmer, 2002

Three kinds of cones:

Ratio 10:5:1 for L:M:S

26 of 75

Measuring Light

27 of 75

A Simple Model of a Light Detector

Credit: Marschner

28 of 75

Mathematics of Light Detection

  • Same math carries over to spectral power distributions
    • Light entering the detector has its SPD, s(λ)
    • Detector has its spectral sensitivity or spectral response, r(λ)

measured signal

input spectrum

detector’s sensitivity

29 of 75

Dimensionality Reduction From ∞ to 1

  • At the detector:
    • SPD is a function of wavelength
      • ∞ dimensional signal
    • Detector result is a scalar value
      • 1 dimensional signal

30 of 75

Spectral Response of Human Cone Cells

  • Instead of one detector as before, now we have three detectors (S, M, L cone cells), each with a different spectral response curve

Normalized response

Wavelength (nm)

31 of 75

Dimensionality Reduction From ∞ to 3

  • At each position on the human retina:
    • SPD is a function of wavelength
      • ∞ dimensional signal
    • 3 types of cones near that position produce three scalar values
      • 3 dimensional signal

32 of 75

The Human Visual System

  • Human eye does not measure each wavelength of light
    • Brain does not receive info about each wavelength
  • Eye measures three response values only (S, M, L)
    • Three quantities at each position of visual field available to brain

Kayvon Fatahalian

33 of 75

Metamers

  • Metameters are two different spectra (∞-dim) that project to the same (S,M,L) (3-dim) response
    • These will appear to have the same color to a human

34 of 75

Metamerism is a Big Effect

Brian Wandell

35 of 75

Metamers

  • Metamers are two different spectra (∞-dim) that project to the same (S,M,L) (3-dim) response
    • These will appear to have the same color to a human
  • The existence of metamers is critical to color reproduction
    • Don’t have to reproduce the full spectrum of a real-world scene

36 of 75

Outline

  • Physics of color
  • Human visual system
  • Color reproduction
  • Color models

37 of 75

Real LCD Screen Pixels (Closeup)

Notice R, G, B sub-pixel geometry.

Effectively three lights at each (x,y) location.

DELL monitor

38 of 75

Additive Color

  • The set of primary lights have a specific spectral distributions

39 of 75

Example Primaries for CRT Display

wavelength (nm)

Emission (watts/m2)

40 of 75

Example Primaries: LCD Display

41 of 75

Additive Color

  • The set of primary lights have a specific spectral distributions

  • We can adjust the brightness of these lights and add them together to produce a particular color:�

  • The color is now described by the scalar values:

42 of 75

Color Reproduction Problem

  • Goal: at each pixel, choose R, G, B values for display so that the output color matches the appearance of the target color in the real world

Display outputs spectrum

Target real spectrum

43 of 75

Empirical Color Matching Experiment

44 of 75

Additive Color Matching Experiment

  • Show test light spectrum on left
  • Mix “primaries” on right until they match
  • The primaries need not be RGB

45 of 75

Example Experiment

Slide from Durand and Freeman 06

46 of 75

Example Experiment

Slide from Durand and Freeman 06

47 of 75

Example Experiment

Slide from Durand and Freeman 06

48 of 75

Example Experiment

Slide from Durand and Freeman 06

49 of 75

CIE RGB Color Matching Experiment

  • Same setup as additive color matching before, but primaries are monochromatic light (single wavelength) of the following wavelengths

The test light is also a monochromatic light

Kayvon Fatahalian

50 of 75

CIE RGB Color Matching Functions

  • Graph plots how much of each CIE RGB primary light must be combined to match a monochromatic light of wavelength given on x-axis

51 of 75

Experiment 2

Slide from Durand and Freeman 06

52 of 75

Experiment 2

Slide from Durand and Freeman 06

53 of 75

Experiment 2

Slide from Durand and Freeman 06

54 of 75

Experiment 2

Slide from Durand and Freeman 06

55 of 75

Experiment 2

Slide from Durand and Freeman 06

56 of 75

CIE RGB Color Matching Functions

  • Graph plots how much of each CIE RGB primary light must be combined to match a monochromatic light of wavelength given on x-axis

57 of 75

CIE XYZ

  • Imaginary primary lights to avoid having negative coefficients

58 of 75

Chromaticity

  • x = X / (X + Y + Z)
  • y = Y / (X + Y + Z)
  • z = Z / (X + Y + Z)
  • x + y + z = 1

59 of 75

Chromaticity

60 of 75

CIE XYZ

61 of 75

Gamut

  • The subset of colors that can be represented within a given display device or color space

62 of 75

Gamut

CIE RGB are the �monochromatic�primaries used for�color matching �tests described �earlier

63 of 75

Outline

  • Physics of color
  • Human visual system
  • Color reproduction
  • Color models

64 of 75

RGB

  • Red, Green, Blue
  • Common specifications for most monitors
    • Tells how much intensity to use for pixels
  • Note: Not standard – RGB means different things for different monitors
  • Generally used in an additive system
    • Each adds additional light (e.g. phosphor)
    • Combine all three colors to get white

65 of 75

CMY

  • Cyan, Magenta, Yellow
  • Commonly used in printing
  • Generally used in a subtractive system:
    • Each removes color from reflected light
    • Combine all three colors to get black
  • Conceptually, [C M Y] = [1 1 1] – [R G B]
    • Complimentary colors to RGB

66 of 75

CMYK

  • Cyan, Magenta, Yellow, Black
  • Comes from printing process – since CMY combine to form black, can replace equal amounts of CMY with Black, saving ink
  • K = min(C, M, Y)

C = C-K

M = M-K

Y = Y-K

67 of 75

HSV (Hue-Saturation-Value)

  • Axes correspond to artistic characteristics of color
  • Intuitive color model

68 of 75

CIELAB model (AKA L*a*b*)

  • A commonly-used color space that strives for perceptual uniformity
  • L* is lightness
  • a* and b* are color-opponent pairs
    • a* is red-green
    • b* is blue-yellow

69 of 75

Perceptual Non-Uniformity

Wikipedia

70 of 75

Opponent Color Theory

  • There’s a good neurological basis for the color space dimensions in CIE LAB
  • The brain seems to encode color early on using three axes:
    • white — black, red — green, yellow — blue
  • A piece of evidence: afterimages

slide credit: Steve Marschner

71 of 75

72 of 75

73 of 75

Rae Kokotailo & Donald Kline

74 of 75

75 of 75

Rae Kokotailo & Donald Kline

Before

After