

Reconstructed the scene from two images (shown above) using the SIFT matchings. The SIFT descriptors are simply computed and matched using OpenCV.


RANSAC estimation: The estimation of E can be made much more robust by selecting sets of points that reach a common agreement (eliminating outliers or spurious matchings) and obtain a better estimate of E. The epipolar lines are drawn using the essential matrix E (for calibrated points).

To recover the transformation R, T between the two cameras, SVD decomposition of E is done. For a given estimate of E, there are two possible solutions for (T, R) due to the twisted pair ambiguity. So there are four possible solutions for (R, T), considering twisted pair ambiguity of E and -E.


Then triangulation is done to check whether a given candidate pair of (R, T) is the correct transformation (one out of the four candidates). This is one by picking the candidate that has the highest number of reconstructed points in front of both the cameras.


Code: click here