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

2.1.Geometry

Uploaded by

shahdadhasil.15
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

2.1.Geometry

Uploaded by

shahdadhasil.15
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 54

Camera Geometry

and
Calibration
Lu Yang
Email: [email protected]
School of Automation Engineering,
UESTC
Outline
• Ideal pinhole model

• Ideal thin lens model

• General lens 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

images Scale and perspective


Perspective Projection

 x' = λx f'  x' = λx f


' y' = λ e λ = y' = λ e λ =
 z  z
f ' = λz f ' = λz
 

 x' = λx f'  x' = f ' x


  z
y' = λy e λ z y
=f ' = λz  y' = f ' z 9
Weak Perspective Project (Affine
Projection)
• Issue
- Perspective effects, but not over the scale of individual
objects
-Collect points into a group at about the same depth, then
divide each point by the depth of its group
- If scene points are in a plane, projections are simply
magnified by m
-Justified if scene depth is small relative to average
distance from camera


y'  –my
 x'  –mxf '
m = – z
 0

10
Orthographic projection

Justified if scene depth is small compared to distance from


camera and camera remains at approximately constant
distance.
11
Some Images

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

Size of field of view governed by size of the


camera retina
d
φ = tan (2 )
-1

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

• Previous approximation is incorrect


→Aberrations and distortions;
→Blurring and incorrect shape in the
image

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

Examples of radial lens distortion: (a) barrel; (b)


pincushion, and (c) fisheye.

23
Radial Distortion Model

 x' = f ' x  x' = f ' x


 z  z
 y  y
 y' = f '  y' = f '
 z  z

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=zu / 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

 x' = f ' x  x' = f ' x


 z  z
 y  y
 y' = f '  y' = f '
 z  z

Distorte  x'' = 1λ x'


d:
 λ = 1+ k1 2
+ k2 r 4 +
1
 x  y'' = λ y'
r
Ideal
:  x' = f ' z
 y
 y' = f z 4
9
'
We can follow exactly the same
recipe with non-linear distortion:

Write non-linear relations between


coordinates:

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

You might also like