compas-dev / compas_cgal

COMPAS package for working with CGAL.
https://compas.dev/compas_cgal
GNU Lesser General Public License v3.0
23 stars 7 forks source link

Implementation of CGAL functionality for surface reconstruction from point-clouds #20

Closed dominikreisach closed 7 months ago

dominikreisach commented 1 year ago

Feature Request

As a user of compas, I want an extension for surface reconstruction from point-clouds so that work with point-clouds without relying on 3rd party software.

Details

Is your feature request related to a problem? Please describe. As we discussed in the meeting on Monday (05.12.2022), a specific extension for point-cloud processing does not exist within the compas framework. We concluded that implementing the funcitonality provided by CGAL into _compascgal would be a first remedy.

Describe the solution you'd like The three relevant algorithms are quite precisely described here. It would be amazing to have them available.

Describe alternatives you've considered Exploring Open3D's Python API in parallel (as discussed on Monday).

tomvanmele commented 12 months ago

hey @dominikreisach

not sure if this is still of interest, but first version available here https://compas.dev/compas_cgal/latest/examples/reconstruction.html

tomvanmele commented 12 months ago

not that the reconstruction function requires a clean input cloud. the point set processing part of the reconstruction pipeline still needs to be added...

petrasvestartas commented 12 months ago

If I understand correctly, mesh reconstruction often needs normal estimation and often raw scans from lidar or cameras do not have that:

normals.append([float(nx), float(ny), float(nz)])

To solve it, this is also implemented by CGAL (normal estimation + normal orientation using the min-spanning-tree):

https://github.com/CGAL/cgal/blob/master/Point_set_processing_3/examples/Point_set_processing_3/normal_estimation.cpp

Also often it is necessary to have:

We can also build on top of that quite a lot of methods. I could also contribute.

Also Jakob released Nanobind, which is a bit faster than pybind11: https://github.com/wjakob/nanobind

tomvanmele commented 12 months ago

also added outlier_removal... do we have some point clouds to test the functionality with?

petrasvestartas commented 12 months ago

Here are a few sets of scans good for testing: https://mega.nz/file/4xoUkDxT#cPs-moPYBQOweGYdFsGhIjZOqJmZUIfkqEDC1eGR__w

petrasvestartas commented 10 months ago

Added also polygonal_surface_reconstruction (https://doc.cgal.org/latest/Polygonal_surface_reconstruction/index.html): This one requires an additional dependency: libraries=["mpfr", "gmp", "libscip"], that is possible to install by conda install scip

To make it run, few things needs to be defined first: a) good normal estimation b) good pointcloud clustering

image
jf--- commented 7 months ago

@tomvanmele this issue can be closed given @petrasvestartas contributions?

tomvanmele commented 7 months ago

yes indeed :)