|
|
|
|
@ -2,12 +2,12 @@ namespace CGAL {
|
|
|
|
|
/*!
|
|
|
|
|
|
|
|
|
|
\mainpage User Manual
|
|
|
|
|
\anchor Chapter_Surface_Reconstruction_from_Point_Sets
|
|
|
|
|
\anchor Chapter_Poisson_Surface_Reconstruction
|
|
|
|
|
\cgalAutoToc
|
|
|
|
|
|
|
|
|
|
\authors Pierre Alliez, Laurent Saboret, Gaël Guennebaud
|
|
|
|
|
|
|
|
|
|
\section Surface_reconstruction_points_3Introduction Introduction
|
|
|
|
|
\section Poisson_surface_reconstruction_3Introduction Introduction
|
|
|
|
|
|
|
|
|
|
This \cgal component implements a surface reconstruction method which
|
|
|
|
|
takes as input point sets with oriented normals and computes an
|
|
|
|
|
@ -17,7 +17,7 @@ an isosurface of this function with the \cgal Surface Mesh Generator
|
|
|
|
|
\cgalCite{cgal:ry-gsddrm-06} or potentially with any other surface
|
|
|
|
|
contouring algorithm.
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3figintroduction,introduction.jpg}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3figintroduction,introduction.jpg}
|
|
|
|
|
Poisson surface reconstruction.\n
|
|
|
|
|
Left: 17K points sampled on the statue of an elephant with a Minolta laser scanner. Right: reconstructed surface mesh.
|
|
|
|
|
\cgalFigureEnd
|
|
|
|
|
@ -28,7 +28,7 @@ function of the inferred solid (Poisson Surface Reconstruction -
|
|
|
|
|
referred to as Poisson). Poisson is a two steps process: it requires
|
|
|
|
|
solving for the implicit function before function evaluation.
|
|
|
|
|
|
|
|
|
|
\section Surface_reconstruction_points_3Common Common Reconstruction Pipeline
|
|
|
|
|
\section Poisson_surface_reconstruction_3Common Common Reconstruction Pipeline
|
|
|
|
|
|
|
|
|
|
Surface reconstruction from point sets is often a sequential process
|
|
|
|
|
with the following steps: 1) Scanning and scan alignment produce a set
|
|
|
|
|
@ -45,11 +45,11 @@ describes algorithms to pre-process the point set before
|
|
|
|
|
reconstruction with functions devoted to the simplification, outlier
|
|
|
|
|
removal, smoothing, normal estimation and normal orientation.
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3figpipeline,pipeline.jpg}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3figpipeline,pipeline.jpg}
|
|
|
|
|
Common surface reconstruction pipeline.
|
|
|
|
|
\cgalFigureEnd
|
|
|
|
|
|
|
|
|
|
\section Surface_reconstruction_points_3Poisson Poisson
|
|
|
|
|
\section Poisson_surface_reconstruction_3Poisson Poisson
|
|
|
|
|
|
|
|
|
|
Given a set of 3D points with oriented normals (denoted oriented
|
|
|
|
|
points in the sequel) sampled on the boundary of a 3D solid, the
|
|
|
|
|
@ -74,20 +74,20 @@ the triangulation using a sparse linear solver. Eventually, the \cgal
|
|
|
|
|
surface mesh generator extracts an isosurface with function value set
|
|
|
|
|
by default to be the median value of \f$ f\f$ at all input points.
|
|
|
|
|
|
|
|
|
|
\subsection Surface_reconstruction_points_3Interface Interface
|
|
|
|
|
\subsection Poisson_surface_reconstruction_3Interface Interface
|
|
|
|
|
|
|
|
|
|
The class template declaration is `template<class Gt> class Poisson_reconstruction_function` wher
|
|
|
|
|
`Gt` is a geometric traits class.
|
|
|
|
|
|
|
|
|
|
For details see: `Poisson_reconstruction_function<GeomTraits>`
|
|
|
|
|
|
|
|
|
|
\subsection Surface_reconstruction_points_3Example Example
|
|
|
|
|
\subsection Poisson_surface_reconstruction_3Example Example
|
|
|
|
|
|
|
|
|
|
The following example reads a point set, creates a Poisson implicit function and reconstructs a surface.
|
|
|
|
|
|
|
|
|
|
\cgalExample{Surface_reconstruction_points_3/poisson_reconstruction_example.cpp}
|
|
|
|
|
\cgalExample{Poisson_surface_reconstruction_3/poisson_reconstruction_example.cpp}
|
|
|
|
|
|
|
|
|
|
\section Surface_reconstruction_points_3Contouring Contouring
|
|
|
|
|
\section Poisson_surface_reconstruction_3Contouring Contouring
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The computed implicit functions can be iso-contoured to reconstruct a
|
|
|
|
|
@ -101,7 +101,7 @@ The parameter `Tag` affects the behavior of `make_surface_mesh()`:
|
|
|
|
|
- `Manifold_with_boundary_tag`: the output mesh is guaranteed to be manifold and may have boundaries.
|
|
|
|
|
- `Non_manifold_tag`: the output mesh has no guarantee and hence is outputted as a polygon soup.
|
|
|
|
|
|
|
|
|
|
\section Surface_reconstruction_points_3Output Output
|
|
|
|
|
\section Poisson_surface_reconstruction_3Output Output
|
|
|
|
|
|
|
|
|
|
The surface reconstructed by `make_surface_mesh()` is required to be a
|
|
|
|
|
model of the concept `SurfaceMeshComplex_2InTriangulation_3`, a data
|
|
|
|
|
@ -116,7 +116,7 @@ and to convert it to a polyhedron (when it is manifold):
|
|
|
|
|
- `output_surface_facets_to_off()`
|
|
|
|
|
- `output_surface_facets_to_polyhedron()`
|
|
|
|
|
|
|
|
|
|
See \ref Surface_reconstruction_points_3/poisson_reconstruction_example.cpp "poisson_reconstruction_example.cpp" example above.
|
|
|
|
|
See \ref Poisson_surface_reconstruction_3/poisson_reconstruction_example.cpp "poisson_reconstruction_example.cpp" example above.
|
|
|
|
|
|
|
|
|
|
\section surface_reconstruction_section_case_studies Case Studies
|
|
|
|
|
|
|
|
|
|
@ -127,7 +127,7 @@ user with some hints about the ideal sampling and contouring
|
|
|
|
|
conditions, and depicts some failure cases when these conditions are
|
|
|
|
|
not matched.
|
|
|
|
|
|
|
|
|
|
\subsection Surface_reconstruction_points_3IdealConditions Ideal Conditions
|
|
|
|
|
\subsection Poisson_surface_reconstruction_3IdealConditions Ideal Conditions
|
|
|
|
|
|
|
|
|
|
The user must keep in mind that the Poisson surface reconstruction
|
|
|
|
|
algorithm comprises two phases (computing the implicit function from
|
|
|
|
|
@ -135,21 +135,21 @@ the input point set and contouring an iso-surface of this
|
|
|
|
|
function). Both require some care in terms of sampling conditions and
|
|
|
|
|
parameter tuning.
|
|
|
|
|
|
|
|
|
|
\subsection Surface_reconstruction_points_3PointSet Point Set
|
|
|
|
|
\subsection Poisson_surface_reconstruction_3PointSet Point Set
|
|
|
|
|
|
|
|
|
|
Ideally the current implementation of the Poisson surface
|
|
|
|
|
reconstruction method expects a dense 3D oriented point set (typically
|
|
|
|
|
matching the epsilon-sampling condition \cgalCite{cgal:bo-pgsms-05}) and
|
|
|
|
|
sampled over a closed, smooth surface. Oriented herein means that all
|
|
|
|
|
3D points must come with consistently oriented normals to the inferred
|
|
|
|
|
surface. \cgalFigureRef{Surface_reconstruction_points_3figbimba} and \cgalFigureRef{Surface_reconstruction_points_3figeros}
|
|
|
|
|
surface. \cgalFigureRef{Poisson_surface_reconstruction_3figbimba} and \cgalFigureRef{Poisson_surface_reconstruction_3figeros}
|
|
|
|
|
illustrate cases where these ideal conditions are met.
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3figbimba,bimba.jpg}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3figbimba,bimba.jpg}
|
|
|
|
|
Poisson reconstruction. Left: 120K points sampled on a statue (Minolta laser scanner). Right: reconstructed surface mesh.
|
|
|
|
|
\cgalFigureEnd
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3figeros,eros.jpg}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3figeros,eros.jpg}
|
|
|
|
|
Left: 120K points sampled on a statue (Minolta laser scanner). Right: reconstructed surface mesh.
|
|
|
|
|
\cgalFigureEnd
|
|
|
|
|
|
|
|
|
|
@ -157,17 +157,17 @@ The algorithm is fairly robust to anisotropic sampling and to
|
|
|
|
|
noise. It is also robust to missing data through filling the
|
|
|
|
|
corresponding holes as the algorithm is designed to reconstruct the
|
|
|
|
|
indicator function of an inferred solid (see
|
|
|
|
|
\cgalFigureRef{Surface_reconstruction_points_3figholes_good}).
|
|
|
|
|
\cgalFigureRef{Poisson_surface_reconstruction_3figholes_good}).
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3figholes_good,holes_good.jpg}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3figholes_good,holes_good.jpg}
|
|
|
|
|
Top left: 65K points sampled on a hand (Kreon laser scanner). Bottom left: the point set is highly anisotropic due to the scanning technology. Right: reconstructed surface mesh and closeup. The holes are properly closed.
|
|
|
|
|
\cgalFigureEnd
|
|
|
|
|
|
|
|
|
|
The algorithm is in general not robust to outliers, although a few
|
|
|
|
|
outliers do not always create a failure, see
|
|
|
|
|
\cgalFigureRef{Surface_reconstruction_points_3figoutliers}.
|
|
|
|
|
\cgalFigureRef{Poisson_surface_reconstruction_3figoutliers}.
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3figoutliers,outliers.jpg}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3figoutliers,outliers.jpg}
|
|
|
|
|
Left: 70K points sampled on an elephant with few outliers emphasized with disks. Right: reconstructed surface mesh.
|
|
|
|
|
\cgalFigureEnd
|
|
|
|
|
|
|
|
|
|
@ -181,7 +181,7 @@ connected components care should be taken to orient the normals of
|
|
|
|
|
each component in alternation (inward/outward) so that the final
|
|
|
|
|
contouring stage picks a proper contouring value.
|
|
|
|
|
|
|
|
|
|
\subsection Surface_reconstruction_points_3ContouringP Contouring Parameters
|
|
|
|
|
\subsection Poisson_surface_reconstruction_3ContouringP Contouring Parameters
|
|
|
|
|
|
|
|
|
|
Our implementation of the Poisson surface reconstruction algorithm
|
|
|
|
|
computes an implicit function represented as a piecewise linear
|
|
|
|
|
@ -193,7 +193,7 @@ and hence may contain sharp creases. As the contouring algorithm
|
|
|
|
|
sharp creases may create spurious clusters of vertices in the final
|
|
|
|
|
reconstructed surface mesh when setting a small mesh sizing or surface
|
|
|
|
|
approximation error parameter (see
|
|
|
|
|
\cgalFigureRef{Surface_reconstruction_points_3figcontouring_bad}).
|
|
|
|
|
\cgalFigureRef{Poisson_surface_reconstruction_3figcontouring_bad}).
|
|
|
|
|
|
|
|
|
|
One way to avoid these spurious clusters consists of adjusting the
|
|
|
|
|
mesh sizing and surface approximation parameters large enough compared
|
|
|
|
|
@ -205,18 +205,18 @@ contouring parameters:
|
|
|
|
|
- Max triangle radius: at least 100 times the average spacing.
|
|
|
|
|
- Approximation distance: at least 0.25 times the average spacing.
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3figcontouring_bad,contouring_bad.jpg}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3figcontouring_bad,contouring_bad.jpg}
|
|
|
|
|
Left: surface reconstructed with approximation distance = 0.25 * average spacing. Right: surface reconstructed with approximation distance = 0.15 * average spacing. Notice the spurious cluster on the chick.
|
|
|
|
|
\cgalFigureEnd
|
|
|
|
|
|
|
|
|
|
\subsection Surface_reconstruction_points_3DegradedConditions Degraded Conditions
|
|
|
|
|
\subsection Poisson_surface_reconstruction_3DegradedConditions Degraded Conditions
|
|
|
|
|
|
|
|
|
|
The conditions listed above are rather restrictive and in practice not
|
|
|
|
|
all of them are met in the applications. We now illustrates the
|
|
|
|
|
behavior of the algorithm when the conditions are not met in terms of
|
|
|
|
|
sampling, wrongly oriented normals, noise and sharp creases.
|
|
|
|
|
|
|
|
|
|
\subsection Surface_reconstruction_points_3SparseSampling Sparse Sampling
|
|
|
|
|
\subsection Poisson_surface_reconstruction_3SparseSampling Sparse Sampling
|
|
|
|
|
|
|
|
|
|
The reconstruction algorithm expects a sufficiently dense point
|
|
|
|
|
set. Although there is no formal proof of correctness of the algorithm
|
|
|
|
|
@ -227,22 +227,22 @@ feature size (the distance to the medial axis, which captures
|
|
|
|
|
altogether curvature, thickness and separation). When this condition
|
|
|
|
|
is not met the reconstruction does not reconstruct the thin
|
|
|
|
|
undersampled features (see
|
|
|
|
|
\cgalFigureRef{Surface_reconstruction_points_3figsampling}).
|
|
|
|
|
\cgalFigureRef{Poisson_surface_reconstruction_3figsampling}).
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3figsampling,sampling.jpg}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3figsampling,sampling.jpg}
|
|
|
|
|
Left: 50K points sampled on the Neptune trident. The reconstruction (not shown) is successful in this case. Right: point set simplified to 1K points then reconstructed (all input points are depicted with normals). The thin feature is not reconstructed.
|
|
|
|
|
\cgalFigureEnd
|
|
|
|
|
|
|
|
|
|
\subsection Surface_reconstruction_points_3LargeHoles Large Holes
|
|
|
|
|
\subsection Poisson_surface_reconstruction_3LargeHoles Large Holes
|
|
|
|
|
|
|
|
|
|
The reconstruction is devised to solve for an implicit function which
|
|
|
|
|
is an approximate indicator function of an inferred solid. For this
|
|
|
|
|
reason the contouring algorithm always extracts a closed surface mesh
|
|
|
|
|
and hence is able to fill the small holes where data are missing due,
|
|
|
|
|
e.g., to occlusions during acquisition (see
|
|
|
|
|
\cgalFigureRef{Surface_reconstruction_points_3figholes_bad}).
|
|
|
|
|
\cgalFigureRef{Poisson_surface_reconstruction_3figholes_bad}).
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3figholes_bad,holes_bad.jpg}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3figholes_bad,holes_bad.jpg}
|
|
|
|
|
Left: 65K points sampled on a hand with no data captured at the wrist base. Right: reconstructed surface mesh. The surface is properly closed on the fingers and also closed at the wrist but in a less plausible manner.
|
|
|
|
|
\cgalFigureEnd
|
|
|
|
|
|
|
|
|
|
@ -255,11 +255,11 @@ This can be avoided by a two pass approach. The first pass for a subset of the p
|
|
|
|
|
serves to get an approximation of the surface at the holes. This surface then serves to
|
|
|
|
|
compute a smoother 3D Delaunay triangulation for the second pass with the full set of points.
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3-fig-two_passes,two-passes.png}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3-fig-two_passes,two-passes.png}
|
|
|
|
|
Left: The wrist. Middle: one pass. Right: two passes.
|
|
|
|
|
\cgalFigureEnd
|
|
|
|
|
|
|
|
|
|
\subsection Surface_reconstruction_points_3WronglyOriented Wrongly Oriented Normals
|
|
|
|
|
\subsection Poisson_surface_reconstruction_3WronglyOriented Wrongly Oriented Normals
|
|
|
|
|
|
|
|
|
|
The Poisson surface reconstruction approaches solves for an implicit
|
|
|
|
|
function whose gradient best matches a set of input normals. Because
|
|
|
|
|
@ -267,16 +267,16 @@ it solves this problem in the least squares sense, it is robust to few
|
|
|
|
|
isolated wrongly oriented (flipped) normals. Nevertheless a cluster of
|
|
|
|
|
wrongly oriented normals leads to an incorrect implicit function and
|
|
|
|
|
hence to spurious geometric or even topological distortion (see
|
|
|
|
|
\cgalFigureRef{Surface_reconstruction_points_3figflipped_normals}).
|
|
|
|
|
\cgalFigureRef{Poisson_surface_reconstruction_3figflipped_normals}).
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3figflipped_normals,flipped_normals.jpg}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3figflipped_normals,flipped_normals.jpg}
|
|
|
|
|
Left: points sampled on a sphere with a cluster of wrongly oriented normals. Right: reconstructed surface mesh with a spurious bump.
|
|
|
|
|
\cgalFigureEnd
|
|
|
|
|
|
|
|
|
|
\subsection Surface_reconstruction_points_3NoiseandOutliers Noise and Outliers
|
|
|
|
|
\subsection Poisson_surface_reconstruction_3NoiseandOutliers Noise and Outliers
|
|
|
|
|
|
|
|
|
|
A large amount of noise inevitably impacts on the reconstruction (see
|
|
|
|
|
\cgalFigureRef{Surface_reconstruction_points_3fignoise}, top) and the
|
|
|
|
|
\cgalFigureRef{Poisson_surface_reconstruction_3fignoise}, top) and the
|
|
|
|
|
current implementation does not provide any mean to trade data fitting
|
|
|
|
|
for smoothness. Nevertheless if the signal-to-noise ratio is
|
|
|
|
|
sufficiently high and/or the surface approximation and sizing
|
|
|
|
|
@ -285,9 +285,9 @@ the noise level the output surface mesh will appear smooth (not
|
|
|
|
|
shown). If the user wants to produce a smooth and detailed output
|
|
|
|
|
surface mesh, we recommend to apply smoothing through
|
|
|
|
|
`jet_smooth_point_set()` (see
|
|
|
|
|
\cgalFigureRef{Surface_reconstruction_points_3fignoise}, bottom).
|
|
|
|
|
\cgalFigureRef{Poisson_surface_reconstruction_3fignoise}, bottom).
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3fignoise,noise.jpg}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3fignoise,noise.jpg}
|
|
|
|
|
Top-left: points sampled on a sphere and corrupted with a lot of noise. Top-right: reconstructed surface mesh. Bottom-left: smoothed point set. Bottom-right: reconstructed surface mesh.
|
|
|
|
|
\cgalFigureEnd
|
|
|
|
|
|
|
|
|
|
@ -296,13 +296,13 @@ into spurious small connected components and massive distortion near
|
|
|
|
|
the inferred surface. In this case the outliers must be removed
|
|
|
|
|
through `remove_outliers()`.
|
|
|
|
|
|
|
|
|
|
\subsection Surface_reconstruction_points_3SharpCreases Sharp Creases
|
|
|
|
|
\subsection Poisson_surface_reconstruction_3SharpCreases Sharp Creases
|
|
|
|
|
|
|
|
|
|
The current reconstruction algorithm is not able to recover the sharp
|
|
|
|
|
creases and corners present in the inferred surface. This translates
|
|
|
|
|
into smoothed sharp creases.
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3figsharp_features,sharp_features.jpg}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3figsharp_features,sharp_features.jpg}
|
|
|
|
|
Left: 5K points sampled on a mechanical piece with sharp features (creases, darts and corners). Right: reconstructed surface mesh with smoothed creases.
|
|
|
|
|
\cgalFigureEnd
|
|
|
|
|
|
|
|
|
|
@ -318,7 +318,7 @@ with the 03 option which maximizes speed. All measurements were done using the
|
|
|
|
|
\subsection SurfReconstPerfPIF Poisson Implicit Function
|
|
|
|
|
|
|
|
|
|
The point set chosen for benchmarking the Poisson implicit function is the Bimba con Nastrino point set
|
|
|
|
|
(1.6 million points) depicted by \cgalFigureRef{Surface_reconstruction_points_3-fig-contouring_bench}.
|
|
|
|
|
(1.6 million points) depicted by \cgalFigureRef{Poisson_surface_reconstruction_3-fig-contouring_bench}.
|
|
|
|
|
We measure the Poisson implicit function computation (i.e., the call to
|
|
|
|
|
`Poisson_reconstruction_function::compute_implicit_function()` denoted by Poisson solve hereafter)
|
|
|
|
|
for this point set as well as for simplified versions obtained through random simplification.
|
|
|
|
|
@ -427,7 +427,7 @@ Reconstruction error (mm)
|
|
|
|
|
</TABLE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3-fig-contouring_bench,contouring_bench.jpg}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3-fig-contouring_bench,contouring_bench.jpg}
|
|
|
|
|
Contouring duration (in s) and reconstruction error (mm)
|
|
|
|
|
against several approximation distance parameters
|
|
|
|
|
for the Bimba con Nastrino point set simplified to 100k points.
|
|
|
|
|
@ -538,7 +538,7 @@ Reconstruction error (mm)
|
|
|
|
|
</TABLE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\cgalFigureBegin{Surface_reconstruction_points_3-fig-simplification_bench,simplification_bench.jpg}
|
|
|
|
|
\cgalFigureBegin{Poisson_surface_reconstruction_3-fig-simplification_bench,simplification_bench.jpg}
|
|
|
|
|
Reconstruction error (mm) against number of points
|
|
|
|
|
for the Bimba con Nastrino point set with 1.6M points
|
|
|
|
|
as well as for simplified versions.
|
|
|
|
|
|