Surface Reconstruction from 3D Line Segments

Surface reconstruction from 3d line segments. [Paper] [Supplementary Material]
Langlois, P. A., Boulch, A., & Marlet, R.
In 2019 International Conference on 3D Vision (3DV) (pp. 553-563). IEEE.


  • [IMPORTANT NOTE] The plane arrangement is given as a Linux x64 binary. Please let us know if you need it for an other platform/compiler or if you have issues with it.

  • MOSEK 8 :

    • Download
    • Installation instructions.
    • Request a license (free for academics), and put it in ~/mosek/mosek.lic.
    • Set the mosek directory in the MOSEK_DIR environment variable such that <MOSEK_DIR>/8/tools/platform/linux64x86/src/fusion_cxx is a valid path:

    export MOSEK_DIR=/path/to/mosek

    • Make sure that the binaries are available at runtime:

    export LD_LIBRARY_PATH=$MOSEK_DIR/8/tools/platform/linux64x86/bin:$LD_LIBRARY_PATH

  • Clone this repository: git clone

  • Go to the directory: cd line-surface-reconstruction

  • CGAL : Version 4.11 is required:

git clone external/cgal
cd external/cgal
git checkout releases/CGAL-4.11.3
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cd ../../..
  • Make a build directory: mkdir build
  • Go to the build directory: cd build
  • Prepare the project with cmake: cmake -DCMAKE_BUILD_TYPE=Release ..
  • Compile the project: make


  • Out of the box examples are available in

  • An example of a full reconstruction procedure from a simple set of images is available here

  • A benchmark example for an artificial textureless scene (with quantitative evaluation) is available here.


For every program, a simple documentation is available by running ./<program_name> -h

  • ransac_on_lines detects planes in a line set.
  • line_based_recons_param performs reconstruction out of a set of lines and detected planes. Computing the linear program is time consuming, but optimizing is way faster. Therefore, this program 1st computes the linear program and enters a loop in which you can manually set the optimization parameters in order to find the optimal ones for your reconstruction.
  • line_based_recons does the same as line_based_recons_param but the optimization parameters are set directly in the command line. Use it only if you know the optimal parameters for the reconstruction.
  • mesh_metrics provides evaluation metrics between two meshes.


Reconstruction .ply files can be visualized directly in programs such as Meshlab or CloudCompare.

A simple OpenGL viewer is available to directly visualize the json line files.

Raw data

The raw data for Andalusian and HouseInterior is available here.
For both examples, it includes the raw images as well as the full calibration in .nvm (VisualSFM) format.

For HouseInterior, a ground truth mesh is also available.


Apart from the code located in the external directory, all the code is provided under the GPL license.

The binaries and code provided in the external/PolyhedralComplex directory is provided under the Creative Commons CC-BY-SA license.

If these licenses do not suit your needs, please get in touch with us.

Citing this work

TITLE = {{Surface Reconstruction from 3D Line Segments}},
AUTHOR = {Langlois, Pierre-Alain and Boulch, Alexandre and Marlet, Renaud},
URL = {},
BOOKTITLE = {{2019 International Conference on 3D Vision (3DV)}},
ADDRESS = {Qu{\'e}bec City, Canada},
PAGES = {553-563},
YEAR = {2019},
MONTH = Sep,
DOI = {10.1109/3DV.2019.00067},