Skip to content

postmalloc/tinysfm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tinysfm

TinySFM is a tiny (~50 loc) implementation of Incremental Structure From Motion. There are no optimisations, no bundle adjustment, no real frame picking strategies. It is small, simple, and (hopefully) easy to grok!

Expects an OpenMVG dataset-like directory structure -

dataset/
    Herz-Jesus-P8/
        img0.jpg
        img1.jpg
        img2.jpg
        ..
        K.txt

K.txt must contain the camera parameters in a 3x3 Numpy readable format. E.g. -

2759.48 0 1520.69 
0 2764.16 1006.81 
0 0 1

You may use the data from OpenMVG benchmark repo.

Dependencies

OpenCV
Numpy
Matplotlib

Usage

python tinysfm.py dataset/Herz-Jesus-P8
It creates a 3D reconstruction from the images in the directory.

Note: TinySFM assumes the photos in directory are named in the order in which they are captured as you move around the subject. Unordered names will affect the quality of reconstruction.

References

Hartley, R. and Zisserman, A., Multiple View Geometry in Computer Vision (2004)

License

MIT

Releases

No releases published

Packages

No packages published

Languages