Skip to content

Commit

Permalink
pass on doc
Browse files Browse the repository at this point in the history
  • Loading branch information
soesau committed Aug 6, 2024
1 parent 008b6fc commit d4d2e6c
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 161 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1420,9 +1420,9 @@ and the number of surface patches that are separated by these edges.

Registration of one mesh onto another is often required to map between multiple acquisitions of an object or between an acquisition and a CAD model, e.g., in quality assurance. A simple linear transformation is only sufficient in the case of rigid objects.

The functions `CGAL::Polygon_mesh_processing::non_rigid_mesh_to_mesh_registration()` and `CGAL::Polygon_mesh_processing::non_rigid_mesh_to_points_registration()` calculate a non-rigid registration from a source mesh onto target mesh or a target oriented point cloud. For each vertex in the source mesh a translation vector and a rotation matrix is provided.
The functions `CGAL::Polygon_mesh_processing::non_rigid_mesh_to_mesh_registration()` and `CGAL::Polygon_mesh_processing::non_rigid_mesh_to_points_registration()` calculate a non-rigid registration from a source mesh onto target mesh or a target oriented point cloud. For each vertex in the source mesh a translation vector and a rotation matrix is returned.
The registration is formulated as an energy to minimize the distance between source and target. The energy is iteratively minimized by solving sparse linear systems and finding closest rotation matrices.
The core algorithm is ICP, iterative closest point. In each iteration, the method identifies vertex or point pairs between the template, initially a copy of the source, and the target and subsequently calculates the transformations which minimize the distance between them. The template is updated after each iteration and converges towards the target.
The core algorithm is ICP, iterative closest point. In each iteration, the method identifies vertex or point pairs between the intermediate, initially a copy of the source, and the target and subsequently calculates the transformations which minimize the distance between them. The intermediate is updated after each iteration and converges towards the target.

\f{equation}{
\mathbf{E_{reg}} = w_1\mathbf{E_{match}} + w_2\mathbf{E_{point\_to\_plane}} + w_3\mathbf{E_{arap}},
Expand Down Expand Up @@ -1451,30 +1451,30 @@ with the single energy terms:

where:
- \f$w_1, w_2\f$ and \f$w_3\f$ denote the weights for the energy terms.
- \f$\mathbf{P}\f$ is the set of vertex/point pairs with \f$\mathbf{v}_i \in\f$ template and \f$\mathbf{\tilde{v}}_i \in\f$ target. It is recreated in each iteration.
- \f$\mathbf{P}\f$ is the set of vertex/point pairs with \f$\mathbf{v}_i \in\f$ intermediate and \f$\mathbf{\tilde{v}}_i \in\f$ target. It is recreated in each iteration.
- \f$\mathbf{R}_i\f$ is a \f$ 3 \times 3 \f$ rotation matrix for source vertex \f$\mathbf{v}_i\f$.
- \f$\mathbf{t}_i\f$ is the translation vector for source vertex \f$\mathbf{v}_i\f$.
- \f$\mathbf{M}\f$ is the template mesh (initially equal to the source mesh).
- \f$\mathbf{M}\f$ is the intermediate mesh (initially equal to the source mesh).
- \f$N(\mathbf{v}_i)\f$ denotes the set of vertices adjacent to \f$\mathbf{v}_i\f$.

The \f$\mathbf{E_{match}}\f$ energy penalizes the distance between point pairs \f$\mathbf{v}_i\f$ and \f$\mathbf{\tilde{v}}_i\f$. The point pairs are restablished after each iteration. In addition, the method can take fixed point pairs of correspondences between source and target. This greatly improves the quality of the registration and is generally required for non-simple meshes.

The \f$\mathbf{E_{point\_to\_plane}}\f$ energy, point to plane, is similar to \f$\mathbf{E_{match}}\f$, but instead penalizes the distance to the plane given by the target vertex and its normal. This energy compensates for different discretizations, i.e., for source and target mesh that were not created by deforming one mesh into the other.

The \f$\mathbf{E_{arap}}\f$ energy, as-rigid-as-possible, controls the rigidness of the transformation. It measures the deformation of the edges connected to each vertex that results from applying an individual transformation to each vertex of the source mesh.
The \f$\mathbf{E_{arap}}\f$ energy, as-rigid-as-possible, controls the rigidity of the transformation. It measures the deformation of the edges connected to each vertex that results from applying an individual transformation to each vertex of the source mesh.

\subsection PMPNonRigidRegistrationParameters Parameters

The algorithm has six parameters:
- `point_to_point_energy`:
Sets the weight `w1` of the \f$\mathbf{E_{match}}\f$. Penalizes the distance between vertices of template and target. A higher values promotes a tighter fit.
Sets the weight `w1` of the \f$\mathbf{E_{match}}\f$. Penalizes the distance between vertices of intermediate and target. A higher value promotes a tighter fit.
- `point_to_plane_energy`:
Sets the weight `w2` of the \f$\mathbf{E_{point\_to\_plane}}\f$. Also penalizes the distances between the meshes, but is more forgiving towards different discretization.
- `as_rigid_as_possible_energy`:
Controls the rigidness weight `w3` of the \f$\mathbf{E_{arap}}\f$. Penalizes the deformation of the template and may thus prefers rigidness over a tight fit.
- max_distance:
The maximal distance for finding vertex/point pairs between the source and target. A pair is ignored during an iteration if the specified distance is exceeded.
- iterations:
Controls the rigidity weight `w3` of the \f$\mathbf{E_{arap}}\f$. Penalizes the deformation of the source and may thus prefers rigidity over a tight fit.
- maximum_matching_distance:
The maximal distance for finding vertex/point pairs between the intermediate and target. A pair is ignored during an iteration if the specified distance is exceeded.
- number_of_iterations:
The number of ICP iterations. The default value is 50.
- correspondences:
Optional fixed vertex/point pairs can be provided to guide the registration. These are especially helpful when source and target are not roughly aligned initially.
Expand All @@ -1484,7 +1484,7 @@ Optional fixed vertex/point pairs can be provided to guide the registration. The
<img src="non-rigid_registration.png" style="max-width:80%;"/>
</center>
\cgalFigureCaptionBegin{registration_results}
Non-rigid registration using 5 correspondes on top of the head and at the tips of hand and feet. A low rigidness leads to a distortion and a self-intersection of the transformed mesh. The topology of the mesh as well as the number of vertices and faces remain unchanged. The lack of correspondences also causes self-intersection and leads to a flattening of the left arm.
Non-rigid registration using five correspondences on top of the head and at the tips of hand and feet. A low rigidity leads to a distortion and a self-intersection of the transformed mesh. The topology of the mesh as well as the number of vertices and faces remain unchanged. The lack of correspondences also causes self-intersection and leads to a flattening of the left arm.
\cgalFigureCaptionEnd

\subsection PMPNonRigidRegistrationExample Non-rigid registration Example
Expand Down Expand Up @@ -1519,7 +1519,7 @@ used as a reference during the project.

The curvature-based sizing field version of isotropic remeshing was added by Ivan Pađen during GSoC 2023, under the supervision of Sébastien Loriot and Jane Tournois.

The non-rigid mesh registration was developed by Roberto M. Dyke. Sven Oesau integrated the method into CGAL.
The non-rigid mesh registration was developed by Roberto M. Dyke. Sven Oesau integrated the method into \cgal.

*/
} /* namespace CGAL */
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d4d2e6c

Please sign in to comment.