FF = u2F( u1, u2 )
Create function u2F
which computes the fundamental matrix using the sevenpoint algorithm from 7 euclidean correspondences u1
, u2
, measured in two images. For constructing the third order polynomial from null space matrices G1
and G2
, there is the u2F_polynom
function in the tools repository, that can be used in your code. There can be multiple solutions; return all solutions as a list of matrices (np.array
) in python (FF = [ F1, F2, … ]
) or a cell array of matrices in matlab (FF = { F1, F2, …};
).
The images and the point correspondences can be downloaded from the InputData.
There is a set of point matches between the images above. Additionaly, there is list of edges
 indices of points, that form an edge (1based). There is also list of 12 indices of points ix
, (1based) that should be used for estimating epipolar geometry.
F
relating the images above: generate all 7tuples from the selected set of 12 correspondences, estimate F
for each of them and chose the one, that minimizes maximal epipolar error over all matches.
F
, compute the corresponding epipolar lines and draw them into the images in corresponding colours (a line segment given by the intersection of the image area and a line must be computed). Export as 08_eg.pdf
.
d1_i
and d2_i
for all points (point index on horizontal axis, the error on vertical axis). Draw both graphs into single figure (different colours) and export as 08_errors.pdf
.
08_data.mat
: the input data u1
, u2
, ix
, the indices of the 7 points used for computing the optimal F
as point_sel
and the matrix F
.
Epipolar error: for a particular fundamental matrix F
, compute epipolar lines in the second image for all points in the first image, and vice versa. Then evaluate the Euclidean distances between a point and corresponding epipolar line for all points in both images, i.e. d1_i
and d2_i
. The epipolar error for the ith match is defined as d1_i + d2_i
.
Upload an archive consisting of:
matlab  python 

08_eg.pdf 

08_errors.pdf 

08_data.mat 

u2F.m  
hw08.m  hw08.py containing the u2F function 
any other files required by your solution (including data and files from the repository).