Coder Social home page Coder Social logo

romankraemer / cloud-subdivide Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 24 KB

A tool to subdivide point clouds into a set of smaller sub point clouds with user defined dimensions.

License: Other

CMake 5.51% C++ 94.49%
point-cloud segmentation subdivide split point-cloud-library subdivision divide

cloud-subdivide's Introduction

Cloud-subdivide: Subdivide point clouds into sub point clouds

This is a tool to subdivide a .pcd/.ply point cloud into a set of smaller sub point clouds with user defined dimensions. The tool starts at point P0 = (xmin, ymin, zmin) of the point cloud and loops through the rest of the cloud from there. The resulting sub clouds are then saved with a .csv log file with some information on the sub clouds e.g. dimensions and number of points.

Visualization output example

sub clouds output example

Prerequisites

  • Build environment [tested with GCC 7 and CMake 3.10]
  • PointCloudLibrary [tested with PCL 1.8(.1)]
  • Boost filesystem and Boost program_options

Build

$ cd path/to/build/dir
$ cmake path/to/src/dir
$ make

Example usage

$ cd path/to/build/dir
$ ./cloud-subdivide --input /path/to/your/point/cloud.ply --res 0.01 --x-dim 4.0 --y-dim 4.0 --z-dim 4.0

The output files will be dumped into /output_files in the root directory of this tool.

Inputs and options

Use input argument --help to show a list of input arguments.

$ ./cloud-subdivide --help
input argument explanation
--help List of input arguments. Default values will be used if there is no input for an argument.
--input arg Set path to input file (.ply or .pcd). Use quotation marks (--input "/path to file") if file path has spaces.
--output arg Set output file format (--output ply or --output pcd) for sub clouds [default: ply].
--res arg Set resolution for octree box search [default: 0.01].
--x-dim arg Set sub cloud dimension in x direction [default: 1.0].
--y-dim arg Set sub cloud dimension in y direction [default: 1.0].
--z-dim arg Set sub cloud dimension in z direction [default: 1.0].

Additional explanation

The user defined dimensions are the maximum dimensions for the sub point clouds. If no more points in the current search iteration and direction (zcurrent max, ycurrent max, xcurrent max based on box grid on input point cloud defined by x-dim, y-dim, z-dim) are left, the resulting sub cloud can be smaller than the defined value(s) for the respective dimension(s).

The point cloud is processed from P0 → zmax → ymax → xmax.

cloud-subdivide's People

Contributors

romankraemer avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.