Coder Social home page Coder Social logo

ai4ce / peac Goto Github PK

View Code? Open in Web Editor NEW
131.0 5.0 34.0 20.46 MB

[ICRA2014] Fast Plane Extraction Using Agglomerative Hierarchical Clustering (AHC)

CMake 3.57% C++ 74.48% MATLAB 21.95%
rgbd plane-extraction plane-detection real-time point-cloud icra

peac's Introduction

Fast Plane Extraction Using Agglomerative Hierarchical Clustering (AHC)

Legal Remarks

Copyright 2014 Mitsubishi Electric Research Laboratories All Rights Reserved.

Permission to use, copy and modify this software and its documentation without fee for educational, research and non-profit purposes, is hereby granted, provided that the above copyright notice, this paragraph, and the following three paragraphs appear in all copies.

To request permission to incorporate this software into commercial products contact: Director; Mitsubishi Electric Research Laboratories (MERL); 201 Broadway; Cambridge, MA 02139.

IN NO EVENT SHALL MERL BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF MERL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

MERL SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND MERL HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

Overview

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.

If you use this package, please cite our ICRA 2014 paper:

Feng, C., Taguchi, Y., and Kamat, V. R. (2014). "Fast Plane Extraction in Organized Point Clouds Using Agglomerative Hierarchical Clustering." Proceedings of the IEEE International Conference on Robotics and Automation, Hong Kong, China, 6218-6225.

Version

1.0

Installation

C++ example
  1. Install OpenCV, Boost and PCL (If you install PCL using their all-in-one installer, you directly get Boost installed as well).

  2. Generate project file using CMake under either Windows or Linux.

  3. Compile.

  4. Run the compiled process: plane_fitter (first connect a Kinect to your computer!) or plane_fitter_pcd (first modify plane_fitter_pcd.ini accordingly!).

  5. Enjoy!

Matlab example
  1. In matlab:
cd WHERE_YOU_EXTRACT_THE_PACKAGE/matlab/mex
  1. Run makefile.m

  2. Select the directories for OpenCV_Include, OpenCV_Lib, and Boost_Include respectively

  3. If everything compiles smoothly:

cd ..
  1. Load a single frame we've prepared for you in matlab by:
load frame
  1. Run our algorithm on the point cloud:
frame.mbs=fitAHCPlane(frame.xyz);
viewSeg(frame.mbs,640,480)
  1. Enjoy!

  2. If you want to play with the kinect_ahc.m with a Kinect, install Kinect_Matlab first.

Contact

Chen Feng

Feel free to email any bugs or suggestions to help us improve the code. Thank you!

peac's People

Contributors

simbaforrest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

peac's Issues

DSO missing from command line

When I built the project file it showed up the following error
Does this mean the boost library is not correctly linked to the cpp file?
I tried to modify the CMakeLists.txt but it doesn't work

make Scanning dependencies of target plane_fitter_pcd [ 12%] Building CXX object CMakeFiles/plane_fitter_pcd.dir/plane_fitter_pcd.cpp.o [ 25%] Linking CXX executable plane_fitter_pcd /usr/bin/ld: CMakeFiles/plane_fitter_pcd.dir/plane_fitter_pcd.cpp.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv' //usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status CMakeFiles/plane_fitter_pcd.dir/build.make:118: recipe for target 'plane_fitter_pcd' failed make[2]: *** [plane_fitter_pcd] Error 1 CMakeFiles/Makefile2:78: recipe for target 'CMakeFiles/plane_fitter_pcd.dir/all' failed make[1]: *** [CMakeFiles/plane_fitter_pcd.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

Thanks for any suggestion

Implementation with ZED Camera

Hello,

I was trying to use ZED camera to acquire the depth information but I don't know which cpp files (or which part) I should modify.

Someone suggested the methods to modify the format of input:
https://answers.ros.org/question/133791/format-of-depth-value-openni2_camera/

And I found this ROS wrapper on ZED documentation to access the data
https://www.stereolabs.com/docs/ros/depth_sensing/

Not sure which type of implementation is better and if there is a better choice

Thank you for any information!

Running plane_fitter_pcd

Hi,
I was trying to run the plane_fitter_pcd but it couldn't open the list.txt that contains a list of pcd files under the sample data directory. What might be the problems? Thanks in advance!

mmvc@mmvc-Alienware-13-R3:~/peac/cpp/build$ ./plane_fitter_pcd
[iniLoad] list=>/home/mmvc/peac/data/stair/list.txt
[iniLoad] ignore line:
[iniLoad] outputDir=>/home/mmvc/peac/data/stair/output
[iniLoad] loop=>1
[iniLoad] debug=>0
[iniLoad] ignore line:
[iniLoad] unitScaleFactor=>1000
[iniLoad] ignore line:
[iniLoad] showWindow=>1
[iniLoad] ignore line:
[iniLoad] stdTol_merge=>8
[iniLoad] stdTol_init=>5
[iniLoad] depthSigma=>1.6e-6
[iniLoad] ignore line:
[iniLoad] z_near=>500
[iniLoad] z_far=>4000
[iniLoad] angleDegree_near=>15
[iniLoad] angleDegree_far=>90
[iniLoad] similarityDegreeTh_merge=>60
[iniLoad] similarityDegreeTh_refine=>30
[iniLoad] ignore line:
[iniLoad] depthAlpha=>0.04
[iniLoad] depthChangeTol=>0.02
[iniLoad] ignore line:
[iniLoad] initType=>0
[iniLoad] ignore line:
[iniLoad] minSupport=>3000
[iniLoad] ignore line:
[iniLoad] windowWidth=>10
[iniLoad] windowHeight=>10
[iniLoad] ignore line:
[iniLoad] doRefine=>1
create:/home/mmvc/peac/data/stair/output
could not open list=/home/mmvc/peac/data/stair/list.txt

Matlab reset params

I use the Matlab interface to code.I want to change the default params and find that every time I reset the params and run the fitAHCPlane again, the code will crush.My code is as follow:
params=getDefaultAHCFitterparams;
params.z_far = 8000;
setAHCPlaneFitterParams(params);
ref_depthImage = depth_images{k};
ref_xyz = getXYZ(ref_depthImage);
ref_mbs = mxFitAHCPlane(ref_xyz);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.