Skip to content

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

License

Notifications You must be signed in to change notification settings

salehjg/MeshToPointcloudFPS

Repository files navigation

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published