openMVG: "open Multiple View Geometry"

Checkout the code

openMVG code is hosted on GitHub https://github.com/openMVG/openMVG. We recommend you to use the github fork and "pull request" mechanism in order to contribute to the library. Submit your "pull request" to the "develop" branch.

Keep your commits as small as possible and use informative commit message.

  • Naming rules:
    • File extension:
    • C++ => .cpp, .hpp
      C => .c, .h

  • Space, alignments, etc.
  • Each line of text be at most 80 characters long,
    Use only spaces, a tab/indentation corresponds to 2 spaces at a time.

  • Try to follow the following guidelines C++ google styleguide.
  • Tested compilers:

    • GCC 4.6.3, linux
    • Visual Studio 2008/2010, Windows
    • xcodeBuild, Mac OS X.

    First steps:

    openMVG data are contained in matrix that relies on the Eigen library.
    2D, 3D points are stored in column major matrix. Accessing each datapoint is done by the col(Inth) function.

    #include "openMVG/numeric/numeric.h"
    #using namespace openMVG;
    void test() {
    // Create 10 2d points.
    Mat pt2Ds(2, 10);

    // Get back the 3rd point
    Vec2 pt2D = pt2Ds.col(3);
    }

    Code samples:

    In order to learn to use the library openMVG is provided with code samples:
    • openMVG_Samples/siftPutativeMatches
      • Open two images,
      • Compute and match sift points and descriptors with distance ratio.

    • openMVG_Samples/robust_homography
      • Compute the sift points that are valid under homography constraint.

    • openMVG_Samples/robust_fundamental
      • Compute the sift points that are valid under fundamental matrix constraint.

    • openMVG_Samples/robust_essential
      • Compute the sift points that are valid under essential matrix constraint,
      • Triangulate the corresponding points,
      • Save the reconstructed scene in PLY file (open it with Meshlab).
    A large part of openMVG features are covered with unit tests. Unit test ensures that the code works as it should and enables more consistent repeatability and provide also a kind of tutorial about usage of the features.