Segment point clouds into cylinder shapes based on constrained region growing
The main code about cylinder segmentation in the paper:
Xi, Z.; Hopkinson, C.; Chasmer, L. Automating Plot-Level Stem Analysis from Terrestrial Laser Scanning. Forests 2016, 7, 252.
Matlab and C++ versions are available now. New functions and python support will be added. CUDA version is also expected.
C++ code is under the cpp folder
Required library: Armadillo, Eigen3, nanoflann
Eigen3 and nanoflann are header-only libraries. They are already included under cpp/include, no need to download additional files.
Header files of Armadillo are also included, but Armadillo also requires external library files. It is suggested to install Intel MKL (https://software.intel.com/en-us/mkl) and add libarary files (mkl_core, mkl_intel_lp64, mkl_sequential) to project.
Configure the CMakeLists.txt under cpp/include to create project files. If CMake cannot detect MKL libraries automatically, tell CMake the file path of mkl_core.lib (Windows) or libmkl_core.a(Linux).
Then compile and build the C++ project results from CMake. The final binary file is cylSegmenter(.exe)
Input point cloud file must be ascii format. Sample data is maple_tree_demo.txt under data. Type the following line in the command line console to see restuls. Third parameter 0.02 is 0.02m, an approximate of point resolution.
cylSegmenter.exe ../../../../data/maple_tree_demo.txt ../../../../result/maple_tree_demo_segs.txt 0.02
Snapshots
Contact: Zhouxin Xi, [email protected]