This project produces an occupancy 3D grid and a signed distance function (SDF) 3D grid from a mesh. This project uses polyscope for visualization, tinyply for the mesh IO, stb for images IO, openMP for parallelization, and nanoflann for kNN search.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
The only dependency is Eigen, which can be installed as follows:
sudo apt-get update
sudo apt-get install libeigen3-dev
The project can be compiled using the following sequence:
git clone https://github.com/rFalque/voxelization_and_sdf.git
cd voxelization_and_sdf
mkdir build
cd build
cmake ../src
make
Additionally, we use OMP for parallelizing the computation. The number of threads can be set with
export OMP_NUM_THREADS=<number of threads to use>
To compute the SDF
./test_SDF
To run the voxelizer
./test_occupancyGrid
To run the colored voxelizer
./test_occupancyGridWithColor
SDF computation:
Voxelized Lucy:
Color voxelizer:
- Raphael Falque - Initial work - GitHub / personal page
This project is licensed under the MIT License - see the LICENSE.md file for details