2.1.Geometry
2.1.Geometry
and
Calibration
Lu Yang
Email: [email protected]
School of Automation Engineering,
UESTC
Outline
• Ideal pinhole model
• Geometric models of
cameras
2
Pinhole Cameras
• Abstract camera model - box with a small
hole in it
• Pinhole cameras work in practice
3
Equivalent Model with
Virtual Image Plane
4
Basic Geometric
Properties
• Distant objects are smaller
• Lines project to lines
• The projection of parallel lines
meet at a single vanishing point
• Vanishing points of coplanar sets of
lines are colinear, form the
vanishing line of the plane
(horizon)
5
Distant objects are
smaller
6
Parallel Lines
7
Vanishing points
• each set of parallel lines
(=direction) 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
• Good way to spot faked 8
y' –my
x' –mxf '
m = – z
0
10
Orthographic projection
12
13
Some Limitations of Pinhole
Model
• Ideal pinhole: single scene point
generate single image, diffraction, low light
level;
• Finite-size pinhole: single scene point
generate extended image. Resulting
image is blurry
14
15
Thin Lens Model
1
-
1 1
=
z'
16
z
Finite Field of View
f
How about human 1
7
eye?
Finite Aperture/1
Ideal case: Only
points on one plane
are in perfect focus;
Finite aperture:
points within a
region of depth D
(depth of field) are
in focus.
For a given f, the
larger the aperture,
the smaller D.
18
Finite Aperture/2
19
Real Lenses
20
Snell’s Law of Refraction
n1 sin(α1 ) = n2 sin(α 2)
First-order optics: appropriate for ideal model of
thin lens
n 1 α1 n 2 α 2
Higher order optics: necessary for real
lenses
sin α α 3 + ..
α 6
Aberration
– .
s:
Blurring: e.g., spherical
aberrations Geometric 2
1
distortion
Spherical aberration
22
Geometric Distortion
23
Radial Distortion Model
Distorte
d:
1
Ideal x'' = λ x'
λ = 1+ k1 2 + k2 r 4 +
: 1
y'' =
r
x y'
x' = f ' z λ
y
y' = f ' z 2
4
Vignetting
25
26
Camera Geometry and
Calibration
27
Homogeneous coordinates in
2D
• Physical point p = x represented by
coordinates Ly
three x=u/w
vu what if w =
Lw y=v/ 0?
w
• Two sets of homogeneous coordinate
vectors are equivalent if they are
proportional to each other
u u' u u'
v Ξ v' e v Ξ λ v' λ s 0
Lw L'w Lw L'w
2
8
Lines in 2D
• General equation of a line
in 2D
ax + by + c = 0
In homogeneous coordinates
a x
l T p = l p = 0, l = b, p = y
L c L 1
a
Lb
2
9
Homogeneous coordinates
in 3D x
• Physical p = y represented by
coordinates
point four
xL=zu / t
vu
y = v / t what if w =
w
0?
Lt
z=w/t
• Two sets of homogeneous coordinate
vectors are equivalent if they are
proportional to each other
u u' u u'
v v' v v'
Ξ e w Ξ λ w'λ s 0
w w' 3
L t L t' Lt L t' 0
Lines in 3D
• General equation of a line in
3D
ax + by + cz + d = 0
In homogeneous
coordinates
П T p = П p = 0, П =a , p =
c z
Ldx L1
b
a
Lb
y 31
Basic Transformations
32
Basic Set of 2D Planar
Transformations
33
34
35
Standard Perspective Projection
Model
36
Alternate Notations
37
Applying the Projection
Matrix
38
39
Other Useful Geometric
Properties
40
Affine Cameras
41
Camera
Calibration
42
43
44
45
Slight digression:
Homogeneous Least
Squares
46
Calibration
47
48
Radial Distortion Model
Make them
linear:
50
51
Key Results
52
53
Website for Camera
Calibration
• http://www.vision.caltech.edu/bouguetj/calib
_doc/
• http://www.ai.sri.com/~konolige/svs/svs.htm
• MATLAB calibration toolbox
• Intel OpenCV calibration package
• Omni-Camera calibration
http://asl.epfl.ch/~scaramuz/research/David
e_Scar
amuzza_files/Research/OcamCalib_Tutorial.h
54
tm