Lectures 9-10: Imaging Geometry and Camera Model: Dr. V Masilamani
Lectures 9-10: Imaging Geometry and Camera Model: Dr. V Masilamani
Model
Dr. V Masilamani
[email protected]
Department of Computer Science and Engineering
IIITDM Kancheepuram
Chennai-127
3 Geometric Transformation in 3D
Translation in 3D
Scaling in 3D
Rotation in 3D
Shearing in 3D
Perspective Transformation in 3D
4 Camera Modeling
5 Camera Calibration
6 Acknowledgements
I Depth computation
I Image Stitching
I 3D Model construction
k
I Given Cartesian coordinate system, homogeneous coordinates can be
obtained
I Given homogeneous coordinates, Cartesian coordinate system can be
obtained
0 0 0 1
1 0 0 −∆x
I T −1
0 1 0 −∆y
=
0 0 1 −∆z
0 0 0 1
I Observation: Given the translation vector, T −1 can be computed
directly(without using algorithm for computing inverse)
I Where is translation used
• To model moving object
I Scaling of 3D point:
x1 ax1
y1 → by1
z1 cz1
I In
Matrix
equation
form:
x2 a 0 0 x1
y 2 = 0 b 0 y 1
z2 0 0 c z1
I In hom. coord. system:
x2 a 0 0 0 x1
y 2 0 b 0 0 y 1
=
z2 0 0 c 0 z1
1 0 0 0 1 1
0
I x x
= S
y0 y
a 0
where, scaling S =
0 b
1
I S −1 = a 01
0 b
I S −1 S = S −1 S = I
x2 = (rcosΦ)cosΘ − (rsinΦ)sinΘ
x2 = x1cosΘ − y 1sinΘ
0 0 0 1
I Hw: Derive transformation matrices for rotations about Y and Z
axes
I Shearing in x Dir:
x 0 = x + sy ; y 0 = y ;
I Shearing in y Dir:
x 0 = x; y 0 = sx + y ;
where
h2 f
=
h1 Zc
−y f
Sub value of h1 and h2, =
Yc Zc
−Yc f
Therefore, y =
Zc
−Xc f
Similarly , x =
Zc
kXc −Xc f
x= −kZc
⇒x =
f
Zc
kYc −Yc f
y= −kZc
⇒y =
f
Zc
Z −1 Y −1 X −1
Pc = ((RΘ3 ) (RΘ2 ) (RΘ1 ) T −1 ) Pw
Z
Pc = ((R−Θ3 Y
) (R−Θ2 X
) (R−Θ1 ) T −1 ) Pw
cosΘ −sinΘ 0 0
sinΘ cosΘ 0 0
RΘZ =
0
0 1 0
0 0 0 1
cosΘ sinΘ 0 0
−sinΘ cosΘ 0 0
(RΘZ )−1 =
0
0 1 0
0 0 0 1
Z
= R−Θ
I Let Pi be the output of perspective transformation of pc
Ih1 Ch1
Ih2 Ch2
Pi =
Ih3 P = Ch3
Ih4 Ch4
Ih1 Ih2
x= y=
Ih4 Ih4
Ih40
Ih10 Ih20
x0 = y0 =
Ih40 Ih40
Ih10 Ih20
x0 = y0 =
Ih40 Ih40
Ih10 − x 0 Ih40 = 0
Ih20 − y 0 Ih40 = 0
C D = U
C T (C D) = C T U
(C T C ) D = C T U
D = (C T C ) C T U