Unofficial customized repository of Patchwork++ for Point cloud segmentation
# in patchwork-plusplus directory
$ pip install .
# in patchwork-plusplus directory
$ mkdir build && cd build
$ cmake ..
$ make
-
clone this repo in your working directory
$ git clone https://github.com/eugenebak/patchwork-plusplus.git
-
Install patchwork++
$ cd patchwork-plusplus $ pip install .
-
Import
pypatchworkpp
in the codepatchwork_module_path = "./patchwork-plusplus/build/python_wrapper" sys.path.insert(0, patchwork_module_path) import pypatchworkpp import numpy as np
-
Declare patchwork++
PatchworkPLUSPLUS = pypatchworkpp.patchworkpp(params)
-
Ground removal
PatchworkPLUSPLUS.estimateGround(point_cloud_data) ground_segments_points = PatchworkPLUSPLUS.getNonground() intensity = np.zeros(len(ground_segments_points)).reshape(-1,1) point_cloud_data = np.hstack((ground_segments_points, intensity))
point_cloud_data
is a numpy array with the shape of(N, 4)
whereN
is the number of points.In this example, intensity values of non-ground points are filled with zero.