The repository contains the python to reconstruct the scene using 2d images with the help of incremental SFM. The camera poses obtained in the subsequent frame are relative to the first frame. Steps involved in the process is given below,
- Used SIFT to extract the keypoints and descriptors from the image. stored these features for future references for faster processing.
- used the brute force matcher to match the descriptors and store the matches ofr the first time for future references.
- first 2 views are used for constructing the baseline poses.
- create 3d points for the baseline poses using triangulation
- Incrementally, find the camera poses relative to the baseline views using PnP projection
- Traingulate the new 3d points using the newly obtained pose from the PnP projection.
- Do bundle adjustment using least squares for every few frames
- repeat the process until all the images are processed
Run the solution using following command
python3 main.py "path/to/your/images"
The structure of dataset should be arranged as follows
Root dir/
images/
0000.jpg
0001.jpg
...
K.txt
Use meshlab to view the pointcloud stored in the reconstructed