Structure from Motion Algorithms in Python.
Eventually, this is intended to be a collection of factorization based structure from motion algorithms. Currently, it only contains a standard rigid factorization algorithm and a state of the art non-rigid shape basis factorization method (Dai et al. 2012) that won the best paper at CVPR2012.
NOTE: This is extremely beta, and no claim is made about the correctness of these implementations. There are likely bugs, and thus contributions and/or friendly comments are welcome. See below for contact information.
- setuptools (you likely have this)
- CVXOPT (for the shape-basis method)
- matplotlib (for viewing results)
- nose (if you want to run the test suite).
To run Dai et al. 2012 on an observation matrix W
import sfm # Run Dai2012 with 3 basis shapes. inferred_model = sfm.factor(W, n_basis = 3) # Get the Fx3xN tensor of points in the # cameras reference frame. Ps = inferred_model.Ps # To view the recovery (using matplotlib) inferred_model.visualize()
To contact the author email jtaylorFOOcs.toronto.edu where FOO is replaced with the at symbol.