For information regarding the specifics of calculations and specifications please see the assignment details here
In order to approximate the projection matrix we needed a list of 2D and 3D points and their correspondences. Luckily we were given these points by the problem spec. Once we had these points we can simply set up a system of linear equations and solve for the missing terms that are the elements of the projection matrix. In order to do this we set up the following formula and solved for M (which is a reshaped version of the projection matrix).
From this we were able to compute the camera center by using the formula we derived in class that
In order to approximate the fundamental matrix we needed 2 lists of 2D points in different images (believed to have correspondence) and then we could perform a regression to solve for
similar to the process we used in part 1. However the fundamental matrix is rank 2, so as an additional step we perform SVD and remove the smallest eigenvalue (set it to zero). Once we had our estimated fundamental matrix we could measure our correctness by looking at the epipolar lines between the images. Note that all interest points should have lines going directly through them in a perfect world.
While this correspondence looked perfect in part 2 this was because all of our interest points were already correctly matched. In reality we have many false points and would like to still be able to estimate the fundamental matrix. In order to do this we used the RANSAC algorithm which is a fancy way of saying we:
This allowed us to eliminate more spurious interest points creating more meaningful matchings between interest points as seen below.
We can further increase the accuracy of the estimation of the fundamental matrix by normalizing the coordinates before solving for the fundamental matrix. To do this we:
For more information on how this was done please look in the estimate_fundamental_matrix.m file or in the design doc listed at the top.
Normalization allowed us to eliminate more spurious interest points creating more meaningful matchings between interest points as seen below.
It is also easier to see the correctness that we gain by looking at the epipolar lines.
Before |
After |