Professional Documents
Culture Documents
Camera Matrix: 16-385 Computer Vision (Kris Kitani)
Camera Matrix: 16-385 Computer Vision (Kris Kitani)
3D to 2D Transform
(today)
2D to 2D Transform
(last session)
A camera is a mapping between
the 3D world
and
a 2D image
A camera is a mapping between
the 3D world and a 2D image
x = PX
2D image camera 3D world
point matrix point
image plane
X
Y
?
z
f
Z
y
image plane
X
fY Y
Z
z
f
> >
[X Y Z] 7! [f X/Z f Y /Z]
Pinhole camera geometry
y
image plane
X
x
x
x = PX
Relationship from similar triangles…
> >
[X Y Z] 7! [f X/Z f Y /Z]
CCD array
camera coordinate
p system
camera coordinate
p system
2 3
f 0 px 0
P=4 0 f py 0 5
0 0 1 0
X world point
Oimage
x
image point
Ocamera
In general, there are three different coordinate systems…
X world point
Oimage
Oworld
x
image point
Ocamera
P = K[I|0]
2 3
f 0 px
K=4 0 f py 5 calibration matrix
0 0 1
Assumes that the camera and world
share the same coordinate system
2 32 3
f 0 px 1 0 0 0
P=4 0 f py 5 4 0 1 0 0 5
0 0 1 0 0 1 0
World zw
coordinate
system
Assumes that the camera and world
share the same coordinate system
2 32 3
f 0 px 1 0 0 0
P=4 0 f py 5 4 0 1 0 0 5
0 0 1 0 0 1 0
Rt World zw
coordinate
3R rotation and translation to align axis system
yc
Xw
Camera xc yw
coordinate
system
zc xw
World zw
coordinate
system
yc
Xw
Camera xc yw
coordinate
system
C zc xw
World zw
Coordinate of the
coordinate
camera center in the
system
world coordinate frame
Xc
yc
Xw
Camera xc yw
coordinate
system
C zc xw
World zw
Coordinate of the
coordinate
camera center in the (X w C) system
world coordinate frame
(X w C)
Translate
Why aren’t
Xc the points
aligned?
yc
Xw
Camera xc yw
coordinate
system
C zc xw
World zw
coordinate
system
(X w C)
Translate
What happens to points after alignment?
Rotate Xc
yc R Xw
Camera xc yw
coordinate
system
C zc xw
World zw
coordinate
system
R(X w C)
Rotate Translate
In inhomogeneous coordinates:
X c = R(X w C)
Optionally in homogeneous coordinates:
2 3 2 3
Xc Xw
6 Yc 7 6 Yw 7
6 7= R RC 6 7
4 Zc 5 0 1 4 Zw 5
1 (4 ⇥ 4) 1
P = KR[I| C]
Quiz
P = KR[I| C]
3x3
intrinsics
Quiz
P = KR[I| C]
3x3 3x3
intrinsics 3D rotation
Quiz
P = KR[I| C]
P = KR[I| C]
P = KR[I| C]
(translate first then rotate)
P = K[R|t]
where
t= RC
(rotate first then translate)
Quiz
x = PX
Quiz
x = PX
3D points to 2D image points
Quiz
x = PX
3D points to 2D image points
x = PX
3D points to 2D image points
P = K[R|t]
Quiz
x = PX
3D points to 2D image points
P = K[R|t]
intrinsic and extrinsic parameters
Generalized pinhole camera model
P = K[R|t]
2 32 3
f 0 px r1 r2 r3 t1
P=4 0 f py 5 4 r4 r5 r6 t2 5
0 0 1 r7 r8 r9 t3
intrinsic parameters extrinsic parameters
2 3 2 3
r1 r2 r3 t1
R = 4 r4 r5 r6 5 t = 4 t2 5
r7 r8 r9 t3
3D rotation 3D translation
Why do we need P?