Skip to content

johannesu/point-cloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Implementation of [1] written in MATLAB and C++.

Example

The code uses the roof duality code from [2].

The code has been tested on:

  • Windows 7, MATLAB 2015a, Visual Studio 2013.
  • Ubuntu 14.04, MATLAB 2015a, GCC 4.8.2.

Getting started

The code requires SPII, which is used to perform local optimization via automatic differentiation.

Windows

Update include/compile_script.m with the correct folders to Eigen and SPII:

...
%%%%%%%%%
% ACTION REQUIRED:
% Point this to your Eigen include directory.
extra_args{end+1} = '-I"C:\Program Files\Eigen"';
%%%%%%%%

% Default installation directories for Spii
extra_args{end+1} = '-I"C:\Program Files\SPII\include"';
extra_args{end+1} = '-L"C:\Program Files\SPII\lib"';
...

Linux/OSX

Install SPII in the default path.

Examples

A good place to start is with the two scripts:

  • examples/example_2D.m
  • examples/example_3D.m

Extend

If you like to add a new cost function update three files and remove the old mex files:

  • include/PointCloud.h add a new functor, e.g:
class My_regularization { ...
  • include/mex_wrapper.h update with the new functor, e.g.:
...
} else  if (!strcmp(problem_type,"my_cost")){
main_function<Quadratic_data, My_regularization>(nlhs, plhs, nrhs, prhs);
} else 
...
  • PointCloud.m update to allow the new cost function, e.g:
case {'linear','quadratic', 'default', 'length', 'my_cost'}
  • Remove the mex-files in /include

  • You can now switch to the new function as:

Obj.cost_function = 'myCost';

Code authors

  • Johannes Ulén
  • Carl Olsson

References

  1. Curvature-based regularization for surface approximation.
    IEEE Conference on Computer Vision and Pattern Recognition, 2012
    C. Olsson and Y. Boykov.

  2. Optimizing binary MRFs via extended roof duality.
    IEEE Conference on Computer Vision and Pattern Recognition, 2007.
    C. Rother, V. Kolmogorov, V. Lempitsky, and M. Szummer.

About

Curvature-based point-cloud regularization

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published