This source code package contains our C++ implementation of the AHC based fast plane extraction for organized point cloud (point cloud that can be indexed as an image). There are three folders in this package:
-
include
Our C++ implementation of the algorithm with dependencies on OpenCV and shared_ptr (from C++11 or Boost).
-
cpp
Two example C++ console applications using our algorithm to extract planes from Kinect-like point cloud (depends on PCL), with a CMake script to help generating project files.
-
matlab
A matlab interface (fitAHCPlane.m) through MEX for using our algorithm in matlab. We also provide a wrapper class Kinect.m and kinect_ahc.m to do real-time plane extraction in matlab, partially depends on a 3rd-party toolbox Kinect_Matlab.
Software Dependencies:
- OpenCV (
BSD-3-Clause
license) - Boost (
BSL-1.0
license) - Point Cloud Library (
BSD-3-Clause
license)
-
Install OpenCV, Boost and PCL (If you install PCL using their all-in-one installer, you directly get Boost installed as well).
-
Generate project file using CMake under either Windows or Linux.
-
Compile.
-
Run the compiled process:
plane_fitter
(first connect a Kinect to your computer!) orplane_fitter_pcd
(first modifyplane_fitter_pcd.ini
accordingly!). -
Enjoy!
- In matlab:
cd WHERE_YOU_EXTRACT_THE_PACKAGE/matlab/mex
-
Run
makefile.m
-
Select the directories for
OpenCV_Include
,OpenCV_Lib
, andBoost_Include
respectively -
If everything compiles smoothly:
cd ..
- Load a single frame we've prepared for you in matlab by:
load frame
- Run our algorithm on the point cloud:
frame.mbs=fitAHCPlane(frame.xyz);
viewSeg(frame.mbs,640,480)
-
Enjoy!
-
If you want to play with the kinect_ahc.m with a Kinect, install Kinect_Matlab first.
If you use the software, please cite the following (MERL TR2014-066):
@inproceedings{Feng2014may,
author = {Feng, C. and Taguchi, Y. and Kamat, V.},
title = {Fast Plane Extraction in Organized Point Clouds Using Agglomerative Hierarchical Clustering},
booktitle = {IEEE International Conference on Robotics and Automation (ICRA)},
year = 2014,
pages = {6218--6225},
month = may,
publisher = {IEEE},
doi = {10.1109/ICRA.2014.6907776},
url = {https://www.merl.com/publications/TR2014-066}
}
Tim Marks tmarks@merl.com
See CONTRIBUTING.md for our policy on contributions.
Released under AGPL-3.0-or-later
license, as found in the LICENSE.md file.
All files:
Copyright (c) 2014,2023 Mitsubishi Electric Research Laboratories (MERL).
SPDX-License-Identifier: AGPL-3.0-or-later