cee598 - visual sensing for civil infrastructure eng. & mgmt. · cee598 - visual sensing for...
TRANSCRIPT
CEE598 - Visual Sensing for
Civil Infrastructure Eng. & Mgmt.
Session 3 – Camera Model and
Projective Geometry
Department of Civil and Environmental Engineering, University of Illinois at Urbana-Champaign
Mani Golparvar-Fard Department of Civil and Environmental Engineering
3129D, Newmark Civil Engineering Lab
e-mail: [email protected]
CVPR Best Demo 2009
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
2 http://mi.eng.cam.ac.uk/~sjt59/hips.html
Stereo-paired iPhone 4 @ 30fps
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
3
Illinois Compass2g Site> Course Contents> Supplementary Documents> 3DVision.avi
A00: watch
Marilia Maschion Producer & Director UCSD ICAM undergraduate
Vincent Rabaud Technical Advisor UCSD CSE student
Serge Belongie Project Advisor UCSD CSE Department
A0: review SVD decomposition
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
4
Outline
Cameras
• Pinhole cameras
• Cameras & lenses
• The geometry of pinhole cameras
• Other camera models
• Next Class
Readings:
• [FP] Chapters 1 – 3
• [HZ] Chapter 6
5
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
Temporary structures, site profile, foundation
walls, and slab rebars are reconstructed
Image View
3D View
(a)
(b)
(c)
Some of the slides in this lecture are courtesy to Prof. Jon Ponce,
University of Illinois, Prof. Silvio Savarese, University of Michigan and
Profs. Marc Levoy and Fei-Fei Li, Stanford University.
Outline
Cameras
• Pinhole cameras
• Cameras & lenses
• The geometry of pinhole cameras
• Other camera models
Without cameras, we wouldn't have Visual Sensing
Class
6
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
Daily Construction Photos
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
7 ©2011, Construction Performance Improvement Class, Mani Golparvar-Fard (Photo Courtesy of Anthony Lee)
At the front left-side of the site lies spare sections of the work platforms, presumably to be used around the back of the building when time
comes.
Daily Construction Photos
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
8 ©2011, Construction Performance Improvement Class, Mani Golparvar-Fard (Photo Courtesy of Anthony Lee)
At the first floor, it is clearly not as far along as the top two floors. Here, drywall and insulation installation has not even begun.
Daily Construction Photos
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
9 A DEWALT rotary laser is used to pinpoint exact height levels for construction. Also in this picture, one can see the fireproofing
material applied on all steel elements of the structure.
©2011, Construction Performance Improvement Class, Mani Golparvar-Fard (Photo Courtesy of Anthony Lee)
How do we see the world?
Let’s design a camera
• Idea 1: put a piece of film in front of an object
• Do we get a reasonable image?
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
10
Pinhole camera
Add a barrier to block off most of the rays
• This reduces blurring
• The opening known as the aperture
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
11
f
f = focal length
c = center of the camera
c
Pinhole camera
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
12
Milestones:
• Leonardo da Vinci (1452-1519): first
record of camera obscura
Some history…
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
13
Milestones:
• Leonardo da Vinci (1452-1519):
first record of camera obscura
• Johann Zahn (1685): first
portable camera
Some history…
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
14
Photography (Niepce, “La
Table Servie,” 1822)
Milestones:
• Leonardo da Vinci (1452-1519):
first record of camera obscura
• Johann Zahn (1685): first portable
camera
• Joseph Nicephore Niepce (1822):
first photo - birth of photography
• Daguerréotypes (1839)
• Photographic Film (Eastman, 1889)
• Cinema (Lumière Brothers, 1895)
• Color Photography (Lumière Brothers,
1908)
• First Digital Camera (Kodak, 1975)
• Picture of Steve Sasson
Some history…
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
15
Let’s also not forget…
Motzu
(468-376 BC)
Aristotle
(384-322 BC)
Also: Plato, Euclid
Al-Kindi (c. 801–
873)
Ibn al-Haytham
(965-1040) Oldest existent
book on geometry
in China
Omar Khayyam
(1080-1131)
Non-Euclidean
Geometry
Parallel postulate
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
16
z
yf'y
z
xf'x
y
xP
z
y
x
P
Derived using similar triangles
Pinhole camera
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
17
O
P = [x, z]
P’=[x’, f]
f
z
x
f
x
x
z
Pinhole camera
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
18
Common to draw image plane in front of
the focal point. Moving the image plane
merely scales the image.
f f
z
yf'y
z
xf'x
Pinhole camera
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
19
Kate lazuka ©
Is the size of the aperture important?
Pinhole camera
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
20
Effect of the Pinhole Size
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
21
Adapted from Levoy (2011)
Replacing the Pinhole with a Lens
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
22
Adapted from Levoy (2011)
Cameras & Lenses
A lens focuses light onto the film
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
23
Cameras & Lenses
A lens focuses light onto the film
• Rays passing through the center are not deviated
• All parallel rays converge to one point on a plane
located at the focal length f
focal point
f
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
24
Cameras & Lenses
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]
“circle of
confusion”
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
25
Geometrical Optics
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
26
Adapted from Levoy (2011)
Gauss’ Ray Tracing Construction
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
27
Adapted from Levoy (2011)
Changing the Focus Distance
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
28
To focus on
objects at
different
distances,
move sensor
relative to
lens
Adapted from Levoy (2011)
Changing the Focal Length
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
29
Adapted from Levoy (2011)
Changing the Focal Length
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
30
Focal Length and Field of View
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
31
Focal Length and Field of View
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
32
Adapted from Levoy (2011)
Changing the Sensor Size
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
33
Adapted from Levoy (2011)
Camera Sensor Sizes
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
34
Adapted from Levoy (2011)
Changing the Focal Length vs. the Viewpoint
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
35
Changing the focal length lets us move back from a
subject, while maintaining its size on the image
Notice that moving back changes perspective
relationships
Wide-angle Telephoto and
Moved back
Adapted from Levoy (2011)
Changing the Focal Length vs. the Viewpoint
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
36
Moving back while changing the focal length lets you keep objects at one depth the same size
In cinematography, this is called the dolly zoom, or “Vertigo effect”, after Alfred Hitchcock’s movie
Adapted from Levoy (2011)
Changing the Focal Length vs. the Viewpoint
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
37
Effect of focal length on portraits
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
38
Focal length is getting longer
Standard “portrait lens” is 85mm
Wide angle Standard Telephoto
Exposure
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
39
𝐻 = 𝐸 × 𝑇
Exposure = Irradiance × Time
Irradiance (E)
• Amount of light falling on a unit area of sensor
per second
• Controlled by aperture
Exposure Time (T)
• In seconds
• Controlled by shutter
Single Lens Reflex Camera
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
40
Adapted from Levoy (2011)
Shutters
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
41
Adapted from Levoy (2011)
Low Shutter Speed
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
42 http://www.annedarlingphotography.com/images/slow-shutter-speed-2-0.jpg
Shutter Speed
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
43
Adapted from Levoy (2011)
Controls how long the sensor is exposed to light
Linear effect on exposure until sensor saturates
Denoted in fractions of a second:
• 1/2000, 1/1000,...,1/250, 1/125, 1/60,...,15, 30
Normal humans can hand-hold down to 1/60
second
• Rule of thumb: shortest exposure = 1 / 𝑓
e.g., 1/180 second for a 180mm lens
Main Side-effect of Shutter Speed
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
44
Motion blur
Doubling exposure time doubles motion blur
Adapted from Levoy (2011)
Useful Shutter Speeds
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
45
Adapted from Levoy (2011)
Useful Shutter Speed
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
46
Adapted from Levoy (2011)
Useful Shutter Speed
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
47
1/800 sec
Aperture
Irradiance on sensor is proportional to
• Square of aperture diameter A
• Inverse square of distance to sensor (~ focal
length f )
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
48
http://photoluminary.com/wp-content/uploads/2011/03/aperture_diagram.jpg
Irradiance on Sensor
As the diameter A of the aperture doubles, its area (hence the light that can get through it) increases by 4x.
Think of the lens as a collection of pinholes, each having a fixed angular field of view (cone in 2nd drawing) determined by the lens design.
A certain amount of light gets through each pinhole. By conservation of energy, that light will fall on whatever sensor is placed in its path.
If the distance to the sensor is doubled, the area intersecting the cone increases by 4x, so the light falling per unit area decreases by 4x.
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
49
Adapted from Levoy (2011)
Aperture
Irradiance on sensor is proportional to square of aperture diameter A
Inverse square of distance to sensor (~ focal length f )
so that aperture values give irradiance regardless of lens,
• Aperture number N is defined relative to focal length
• f/2.0 on a 50mm lens means the aperture is 25mm
• f/2.0 on a 100mm lens means the aperture is 50mm
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
50
𝑁 =𝑓
𝐴
Adapted from Levoy (2011)
Example of F-number calculations
A relative aperture size (called F-number or just N) of 2 is written f/2, reflecting the fact that it is computed by dividing focal length (f) by the absolute aperture diameter (A). Doubling both the absolute aperture diameter (A) and the
focal length (f) cancel; leaving the same relative aperture size (N).
In this example, both lenses are f/2.
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
51
Adapted from Levoy (2011)
Aperture
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
52
Adapted from Levoy (2011)
Depth of Field
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
53
Adapted from Levoy (2011)
Trading off motion blur and depth of field
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
54
Adapted from Levoy (2011)
Sensitivity (ISO)
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
55
Adapted from Levoy (2011)
Tradeoff Affecting Brightness
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
56
Adapted from Levoy (2011)
Canon EOS C300
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
57
Canon EOS C300
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
58
Snell’s law
n1 sin 1 = n2 sin 2
1 = incident angle
2 = refraction angle
ni = index of refraction
Cameras & Lenses
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
59
Snell’s law:
n1 sin 1 = n2 sin 2
Small angles:
n1 1 n2 2
n1 = n (lens)
n1 = 1 (air)
)1n(2
Rf
f
1
z
1
'z
1
zo
Thin Lenses
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
60
z
y'z'y
z
x'z'x
ozf'z
zo
)1n(2
Rf
Thin Lenses
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
61
Issues with lenses: Spherical aberration
Rays farther from the
optical axis focus closer
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
62
No distortion
Pin cushion
Barrel
Issues with lenses: Radial Distortion
• Caused by imperfect lenses
• Deviations are most noticeable for rays that pass through the
edge of the lens
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
63
Outline
Cameras
• Pinhole cameras
• Cameras & lenses
• The geometry of pinhole cameras
• Other camera models
64
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
Pinhole perspective projection f
f = focal length
c = center of the camera
c
)z
yf,
z
xf()z,y,x(
2E
3
Pinhole camera
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
65
Is this a linear transformation?
No — division by z is nonlinear
How to make it linear?
)z
yf,
z
xf()z,y,x(
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
66
Homogeneous coordinates
homogeneous image
coordinates
homogeneous scene
coordinates
• Converting from homogeneous coordinates
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
67
Perspective Projection Transformation
1
z
y
x
0100
00f0
000f
z
yf
xf
X
z
yf
z
xf
iX
XMX
M
3H
4
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
68
Pixels, bottom-left coordinate systems
From retina plane to images
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
69
xc
yc
Coordinate systems
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
70
x
y
xc
yc
C=[cx, cy]
)cz
yf,c
z
xf()z,y,x( yx
1. Off set
Converting to pixels
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
71
)cz
ylf,c
z
xkf()z,y,x( yx
1. Off set
2. From metric to pixels
x
y
xc
yc
C=[cx, cy] Units: k,l : pixel/m
f : m : pixel
, Non-square pixels
Converting to pixels
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
72
Matrix form?
x
y
xc
yc
C=[cx, cy]
)cz
y,c
z
x()z,y,x( yx
Converting to pixels
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
73
)cz
y,c
z
x()z,y,x( yx
1
z
y
x
0100
0c0
0c0
z
zcy
zcx
X y
x
y
x
x
y
xc
yc
C=[cx, cy]
Camera Matrix
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
74
XMX
X0IK
1
z
y
x
0100
0c0
0c0
X y
x
Camera
matrix K
Camera Matrix
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
75
1
z
y
x
0100
0c0
0cs
X y
x
Skew parameter
x
y
xc
yc
C=[cx, cy] K has 5 degrees of freedom!
Finite projective cameras
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
76
Ow
iw
kw
jw
R,T
World reference system
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
77
3D Rotation of Points
Rotation around the coordinate axes, counter-clockwise:
100
0cossin
0sincos
)(
cos0sin
010
sin0cos
)(
cossin0
sincos0
001
)(
z
y
x
R
R
R
p
x
Y’
p’
g
x’
y
z
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
78
wXMX wXTRK
Ow
iw
kw
jw
R,T
wXTRX
In 4D homogeneous coordinates:
Internal parameters External parameters
World reference system
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
79
wx XMX 4313
14w4333 XTRK
Ow
iw
kw
jw
R,T
How many degrees of freedom?
5 + 3 + 3 =11!
100
c0
cs
K y
x
Projective cameras
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
80
Ow
iw
kw
jw
R,T
)X
X,
X
X()z,y,x(
w3
w2
w3
w1w
m
m
m
m M is defined up to scale!
Multiplying M by a scalar
won’t change the image
w13 XMX
14w4333 XTRK
3
2
1
m
m
m
M
Projective cameras
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
81
][ bATKRKTRKM
3
2
1
a
a
a
A
100
0 y
x
c
cs
K
lf
;kf
Theorem (Faugeras, 1993)
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
82
•Points project to points
•Lines project to lines
Properties of Projection
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
83
•Distant objects look smaller
z
y'f'y
z
x'f'x
Image plane
scene
Properties of Projection
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
84
•Angles are not preserved
•Parallel lines meet! Vanishing point
Properties of Projection
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
85
• Each set of parallel lines meets at a different point
[The vanishing point for this direction]
•Sets of parallel lines on the same plane lead to collinear vanishing
points [The line is called the horizon for that plane]
Vanishing points
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
86
One-point perspective
Masaccio, Trinity,
Santa Maria Novella,
Florence, 1425-28
Credit slide S. Lazebnik CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
87
The exterior columns appear bigger
The distortion is not due to lens flaws
Problem pointed out by DaVinci
Slide by F. Durand Credit slide S. Lazebnik
Properties of Projection Objects on the periphery are expanded
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
88
Properties of Projection
Degenerate cases
• Line through focal point projects to a point.
• Plane through focal point projects to line
• Plane perpendicular to image plane projects to part of
the image (with horizon).
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
89
Outline
Cameras
• Pinhole cameras
• Cameras & lenses
• The geometry of pinhole cameras
• Other camera models
90
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
0
'where
'
'
z
fm
myy
mxx
is the magnification.
P ~
When the relative scene depth is small compared to its distance from the camera
Weak perspective projection
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
91
y'y
x'x
When the camera is at a (roughly constant) distance from the scene
–Distance from center of projection
to image plane is infinite
Orthographic (affine) projection
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
92
Pros and Cons of These Models
Weak perspective much simpler math. • Accurate when object is small and distant.
• Most useful for recognition.
Pinhole perspective much more accurate for scenes. • Used in structure from motion.
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
93
Qingming Festival by the Riverside Zhang Zeduan ~900 AD
Weak perspective projection
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
94
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
The Kangxi Emperor's Southern Inspection Tour (1691-1698) By Wang Hui
95 http://www.youtube.com/watch?v=mrFDGct4kH8
How to calibrate a camera?
Next lecture
CEE598 Visual Sensing for Civil Infrastructure Eng. & Mgmt. © Mani Golparvar-Fard, 2013
96