-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/rshilliday/sfm
- Loading branch information
Showing
1 changed file
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,28 @@ | ||
# sfm | ||
An implementation of incremental structure from motion | ||
# An implementation of incremental Structure from Motion | ||
|
||
Structure from motion is an algorithm that generates a 3D reconstruction (pointcloud) from a sequence of 2D images. Instructions on running the repo can be found below. The rough steps of my pipeline are: | ||
|
||
i) Match keypoints between images | ||
ii) Find a good image pair to initialize the reconstruction (many matches and significant rotation between images) | ||
iii) Extend the reconstruction by resecting adjacent images with PnP and triangulating new points | ||
iv) Refine camera parameters and 3D point coordinates with bundle adjustment regularly | ||
|
||
Here are examples of the output I was able to generate: | ||
|
||
![](results/side-by-side.png) | ||
|
||
|
||
If desired, clone this repository and setup the conda environment: | ||
``` | ||
git clone https://github.com/rshilliday/sfm.git | ||
cd sfm | ||
conda env create -n sfm -f environment.yml | ||
conda activate sfm | ||
``` | ||
|
||
Now, run jupyter: | ||
``` | ||
jupyter notebook | ||
``` | ||
And open main.ipynb and hit "run all" to generate a 3D reconstruction of the "templeRing" dataset (http://vision.middlebury.edu/mview/data/). | ||
I also created my own dataset from pictures of a Viking figurine. To generate a reconstruction of that, in the second cell of main.ipynb change n_imgs to 49 and change the imgset parameter of `find_features()` to 'Viking', and then hit "run all". |