By Arsyad Kamili.
This project implements CGAL's 3D Alpha Wrapping algorithm to reconstruct a surface from a stream of point cloud. The stream is processed in batches to save computational resources. The project is implemented in C++ and uses CGAL library for the surface reconstruction. The main purpose of this project is to visualize the surface reconstruction in real-time; meaning that another input, the pose of the device, is visualized on the reconstructed object. This project is still under development and this readme will be updated as the project progresses.
Below is an example 3D visualization of alpha wrapping algorithm on a kitten point cloud with different parameters.
![](https://private-user-images.githubusercontent.com/22293969/258737957-196f58e1-7a2d-4f0c-a4f0-aee2db79e1a4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2NDAwMzcsIm5iZiI6MTcyNDYzOTczNywicGF0aCI6Ii8yMjI5Mzk2OS8yNTg3Mzc5NTctMTk2ZjU4ZTEtN2EyZC00ZjBjLWE0ZjAtYWVlMmRiNzllMWE0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI2VDAyMzUzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZhNzcxNjFhM2Y1M2NjZjliZjNkZDkxYmNmODYzNzdkYjc2YjcyYTg4YzU5YWE0MmM4ZWU4MWU0MTM2N2RlNWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.cRjqh69Hxy649jNtsKC-AzlUHRMXvzUQ2RKD40MmMpE)
initial load
![](https://private-user-images.githubusercontent.com/22293969/258738562-2d18d37c-7d8f-4031-a663-de0213498b85.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2NDAwMzcsIm5iZiI6MTcyNDYzOTczNywicGF0aCI6Ii8yMjI5Mzk2OS8yNTg3Mzg1NjItMmQxOGQzN2MtN2Q4Zi00MDMxLWE2NjMtZGUwMjEzNDk4Yjg1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI2VDAyMzUzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk0M2NiMDkyNGIyNmY3ZDI0MTRiZTlkYzhmMTI2YTJjNTBiNjk5MzIzYTBmNzZhYmM3NjEzMTBkNzY5MTkwZGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.O5hO3vjmhmu6rmjYxQAls_G2h2kgQuYZqyMp6C76lTE)
adjust relative alpha and offset values
![](https://private-user-images.githubusercontent.com/22293969/258738744-087d75b1-03be-47bd-8363-5c123351d630.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2NDAwMzcsIm5iZiI6MTcyNDYzOTczNywicGF0aCI6Ii8yMjI5Mzk2OS8yNTg3Mzg3NDQtMDg3ZDc1YjEtMDNiZS00N2JkLTgzNjMtNWMxMjMzNTFkNjMwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI2VDAyMzUzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE0MDllMzJlMThlY2UyMmQ3ZWNjYjM4MTFjN2U3ODFlZTcwYzRkMzA1NGY0ZGFiZmQ2NGJhMjJjNGFlNTI4MTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.HtYYkqNa5EvyUxVWvycxfmJFsJscUSm6rlBsax4zxxk)
reconstructed surface visualization
Once installed, you can run
point_cloud_surface_reconstruction <path_to_point_cloud_data>
and try interacting with the the panel and viewer.
- CGAL - Computational Geometry Algorithms Library
- Pangolin - Lightweight portable rapid development library for managing OpenGL display / interaction and abstracting video input. OpenGL is required to install Pangolin. Other version (at least 0.6 and above) of Pangolin should also work but I used version 0.8.
A normal mkdir build;cd build;cmake ..; make
should work just fine to build the program provided that you already took care of the dependencies.
- 01/08/2023 - Initial commit - running
./main <path_to_point_cloud> <alpha> <offset>
will output the reconstructed object in a.off
file. - 03/08/2023 - Successfully drawn the mesh using pangolin and set up the thread structure. Design improvement is needed.
- 04/08/2023 - Added menu, surface drawing, and other improvements.