Professional Documents
Culture Documents
Image Formation
Light (Energy) Source
Surface
2. Camera Geometry
Imaging Plane
Camera:
Spec &
Pose
3D
Scene
Pinhole Lens
Computer Vision
World
Optics
Sensor
Signal
2D
Image
Zoltan Kato
http://www.inf.u-szeged.hu/~kato/
Slide adopted from Zhigang Zhu Computer Vision - CSC I6716
Image Plane
Image plane
Optical Axis
ff
z
viewpoint
f
Pinhole lens
Out of view
Perspective projection
f called the focal length of the lens
Slide adopted from Zhigang Zhu Computer Vision - CSC I6716
Equivalent Geometry
Perspective Projection
p(x, y)
P( X,Y,Z )
Z
Z=f
Projection plane z = f
Equivalent mathematically
Slide adopted from Zhigang Zhu Computer Vision - CSC I6716
Reverse Projection
Given a center of projection and image coordinates of a
point, it is not possible to recover the 3D depth of the
point from a single image.
P(X,Y,Z) can be anywhere along this line
p(x,y)
X f
Y a
Z f
X
Z
Y
Z
X
fX f
Y
Z a fY =
Z
1
X
0
Y
0
Z
1 0
1
Stereo Geometry
Object point
line
Kosara,, robert@kosara.net
Photo by Robert Kosara
http://www.kosara.net/gallery/pinholeamsterdam/pic01.html
straight
size
parallelism/angle
Central
Projection
Rays
shape
shape
of planes
Vergence Angle
depth
size
parallelism/angle
shape
shape
of planes
depth
Amsterdam
Kosara,, robert@kosara.net
Photo by Robert Kosara
http://www.kosara.net/gallery/pinholeamsterdam/pic01.html
Amsterdam
9straight line
10
11
9straight line
size
parallelism/angle
shape
shape
of planes
depth
Kosara,, robert@kosara.net
Photo by Robert Kosara
http://www.kosara.net/gallery/pinholeamsterdam/pic01.html
P(X,Y,Z)
12
Amsterdam
size
parallelism/angle
shape
shape
of planes
depth
13
9straight line
Kosara,, robert@kosara.net
Photo by Robert Kosara
http://www.kosara.net/gallery/pinholeamsterdam/pic01.html
Kosara,, robert@kosara.net
Photo by Robert Kosara
http://www.kosara.net/gallery/pinholeamsterdam/pic01.html
9straight line
Amsterdam
size
parallelism/angle
shape
shape
of planes
depth
parallelism/angle
shape
shape
9
of planes
parallel to image
depth
9straight line
size
parallelism/angle
shape
shape
9
of planes
parallel to image
Depth
stereo
motion
size
structure
15
Kosara,, robert@kosara.net
Photo by Robert Kosara
http://www.kosara.net/gallery/pinholeamsterdam/pic01.html
size
Amsterdam
9straight line
14
16
Camera Parameters
Y
yim
Image
frame
Pose / Camera
(xim,yim)
xim
CCD
X
Object / World
Zw
Xw
Yw
p (x,y,f)
(0,0)
Size:
(sx,sy)
Pixel
(xim,yim)
oy
xim
X
From frame to image Y fX + Zox fs x
Image center
Z a fY + Zo y =
Directions of axes
Z
1
Pixel size
Pw
ox
fs y
oy
1
Intrinsic Parameters
X
0
Y
0
Z
0
1
18
ox
yim
x
Z
Camera Parameters
(x, y)
Coordinate Systems
(xim,yim)
x = xd (1 + k1r 2 + k 2 r 4 )
xim
x
Z
y = yd (1 + k1r 2 + k 2 r 4 )
Lens Distortions
P = R Pw + T
Extrinsic Parameters
r2 = xd2+yd2
(xd , yd) distorted points
k1 , k2: distortion coefficients
T
P
Zw
Pw
Xw
Yw
yim
(xd, yd)
R 1 = RT , i.e. RRT = RT R = I
19
20
~
~ ~
X cam = R X - C
x = K[I | 0]X cam
~
x = KR I | C X
X
~
R RC Y R RC
X cam =
=
X
Z
0
1
0
1
1
~
P = K[R | T ]
x = PX
T = RC
fx
K =
s
fy
[ ]
px
p y
1
arctan(1/s)
1
~
P = KR I | -C 11 degree of
~
C Projection
freedom (5+3+3)
non-singular
center in world
coordinate
frame.
s skew
for CCD/CMOS, always s=0
decompose P in K,R,C?
~
P = [M | p 4 ] [K, R ] = RQ(M ) C = M 1p 4
~
C Projection center in world coordinate frame.
{finite cameras}={P4x3 | det M0}
If rank P=3, but rank M<3, then camera is at infinity
21
Column vectors
PC = 0
Algebraically, C may
be obtained as:
22
0
1
[p 2 ] = [p1p 2 p3p 4 ]
0
0
M = KR
=(
R )-1= R -1 Q -1
23
24
Row vectors
Affine cameras
1T X
x p
y = p 2 T Y
T Z
0 p 3
1
1T X
0 p
y = p 2 T Y
T Z
w p 3
1
26
x
P =
y
Y
p(x, y)
P(X,Y,Z)
1T
t1 (7 degrees of freedom)
r
r 2T t
2
1 0 1 / k
X
0
Z=f
A sequence of two transformations
Orthographic projection : parallel rays
Isotropic scaling : f/Z
Linear Model
Preserve angles and shapes
Slide adopted from Zhigang Zhu Computer Vision - CSC I6716
f
X
Z
f
y= Y
Z
x=
27
28
Affine camera
x
PA =
s
y
1T
t1
r
r1T t 2
1 0 1 / k
m11 m12
PA = m21 m22
0
0
m13 t1
m23 t 2 (8dof)
0 1
IBMR:
1 0 0 0
PA = [3 3 affine]0 1 0 0[4 4 affine]
0 0 0 1
Jack Tumblin
jet@cs.northwestern.edu
29
Cameras Revisited
Plenty of Terminology:
Image Plane or Focal Plane
Focal Distance f
Camera Center C
z
Principal Point
Principal Axis
Principal Plane
Camera Coords (xc,yc,zc)
Image Coords (x,y)
Cameras Revisited
yc
Plenty of Terminology:
Image Plane or Focal Plane
Focal Distance f
Camera Center C
z
Principal Point
Principal Axis
Principal Plane
Camera Coords (xc,yc,zc)
Image Coords (x,y)
yc
xc
xc
Cameras Revisited
Plenty of Terminology:
Image Plane or Focal Plane
Focal Distance f
Camera Center C
z
Principal Point
Principal Axis
Principal Plane
Camera Coords (xc,yc,zc)
Image Coords (x,y)
Cameras Revisited
yc
yc
xc
Cameras Revisited
Plenty of Terminology:
Image Plane or Focal Plane
Focal Distance f
Camera Center C
z
Principal Point p
Principal Axis
Principal Plane
Camera Coords (xc,yc,zc)
Image Coords (x,y)
Plenty of Terminology:
Image Plane or Focal Plane
Focal Distance f
Camera Center C
z
Principal Point p
Principal Axis
Principal Plane
Camera Coords (xc,yc,zc)
Image Coords (x,y)
xc
Cameras Revisited
yc
xc
Plenty of Terminology:
Image Plane or Focal Plane
Focal Distance f
Camera Center C
z
Principal Point p
Principal Axis
Principal Plane
Camera Coords (xc,yc,zc)
Image Coords (x,y)
yc
xc
Cameras Revisited
Plenty of Terminology:
Image Plane or Focal Plane
Focal Distance f
Camera Center C
zc
Principal Point p
Principal Axis
Principal Plane
Camera Coords (xc,yc,zc)
Image Coords (x,y)
Cameras Revisited
yc
C =[0,0,0]
xc
Plenty of Terminology:
Image Plane or Focal Plane
Focal Distance f
Camera Center C
z
Principal Point p
Principal Axis
Principal Plane
Camera Coords (xc,yc,zc)
Image Coords (x,y)
xf s px 0 xc
0 yf py 0 yc
0
0 1 0 zc
1
(3x3 submatrix)
submatrix)
x
y
z
P0 X = x
y
zc
yc
y
p
f
xc
[K 0] = P0
y
z
xc
Cameras Revisited
yc
C
f
PX =
C
xc
zc
(world space)
xw
x, or yzw
w
tw
xc
yc
zc
P
P = P2T
3T
P
1T
P=
p1 p2 p3 p4
f
xc
yc
f C
xc
xc
yc
zc
(c a m
er a s
p ace
)
Combine: write
(P0RT)X = x
as
PX = x
Input: X
3D World Space
x
w
x, or yzw
w
tw
PX =
yc
x, or
xw
yw
zw
tw
xc
yc
zc
P
P = P2T
3T
P
1T
zc
yc
f
xc
x
w
x, or yzw
w
tw
xc
yc
zc
P
P = P2T
3T
P
1T
yc
x
w
x, or yzw
w
tw
xc
yc
zc
P
P = P2T
3T
P
1T
xc
yc
zc
P
P = P2T
3T
P
1T
PX =
yc
f
xc
yc
xc
xc
xw
x, or yzw
w
tw
x, or
xw
yw
zw
tw
xc
yc
zc
P
P = P2T
3T
P
1T
Principal
plane P3
yc
zc
p
f
xc
x
w
x, or yzw
w
tw
xc
yc
zc
m1T
P = m2T p 4
m3T
PX =
M
Principal Axis Vector (zc) in world space:
Normal of principal plane: = m3 = [p31 p32 p33 ]T
P3 Scaling Ambiguous direction!! +/- m3 ?
Solution: use det(M)m3 as front of camera
yc
Mm3 = p = x0
zc
p
x0
xc
x
w
x, or yzw
w
tw
m1T
P = m2T p 4
m3T
~
M
xc
yc
zc
~
-M-1p4
Cameras Position in the World: C =
zc
p f
xc