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
- Host: GitHub
- URL: https://github.com/johannesu/point-cloud
- Owner: johannesu
- License: gpl-2.0
- Created: 2015-05-11T13:43:08.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-02T14:07:19.000Z (over 10 years ago)
- Last Synced: 2025-06-22T07:44:21.186Z (7 months ago)
- Topics: curvature, regularization
- Language: C++
- Homepage:
- Size: 1.26 MB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Implementation of [1] written in MATLAB and C++.

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_.