Search
[F, G] = u2FG( u1, u2 )
The function u2FG computes the 'fundamental matrix' G using the eight-point algorithm from 8 euclidean correspondences u1, u2, measured in two images. Then the true fundamental matrix F is found, which is close to G and rank(F) = 2.
u2FG
G
u1
u2
F
rank(F) = 2
Inside this function, prior to constructing a matrix for SVD, the points must be normalized. This can be done by subtracting a centroid of the 8 points and dividing by it's standard deviation; in each image separately. Express the normalization as homographies H1 and H2, the points are modified by these.
H1
H2
u1n = H1 * u1p; % u1p are homogeneous u2n = H2 * u2p; % u2p are homogeneous
Then the computed Gn and Fn relate the normalized correspondences u1n and u2n and must be back-normalized.
Gn
Fn
u1n
u2n
G = H2' * Gn * H1 F = H2' * Fn * H1
The matrix Gn computed by SVD has usually rank = 3 due to noise in data. Therefore modification to rank = 2 is needed. Compute SVD of the Gn, nullify the D(3,3) and compose the matrix back.
1. Correspondences between the images
2. Epipolar geometry
l1_i = F'*x2_i
l2_i = F*x1_i
i
d1_i = d(x1_i,l1_i)
d2_i = d(x2_i,l2_i)
d1_i + d2_i
08_eg.pdf
d1_i
d2_i
08_errors.pdf
08_data.mat
point_sel
Hand an archive consisting of:
u2FG.m
hw08.m
any other files required by hw08.m (including data and files from the repository).