Open Source Structure from Motion pipeline
1.7K
OpenSfM is a Structure from Motion library written in Python on top of OpenCV. The library serves as a processing pipeline for reconstructing camera poses and 3D scenes from multiple images. It consists of basic modules for Structure from Motion (feature detection/matching, minimal solvers) with a focus on building a robust and scalable reconstruction pipeline. It also integrates external sensor (e.g. GPS, accelerometer) measurements for geographical alignment and robustness. A JavaScript viewer is provided to preview the models and debug the pipeline.
Checkout this blog post with more demos
Install OpenCV using
brew tap homebrew/science
brew install opencv
brew install homebrew/science/ceres-solver
brew install boost-python
sudo pip install -r requirements.txt
And install OpenGV using
git clone https://github.com/paulinus/opengv.git
cd opengv
mkdir build
cd build
cmake .. -DBUILD_TESTS=OFF -DBUILD_PYTHON=ON
make install
Be sure to update your PYTHONPATH to include /usr/local/lib/python2.7/site-packages where OpenCV and OpenGV have been installed. For example:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
See the Dockerfile for the commands to install all dependencies on Ubuntu 14.04. The steps are
-fPIC compilation flagWhen running OpenSfM on top of OpenCV 3.0 the OpenCV Contrib modules are required for extracting SIFT or SURF features.
python setup.py build
An example dataset is available at data/berlin.
data/DATASET_NAME/images/data/DATASET_NAME/config.yamlbin/run_all data/DATASET_NAMEpython -m SimpleHTTPServerhttp://localhost:8000/viewer/reconstruction.html#file=/data/DATASET_NAME/reconstruction.meshed.json.Things you can do from there:
bin/mesh data/berlin to build a reconstruction with sparse mesh that will produce smoother transitions from imagesContent type
Image
Digest
Size
352 MB
Last updated
about 10 years ago
docker pull freakthemighty/opensfm