Hi folks!
As I was assigned to do the preliminary about an interesting computer vision algorithm named Structure from Motion, so I am going be breaking the process down a bit as it can ease your process getting into SfM.
There are people who already implemented SfM algorithm in many languages such as MATLAB, C++, and Python. I have done some searches and found out that OpenSfM
library is a potential library to be used mainly because it is an open-source project, so I can see how the code works.
Let’s get started with how to setup the library.
This part is going to be about how to build the library from its source codes.
First of all, we have to clone the project from GitHub using --recursive
option.
git clone --recursive https://github.com/mapillary/OpenSfM
Then we need to make sure that the submodules are updated.
cd OpenSfM && git submodule update --init --recursive
The main dependencies we have to install are:
If you only want to build the source codes to bin/ directory, it will automatically build all codes for you.
python3 setup.py build
Just in case that you need to install the opensfm
package, then use install command through setup.py
file.
python3 setup.py install
This section is dedicated to some issues you might be encountering during the setup process.
As the library utilizes Python simeple HTTP server, in Python 3, you have to use this command instead of the indicated command in the document.
|
|
On Linux
, if you are running the OpenSfM scripts with your default python command, it is going to call your python
, which means Python version 2 by default. So you have to change some files to make it works normally.
|
|
|
|
The required dependency of pyproj
is cython
, so just install it before installing pyproj.
pip3 install cython
The default remote url is sometimes unavailable, so you can use this link instead.
pip3 install git+https://github.com/jswhit/pyproj.git
The document is written on the Sphinx
tool and sphinx_rtd_theme
. If you don’t have these packages, just install them through pip.
|
|