Discrete Epipolar Geometry and Its Application to 3D Reconstruction