0% found this document useful (0 votes)
27 views

01 Camera

Good Course on First Principle of Computer Vision--Lecture1

Uploaded by

jingw497
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

01 Camera

Good Course on First Principle of Computer Vision--Lecture1

Uploaded by

jingw497
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 76

1.

Camera

1
Image Formation

• Let’s design a camera


―Idea 1: put a piece of film in front of an object
―Do we get a reasonable image?

2
Pinhole Camera

• Add a barrier to select rays


―The opening known as the aperture
―How does this transform the image?

3
Pinhole Camera

• First Idea: Mo‐Ti, China


(470‐390 BC)
• First build: Al Hacen, Iraq/Egypt
(965‐1039 AD)
• Drawing aid for artists:
described by Leonardo da Vinci
(1452‐1519)

4
Home‐made Pinhole Camera

Why so
blurry? http://www.pauldebevec.com/Pinhole/

5
Shrinking the Aperture

• Why not make the aperture as small as possible?


―Less light gets through
―Diffraction effects

6
Shrinking the Aperture

7
Make Your Own Pinhole Camera at Home

• Step by step instructions at


http://graphics.cs.cmu.edu/courses/15‐
463/2015_fall/hw/proj5‐camera/

• Stereo pinhole camera can be built too (by James Hays)


http://cs.brown.edu/courses/csci1290/2011/asgn/proj4/

8
photos by Abelardo Morell

Sunrise of lower Manhattan, 2022


https://www.abelardomorell.net/selectedworks/camera‐obscura

9
Questions?

10
The reason for lenses

11
The reason for lenses
• Focus all lights shed on the lens to a single point
• Much more energy efficient than a pinhole

12
Problem with lenses

• 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

13
Thin Lenses

• Thin lens equation:

―Any object point satisfying this equation is in focus


―Adjusting to choose the object in focus

14
Depth of Field
• Only points at certain distance are in focus

15
Aperture Controls Depth of Field

• Changing the aperture size affects depth of field


―smaller aperture increases the range in which the object is approximately in focus
―But small aperture reduces amount of light – need to increase exposure

16
F‐number: focal length / aperture diameter
• Aperture size is controlled by the F‐number

17
Varying the aperture

http://beginnersphotographyblog.com/842/how-changing-aperture-affects-depth-of-field/

18
Exposure: shutter speed vs. aperture

19
Shutter Speed

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

20
Questions?

21
Field of View (Zoom)

22
Field of View (Zoom)

23
FOV depends on Focal Length

Smaller FOV = larger Focal Length

24
Expensive toys…

25
From Zisserman & Hartley

26
Field of View / Focal Length

27
Field of View / Focal Length

28
Lens Flaws: Chromatic Aberration
• Dispersion: wavelength‐dependent refractive index
―(enables prism to spread white light beam into rainbow)
• Modifies ray‐bending and lens focal length:

• Color fringes near edges of image


• Corrections: add ‘doublet’ lens of flint glass, etc.

29
Chromatic Aberration

Slide by Carl Doersch

30
Chromatic Aberration

31
Radial Distortion

32
Questions?

33
Accidental Pinhole Camera

What is this??
Some kind of shadow??

(a) an open window in a room (b) a picture of the wall opposite the window

Accidental pinhole and pinspeck cameras: revealing the scene outside the picture;
Antonio Torralba and William T. Freeman, CVPR 2012
34
Accidental Pinhole Camera

the same wall when the window is outside of the window


closed, leaving only a small hole

35
Accidental Pinhole Camera

A blurry picture of outside!

How can we obtain a clearer picture??


 How to obtain an image with smaller pinhole?

36
Accidental Pinhole Camera

What could be a
problem when
computing the
difference image??

The difference image is the image captured by


a camera with the occluder as a pinhole!

37
Accidental Pinhole Camera

38
Lensless Camera
(with programmable aperture)

Replace the pinhole with a coded aperture.


The aperture pattern (a LCD) is programmable

Lensless Imaging with A Controllable Aperture, Assaf Zomet and Shree Nayar,
CVPR 2006

39
Lensless Camera
(with programmable aperture)

40
Lensless Camera
(with programmable aperture)

41
Lensless Camera
(with programmable aperture)

Conventional camera This novel camera

Split field of view

42
Lensless Camera
(with programmable aperture)
optical convolution

Put a coded pattern at the pinhole


The captured image is the convolution of the pattern
with the original image (optical convolution!)
43
Lensless Camera
(with programmable aperture)
Face detection by convolution

44
Lensless Camera
(with programmable aperture)

45
Lensless Camera
(with programmable aperture)
Conventional camera This novel camera

See original paper for more details

46
Questions?

47
Coded Exposure

Input Photo Recovered Result

Coded Exposure Photography: Motion Deblurring using Fluttered Shutter,


Ramesh Raskar, Amit Agrawal, Jack Tumblin,
SIGGRAPH 2006
48
Traditional Camera

Shutter is OPEN

Slides from Ramesh Raskar


Coded Aperture

Flutter Shutter

Slides from Ramesh Raskar


• A BBC 2014 article: Harold Edgerton – the man who frozes time

inspired by Harold Edgerton,


a MIT EE professor and inventor of electronic flash
51
a DisplayTech ferro-electric shutter

Slides from Ramesh Raskar


Lab Setup

Slides from Ramesh Raskar


Blurring
Sync Function
==
Convolution

Traditional Camera: Box Filter


Slides from Ramesh Raskar
Preserves High
Frequencies!!!

Flutter Shutter: Coded Filter


Slides from Ramesh Raskar
Short Exposure Long Exposure Coded Exposure

Our result

Matlab Lucy Ground Truth

Slides from Ramesh Raskar


License Plate Retrieval
Slides from Ramesh Raskar
Coded Aperture

Image and depth from a conventional camera with a coded aperture,


Anat Levin, Rob Fergus, Frédo Durand, William Freeman
SIGGRAPH 2007.

Dappled photography: Mask enhanced cameras for heterodyned light fields and coded
aperture refocusing
Ashok Veeraraghavan, Ramesh Raskar, Amit Agrawal, Ankit Mohan, Jack Tumblin
SIGGRAPH 2007
Lens and defocus

Image of a point
Lens’ aperture
light source

Camera
Lens
sensor

Point
spread
function

Focal plane
Slides from Anat Levin
Lens and defocus

Image of a
Lens’ aperture defocused point
light source

Camera
Object Lens
sensor

Point
spread
function

Focal plane
Slides from Anat Levin
Lens and defocus

Image of a
Lens’ aperture defocused point
light source

Camera
Object Lens
sensor

Point
spread
function

Focal plane
Slides from Anat Levin
Lens and defocus

Image of a
Lens’ aperture defocused point
light source

Camera
Object Lens
sensor

Point
spread
function

Focal plane
Slides from Anat Levin
Depth & Defocus
• The amount of blur depends on distance

measured PSFs at different depths input defocused image

63
Depth & Defocus
• Defocus is local convolution with a depth‐dependent kernel

depth 3

depth 2
input defocused image
depth 1

64
Slides from Anat Levin
Slides from Anat Levin
Solution: lens with occluder

Image of a
Aperture pattern defocused point
light source

Camera
Object Lens with coded
sensor
aperture

Point
spread
function

Focal plane
Slides from Anat Levin
Solution: lens with occluder

Image of a
Aperture pattern defocused point
light source

Camera
Object Lens with coded
sensor
aperture

Point
spread
function

Focal plane
Slides from Anat Levin
Solution: lens with occluder

Image of a
Aperture pattern defocused point
light source

Camera
Object Lens with coded
sensor
aperture

Point
spread
function

Focal plane
Slides from Anat Levin
Solution: lens with occluder

Image of a
Aperture pattern defocused point
light source

Camera
Object Lens with coded
sensor
aperture

Point spread
function

Focal plane
Slides from Anat Levin
Coded Aperture Changes the Blur Kernel

In focus photo Out‐of‐focus, Out‐of‐focus,


circular71aperture coded‐aperture
Coded Aperture Changes the Blur Kernel
• New PSF preserves high frequencies
―More content available to help us
determine correct depth

72
Input

Slides from Anat Levin


All-focused
(deconvolved)

Slides from Anat Levin


Coded Apertures in Astronomy
• Coded apertures for x‐rays and gamma rays
―Some wavelengths are difficult to focus
―No “lenses” available

The hexagonal coded aperture mask of SPI is located


The INTEGRAL spectrometer: SPI for
1.7 m above the detection plane. The mask is made of 3
gamma‐ray analysis
centimetre thick tungsten and consists of 127 hexagonal
elements, of which 63 are opaque, 64 transparent.
Questions?

76

You might also like