Camera Parameters Intrinsic - Extrinsic PDF
Camera Parameters Intrinsic - Extrinsic PDF
x
U f 0 0 0
V = 0 f 0 0 y
z
S 0 0 1 0
1
The Retinal Plane
x
M y
z
F
x
y
u v
m u
v
f
Camera orientation in the world
The position of the camera in the world must be recovered
rotational component
translation component
Describes absolute position of the focal plane in the world coordinate
system
This is a Euclidean transform from one coordinate system to another
-translation, rotation
F
z
x
Translation
Frames A and B are related through
a pure translation
yA
rA rA = rB + tA
yB
xA rB
where ta represents
A
B the pure
tA
xB translation from
frame A to frame
B written in frame
A coordinates
Rotations
Frames A and B are related through
a pure rotation
A position vector r, in
yB
yA
r frame B, can be
expressed in the A
xB coordinate frame by
employing the 3 X 3
xA transformation matrix
ARB . . .
Rotation Matrix
v v
rA = A RB rB
) ) ) ) ) )
i A i B i A j B i A k B
rx A rx
ry = )j i) ) ) ) ) B
A A B j A j B j A k B ry B
rz A ) ) ) ) ) ) rz B
k A i B k A j B k A k B
This projection of frame B onto frame A clearly converts
a position vector, rB , written in frame B, into the
corresponding coordinates in frame A, rA .
Interpreting the Rotation Matrix
To interpret the rotation matrix for this
transformation:
the rows of ARB represent the projection of
the basis vectors for frame A onto the basis
vectors of frame B
the columns of ARB represent the basis
vectors of frame B projected onto the basis
vectors of frame A
Rotations
cos( ) -sin( ) 0
)A )A )A
ARB = x y z = sin( ) cos( ) 0
B B B
0 0 1
Rotations: x
For completeness, we will look at the rotation
matrix for rotations about all three axes:
1 0 0
)
rot ( x , ) = 0 cos( ) sin( )
0 sin( ) cos( )
Rotations: y
For completeness, we will look at the rotation
matrix for rotations about all three axes:
cos( ) 0 sin( )
)
rot ( y, ) = 0 1 0
sin( ) 0 cos( )
Rotations: z
For completeness, we will look at the rotation
matrix for rotations about all three axes:
cos( ) sin( ) 0
)
rot ( z , ) = sin( ) cos( ) 0
0 0 1
Extrinsic Parameters
Recall the fundamental equations of perspective projection
assumed the orientation of the camera and world frame known
this is actually a difficult problem known as extrinsic pose problem
using only image information recover the relative position and
orientation of the camera and world frames
This transformation is typically defined by:
3-D translation vector T=[x,y,z]T
defines relative positions of each frame
3x3 rotation matrix, R
rotates corresponding axes of each frame into each other
R is orthogonal: (RTR = RRT =I)
Extrinsic Parameters
XC
RT
ZW
ZC
YC
YW
( )
XW r11 r12 r13
Note: we write R= r21 r22 r23
r31 r32 r33
) )
0 x0 x2
v 2
t0 )
1 x1
r rx
T
0 2 = [ 1
0 0 0
R2 t0
1
] r
r y
r2 =
rz
r
Then, r0 = 0T2 r2
r r 1 2
= 1 R 2 r2 + t0
Composing Transformations
Example: Suppose
where:
)
0T1 = translation( x0 , 1.0)
)
1T 2 = translation( y1 , 1.0)
)
2T 3 = translation( z2 , 1.0)
)
3T 4 = rotation ( y3 , / 4)
Composing Transformations
Example: 0T4 = 0T1 1T2 2T3 3T4
)
) z3 )
z4 x4
) )
4 y3, y4
/4
)
3 x3
)
z2
) ) )
z0 z1 y2
)
2
) y1 )
y0 x2
0 1
) )
x0 x1
Composing Transformations
0.707 0 0.707 1
0 1 0 1
0T4 =
0.707 0 0.707 1
0 0 0 1
Extrinsic Parameters
XC
RT
ZW
ZC
YC
YW
pc = P p w
( )
XW r11 r12 r13
R= r21 r22 r23
r31 r32 r33
R T
P=
0 0 0 1
[
T = Tx Ty Tz ]
T
Intrinsic Parameters
Characterize the optical, geometric, and digital
characteristics of the camera
Defined by:
perspective projection: focal length f
transformation between camera frame and pixel coordinates
geometric distortion introduced by the lens
Transform between camera frame and pixels:
x = -(xim - ox)sx
y = -(yim - oy)sy
x = xd (1 + k1r2 + k2r4)
y = yd (1 + k1r2 + k2r4)
X Y
Recall x= f
Z
y= f
Z
RT2(Pw - T)
-(xim - ox)sx = f
RT3(Pw - T)
Mint =
(-f/sx
0
0
0
-f/sy
0
ox
oy
1
)
Mext=
(r11
r21
r31
r12
r22
r32
r13
r23
r33
-RT1T
-RT1T
-RT1T
)
Using the Perspective Equations
3x3 Mint only depends on the intrinsic parameters
3x4 Mext depends on extrinsic parameters
We make use of these by introducing homogeneous coordinates to
point vectors in the world.
Pw must be expressed in homogenous coordinates to allow direct
multiplication to Mint and Mext
x1 Xw
x2 = Mint Mext Yw
Zw
x3
1
[x1,x2,x3]T is the projected point, using the vector we compute image
coordinates:
x1/x3 = xim
x2/x3 = yim
The Perspective Transform