Giter Club home page Giter Club logo

opensfm's Introduction

OpenSfM

Overview

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

Dependencies

Installing dependencies on MacOSX

Use

brew tap homebrew/science
brew install opencv
brew install homebrew/science/ceres-solver
brew install boost-python
sudo pip install -r requirements.txt

Be sure to update your PYTHONPATH to include /usr/local/lib/python2.7/site-packages where OpenCV has been installed:

export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH

Installing dependencies on Ubuntu

  1. OpenCV - Install by following the steps in the Ubuntu OpenCV installation guide. An alternative instruction tested for Ubuntu 10.04 can be found at OpenCV Docs. OpenCV requires GCC and CMake among other things.

  2. Ceres solver - Build Ceres according the documentation. Make sure to read the Linux note, follow the shared library instructions and compile Ceres with the -fPIC option. Install Ceres from the ceres-bin directory after make by:

    sudo make install
    
  3. Boost Python - Install through apt-get:

    sudo apt-get install libboost-python-dev
    
  4. NumPy, networkx, PyYaml, exifread - Install pip and then run the following from the root of the project:

    sudo pip install -r requirements.txt
    
  5. SciPy - Install gfortran through apt-get and then install SciPy with:

    sudo apt-get install gfortran
    sudo pip install scipy
    

Building

python setup.py build

Running

An example dataset is available at data/berlin.

  1. Put some images in data/DATASET_NAME/images/
  2. Put config.yaml in data/DATASET_NAME/config.yaml
  3. Go to the root of the project and run bin/run_all data/DATASET_NAME
  4. Start an http server from the root with python -m SimpleHTTPServer
  5. Browse http://localhost:8000/viewer/reconstruction.html#file=/data/DATASET_NAME/reconstruction.meshed.json.

Things you can do from there:

  • Use datasets with more images
  • Click twice on an image to see it. Then use arrows to move between images.
  • Run bin/mesh data/berlin to build a reconstruction with sparse mesh that will produce smoother transitions from images

opensfm's People

Contributors

davll avatar godspeed1989 avatar jesolem avatar kolen avatar ktuite avatar oscarlorentzon avatar paulinus avatar ybkuang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.