The 8-Point Algorithm: 16-385 Computer Vision (Kris Kitani)
The 8-Point Algorithm: 16-385 Computer Vision (Kris Kitani)
0>
xm Fxm =0
What’s the relationship between F and x?
Assume you have M point correspondences
0
{xm , xm } m = 1, . . . , M
S V D
Assume you have M point correspondences
0
{xm , xm } m = 1, . . . , M
S V D
Assume you have M point correspondences
0
{xm , xm } m = 1, . . . , M
S V D
Assume you have M point correspondences
0
{xm , xm } m = 1, . . . , M
0 0
x m x m f 1 + x m ym f 2 + x m f 3 +
0 0
y m x m f 4 + ym y m f 5 + ym f 6 +
0 0
x m f 7 + ym f 8 + f 9 = 0
2 32 3
⇥ ⇤ f 1 f2 f3 xm
0
xm 0
ym 1 4 f4 f5 f 6 5 4 ym 5 = 0
f7 f8 f9 1
AX = 0
How do you solve a homogeneous linear system?
AX = 0
Total Least Squares
2
minimize kAxk
2
subject to kxk = 1
How do you solve a homogeneous linear system?
AX = 0
Total Least Squares
2
minimize kAxk
2
subject to kxk = 1
SVD!
How do you solve a homogeneous linear system?
AX = 0
Total Least Squares
2
minimize kAxk
2
subject to kxk = 1
SVD!
How do you solve a homogeneous linear system?
AX = 0
Total Least Squares
2
minimize kAxk
2
subject to kxk = 1
SVD!
Eight-Point Algorithm
0. (Normalize points)
1. Construct the M x 9 matrix A
2. Find the SVD of ATA
3. Entries of F are the elements of column of
V corresponding to the least singular value
4. (Enforce rank 2 constraint on F)
5. (Un-normalize F)
Example
epipolar lines
2 3
0.00310695 0.0025646 2.96584
F=4 0.028094 0.00771621 56.3813 5
13.1905 29.2007 9999.79
2 3
343.53
x = 4 221.70 5
1.0
0
l = Fx
2 3
0.0295
=4 0.9996 5
265.1531
0
l = Fx
2 3
0.0295
=4 0.9996 5
265.1531
Where is the epipole?
SVD!
Fe = 0
The epipole is in the right null space of F
SVD!
Fe = 0
The epipole is in the right null space of F
SVD!
>> [u,d] = eigs(F’ * F)
eigenvectors
u =
-0.0013 0.2586 -0.9660
0.0029 -0.9660 -0.2586
1.0000 0.0032 -0.0005
eigenvalue
d = 1.0e8*
-1.0000 0 0
0 -0.0000 0
0 0 -0.0000
>> [u,d] = eigs(F’ * F)
eigenvectors
u =
-0.0013 0.2586 -0.9660
0.0029 -0.9660 -0.2586
1.0000 0.0032 -0.0005
eigenvalue
d = 1.0e8*
-1.0000 0 0
0 -0.0000 0
0 0 -0.0000
>> [u,d] = eigs(F’ * F)
eigenvectors
u =
-0.0013 0.2586 -0.9660
0.0029 -0.9660 -0.2586
1.0000 0.0032 -0.0005
eigenvalue
d = 1.0e8*
-1.0000 0 0
0 -0.0000 0
0 0 -0.0000
eigenvalue
d = 1.0e8*
-1.0000 0 0
0 -0.0000 0
0 0 -0.0000