SfM: Structure from Motion

Structure from Motion computes an external camera pose per image (the motion) and a 3D point cloud (the structure) from:

  • images,
  • some intrinsic camera parameters,
  • corresponding geometric valid features accross images.
../../../_images/imagesInput.png

Figure : Input images, estimated camera location and structure.

openMVG SfM tools

  • 2 Structure from Motion (SfM) pipeline:
    • an Incremental Structure from Motion chain [ACSfM] (ACCV 2012),
    • a Global Structure from Motion chain [GlobalACSfM] (ICCV 2013),
  • 1 Structure from known Motion (SfM) pipeline:
    • Structure computation from known camera poses and features.
  • tools to visualize:
    • features,
    • photometric/geometric matches correspondences,
    • features tracks.
  • tools to export to existing Multiple View Stereovision (MVS) pipeline:

OpenMVG SfM pipelines

OpenMVG SfM pipelines run as a 4 step process:

2. Image description computation

3. Corresponding images and correspondences computation

5. Optional further processing (3rd party)

You can either run by hand all the process or use pre-defined python scripts (that are using some default options).

OpenMVG SfM pipelines demo

A complete ready to use tutorial demo is exported in your build directory. It clones an image dataset and run the SfM pipelines on it:

  • openMVG_Build/software/SfM/tutorial_demo.py

In order to use easily the Sequential or the Global pipeline, ready to used script are exported in your build directory:

  • openMVG_Build/software/SfM/SfM_SequentialPipeline.py
  • openMVG_Build/software/SfM/SfM_GlobalPipeline.py

To use them simply run:

$ cd openMVG_Build/software/SfM/
$ python SfM_SequentialPipeline.py [full path image directory] [resulting directory]
$ python SfM_SequentialPipeline.py ~/home/user/data/ImageDataset_SceauxCastle/images ~/home/user/data/ImageDataset_SceauxCastle/Castle_Incremental_Reconstruction

$ python SfM_GlobalPipeline.py [full path image directory] [resulting directory]

More details about openMVG tools

To know more about each tool visit the following link and read the doc below:

PS: We strongly advise to use a 3 directories based data organisation structure

  • images
    • your image sequence.
  • matches
    • directory used to store image information, images features, descriptors and matches information.
  • outReconstruction
    • directory used to store the SfM result and process log.