Skip to content

Running examples that use OpenMVG

Ivan Eichhardt edited this page Sep 6, 2019 · 1 revision

This repository contains a modified version of OpenMVG (available here github.com/eivan/openMVG), that now handles affine covariant features and derivatives of the camera projection. OpenMVG is a library for computer vision and multiple-view geometry tasks.

Below, first, you'll see a description of the examples/tools using OpenMVG, provided in this repository. Next, a description of how to use a python script also provided in this repository, to run the full Structure-From-Motion (SfM) pipeline of OpenMVG, followed by the closing steps of LAF refinement and surface normal estimation using our tools.

The OpenMVG examples

To compile the OpenMVG examples provided in this repository follow the instructions in BUILD.md.

sample_openMVG_RefineLAFs

This executable reads an OpenMVG SfMData file to perform multiview Local Affine Frame (LAF) refinement for all tracks.

Example usage:

sample_openMVG_RefineLAFs --sfmdata sfm_data.bin --outdir out

sample_openMVG_LAFsToSVG

This executable is typically used for debugging, outputs .svg files for each view in the scene and draws the ellipsoids representing the LAFs onto the photos. Different tracks are distinguished with various colours.

Example usage:

sample_openMVG_LAFsToSVG--sfmdata sfm_data.bin --outdir out

sample_openMVG_EstimateNormals

This tool is used to estimate surface normals for each landmark in the scene, using the LAFs as different observations of the landmark. Surface normal estimation is performed using a simple two-view method called Fast Normal Estimator (FNE). Try it with and without refed LAFs.

Example usage:

sample_openMVG_EstimateNormals--sfmdata sfm_data.bin --outdir out

Embedding LAF refinement into the SfM pipeline

Download the SfM_quality_evaluation repository or use your favourite set of photos of a scene.

Use this python script customized to also perform multiview LAF refinement and surface normal estimation: scripts/EvaluationLauncher_TBMR.py.

You may use the following instructions to parameterize the python script. The paths might, of course, differ based on your build settings and environment.

set PYSCRIPT_NAME=scripts\EvaluationLauncher_TBMR.py
set OPENMVG_BIN=build_dir\dependencies\openMVG\src\Windows-AMD64-Release\Release\
set LAF_REFINEMENT_BIN=build_dir\bin\Release\

python %PYSCRIPT_NAME% %OPENMVG_BIN% %LAF_REFINEMENT_BIN% Benchmarking_Camera_Calibration_2008 ./