(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
Cmake
>= 3.13Python
>= 3.6Open3D
>= 12.0pybind11
Eigen
-
Build
open3d
as 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 -j
If you don't want to build python binding, just add
-DBUILD_PYTHON=OFF
. -
Add python link path: Add these two lines to
~/.bashrc
scriptexport PYTHONPATH="$PYTHONPATH:</path/to/installation>/PrimitivesFittingLib/lib/python" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:</path/to/installation>/PrimitivesFittingLib/lib"
The example python scripts can be found in examples/python
. You can run it after you install the library successfully.