Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/salehjg/MeshToPointcloudFPS
A mesh to pointcloud converter with FPS algorithm and HDF5 output generator
https://github.com/salehjg/MeshToPointcloudFPS
converter farthest-point-sampling mesh mesh-to-pointcloud point-cloud
Last synced: about 2 months ago
JSON representation
A mesh to pointcloud converter with FPS algorithm and HDF5 output generator
- Host: GitHub
- URL: https://github.com/salehjg/MeshToPointcloudFPS
- Owner: salehjg
- License: bsd-3-clause
- Created: 2021-07-29T18:58:56.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-25T15:22:48.000Z (almost 2 years ago)
- Last Synced: 2024-08-01T03:28:25.226Z (5 months ago)
- Topics: converter, farthest-point-sampling, mesh, mesh-to-pointcloud, point-cloud
- Language: C++
- Homepage:
- Size: 2.67 MB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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
- [x] 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
* The code for FPS algorithm is adopted from the CUDA kernel at [GitHub: charlesq34/pointnet2](https://github.com/charlesq34/pointnet2/blob/master/tf_ops/sampling/tf_sampling_g.cu).
* [GitHub: jamolnng/argparse](https://github.com/jamolnng/argparse) (GPL3)
* [GitHub: cnr-isti-vclab/vcglib](https://github.com/cnr-isti-vclab/vcglib) (GPL3)
* [GitHub: cnr-isti-vclab/meshlab](https://github.com/cnr-isti-vclab/meshlab) (GPL3)
* [ShapeNetCore-V2](https://shapenet.org/)
* The example mesh file has been created with [Vectary.com](https://www.vectary.com/)