Project 3 / Camera Calibration and Fundamental Matrix Estimation with RANSAC

In this project we essentially implement 3 subparts related to camera calibration and fundamental matrix estimation

  1. Computing Camera projection matrix
  2. Estimating the fundamental matrix
  3. Fundamental matrix with RANSAC

Computing Camera Projection Matrix

We construct a linear system of equations from the equations described in the lecture slides and the assignment writeup. We solved the minimization problem |Ax| under the constraint |x| = 1 using a property from linear algebra that the minimum is achieved at x=v_n where v_n is the last column in the V matrix in the SVD decomposition of matrix A. A full proof for this can be found at Proof

Further the center was calculated by following the equation in the writeup. The following was the output camera center and the projection matrix produced

The projection matrix is:
   -0.4583    0.2947    0.0140   -0.0040
    0.0509    0.0546    0.5411    0.0524
   -0.1090   -0.1783    0.0443   -0.5968


The total residual is: <0.0445>

The estimated location of camera is: <-1.5127, -2.3517, 0.2826>

Estimating the fundamental matrix

The estimate of the fundamental matrix found was


   -0.0000    0.0000   -0.0019
    0.0000    0.0000    0.0172
   -0.0009   -0.0264    0.9995
This was computed without the normalization step done as extra credit. The epipolar lines with the above fundamental matrix for the base pair image is as follows.

Fundamental Matrix with RANSAC and Extra Credit

For RANSAC I sampled 10 points and used 10,000 iterations to come up with the best fit line and chose a value of 0.05 for the threshold. I also implemented the extra credit as mentioned in the writeup. I normalized the points so that their mean is zero and average magnitude is about sqrt(2). I also tried average magniture of 1.0 but results were better with the value sqrt(2).

Results Mount Rushmore Without Normalization

Results Mount Rushmore With Normalization

Results Notredame Without Normalization

Results Notredame with Normalization

Results Episcopal Without Normalization

Results Episcopal With Normalization