salehjg / MeshToPointcloudFPS

A mesh to pointcloud converter with FPS algorithm and HDF5 output generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MeshToPointcloudFPS

The project is meant to provide a simple C++ based utility which converts mesh files (*.obj) to pointclouds. The data is down-sampled using Farthest Point Sampling algorithm (FPS). The user can export the results in various formats such as HDF5 (*.h5), PCL (*.pcd), and ...

Development Status

  • CPU-only, Single-thread
  • CPU-only, Multi-thread
  • CPU-only, Multi-thread, Batch Operation Support
  • GPU-CUDA
  • GPU-OCL

Dependencies

HDF5,  community/hdf5     in ArchLinux
PCL,   aur/pcl 1.11.1-2   in ArchLinux
CMake, extra/cmake        in ArchLinux

Usage

As below:

$ FpsCpu -h
Usage: FpsCpu [options...]
Options:
    -i, --inputmesh        The path for the input mesh *.obj file. (Required)
    -o, --outputhdf5       The path for the output hdf5 *.h5 file with sampled point cloud. (Required)
    -n, --npoints          The target number of points per mesh input file (input.obj). (Required)
    -r, --rawpcd           The path for the optional output pcd *.pcd file with RAW point cloud.
    -p, --outputpcd        The path for the optional output pcd *.pcd file with sampled point cloud.
    -h, --help             Shows this page 

Example

$ git clone https://github.com/salehjg/MeshToPointcloudFPS.git
$ cd MeshToPointcloudFPS
$ mkdir build
$ cd build
$ cmake ..
$ make -j8
$ ./FpsCpu -n 1024 -i ../data/tube.obj -o sampled.h5 -p sampled.pcd -r raw.pcd 
$ pcl_viewer raw.pcd
$ pcl_viewer sampled.pcd

Credits

About

A mesh to pointcloud converter with FPS algorithm and HDF5 output generator

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 96.0%Language:CMake 3.5%Language:C 0.5%