Lecture 8: Camera Calibration - Artificial · PDF file Fei-Fei Li Lecture 8 - 21 19-Oct-11...
date post
06-Jul-2020Category
Documents
view
0download
0
Embed Size (px)
Transcript of Lecture 8: Camera Calibration - Artificial · PDF file Fei-Fei Li Lecture 8 - 21 19-Oct-11...
Lecture 8 -Fei-Fei Li
Lecture 8:
Camera Calibration
Professor Fei-Fei Li
Stanford Vision Lab
19-Oct-111
Lecture 8 -Fei-Fei Li
What we will learn today?
• Review camera parameters
• Affine camera model (Problem Set 2 (Q4))
• Camera calibration
• Vanishing points and lines (Problem Set 2
(Q1))
19-Oct-112
Reading:
• [FP] Chapter 3 • [HZ] Chapter 7, 8.6
Lecture 8 -Fei-Fei Li
What we will learn today?
• Review camera parameters
• Affine camera model
• Camera calibration
• Vanishing points and lines
19-Oct-113
Reading:
• [FP] Chapter 3 • [HZ] Chapter 7, 8.6
Lecture 8 -Fei-Fei Li 19-Oct-114
Projective camera f
Oc
f = focal length
Lecture 8 -Fei-Fei Li 19-Oct-115
Projective camera
x
y
xc
yc
C=[uo, vo]
f
Oc
f = focal length
uo, vo = offset
Lecture 8 -Fei-Fei Li 19-Oct-116
Projective camera f
Oc
Units: k,l [pixel/m]
f [m]
[pixel],αααα ββββ Non-square pixels
f = focal length
uo, vo = offset
→ non-square pixels,αααα ββββ
Lecture 8 -Fei-Fei Li 19-Oct-117
Projective camera
=
1 0100
00
0
z
y
x
v
us
P' o
o
β α
f
Oc
K has 5 degrees of freedom!
Pc
P’
f = focal length
uo, vo = offset
→ non-square pixels,αααα ββββ θ = skew angle
Lecture 8 -Fei-Fei Li 19-Oct-118
Projective camera f
Oc
−
=′
1
z
y
x
0100
0v0
0ucot
P o
o
sinθθθθ ββββ
θθθθαααααααα
Pc
P’
f = focal length
uo, vo = offset
→ non-square pixels,αααα ββββ θ = skew angle
K has 5 degrees of freedom!
Lecture 8 -Fei-Fei Li 19-Oct-119
Projective camera f
Oc
Pc
Ow
iw
kw
jw R,T
P’
f = focal length
uo, vo = offset
→ non-square pixels,αααα ββββ θ = skew angle R,T = rotation, translation
wP TR
P 44
10 ×
=
cORT ~−=
Lecture 8 -Fei-Fei Li 19-Oct-1110
Projective camera
f = focal length
uo, vo = offset
→ non-square pixels,αααα ββββ
f
Oc
P
Ow
iw
kw
jw
wPMP =′
[ ] wPTRK= Internal (intrinsic) parameters
External (extrinsic) parameters
θ = skew angle R,T = rotation, translation
P’
R,T
Lecture 8 -Fei-Fei Li 19-Oct-1111
Projective camera
wPMP =′ [ ] wPTRK= Internal (intrinsic) parameters
External (extrinsic) parameters
Lecture 8 -Fei-Fei Li 19-Oct-1112
Projective camera
wPMP =′ [ ] wPTRK=
−
= 100
v0
ucot
K o
o
sinθθθθ ββββ
θθθθαααααααα
= T 3
T 2
T 1
R
r
r
r
=
z
y
x
t
t
t
T
43×
Lecture 8 -Fei-Fei Li 19-Oct-1113
Goal of calibration
wPMP =′ [ ] wPTRK=
−
= 100
v0
ucot
K o
o
sinθθθθ ββββ
θθθθαααααααα
= T 3
T 2
T 1
R
r
r
r
=
z
y
x
t
t
t
T
43×
Estimate intrinsic and extrinsic parameters
from 1 or multiple images
Lecture 8 -Fei-Fei Li
What we will learn today?
• Review camera parameters
• Affine camera model (Problem Set 2 (Q4))
• Camera calibration
• Vanishing points and lines
19-Oct-1114
Reading:
• [FP] Chapter 3 • [HZ] Chapter 7, 8.6
Lecture 8 -Fei-Fei Li 19-Oct-1115
Weak perspective projection
Relative scene depth is small compared to its distance from the camera
= magnification
−= −=
myy
mxx
'
'
0
' where
z
f m −=
Lecture 8 -Fei-Fei Li 19-Oct-1116
Orthographic (affine) projection
Distance from center of projection to image plane is infinite
= =
y'y
x'x
Lecture 8 -Fei-Fei Li 19-Oct-1117
Affine cameras
[ ] PTRKP ='
= 100
00
0s
K y
x
αααα αααα
= 10
TR
1000
0010
0001
KM
Affine case
Parallel projection matrix
= 10
TR
0100
0010
0001
KM
= 100
y0
xs
K oy
ox
αααα αααα
Projective caseCompared to
Lecture 8 -Fei-Fei Li 19-Oct-1118
Remember….
Projectivities:
=
=
1
y
x
H
1
y
x
bv
tA
1
'y
'x
p
Affinities:
=
=
1
y
x
H
1
y
x
10
tA
1
'y
'x
a
Lecture 8 -Fei-Fei Li 19-Oct-1119
[ ] PTRKP ='
= 100
00
00
y
x
K α α
= 10
TR
1000
0010
0001
KM
=
=×
×= 10
bA
1000
]affine44[
1000
0010
0001
]affine33[ 2232221
1131211
baaa
baaa
M
=+=
+
=
=
1 '
2
1
232221
131211 PMP b
b
Z
Y
X
aaa
aaa
y
x P EucbA
[ ]bAMM Euc ==
We can obtain a more compact formulation than:
Affine cameras
Lecture 8 -Fei-Fei Li 19-Oct-1120
Affine cameras
PP’
P’
; 1
'
=+=
=
P bAP M
v
u P [ ]bAM =
M = camera matrix
[non-homogeneous image coordinates]
To recap:
This notation is useful when we’ll discuss affine structure from motion
Lecture 8 -Fei-Fei Li 19-Oct-1121
Affine cameras
• Weak persp