An open API service indexing awesome lists of open source software.

https://github.com/johannesu/point-cloud

Curvature-based point-cloud regularization
https://github.com/johannesu/point-cloud

curvature regularization

Last synced: 7 months ago
JSON representation

Curvature-based point-cloud regularization

Awesome Lists containing this project

README

          

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

![Example](examples/example.png)

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](https://github.com/petters/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(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_.