yuecideng / PrimitivesFittingLib

A unified library for fitting primitives from 3D point cloud data with both C++&Python API.
MIT License
16 stars 2 forks source link
pointcloudprocessing primitives ransac-algorithm

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:

How to build

Requirements

Build

Linux (currently only supported)
  1. Build open3d as external library. You can follow the instruction from here guide

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

  3. Add python link path: Add these two lines to ~/.bashrc script

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