Top Banner
Capturing Light… in man and machine 15-463: Computational Photograph Alexei Efros, CMU, Fall 200 Some figures from Steve Seitz, Steve Palmer, Paul Debevec, and Gonzalez et al.
44

Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Capturing Light… in man and machine

15-463: Computational PhotographyAlexei Efros, CMU, Fall 2006Some figures from Steve Seitz, Steve

Palmer, Paul Debevec, and Gonzalez et al.

Page 2: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Image Formation

Digital Camera

The Eye

Film

Page 3: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Digital camera

A digital camera replaces film with a sensor array• Each cell in the array is light-sensitive diode that converts photons to electrons• Two common types

– Charge Coupled Device (CCD) – CMOS

• http://electronics.howstuffworks.com/digital-camera.htm

Page 4: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Sensor Array

CMOS sensor

Page 5: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Sampling and Quantization

Page 6: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Interlace vs. progressive scan

http://www.axis.com/products/video/camera/progressive_scan.htm

Page 7: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Progressive scan

http://www.axis.com/products/video/camera/progressive_scan.htm

Page 8: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Interlace

http://www.axis.com/products/video/camera/progressive_scan.htm

Page 9: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

The Eye

The human eye is a camera!• Iris - colored annulus with radial muscles

• Pupil - the hole (aperture) whose size is controlled by the iris

• What’s the “film”?– photoreceptor cells (rods and cones) in the retina

Page 10: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

The Retina

Cross-section of eye

Ganglion cell layer

Bipolar cell layer

Receptor layer

Pigmentedepithelium

Ganglion axons

Cross section of retina

Page 11: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Retina up-close

Light

Page 12: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

© Stephen E. Palmer, 2002

Cones cone-shaped less sensitive operate in high light color vision

Two types of light-sensitive receptors

cone

rod

Rods rod-shaped highly sensitive operate at night gray-scale vision

Page 13: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Rod / Cone sensitivity

The famous sock-matching problem…

Page 14: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

© Stephen E. Palmer, 2002

Distribution of Rods and Cones.

0

150,000

100,000

50,000

020 40 60 8020406080

Visual Angle (degrees from fovea)

Rods

Cones Cones

Rods

FoveaBlindSpot

# R

ecep

tors

/mm

2

Night Sky: why are there more stars off-center?

Page 15: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Electromagnetic Spectrum

http://www.yorku.ca/eye/photopik.htm

Human Luminance Sensitivity Function

Page 16: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Why do we see light of these wavelengths?

© Stephen E. Palmer, 2002

.

0 1000 2000 3000

En

erg

y

Wavelength (nm)

400 700

700 C

2000 C

5000 C

10000 C

VisibleRegion

…because that’s where theSun radiates EM energy

Visible Light

Page 17: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

The Physics of Light

Any patch of light can be completely describedphysically by its spectrum: the number of photons (per time unit) at each wavelength 400 - 700 nm.

400 500 600 700

Wavelength (nm.)

# Photons(per ms.)

© Stephen E. Palmer, 2002

Page 18: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

The Physics of Light

.

# P

ho

ton

s

D. Normal Daylight

Wavelength (nm.)

B. Gallium Phosphide Crystal

400 500 600 700

# P

ho

ton

s

Wavelength (nm.)

A. Ruby Laser

400 500 600 700

400 500 600 700

# P

ho

ton

s

C. Tungsten Lightbulb

400 500 600 700

# P

ho

ton

s

Some examples of the spectra of light sources

© Stephen E. Palmer, 2002

Page 19: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

The Physics of Light

Some examples of the reflectance spectra of surfaces

Wavelength (nm)

% P

hoto

ns R

efle

cted

Red

400 700

Yellow

400 700

Blue

400 700

Purple

400 700

© Stephen E. Palmer, 2002

Page 20: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

The Psychophysical Correspondence

There is no simple functional description for the perceivedcolor of all lights under all viewing conditions, but …...

A helpful constraint: Consider only physical spectra with normal distributions

area

Wavelength (nm.)

# Photons

400 700500 600

mean

variance

© Stephen E. Palmer, 2002

Page 21: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

The Psychophysical Correspondence

Mean Hue

yellowgreenblue

# P

hoto

ns

Wavelength

© Stephen E. Palmer, 2002

Page 22: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

The Psychophysical Correspondence

Variance Saturation

Wavelength

high

medium

low

hi.

med.

low# P

hoto

ns

© Stephen E. Palmer, 2002

Page 23: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

The Psychophysical Correspondence

Area Brightness#

Pho

tons

Wavelength

B. Area Lightness

bright

dark

© Stephen E. Palmer, 2002

Page 24: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

© Stephen E. Palmer, 2002

.

400 450 500 550 600 650

RE

LAT

IVE

AB

SO

RB

AN

CE

(%

)

WAVELENGTH (nm.)

100

50

440

S

530 560 nm.

M L

Three kinds of cones:

Physiology of Color Vision

• Why are M and L cones so close?• Are are there 3?

Page 25: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

More Spectra

metamers

Page 26: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Color Sensing in Camera (RGB)

3-chip vs. 1-chip: quality vs. cost

Why more green?

http://www.cooldihttp://www.cooldictionary.com/words/Bayer-filter.wikipediationary.com/words/Bayer-filter.wikipedia

Why 3 colors?

Page 27: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Practical Color Sensing: Bayer Grid

Estimate RGBat ‘G’ cels from neighboring values

http://www.cooldictionary.com/words/Bayer-filter.wikipedia

Page 28: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

RGB color space

RGB cube• Easy for devices• But not perceptual• Where do the grays live?• Where is hue and saturation?

Page 29: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

HSV

Hue, Saturation, Value (Intensity)• RGB cube on its vertex

Decouples the three components (a bit)Use rgb2hsv() and hsv2rgb() in Matlab

Page 30: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Programming Assignment #1

• How to compare R,G,B channels?• No right answer

• Sum of Squared Differences (SSD):

• Normalized Correlation (NCC):

Page 31: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Image Pyramids (preview)

Known as a Gaussian Pyramid [Burt and Adelson, 1983]• In computer graphics, a mip map [Williams, 1983]• A precursor to wavelet transform

Page 32: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

White Balance

White World / Gray World assumptions

Page 33: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Image Formation

f(x,y) = reflectance(x,y) * illumination(x,y)Reflectance in [0,1], illumination in [0,inf]

Page 34: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Problem: Dynamic Range

15001500

11

25,00025,000

400,000400,000

2,000,000,0002,000,000,000

The real world isHigh dynamic range

Page 35: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

pixel (312, 284) = 42pixel (312, 284) = 42

ImageImage

42 photos?42 photos?

Is Camera a photometer?

Page 36: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Long Exposure

10-6 106

10-6 106

Real world

Picture

0 to 255

High dynamic range

Page 37: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Short Exposure

10-6 106

10-6 106

Real world

Picture

0 to 255

High dynamic range

Page 38: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

scenesceneradianceradiance

(W/sr/m )(W/sr/m )

scenesceneradianceradiance

(W/sr/m )(W/sr/m )

sensorsensorirradianceirradiance

sensorsensorirradianceirradiance

sensorsensorexposureexposuresensorsensor

exposureexposure

LensLensLensLens ShutterShutterShutterShutter

2222

tt

analogvoltagesanalog

voltagesdigitalvaluesdigitalvalues

pixelvaluespixel

values

CCDCCD ADCADC RemappingRemapping

Image Acquisition Pipeline

Camera is NOT a photometer!

Page 39: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Varying Exposure

Page 40: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

What does the eye sees?

The eye has a huge dynamic rangeDo we see a true radiance map?

Page 41: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Eye is not a photometer!

"Every light is a shade, compared to the higher lights, till you come to the sun; and every shade is a light, compared to the deeper shades, till you come to the night."

— John Ruskin, 1879

Page 42: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Cornsweet Illusion

Page 43: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Campbell-Robson contrast sensitivity curveCampbell-Robson contrast sensitivity curve

Sine wave

Page 44: Capturing Light… in man and machine 15-463: Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,

Metamers

Eye is sensitive to changes(more on this later…)