Skip to content
C++ implementation of the Medial Axis Shrinking Ball algorithm
C++ CMake C
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmake
src Use size_t to index simplification grid (#23) Jan 28, 2017
thirdparty Update projects and remove vrui/kdtree2 Oct 19, 2016
vs_build compute_ma - A more complete solution to handle duplicate coordinates… Oct 27, 2016
CMakeLists.txt let cmake compile everything again Oct 25, 2016
LICENSE switch to MIT license Apr 21, 2016
README.md update README Oct 26, 2016

README.md

masbcpp

masbcpp is a C++ implementation of the shrinking ball algorithm to approximate the Medial Axis Transform (MAT) of an oriented point cloud. It is being developed in support of the 3DSM project that aims to explore possible applications of the MAT for GIS point clouds (e.g. from airborne LiDAR). To deal with noisy input data a novel noise-handling mechanism is built-in.

See this video for a demonstration of the MAT of some LiDAR point clouds. And this video demonstrates how the shrinking ball algorithm works.

Installation

For Linux/OS X:

$ git clone https://github.com/tudelft3d/masbcpp.git
$ cd masbcpp
$ cmake .
$ make

Building on windows should be possible with Visual Studio.

External dependencies

PCL is currently the only dependency that is not included in this distribution (but PCL has many dependencies of its own).

###Build with OpenMP support (multithreading) The build system should autodetect whether your compiler supports OpenMP and build masbpp with multithreading support accordingly. To enable multithreading on Mac OS X (tested with version 10.10), do

$ brew install clang-omp

prior to building masbcpp (assuming you have installed Homebrew).

Usage

See

$ ./compute_ma --help

and

$ ./compute_normals --help

and

$ ./simplify --help

Currently only NumPy binary files (.npy) are supported as input and output. Use pointio for reading and writing of .npy files and conversion from the ASPRS LAS format.

Limitations

The current implementation is not infinitely scalable, mainly in terms of memory usage. Processing very large datasets (hundreds of millions of points or more) is therefore not really supported.

Acknowledgements

The shinking ball algorithm was originally introduced by

@article{ma12,
  title={3D medial axis point approximation using nearest neighbors and the normal field},
  author={Ma, Jaehwan and Bae, Sang Won and Choi, Sunghee},
  journal={The Visual Computer},
  volume={28},
  number={1},
  pages={7--19},
  year={2012},
  publisher={Springer}
}

Details on how I adapted the shrinking ball algorithm to handle noisy inputs can be found in

@article{Peters16,
	author = {Peters, Ravi and Ledoux, Hugo},
	title = {Robust approximation of the {Medial Axis Transform} of {LiDAR} point clouds as a tool for visualisation},
	journal = {Computers \& Geosciences},
	year = {2016},
	volume = {90},
	number = {A},
	pages = {123--133},
	month = {mar}
}

I would like to thank the authors of the following libraries for releasing their code to the general public under permissive licenses, masbcpp ships with (parts of) these libraries:

You can’t perform that action at this time.