91
Pinhole cameras 15-463, 15-663, 15-862 Computational Photography Fall 2017, Lecture 14 http://graphics.cs.cmu.edu/courses/15-463

Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole cameras

15-463, 15-663, 15-862Computational Photography

Fall 2017, Lecture 14http://graphics.cs.cmu.edu/courses/15-463

Page 2: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Course announcements

• Homework 4 is out.- Due October 26th.- Bilateral filter will take a very long time to run.- Make sure to sign up for a camera and a team.- Drop by Yannis’ office to pick up cameras any time.

• Yannis has extra office hours on Wednesday, 2-4pm.- You can come to ask questions about HW4 (e.g., “how do I use a DSLR camera?”).- You can come to ask questions about final project.

• Project ideas are due on Piazza on Friday 20th.

Page 3: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Overview of today’s lecture

• Some motivational imaging experiments.

• Pinhole camera.

• Accidental pinholes.

• Camera matrix.

• Perspective.

• Orthographic camera.

Page 4: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Slide credits

Most of these slides were adapted from:

• Kris Kitani (15-463, Fall 2016).

Some slides inspired from:

• Fredo Durand (MIT).

Page 5: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Some motivational imaging experiments

Page 6: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Let’s say we have a sensor…

digital sensor (CCD or CMOS)

Page 7: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

… and an object we like to photograph

digital sensor (CCD or CMOS)

real-world object

What would an image taken like this look like?

Page 8: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Bare-sensor imaging

digital sensor (CCD or CMOS)

real-world object

Page 9: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Bare-sensor imaging

digital sensor (CCD or CMOS)

real-world object

Page 10: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Bare-sensor imaging

digital sensor (CCD or CMOS)

real-world object

Page 11: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Bare-sensor imaging

digital sensor (CCD or CMOS)

real-world object

All scene points contribute to all sensor pixelsWhat does the image on the

sensor look like?

Page 12: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Bare-sensor imaging

All scene points contribute to all sensor pixels

Page 13: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Let’s add something to this scene

digital sensor (CCD or CMOS)

real-world object

barrier (diaphragm)

pinhole (aperture)

What would an image taken like this look like?

Page 14: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole imaging

digital sensor (CCD or CMOS)

real-world object

most rays are blocked

one makes it through

Page 15: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole imaging

digital sensor (CCD or CMOS)

real-world object

most rays are blocked

one makes it through

Page 16: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole imaging

digital sensor (CCD or CMOS)

real-world object

Each scene point contributes to only one sensor pixelWhat does the image on the

sensor look like?

Page 17: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole imaging

real-world object

copy of real-world object (inverted and scaled)

Page 18: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole camera

Page 19: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole camera a.k.a. camera obscura

Page 20: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Chinese philosopher Mozi (470 to 390 BC)

First mention … First camera …

Greek philosopher Aristotle(384 to 322 BC)

Pinhole camera a.k.a. camera obscura

Page 21: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole camera terms

digital sensor (CCD or CMOS)

real-world object

barrier (diaphragm)

pinhole (aperture)

Page 22: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole camera terms

digital sensor (CCD or CMOS)

real-world object

barrier (diaphragm)

pinhole (aperture)

image plane

camera center (center of projection)

Page 23: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Focal length

real-world object

focal length f

Page 24: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Focal length

real-world object

focal length 0.5 f

What happens as we change the focal length?

Page 25: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Focal length

real-world object

focal length 0.5 f

What happens as we change the focal length?

Page 26: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Focal length

real-world object

focal length 0.5 f

What happens as we change the focal length? object projection is half the size

Page 27: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole size

real-world object

pinhole diameter

Ideal pinhole has infinitesimally small size• In practice that is impossible.

Page 28: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole size

real-world object

pinhole diameter

What happens as we change the pinhole diameter?

Page 29: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole size

real-world object

What happens as we change the pinhole diameter?

Page 30: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole size

real-world object

What happens as we change the pinhole diameter?

Page 31: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole size

real-world object

What happens as we change the pinhole diameter? object projection becomes blurrier

Page 32: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Pinhole size

real-world object

What happens as we change the pinhole diameter?

Will the image keep getting sharper the smaller we make the pinhole?

pinhole diameter

Page 33: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Diffraction limitA consequence of the wave nature of light

What do geometric optics predict will happen?

What do wave optics predict will happen?

Page 34: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Diffraction limitA consequence of the wave nature of light

What do geometric optics predict will happen?

What do wave optics predict will happen?

Page 35: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Diffraction limitA consequence of the wave nature of light

What do geometric optics predict will happen?

What do wave optics predict will happen?

Page 36: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Diffraction limitDiffraction pattern = Fourier transform of the pinhole.• Smaller pinhole means bigger Fourier spectrum.• Smaller pinhole means more diffraction.

small pinhole

wide diffraction

pattern

narrow diffraction

pattern

large pinhole

Page 37: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

What about light efficiency?

real-world object

pinhole diameter

focal length f• What is the effect of doubling the pinhole diameter? • What is the effect of doubling the focal length?

Page 38: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

What about light efficiency?

real-world object

pinhole diameter

focal length f• 2x pinhole diameter → 4x light• 2x focal length → ¼x light

Page 39: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Some terminology notes

real-world object

pinhole diameter

focal length fThe “f-number” is the ratio: focal length / pinhole diameter

A “stop” is a change in camera settings that changes amount of light by a factor of 2

Page 40: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Can we do better than pinhole imaging?

digital sensor (CCD or CMOS)

real-world object

barrier (diaphragm)

pinhole (aperture)

Page 41: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Accidental pinholes

Page 42: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office
Page 43: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office
Page 44: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

What does this image say about the world outside?

Page 45: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Accidental pinhole camera

Page 46: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Accidental pinhole camera

window is an aperture

projected pattern on the wall window with smaller gap

upside down view outside window

Page 47: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Accidental pinspeck camera

Page 48: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Camera matrix

Page 49: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

The camera as a coordinate transformation

A camera is a mapping from:

the 3D world

to:

a 2D image

3D object

2D image2D image

2D to 2D transform(image warping)

3D to 2D transform(camera)

Page 50: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

The camera as a coordinate transformation

cameramatrix

3D world point

2D image point

What are the dimensions of each variable?

A camera is a mapping from:

the 3D world

to:

a 2D image

homogeneous coordinates

Page 51: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

The camera as a coordinate transformation

homogeneousworld coordinates

4 x 1

homogeneousimage coordinates

3 x 1

cameramatrix3 x 4

Page 52: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

The pinhole camera

real-world object

camera center

image plane

focal length f

Page 53: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

The (rearranged) pinhole camera

real-world object

image plane

focal length fcamera center

Page 54: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

The (rearranged) pinhole camera

camera center

image plane

principal axis

What is the equation for image coordinate x in terms of X?

Page 55: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

The 2D view of the (rearranged) pinhole camera

What is the equation for image coordinate x in terms of X?

image plane

Page 56: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

The 2D view of the (rearranged) pinhole camera

image plane

Page 57: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

The (rearranged) pinhole camera

camera center

image plane

principal axis

What is the camera matrix P for a pinhole camera?

Page 58: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

The pinhole camera matrix

Relationship from similar triangles:

General camera model:

What does the pinhole camera projection look like?

Page 59: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

The pinhole camera matrix

Relationship from similar triangles:

General camera model:

What does the pinhole camera projection look like?

Page 60: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Generalizing the camera matrix

How does the camera matrix change?

Camera origin and image origin might be different

camera coordinate system

image coordinate system

image plane

Page 61: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Generalizing the camera matrix

How does the camera matrix change?

Camera origin and image origin might be different

camera coordinate system

image coordinate system

image plane

Page 62: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Camera matrix decomposition

We can decompose the camera matrix like this:

calibration matrix

intrinsic (3 x 3) extrinsic (3 x 4)

Page 63: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Extrinsic camera parameters

We can decompose the camera matrix like this:

intrinsic (3 x 3) extrinsic (3 x 4)

world coordinate system

camera coordinate system

What if world and camera coordinate systems are different?

assumes camera and world share the same

coordinate system

Page 64: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Extrinsic camera parameters

We can decompose the camera matrix like this:

intrinsic (3 x 3) extrinsic (3 x 4)

world coordinate system

camera coordinate system

What if world and camera coordinate systems are different?

assumes camera and world share the same

coordinate system

3D rotation and translation

Page 65: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Extrinsic camera parameters

We can decompose the camera matrix like this:

intrinsic (3 x 3) extrinsic (3 x 4)

What if world and camera coordinate systems are different?

assumes camera and world share the same

coordinate system

Page 66: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Extrinsic camera parameters

We can decompose the camera matrix like this:

intrinsic (3 x 3) extrinsic (3 x 4)

What if world and camera coordinate systems are different?

Page 67: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

General pinhole camera matrix

We can decompose the camera matrix like this:

Another way to write the mapping:

where

(translate first then rotate)

(rotate first then translate)

Page 68: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Recap

What is the size and meaning of each term in the camera matrix?

? ? ? ?

Page 69: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Recap

What is the size and meaning of each term in the camera matrix?

3x3 intrinsics

? ? ?

Page 70: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Recap

What is the size and meaning of each term in the camera matrix?

3x3 intrinsics

3x3 3D rotation

? ?

Page 71: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Recap

What is the size and meaning of each term in the camera matrix?

3x3 intrinsics

3x3 3D rotation

3x3 identity

?

Page 72: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Recap

What is the size and meaning of each term in the camera matrix?

3x3 intrinsics

3x3 3D rotation

3x3 identity

3x1 3D translation

Page 73: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Perspective

Page 74: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Forced perspective

Page 75: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

The Ames room illusion

Page 76: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

The Ames room illusion

Page 77: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

The 2D view of the (rearranged) pinhole camera

image plane

magnification changes with depth

Page 78: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Magnification depends on depth

real-world object

What happens as we change the focal length?

depth Z

depth 2 Z

Page 79: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Magnification depends on focal length

real-world object

focal length f

focal length 2 f

Page 80: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

What if…

real-world object

focal length f

focal length 2 f1. Set focal length to halfdepth 2 Z

Page 81: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

What if…

real-world object

1. Set focal length to half2. Set depth to half

depth Z focal length f

Is this the same image as the one I had at focal

length 2f and distance 2Z?

Page 82: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Perspective distortion

long focal length short focal lengthmid focal length

Page 83: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Perspective distortion

Page 84: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

What is the best focal length for portraits?That’s like asking which is better, vi or emacs…

long focal length short focal lengthmid focal length

Page 85: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Vertigo effectNamed after Alfred Hitchcock’s movie• also known as “dolly zoom”

Page 86: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Vertigo effect

How would you create this effect?

Page 87: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Orthographic camera

Page 88: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

What if…

real-world object

depth Z focal length f

Continue increasing Z and f while maintaining same

magnification?

𝑓 → ∞ and𝑓

𝑍= constant

Page 89: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Orthographic vs pinhole camera

image plane

magnification changes with depth

magnification does not change with depth

Page 90: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

Orthographic vs pinhole camera

General pinhole camera:

General orthographic camera:

Bottom row is always [0 0 0 1]

Projective camera

Affine camera

We also call these cameras:

What is the rationale behind these names?

Page 91: Introduction and course overviewgraphics.cs.cmu.edu/courses/15-463/2017_fall/lectures/lecture14.pdf- Drop by Yannis’ office to pick up cameras any time. • Yannis has extra office

References

Basic reading:• Szeliski textbook, Section 2.1.5.

Additional reading:• Hartley and Zisserman, “Multiple View Geometry in Computer Vision,” Cambridge University Press 2004.

chapter 6 of this book is a very thorough treatment of camera models.• Goodman, “Introduction to Fourier Optics,” W.H. Freeman 2004.

the standard reference on Fourier optics, chapter 4 covers aperture diffraction.• Torralba and Freeman, “Accidental Pinhole and Pinspeck Cameras,” CVPR 2012.

the eponymous paper discussed in the slides.