Two-View Geometry: Computation of the Fundamental Matrix F
簡韶逸 Shao-Yi Chien Department of Electrical Engineering National Taiwan University Fall 2019
1
Computation of the Fundamental Matrix F Shao-Yi Chien Department - - PowerPoint PPT Presentation
Two-View Geometry: Computation of the Fundamental Matrix F Shao-Yi Chien Department of Electrical Engineering National Taiwan University Fall 2019 1 Outline Computation of the fundamental matrix F [Slides credit: Marc
簡韶逸 Shao-Yi Chien Department of Electrical Engineering National Taiwan University Fall 2019
1
2
[Slides credit: Marc Pollefeys]
separate known from unknown
33 32 31 23 22 21 13 12 11
, , , , , , , , 1 , , , ' , ' , ' , ' , ' , '
T 33 32 31 23 22 21 13 12 11
f f f f f f f f f y x y y y x y x y x x x
(data) (unknowns) (linear)
f 1 ' ' ' ' ' ' 1 ' ' ' ' ' '
1 1 1 1 1 1 1 1 1 1 1 1
n n n n n n n n n n n n
y x y y y x y x y x x x y x y y y x y x y x x x
T 3 3 3 T 2 2 2 T 1 1 1 T 3 2 1
SVD from linearly computed F matrix (rank 3)
T 2 2 2 T 1 1 1 T 2 1
F
Compute closest rank-2 approximation
Enforcing singularity!
Effect of enforcing singularity
f 1 ' ' ' ' ' ' 1 ' ' ' ' ' '
7 7 7 7 7 7 7 7 7 7 7 7 1 1 1 1 1 1 1 1 1 1 1 1
y x y y y x y x y x x x y x y y y x y x y x x x
T 9x9 7 1 7x7
9x2 9 8
T 8 T
] 000000010 [ V e.g.V
2 1 T
i i
but F1+lF2 not automatically rank 2
F1 F2 F F7pts
1 2 2 3 3 2 1
(obtain 1 or 3 solutions) (cubic equation)
1 ´ ´ ´ ´ ´ ´ 1 ´ ´ ´ ´ ´ ´ 1 ´ ´ ´ ´ ´ ´
33 32 31 23 22 21 13 12 11 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1
f f f f f f f f f y x y y y y x x x y x x y x y y y y x x x y x x y x y y y y x x x y x x
n n n n n n n n n n n n
~10000 ~10000 ~10000 ~10000 ~100 ~100 1 ~100 ~100
(0,0) (700,500) (700,0) (0,500) (1,-1) (0,0) (1,1) (-1,1) (-1,-1)
1 1 500 2 1 700 2
(0, 0) 2
11
i i i i i
2 2
(= least-squares for Gaussian noise)
T
i
Parameterize: Initialize: normalized 8-point, (P,P‘) from F, reconstruct Xi
i i i i
Minimize cost using Levenberg-Marquardt (preferably sparse LM, see book) (overparametrized)
’
15
(Expensive Method)
e
1 T T JJ
T T
(one eq./point JJT scalar)
2 2 2 1 2 2 T 2 1 T T
Fx Fx F x' F x' JJ
T T
2 2 2 1 2 2 T 2 1 T T
Fx Fx F x' F x' Fx x'
(problem if some x is located at epipole) advantage: no subsidiary variables required where 𝐺𝑦𝑗 𝑘
2 represents the square of the j-th entry of the vector Fxi
2 2 2 1 2 2 T 2 1 T T
Fx Fx 1 F x' F x' 1 Fx x'
i i i i i
2 T 2
i i i i i
2 T 2
(for all points!) Residual error:
28
homogeneous edge corner
(e.g.Harris&Stephens´88; Shi&Tomasi´94)
Find points that differ as much as possible from all neighboring points
10 10 10 10
h h w w
0.96
0.19
0.75
0.51 0.72
0.73 0.15
0.49 0.16 0.79 0.21 0.08 0.50
0.28 0.99
Step 3.1 select minimal sample (i.e. 7 matches) Step 3.2 compute solution(s) for F Step 3.3 determine inliers
until (#inliers,#samples)<95%
Step 4. Compute F based on all inliers Step 5. Look for additional matches by guided matching Step 6. Refine F based on all correct matches
(generate hypothesis) (verify hypothesis)
34
i i i i i
2 2
2 2 2 1 2 2 T 2 1 T T
Fx Fx F x' F x' Fx x'
(1.5 pixels)
37
500 corners 500 corners
38
188 matches 89 outliers 99 inliers 157 matches with guided matching
(compensate for model complexity)
simplify stereo matching by warping the images Apply projective transformation so that epipolar lines correspond to horizontal scanlines e e map epipole e to (1,0,0) try to minimize image distortion problem when epipole in (or close to) the image
Bring two views to standard stereo setup (moves epipole to ) (not possible when in/close to image)
~ image size
(calibrated) Distortion minimization (uncalibrated) (standard approach)
the epipole to a point at infinity
translation only
H-Tl=H’-Tl’
42
43
=I if x=y=0
44
45
Polar re-parameterization around epipoles Requires only (oriented) epipolar geometry Preserve length of epipolar lines Choose so that no pixels are compressed
rectified image
(Pollefeys et al. ICCV’99)
Works for all relative motions Guarantees minimal image size