Top Banner
66

What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Dec 22, 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: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.
Page 2: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.
Page 3: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

What is wrong with this picture?

Page 4: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Recap from Lecture 2

Pinhole camera model

Perspective projections

Focal length and field of view

Remember to use your textbook:

Chapter 2 of Szeliski

Page 5: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Slide Credit: Saverese

Recap - Projection matrix

XtRKx x: Image Coordinates: (u,v,1)K: Intrinsic Matrix (3x3)R: Rotation (3x3) t: Translation (3x1)X: World Coordinates: (X,Y,Z,1)

Ow

iw

kw

jwR,T

Page 6: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Slide Credit: Saverese

Recap - Projection matrix

XtRKx x: Image Coordinates: (u,v,1)K: Intrinsic Matrix (3x3)R: Rotation (3x3) t: Translation (3x1)X: World Coordinates: (X,Y,Z,1)

Page 7: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Adding a lens

A lens focuses light onto the film• There is a specific distance at which objects are “in focus”

– other points project to a “circle of confusion” in the image

• Changing the shape of the lens changes this distance

“circle of confusion”

Page 8: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Focal length, aperture, depth of field

A lens focuses parallel rays onto a single focal point• focal point at a distance f beyond the plane of the

lens• Aperture of diameter D restricts the range of rays

focal point

F

optical center(Center Of Projection)

Slide source: Seitz

Page 9: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Depth of field

Changing the aperture size or focal length affects depth of field

f / 5.6

f / 32

Flower images from Wikipedia http://en.wikipedia.org/wiki/Depth_of_field

Slide source: Seitz

Page 10: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Shrinking the aperture

Why not make the aperture as small as possible?• Less light gets through• Diffraction effects

Slide by Steve Seitz

Page 11: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Shrinking the aperture

Slide by Steve Seitz

Page 12: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Capturing Light… in man and machine

CS 143: Computer VisionJames Hays, Brown, Fall 2013

Many slides by Alexei A. Efros

Page 13: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Image Formation

Digital Camera

The Eye

Film

Page 14: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

A photon’s life choices• Absorption• Diffusion• Reflection• Transparency• Refraction• Fluorescence• Subsurface scattering• Phosphorescence• Interreflection

λ

light source

?

Page 15: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

A photon’s life choices• Absorption• Diffusion• Reflection• Transparency• Refraction• Fluorescence• Subsurface scattering• Phosphorescence• Interreflection

λ

light source

Page 16: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

A photon’s life choices• Absorption• Diffuse Reflection• Reflection• Transparency• Refraction• Fluorescence• Subsurface scattering• Phosphorescence• Interreflection

λ

light source

Page 17: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

A photon’s life choices• Absorption• Diffusion• Specular Reflection• Transparency• Refraction• Fluorescence• Subsurface scattering• Phosphorescence• Interreflection

λ

light source

Page 18: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

A photon’s life choices• Absorption• Diffusion• Reflection• Transparency• Refraction• Fluorescence• Subsurface scattering• Phosphorescence• Interreflection

λ

light source

Page 19: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

A photon’s life choices• Absorption• Diffusion• Reflection• Transparency• Refraction• Fluorescence• Subsurface scattering• Phosphorescence• Interreflection

λ

light source

Page 20: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

A photon’s life choices• Absorption• Diffusion• Reflection• Transparency• Refraction• Fluorescence• Subsurface scattering• Phosphorescence• Interreflection

λ1

light source

λ2

Page 21: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

A photon’s life choices• Absorption• Diffusion• Reflection• Transparency• Refraction• Fluorescence• Subsurface scattering• Phosphorescence• Interreflection

λ

light source

Page 22: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

A photon’s life choices• Absorption• Diffusion• Reflection• Transparency• Refraction• Fluorescence• Subsurface scattering• Phosphorescence• Interreflection

t=1

light source

t=n

Page 23: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

A photon’s life choices• Absorption• Diffusion• Reflection• Transparency• Refraction• Fluorescence• Subsurface scattering• Phosphorescence• Interreflection

λ

light source

(Specular Interreflection)

Page 24: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Lambertian Reflectance• In computer vision, surfaces are often

assumed to be ideal diffuse reflectors with know dependence on viewing direction.

Page 25: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

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

Slide by Steve Seitz

Page 26: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Sensor Array

CMOS sensor

Page 27: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Sampling and Quantization

Page 28: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Interlace vs. progressive scan

http://www.axis.com/products/video/camera/progressive_scan.htm Slide by Steve Seitz

Page 29: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Progressive scan

http://www.axis.com/products/video/camera/progressive_scan.htm Slide by Steve Seitz

Page 30: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Interlace

http://www.axis.com/products/video/camera/progressive_scan.htm Slide by Steve Seitz

Page 31: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Rolling Shutter

Page 32: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

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

Slide by Steve Seitz

Page 33: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

The Retina

Cross-section of eye

Ganglion cell layer

Bipolar cell layer

Receptor layer

Pigmentedepithelium

Ganglion axons

Cross section of retina

Page 34: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

What humans don’t have: tapetum lucidum

Page 35: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

© 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 36: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Rod / Cone sensitivity

Page 37: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

© 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?Averted vision: http://en.wikipedia.org/wiki/Averted_vision

Page 38: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Eye Movements

SaccadesCan be consciously controlled. Related to perceptual attention.

200ms to initiation, 20 to 200ms to carry out. Large amplitude.

MicrosaccadesInvoluntary. Smaller amplitude. Especially evident during prolonged fixation. Function debated.

Ocular microtremor (OMT)involuntary. high frequency (up to 80Hz), small amplitude.

Page 39: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Electromagnetic Spectrum

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

Human Luminance Sensitivity Function

Page 40: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

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 41: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

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 42: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

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 43: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

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 44: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

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 45: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

The Psychophysical Correspondence

Mean Hue

yellowgreenblue

# P

hoto

ns

Wavelength

© Stephen E. Palmer, 2002

Page 46: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

The Psychophysical Correspondence

Variance Saturation

Wavelength

high

medium

low

hi.

med.

low# P

hoto

ns

© Stephen E. Palmer, 2002

Page 47: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

The Psychophysical Correspondence

Area Brightness#

Pho

tons

Wavelength

B. Area Lightness

bright

dark

© Stephen E. Palmer, 2002

Page 48: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

© 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?• Why are there 3?

Page 49: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Impossible Colors

Can you make the cones respond in ways that typical light spectra never would?

http://en.wikipedia.org/wiki/Impossible_colors

Page 50: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Tetrachromatism

Most birds, and many other animals, have cones for ultraviolet light.

Some humans, mostly female, seem to have slight tetrachromatism.

Bird cone responses

Page 51: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

More Spectra

metamers

Page 52: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Practical Color Sensing: Bayer Grid

Estimate RGBat ‘G’ cells from neighboring values

Slide by Steve Seitz

Page 53: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Color ImageR

G

B

Page 54: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Images in Matlab• Images represented as a matrix• Suppose we have a NxM RGB image called “im”

– im(1,1,1) = top-left pixel value in R-channel– im(y, x, b) = y pixels down, x pixels to right in the bth channel– im(N, M, 3) = bottom-right pixel in B-channel

• imread(filename) returns a uint8 image (values 0 to 255)– Convert to double format (values 0 to 1) with im2double

0.92 0.93 0.94 0.97 0.62 0.37 0.85 0.97 0.93 0.92 0.990.95 0.89 0.82 0.89 0.56 0.31 0.75 0.92 0.81 0.95 0.910.89 0.72 0.51 0.55 0.51 0.42 0.57 0.41 0.49 0.91 0.920.96 0.95 0.88 0.94 0.56 0.46 0.91 0.87 0.90 0.97 0.950.71 0.81 0.81 0.87 0.57 0.37 0.80 0.88 0.89 0.79 0.850.49 0.62 0.60 0.58 0.50 0.60 0.58 0.50 0.61 0.45 0.330.86 0.84 0.74 0.58 0.51 0.39 0.73 0.92 0.91 0.49 0.740.96 0.67 0.54 0.85 0.48 0.37 0.88 0.90 0.94 0.82 0.930.69 0.49 0.56 0.66 0.43 0.42 0.77 0.73 0.71 0.90 0.990.79 0.73 0.90 0.67 0.33 0.61 0.69 0.79 0.73 0.93 0.970.91 0.94 0.89 0.49 0.41 0.78 0.78 0.77 0.89 0.99 0.93

0.92 0.93 0.94 0.97 0.62 0.37 0.85 0.97 0.93 0.92 0.990.95 0.89 0.82 0.89 0.56 0.31 0.75 0.92 0.81 0.95 0.910.89 0.72 0.51 0.55 0.51 0.42 0.57 0.41 0.49 0.91 0.920.96 0.95 0.88 0.94 0.56 0.46 0.91 0.87 0.90 0.97 0.950.71 0.81 0.81 0.87 0.57 0.37 0.80 0.88 0.89 0.79 0.850.49 0.62 0.60 0.58 0.50 0.60 0.58 0.50 0.61 0.45 0.330.86 0.84 0.74 0.58 0.51 0.39 0.73 0.92 0.91 0.49 0.740.96 0.67 0.54 0.85 0.48 0.37 0.88 0.90 0.94 0.82 0.930.69 0.49 0.56 0.66 0.43 0.42 0.77 0.73 0.71 0.90 0.990.79 0.73 0.90 0.67 0.33 0.61 0.69 0.79 0.73 0.93 0.970.91 0.94 0.89 0.49 0.41 0.78 0.78 0.77 0.89 0.99 0.93

0.92 0.93 0.94 0.97 0.62 0.37 0.85 0.97 0.93 0.92 0.990.95 0.89 0.82 0.89 0.56 0.31 0.75 0.92 0.81 0.95 0.910.89 0.72 0.51 0.55 0.51 0.42 0.57 0.41 0.49 0.91 0.920.96 0.95 0.88 0.94 0.56 0.46 0.91 0.87 0.90 0.97 0.950.71 0.81 0.81 0.87 0.57 0.37 0.80 0.88 0.89 0.79 0.850.49 0.62 0.60 0.58 0.50 0.60 0.58 0.50 0.61 0.45 0.330.86 0.84 0.74 0.58 0.51 0.39 0.73 0.92 0.91 0.49 0.740.96 0.67 0.54 0.85 0.48 0.37 0.88 0.90 0.94 0.82 0.930.69 0.49 0.56 0.66 0.43 0.42 0.77 0.73 0.71 0.90 0.990.79 0.73 0.90 0.67 0.33 0.61 0.69 0.79 0.73 0.93 0.970.91 0.94 0.89 0.49 0.41 0.78 0.78 0.77 0.89 0.99 0.93

R

GB

rowcolumn

Page 55: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Color spaces

How can we represent color?

http://en.wikipedia.org/wiki/File:RGB_illumination.jpg

Page 56: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Color spaces: RGB

0,1,0

0,0,1

1,0,0

Image from: http://en.wikipedia.org/wiki/File:RGB_color_solid_cube.png

Some drawbacks• Strongly correlated channels• Non-perceptual

Default color space

R(G=0,B=0)

G(R=0,B=0)

B(R=0,G=0)

Page 57: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Color spaces: HSV

Intuitive color space

H(S=1,V=1)

S(H=1,V=1)

V(H=1,S=0)

Page 58: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Color spaces: YCbCr

Y(Cb=0.5,Cr=0.5)

Cb(Y=0.5,Cr=0.5)

Cr(Y=0.5,Cb=05)

Y=0 Y=0.5

Y=1Cb

Cr

Fast to compute, good for compression, used by TV

Page 59: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Color spaces: L*a*b*

“Perceptually uniform”* color space

L(a=0,b=0)

a(L=65,b=0)

b(L=65,a=0)

Page 60: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

If you had to choose, would you rather go without luminance or chrominance?

Page 61: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

If you had to choose, would you rather go without luminance or chrominance?

Page 62: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Most information in intensity

Only color shown – constant intensity

Page 63: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Most information in intensity

Only intensity shown – constant color

Page 64: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Most information in intensity

Original image

Page 65: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Back to grayscale intensity0.92 0.93 0.94 0.97 0.62 0.37 0.85 0.97 0.93 0.92 0.990.95 0.89 0.82 0.89 0.56 0.31 0.75 0.92 0.81 0.95 0.910.89 0.72 0.51 0.55 0.51 0.42 0.57 0.41 0.49 0.91 0.920.96 0.95 0.88 0.94 0.56 0.46 0.91 0.87 0.90 0.97 0.950.71 0.81 0.81 0.87 0.57 0.37 0.80 0.88 0.89 0.79 0.850.49 0.62 0.60 0.58 0.50 0.60 0.58 0.50 0.61 0.45 0.330.86 0.84 0.74 0.58 0.51 0.39 0.73 0.92 0.91 0.49 0.740.96 0.67 0.54 0.85 0.48 0.37 0.88 0.90 0.94 0.82 0.930.69 0.49 0.56 0.66 0.43 0.42 0.77 0.73 0.71 0.90 0.990.79 0.73 0.90 0.67 0.33 0.61 0.69 0.79 0.73 0.93 0.970.91 0.94 0.89 0.49 0.41 0.78 0.78 0.77 0.89 0.99 0.93

Page 66: What is wrong with this picture? Recap from Lecture 2 Pinhole camera model Perspective projections Focal length and field of view Remember to use your.

Next Lecture

Image Filtering - the core idea for project 1, and all of image processing.

Project 1 is much simpler than the remaining projects.