DGtal
1.4.beta

Part of the Geometry package.
This part of the manual describes classes and functions related to the regularization of digital surfaces: Given an input normal vector field attached to digital surface surfels, the regularization outputs a piecewise smooth quadrangulated surface such that each quad is as perpendicular as possible to the input normal vector field. For more details, please refer to [29] and [30].
Related example: geometry/surfaces/testDigitalSurfaceRegularization.cpp
If \(P\) denotes the vertices of the input digital surface, \(F\) the set of (quadrilateral) faces and \(n_f\) an estimated normal vector on the face \(f\), we want the quad surface vertex positions \(P^*\) that minimizes the following energy function:
\[\mathcal{E}(P) := \alpha \sum_{i=1}^{n} \p_i  \hat{p}_i\^2 + \beta \sum_{f\in F} \sum_{{e_j} \in \partial{f} } ( e_j \cdot n_{f} )^2 + \gamma \sum_{i=1}^{n} \\hat{p}_i  \hat{b}_i\^2\,.\]
where \("\cdot"\) is the standard \(\mathbb{R}^3\) scalar product, \(e_j\in \partial{f}\) is an edge of the face \(f\) (and is equal to some \(p_k  p_l\)) and \( \hat{b}_i\) is the barycenter of the vertices adjacent to \(\hat{p}_i\).
The energy function is convex and can be minimized by solving a linear system as described in [29]. This minimization scheme is available in the DGtalTools (see volSurfaceRegularization). In this implementation, we consider an iterative scheme (gradient descent strategy) which allows us a finer control of the process.
Starting from an implicit digital surface:
with the following geometry (with a gridstep set to 0.3):
The regularization class instance can be set up using the following syntax:
The DigitalSurfaceRegularization::init() method sets some default values for the \(\alpha\), \(\beta\) and \(\gamma\) parameters. Such parameters can be either chosen as global values (e.g. init(alpha,beta,gamma)), or as local weights. In the latter case, the user must specify a vector of \(\alpha[i]\), \(\beta[i]\) and \(\gamma[i]\) values, one per digital surface pointels (see Local control). In this example, the normal vector field attached to the surfels is a trivial normal estimator whose normals are given by local convolution of input quad normals. We can now minimize the energy as follows:
Note that the user can specify the number of steps of the gradient descent as well as the initial learning rate. Note that if the DigitalSurfaceRegularization::regularize() method is called another time, the descent starts from the previous results (aka warm restart). Using the default settings (and the trivial normal vectors), we obtain the following reconstruction.
A key ingredient of the approach is to be able to change the input normal bundle. One can consider normal vectors from Integral invariant curvature estimator 2D/3D. Normal vectors can be attached using either a functor, a function or a lambda. For example, using Shortcuts (for the impatient developper)
to obtain
For piecewise smooth reconstruction, one can consider preprocessing of the normal vector field using Piecewisesmooth approximation using a discrete calculus model of AmbrosioTortorelli functional
As discussed above, the user can control the weights \(\alpha\), \(\beta\) and \(\gamma\) per digital surface vertex. For instance using the following weights:
we obtain a regularization with a locally adapted data attachment term.