Skip to content

Commit

Permalink
Merge branch 'develop' => v0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoulon committed May 30, 2015
2 parents 82ecbc4 + d1d4ad8 commit bc0def6
Show file tree
Hide file tree
Showing 240 changed files with 3,995 additions and 4,718 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ language: cpp

compiler:
- gcc
#- clang: #Consider clang later, since cereal does not build fine with clang
#- clang: #Consider clang later, since cereal does not build fine on the clang CI version
# - "3.3"

before_install:
Expand All @@ -33,7 +33,7 @@ before_script:

script:
# limit GCC builds to a reduced number of thread for the virtual machine
- if [ "$CC" = "gcc" ]; then make; else make -j 2; fi
- make -j 2
# Perform unit tests only on GCC builds
- if [ "$CC" = "gcc" ]; then make test; fi

Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Michael Holroyd
Romain Janvier
Rory McCann
Romuald Perrot
rhiestan
sergi pujades-rocamora
sflotron
vincentweb
Expand Down
54 changes: 38 additions & 16 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
OpenMVG (open Multiple View Geometry)
=====================================

-----------------
Build instruction
-----------------
------------------
Build instructions
------------------

Required tools:
* Cmake
Expand All @@ -31,12 +31,21 @@ OpenMVG_BUILD_TESTS (ON/OFF(default))=> Build openMVG unit tests
OpenMVG_BUILD_EXAMPLES (ON/OFF(default))=> Build OpenMVG example applications.
Does not affect binaries under 'software'

--------------------------
General informations
for openMVG SfM pipelines
--------------------------
OpenMVG can export graphs as graphviz .dot files and render them as SVG files.
If you want consider this graph visualization feature, please consider to install Graphviz.

-----------------
Linux compilation
-----------------

Setup the required external library.
* sudo apt-get install libpng-dev libjpeg-dev libtiff-dev libxxf86vm1 libxxf86vm-dev libxi-dev libxrandr-dev
If you want see the view graph svg logs
* sudo apt-get install graphviz

$ git clone --recursive https://github.com/openMVG/openMVG.git
$ cd openMVG
Expand Down Expand Up @@ -92,6 +101,7 @@ Compile the libraries and binaries samples.
-------------------
Mac compilation
-------------------

$ git clone --recursive https://github.com/openMVG/openMVG.git
$ cd openMVG
$ ls
Expand All @@ -105,22 +115,34 @@ If you want enable unit tests and examples to the build:
$ xcodebuild -configuration Release


--------------------
Using openCV sample
--------------------
--------------------
Using openCV sample
--------------------

Add -DOpenMVG_USE_OPENCV=ON to your cmake command line and set OpenCV_DIR variable to your openCV build directory
=> i.e.: -DOpenCV_DIR="/home/user/Dev/github/itseez/opencv_Build" -DOpenMVG_USE_OPENCV=ON

------------------------------------
Using as library dependency in cmake
------------------------------------
Adding following lines to your CMakeLists.txt should provide OpenMVG usable as
static library:
------------------------------------------------------------
Using OpenMVG as a third party library dependency in cmake
-------------------------------------------------------------

OpenMVG can be used as a third party once it have been installed.
Because it can use it's own ceres version, it's better to install it locally and not in system files.
So please consider using the CMAKE_INSTALL_PREFIX cmake variable to specify a local installation directory.

Here the syntax to add the variable to the cmake command line:
-DCMAKE_INSTALL_PREFIX:STRING="./openMVG_install"

Perform "make" and "make install"

Once the library has been installed, go to your project that want use OpenMVG as an external library and add:

add_subdirectory(openMVG/src)
include_directories(${OpenMVG_INCLUDES})
target_link_libraries(target ${OpenMVG_LIBS})
FIND_PACKAGE(OpenMVG REQUIRED)
INCLUDE_DIRECTORIES(${OPENMVG_INCLUDE_DIRS})
ADD_EXECUTABLE(main main.cpp)
TARGET_LINK_LIBRARIES(main ${OPENMVG_LIBRARIES})

Information about required dependencies, standalone build and platform
specificity can be found below.
Specify to CMAKE where OpenMVG have been installed by using the cmake OpenMVG_DIR variable that must point to:
-DOpenMVG_DIR:STRING="YourInstallPath"/share/openMVG/cmake

A message will be displayed if OpenMVG is found or not at the cmake configure step.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,16 @@ publications are relevant:
[5] Moisan Lionel, Moulon Pierre and Monasse Pascal. IPOL 2012.
[Automatic Homographic Registration of a Pair of Images, with A Contrario Elimination of Outliers.](http://dx.doi.org/10.5201/ipol.2012.mmm-oh)

Please cite [3] if you use openMVG library in your work.
[6] Moulon Pierre, Monasse Pascal and Marlet Renaud. ICCV 2013.
[Global Fusion of Relative Motions for Robust, Accurate and Scalable Structure from Motion.](http://imagine.enpc.fr/~moulonp/publis/iccv2013/index.html)

or cite it as:

```
@misc{openMVG,
author = "Pierre Moulon and Pascal Monasse and Renaud Marlet and Others",
title = "OpenMVG",
howpublished = "\url{https://github.com/openMVG/openMVG}",
}
```

3 changes: 3 additions & 0 deletions docs/sphinx/rst/bibliography.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ Bibliography
.. [CMPMVS] **Multi-View Reconstruction Preserving Weakly-Supported Surfaces.**
M. Jancosek, T. Pajdla, CVPR 2011.
.. [Waechter2014] **Let There Be Color! Large-Scale Texturing of 3D Reconstructions.**
M. Waechter, N. Moehrle, and M. Goesele, ECCV 2014.
.. [FLANN] **Fast Approximate Nearest Neighbors with Automatic Algorithm Configuration.**
Muja, Marius, and David G. Lowe. VISAPP (1). 2009.
Expand Down
59 changes: 0 additions & 59 deletions docs/sphinx/rst/openMVG/bundle_adjustment/bundle_adjustment.rst

This file was deleted.

27 changes: 11 additions & 16 deletions docs/sphinx/rst/openMVG/cameras/cameras.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,6 @@ A 3D point is projected in a image with the following formula (homogeneous coord
OpenMVG Pinhole camera models
------------------------------

* Simple pinhole camera models (intrinsic + extrinsic(pose))
* Pinhole camera models with radial distortion (intrinsic + extrinsic(pose))

.. code-block:: c++

// Setup a simple pinhole camera at origin
// Pinhole camera P = K[R|t], t = -RC
Mat3 K;
K << 1000, 0, 500,
0, 1000, 500,
0, 0, 1;
PinholeCamera cam(K, Mat3::Identity(), Vec3::Zero());

// Radial distortion (brown model -> polynomial distortion (K1 to k3))
BrownPinholeCamera(K, Mat3::Identity(), Vec3::Zero(), k1, k2 , k3);

* Pinhole intrinsic

* :class:`Pinhole_Intrinsic : public IntrinsicBase`
Expand All @@ -111,3 +95,14 @@ OpenMVG Pinhole camera models
* classic pinhole camera (Focal + principal point and image size) + radial distortion by three factors.
* can add and remove distortion

* Simple pinhole camera models (intrinsic + extrinsic(pose))

.. code-block:: c++

// Setup a simple pinhole camera at origin
// Pinhole camera P = K[R|t], t = -RC
Mat3 K;
K << 1000, 0, 500,
0, 1000, 500,
0, 0, 1;
PinholeCamera cam(K, Mat3::Identity(), Vec3::Zero());
3 changes: 1 addition & 2 deletions docs/sphinx/rst/openMVG/openMVG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ openMVG provide a collection of tiny libraries that allow to solve computer visi
robust_estimation/robust_estimation.rst
matching/matching.rst
tracks/tracks.rst
bundle_adjustment/bundle_adjustment.rst
geometry/geometry.rst


Expand All @@ -34,7 +33,7 @@ Todo:

* **graph** - Manipulation of graphs (connected CC, triplet listing...)

* **exif_IO** - Collection of tools to extract and use image EXIF data.
* **exif** - Collection of tools to extract and use image EXIF data.

* **matching_image_collection** - Functions to perform local matching and geometric filtering of putative correspondences in image collections.

Expand Down
21 changes: 18 additions & 3 deletions docs/sphinx/rst/openMVG/sfm/sfm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ Non linear refinement, Bundle Adjustment

OpenMVG provides a generic bundle_adjustment framework to refine or keep as constant the following parameters:

* internal parameters,
* external parameters,
* 3D structure.
* internal orientation parameters (intrinsics: camera projection model),
* external orientation parameters (extrinsics: camera poses),
* structure (3D points).

.. code-block:: c++

Expand All @@ -128,6 +128,21 @@ OpenMVG provides a generic bundle_adjustment framework to refine or keep as cons

const double dResidual_after = RMSE(sfm_data);

Bundle Adjustment (ajustement de faisceaux), is a non linear optimization problem.
It looks to minimizing the residual error of a series of user cost functions (the reprojection errors of the structure :math:`X_j` to the images measures :math:`x_j^i`).
According:

* :math:`X_j` the Jnth 3D point of the structure of the scene,
* :math:`x_j^i` the observation of the projection of the 3D point :math:`X_j` in the image :math:`i`,
* :math:`P_i` the projection matrix of the image :math:`i`

From a user provided initial guess the vector of parameters: :math:`\{X_j,P_i\}_{i,j}`: camera parameters :math:`\{P_i\}_i` and the scene structure :math:`\{X_j\}_j` are refined in order to minimizes the residual reprojection cost:

.. math::
\underset{ \{P_i\}_i, \{X_j\}_j}{minimize} \left\| \sum_{j=0}^{m} \sum_{i=0}^{n} x_j^i - P_i X_j \right\|_2
OpenMVG proposes options in order to tell if a parameter group must be kept as constant or refined during the minimization.

SfM Pipelines
==============

Expand Down
42 changes: 42 additions & 0 deletions docs/sphinx/rst/software/SfM/ExportUndistortedImages.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

********************************************
openMVG_main_ExportUndistortedImages
********************************************

This application export undistorted images from known camera parameter intrinsic.

Algorithm of the application

.. code-block:: c++

Require: internal + camera calibration
Require: images
Ensure: undistorted images
for each view
if view has valid intrinsic
undistort and save the undistorted view

Information and usage
========================

The chain is designed to run on a sfm_data.json file.
The sfm_data file should contains:
- valid view with some defined intrinsics,

.. code-block:: c++

$ openMVG_main_ExportUndistortedImages -i Dataset/out_Reconstruction/sfm_data.json -o Dataset/out_Reconstruction/undistortedImages

Arguments description:

**Required parameters:**

- **[-i|--input_file]**

- a SfM_Data file with valid intrinsics and poses and optional structure

- **[-o|--outdir]**

- path where the undistorted images will be stored


5 changes: 5 additions & 0 deletions docs/sphinx/rst/software/SfM/MVS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ Export to MVE (Multi-View Environment)

You will need to compile MVE tools and `FSSR <http://www.gris.informatik.tu-darmstadt.de/projects/floating-scale-surface-reco/>`_.

Export to MVS Texturing
=======================

If you don't want to use the full MVE pipeline but only `MVS Texturing <http://www.gris.tu-darmstadt.de/projects/mvs-texturing/>`_ [Waechter2014]_ to project a set of oriented images on a mesh, one solution is to use the openMVG_main_openMVG2MVSTEXTURING binary. This binary converts your SfM_Data file into one format used by MVS Texturing. In addition, you may need to undistort your images with openMVG_main_ExportUndistortedImages as it's not handled by the openMVG_main_openMVG2MVSTEXTURING tool.

Export to CMPMVS
========================

Expand Down
2 changes: 2 additions & 0 deletions docs/sphinx/rst/software/SfM/SfM.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ OpenMVG SfM pipelines run as a 4 step process:

./ComputeSfM_DataColor.rst
./ComputeStructureFromKnownPoses.rst
./ExportUndistortedImages.rst


5. Optional further processing (3rd party)
Expand Down Expand Up @@ -131,6 +132,7 @@ To know more about each tool visit the following link and read the doc below:
./GlobalSfM.rst
./ComputeSfM_DataColor.rst
./ComputeStructureFromKnownPoses.rst
./ExportUndistortedImages.rst

.. toctree::
:maxdepth: 1
Expand Down
Loading

0 comments on commit bc0def6

Please sign in to comment.