Clone wiki

ppsfm / Home

Practical Projective Structure-from-Motion (P2SfM)

This project hosts code implementing the P2SfM method for projective 3D reconstruction and described in the corresponding ICCV'17 paper by Ludovic Magerand and Alessio Del Bue. The paper is available in the Downloads section or on the project page:

This work has been done at the Istituto Italiano di Tecnologia (IIT) at the Visual Geometry an Modelling (VGM, Lab and it is published under the GPL 3 license. It is provided for research purpose only and appropriate citation to this paper should be made if you use it:

author = {Magerand, Ludovic and Del Bue, Alessio},
title = {Practical Projective Structure From Motion (P2SfM)},
booktitle = {The IEEE International Conference on Computer Vision (ICCV)},
month = {Oct},
year = {2017}

For any questions or comments on the code, feel free to contact or

Details below are provided with Ubuntu code examples for reference.


The code is written in MATLAB and the following toolboxes:

  • MATLAB Computer Vision toolbox (fundamental matrix estimation and some visualization routines), part of matlab but require a specific license.
  • Toolkbox SeDuMi SDP solver for GloptiPoly
  • Toolkbox GloptiPoly toolbox (polynomial optimization used in the metric upgrade) available.

As well as mercurial and 7zip:

sudo apt-get install mercurial
sudo apt-get install p7zip-full

Windows softwares are available at mercurial and 7-Zip

Installation steps

  1. Checkout (or download and extract) the repository.
hg clone https://[user]
  1. Open file ppsfm_options.m and edit lines 58 and 59 to reflect the path of the corresponding toolboxes. If you already have them in your path, just put an empty string.
  2. Download and extract the data archive in the same directory.
7z x data.7z


To run one of the real dataset available in the data archive:

  1. Open the file test_ppsfm.m and uncomment the corresponding line.
  2. If needed (as written in the comments), change the option max_level_views on line 73 to the given value.
  3. Execute the test_ppsfm.m script from the command line.


TODO: add the most commons options and explain them + descrption of the dataset mat files