Sie sind auf Seite 1von 9

Color

Color

Frédo Durand and Barb Cutler


MIT- EECS
Many slides courtesy of Victor Ostromoukhov and Leonard McMillan
Color Vision 1

Admin Review of assignments


• Final project due this Friday • Ray-casting spheres, planes, triangles
– If you aren’t well advanced yet, time to freak out • Shadow rays, reflection, refraction
• Don’t forget the final report (~1000 words) • Phong shading, solid textures
• Submit code, executable, instructions • Grid acceleration
(we want to copy-paste command lines) • Supersampling and filtering
• Spline editing, surfaces of revolution, patches
• Particle systems

Color Vision 3 Color Vision 4

How to optimize your ray tracer Industrial-strength ray tracer


• Grid insertion: be smart about bbox! • Usually, one single primitive (triangles)
– Don’t check all voxels! • Heavily optimize ray-triangle and spatial data structure
• Precompute values used by intersection (recursive grid or kd-tree)
– E.g. inverse of matrix, square of radius – Watch memory footprint
– If a value does not change between iterations, cache it! • Pluggable shaders (same as your shader class)
• Passing parameters as pointers/refs, not value • High-quality supersampling (same as you)
– Otherwise you spend a lot of time calling constructors and • Distribution ray-tracing (soft shadows, glossy, DoF)
allocating memory
• Global illumination (Irradiance caching, photon maps,
• In general, avoid memory allocation in inner loops but only recently used)
• Texture mapping, bump mapping
• But remember, optimization should come last and not at • Fancy light sources (shaders as well)
the price of readability
• Volumetric effects (fog, dust)
• Trust the compiler for low-level optimizations
• Data management (although not always done well)
Color Vision 5 Color Vision 6

1
Today: color Plan
Disclaimer: • What is color
• Color is both quite simple and quite complex • Cones and spectral response
• Color blindness and metamers
• There are two options to teach color: • Fundamental difficulty with colors
– pretend it all makes sense and it’s all simple • Colorimetry and color spaces
– Expose the complexity and arbitrary choices
• Unfortunately I have chosen the latter • Next time:
– Too bad if you believe ignorance is bliss More perception
Gamma

Color Vision 7 Color Vision 8

What is Color? What is Color? Neon Lamp

Electromagnetic Wave Spectral

Spectral Power

Power Distribution

Distribution

Illuminant F1
Illuminant D65
Reflectance Reflectance
(nm)
Spectrum Spectrum Spectral
Power
Distribution

Spectral Under D65

Power
Distribution

Spectral
Power
Distribution
Under F1

Color Vision 9 Color Vision 10

What is Color? What is Color?

Observer

Stimulus Ganglion Horizontal


M L Spectral

Cells Cells Sensibility


Bipolar
Cells Rod Cone S of the
L, M and S
Cones

Light
Light

Amacrine
Cells
Retina Optic Nerve
Distribution of
Color Vision 11 Color Vision Rods Cones Cones and Rods 12

2
What is Color? Questions?
Right LGN

Left LGN
Visual
Cortex

LGN = Lateral Geniculate Nucleus


Color Vision 13 Color Vision 14

Plan Cone spectral sensitivity


• What is color • Short, Medium and Long wavelength
• Cones and spectral response
• Color blindness and metamers
• Response = ∫
wavelengthstimulus(λ) * response(λ) dλ
S M L
• Fundamental difficulty with colors 1.00
• Colorimetry and color spaces 0.75

0.50
• Next time:
More perception 0.25
Gamma
0.00
400 500 600 700
Color Vision 15 Color Vision wavelength 16

Cone response Big picture Light reflectance


• It’s all linear! multiply
Stimulus

Stimulus
Cone responses

Cone responses

Multiply wavelength by wavelength


Multiply wavelength by wavelength

Color Vision Integrate 17 Color Vision Integrate 18

3
Cones do not “see” colors Response comparison
• Different wavelength, different intensity • Different wavelength, different intensity
• Same response • But different response for different cones
M S M L
1.00 1.00

0.75 0.75

0.50 0.50

0.25 0.25

0.00 0.00
400 500 600 700 400 500 600 700
wavelength wavelength
Color Vision 19 Color Vision 20

von Helmholtz 1859: Trichromatic theory Questions?


• Colors as relative responses
(ratios)
Violet
Blue
Orange
Yellow
Green
Violet

Blue

Red

Green
Yellow
Receptor Responses

Orange
Red
Short wavelength receptors
Medium wavelength receptors
400 500 600 700
Long wavelength receptors
Wavelengths (nm)
Color Vision 21 Color Vision 22

Plan Color blindness


• What is color • Classical case: 1 type of cone is missing (e.g. red)
• Cones and spectral response • Now Project onto lower-dim space (2D)
• Color blindness and metamers • Makes it impossible to distinguish some spectra
• Fundamental difficulty with colors
• Colorimetry and color spaces

• Next time:
More perception
Gamma

Color Vision 23 Color Vision differentiated Same responses 24

4
Color blindness – more general Color blindness test
• Dalton
• 8% male, 0.6% female
• Genetic
• Dichromate (2% male)
– One type of cone missing
– L (protanope), M (deuteranope),
S (tritanope)
• Anomalous trichromat
– Shifted sensitivity

Color Vision 25 Color Vision 26

Color blindness test Metamers


• Maze in subtle intensity contrast • We are all color blind!
• Visible only to color blinds • Different spectrum
• Color contrast overrides intensity otherwise • Same response
• Essentially, we have
projected from an
infinite-dimensional
spectrum to a 3D space:
we loose information

Color Vision 27 Color Vision 28

Metamers allows for color matching Metamerism & light source


• Reproduce the color of any test lamp • Metamers
with the addition of 3 given primary lights under a given
• Essentially exploit metamers light source
• May not be
metamers
under a
different
lamp

Color Vision 29 Color Vision 30

5
Questions? Playtime: Prokudin-Gorskii
• Russia circa 1900
• One camera, move the film with filters to get 3
exposures

Meryon (a colorblind painter), Le Vaisseau Fantôme http://www.loc.gov/exhibits/empire/


Color Vision 31 Color Vision 32

Playtime: Prokudin-Gorskii Playtime: Prokudin-Gorskii


• Digital restoration

http://www.loc.gov/exhibits/empire/
Color Vision 33 Color Vision 34

Playtime: Prokudin-Gorskii Playtime: Prokudin-Gorskii

Color Vision 35 Color Vision 36

6
Plan Warning
• What is color Tricky thing with spectra & color:
• Cones and spectral response • Spectrum for the stimulus / synthesis
• Color blindness and metamers – Light, monitor, reflectance
• Fundamental difficulty with colors • Response curve for receptor /analysis
• Colorimetry and color spaces – Cones, camera, scanner
They are usually not the same
• Next time: There are good reasons for this
More perception
Gamma

Color Vision 37 Color Vision 38

Synthesis Synthesis
• If we have monitor phosphors with the same • Take a given stimulus and the corresponding
spectrum as the cones, can we use them directly? responses s, m, l (here 0.5, 0, 0)

S M L S M L
1.00 1.00

0.75 0.75

0.50 0.50

0.25 0.25

0.00 0.00
400 500 600 700 400 500 600 700
Color Vision wavelength 39 Color Vision wavelength 40

Synthesis What’s going on?


• Use it to scale the cone spectra (here 0.5 * S) • The three cone responses are not orthogonal
• You don’t get the same cone response!
(here 0.5, 0.1, 0.1)
• i.e. they overlap and “pollute” each other

S M L S M L
1.00 1.00

0.75 0.75

0.50 0.50

0.25 0.25

0.00 0.00
400 500 600 700 400 500 600 700
Color Vision wavelength 41 Color Vision wavelength 42

7
Questions? Plan
• What is color
• Cones and spectral response
• Color blindness and metamers
• Fundamental difficulty with colors
• Colorimetry and color spaces

• Next time:
More perception
Gamma

Color Vision 43 Color Vision 44

Standard color spaces Standard color spaces


• Colorimetry: science of color measurement • We need a principled color space
• Quantitative measurements of colors are crucial • Many possible definition
in many industries – Including cone response (LMS)
– Television, computers, print, paint, luminaires – Unfortunately not really used
• So far, we have used some vague notion of RGB
• Unfortunately, RGB is not precisely defined, and • The good news is that color vision is linear and
depending on your monitor, you might get 3-dimensional, so any color space based on color
something different matching can be obtained using 3x3 matrix
• We need a principled color space • But there are non-linear color spaces (e.g. Hue
Saturation Value, Lab)
Color Vision 45 Color Vision 46

CIE CIE
• Commission Internationale de l’Eclairage • First in charge of measuring brightness for
(International Lighting Commission) different light chromaticities
• Circa 1920 • Predict brightness of arbitrary spectrum (linearity)
• First in charge of measuring brightness for
different light chromaticities (monochromatic
wavelength)

Color Vision 47 Color Vision 48

8
Questions?

Color Vision 49

Das könnte Ihnen auch gefallen