3D reconstruction from two images. Reconstruction class modified from here.
Simple 3D reconstruction from two images of the same scene from two different viewpoints. There are many many books and articles which explain it way better (for example), but I'll just point the steps I took:
- Find the camera matrix. (Not in the code)
- Get the keypoints and descriptors using SIFT, SURF, ...
- Calculate the optical flow using the Lukas-Kanade algorithm.
- Find the essential matrix using Singular Value Decomposition.
- Triangulate.
- Visualize.