




function F = EstimateFundamentalMatrix(x1, x2)
%% EstimateFundamentalMatrix
% Estimate the fundamental matrix from two image point correspondences
% Inputs:
% x1 - size (N x 2) matrix of points in image 1
% x2 - size (N x 2) matrix of points in image 2, each row corresponding
% to x1
% Output:
% F - size (3 x 3) fundamental matrix with rank 2
A = zeros(8,9);
for i = 1:8
A(i,:)