PrimitivesFittingLib
PrimitivesFittingLib copied to clipboard
A unified library for fitting primitives from 3D point cloud data with both C++&Python API.
PrimitivesFittingLib
(New) A new and more generalized implementation can be found in Misc3D
A unified library for fitting multiple primitives from 3D point cloud data using segmentation and RANSAC algorithm with both C++&Python API.
The supported primitives type:
- Plane
- Sphere
- Cylinder
How to build
Requirements
Cmake>= 3.13Python>= 3.6Open3D>= 12.0pybind11Eigen
Build
Linux (currently only supported)
-
Build
open3das external library. You can follow the instruction from here guide -
Git clone the repo and run:
mkdir build && cd build cmake .. -DOpen3D_DIR=</path/to/open3d> -DCMAKE_INSTALL_PREFIX=</path/to/installation> make install -jIf you don't want to build python binding, just add
-DBUILD_PYTHON=OFF. -
Add python link path: Add these two lines to
~/.bashrcscriptexport PYTHONPATH="$PYTHONPATH:</path/to/installation>/PrimitivesFittingLib/lib/python" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:</path/to/installation>/PrimitivesFittingLib/lib"
How to use
The example python scripts can be found in examples/python. You can run it after you install the library successfully.