Lecture 9
Lecture 9
Lecture 9
Image Formation
Image Formation
How do we see the world?
object
film
(cid:132) Let’s design a camera
(cid:137) Idea 1: put a piece of film in front of an object
(cid:137) Do we get a reasonable image?
Slide by Steve Seitz
It receives light from all directions
Pinhole camera
object
barrier
film
From Photography, London et al.
(cid:132) Add a barrier to block off most of the rays
(cid:137) This reduces blurring
(cid:137) The opening known as the aperture
(cid:137) How does this transform the image?
Slide by Steve Seitz
Pinhole
Pinhole camera model
From Photography, London et al.
(cid:132) Pinhole model:
(cid:137) Captures pencil of rays – all rays through a single point
(cid:137) The point is called Center of Projection (COP)
(cid:137) The image is formed on the Image Plane
(cid:137) Effective focal length f is distance from COP to Image Plane
Slide by Steve Seitz
1
Pinhole size?
Lenses
(cid:132) gather more
light!
(cid:132) But need to be
focused
From Photography, London et al.
From Photography, London et al.
Dimensionality Reduction Machine
(3D to 2D)
3D world
2D image
Funny things happen…
Point of observation
(cid:132) What have we lost?
(cid:137) Angles
(cid:137) Distances (lengths)
Figures © Stephen E. Palmer, 2002
Parallel lines aren’t…
Distant objects are smaller
…but humans adopt!
length of B = 2*length of C
length of B’ = length of C’
Müller-Lyer Illusion
Forsyth&Ponce
We don’t make measurements in the image plane
http://www.michaelbach.de/ot/sze_muelue/index.html
2
Perspective projection
The equation of projection
(cid:132) Abstract camera model – box with a small hole in it
(cid:132) In an ideal pinhole camera everything is in focus
Forsyth&Ponce
2D image
3D world
The equation of projection
(cid:132) Cartesian coordinates:
(cid:137)We have, by similar triangles, that
(
zyx
,
,
)
→
(
f
f
,
−
,
f
)
x
z
y
z
(cid:137)Ignore the third coordinate, and get
(
zyx
,
,
)
→
(
f
f
,
x
z
y
z
)
The camera matrix
(cid:132) Turn previous expression into HC’s
(cid:137)HC’s for 3D point are (x,y,z,1)
(cid:137)HC’s for point in image are (u,v,w)
u
01
(cid:132) Position of the point in the image from HC
00
10
w
=
0
0
1
0
0
0
v
f
x
y
z
1
normalize by w
u
v
w
=
x
y
fz
1
w
u
v
w
=
f
z
x
y
fz
=
fx
fy
z
z
1
Weak perspective
(cid:132) Issues:
(cid:137) perspective effects, but not over the scale of individual objects
(cid:137) collect points into a group at about the same depth, then divide
each point by the depth of its group
(cid:137) Adv: easy
(cid:137) Disadv: wrong
Orthographic projection
Telescope projection can be modeled by orthographic projection
3
Orthographic Projection
(cid:132) Special case of perspective projection
(cid:137) Distance from the COP to the PP is infinite
Image
World
Building a real camera
(cid:137) Also called “parallel projection”
(cid:137) What’s the projection matrix?
Slide by Steve Seitz
Camera Obscura
Camera Obscura, Gemma Frisius, 1558
Home-made pinhole camera
(cid:132) The first camera
(cid:137) Known to Aristotle
(cid:137) Depth of the room is the effective focal length
http://www.debevec.org/Pinhole/
Why so
blurry?
Shrinking the aperture
Shrinking the aperture
(cid:132) Why not make the aperture as small as possible?
(cid:137) Less light gets through
(cid:137) Diffraction effects…
Slide by Steve Seitz
4
The reason for lenses
Focus
Focus and Defocus
Thin lenses
object
lens
film
(cid:132) A lens focuses light onto the film
(cid:137) There is a specific distance at which objects are “in focus”
(cid:132) other points project to a “circle of confusion” in the image
(cid:137) Changing the shape of the lens changes this distance
(cid:132) Thin lens equation:
(cid:137) Any object point satisfying this equation is in focus
(cid:137) What is the shape of the focus region?
(cid:137) How can we change the focus region?
(cid:137) Thin lens applet: http://www.phy.ntnu.edu.tw/java/Lens/lens_e.html (by Fu-Kwun Hwang )
Slide by Steve Seitz
Slide by Steve Seitz
Varying Focus
Depth Of Field
Slide by Steve Seitz
“circle of
confusion”
Ren Ng
5
Depth of Field
Aperture controls Depth of Field
http://www.cambridgeincolour.com/tutorials/depth-of-field.htm
(cid:132) Changing the aperture size affects depth of field
(cid:137) A smaller aperture increases the range in which the object is
(cid:137) But small aperture reduces amount of light – need to increase
approximately in focus
exposure
Varying the aperture
Nice Depth of Field effect
Large apeture = small DOF
Small apeture = large DOF
Field of View (Zoom)
Field of View (Zoom)
6
Field of View (Zoom)
FOV depends of Focal Length
f
f
Smaller FOV = larger Focal Length
Field of View / Focal Length
Large FOV, small f
Camera close to car
Small FOV, large f
Camera far from the car
Lens Flaws: Chromatic Aberration
(cid:132) Dispersion: wavelength-dependent refractive index
(cid:137) (enables prism to spread white light beam into rainbow)
(cid:132) Modifies ray-bending and lens focal length: f(λ)
(cid:132) color fringes near edges of image
(cid:132) Corrections: add ‘doublet’ lens of flint glass, etc.
7
From Zisserman & Hartley
Lens Flaws
Chromatic Aberration
Radial Distortion (e.g. ‘Barrel’ and
‘pin-cushion’)
straight lines curve around the image center
Near Lens Center
Near Lens Center
Near Lens Outer Edge
Near Lens Outer Edge
Radial Distortion
Radial Distortion
No distortion
Pin cushion
Barrel
(cid:132) Radial distortion of the image
(cid:137) Caused by imperfect lenses
(cid:137) Deviations are most noticeable for rays that pass
through the edge of the lens
8