CGAL 6.1 - Polygon Mesh Processing
Loading...
Searching...
No Matches
Registration Functions

Functions to compute the transformation for mapping one mesh onto another or onto a set of points.

Functions

template<typename TriangleMesh , typename PointRange , typename VertexTranslationMap , typename VertexRotationMap , typename NamedParameters1 = parameters::Default_named_parameters, typename NamedParameters2 = parameters::Default_named_parameters>
void CGAL::Polygon_mesh_processing::non_rigid_mesh_to_points_registration (const TriangleMesh &source, const PointRange &target, VertexTranslationMap &vtm, VertexRotationMap &vrm, const NamedParameters1 &np1=parameters::default_values(), const NamedParameters2 &np2=parameters::default_values())
 computes non-rigid transformation of a mesh onto a set of oriented points.
 
template<typename TriangleMesh1 , typename TriangleMesh2 , typename VertexTranslationMap , typename VertexRotationMap , typename NamedParameters1 = parameters::Default_named_parameters, typename NamedParameters2 = parameters::Default_named_parameters>
void CGAL::Polygon_mesh_processing::non_rigid_mesh_to_mesh_registration (const TriangleMesh1 &source, const TriangleMesh2 &target, VertexTranslationMap &vtm, VertexRotationMap &vrm, const NamedParameters1 &np1=parameters::default_values(), const NamedParameters2 &np2=parameters::default_values())
 computes non-rigid transformation of a mesh onto another mesh.
 
template<typename TriangleMesh , typename VertexTranslationMap , typename VertexRotationMap , typename NamedParameters = parameters::Default_named_parameters>
void CGAL::Polygon_mesh_processing::apply_non_rigid_transformation (const TriangleMesh &mesh, const VertexTranslationMap &vtm, const VertexRotationMap &vrm, const NamedParameters &np=parameters::default_values())
 applies a non-rigid transformation to the vertices of the mesh.
 

Function Documentation

◆ apply_non_rigid_transformation()

template<typename TriangleMesh , typename VertexTranslationMap , typename VertexRotationMap , typename NamedParameters = parameters::Default_named_parameters>
void CGAL::Polygon_mesh_processing::apply_non_rigid_transformation ( const TriangleMesh &  mesh,
const VertexTranslationMap &  vtm,
const VertexRotationMap &  vrm,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/Polygon_mesh_processing/non_rigid_mesh_registration.h>

applies a non-rigid transformation to the vertices of the mesh.

Vertex normal vectors are updated when the vertex normal property map is provided in the named parameters. Potential face normal vectors are not updated.

Template Parameters
TriangleMesha model of FaceGraph.
VertexTranslationMapis a property map with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and GeomTraits::Vector_3 as value type, GeomTraits being the type of the parameter geom_traits.
VertexRotationMapis a property map with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and CGAL::Aff_transformation_3<GeomTraits> as value type, GeomTraits being the type of the parameter geom_traits. Only the rotational part of the transformations is considered.
NamedParametersa sequence of Named Parameters.
Parameters
meshthe triangle mesh to be transformed.
vtma readable vertex property map of mesh that contains the translation vector of the registration.
vrma readable vertex property map of mesh that contains the rotational part of the registration.
npan optional sequence of Named Parameters among the ones listed below.
Optional Named Parameters
  • a property map associating points to the vertices of mesh
  • Type: a class model of ReadWritePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and Point_3 as value type
  • Default: get_const_property_map(CGAL::vertex_point, source)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in TriangleMesh.

  • a property map associating normals to the vertices of mesh
  • Type: a class model of ReadWritePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and Vector_3 as value type
  • Extra: If this parameter is provided, the contained normals will be updated.

  • an instance of a geometric traits class
  • Type: a class model of Kernel
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
  • Extra: The geometric traits class must be compatible with the vertex point type.

◆ non_rigid_mesh_to_mesh_registration()

template<typename TriangleMesh1 , typename TriangleMesh2 , typename VertexTranslationMap , typename VertexRotationMap , typename NamedParameters1 = parameters::Default_named_parameters, typename NamedParameters2 = parameters::Default_named_parameters>
void CGAL::Polygon_mesh_processing::non_rigid_mesh_to_mesh_registration ( const TriangleMesh1 &  source,
const TriangleMesh2 &  target,
VertexTranslationMap &  vtm,
VertexRotationMap &  vrm,
const NamedParameters1 &  np1 = parameters::default_values(),
const NamedParameters2 &  np2 = parameters::default_values() 
)

#include <CGAL/Polygon_mesh_processing/non_rigid_mesh_registration.h>

computes non-rigid transformation of a mesh onto another mesh.

A non-rigid ICP, iterative closest point, method based on a SIGGRAPH'16 Tutorial. The method uses optional correspondences between the source and the target for the rough alignment. The iterative closest point method iteratively approaches the target by minimizing the distance between vertices of the source and vertices of the target.

Note
This function requires the Eigen library.
Template Parameters
TriangleMesh1a const model of FaceGraph.
TriangleMesh2a const model of FaceGraph.
VertexTranslationMapis a property map with boost::graph_traits<TriangleMesh1>::vertex_descriptor as key type and GeomTraits::Vector_3 as value type, GeomTraits being the type of the parameter geom_traits.
VertexRotationMapis a property map with boost::graph_traits<TriangleMesh1>::vertex_descriptor as key type and CGAL::Aff_transformation_3<GeomTraits> as value type, GeomTraits being the type of the parameter geom_traits.
NamedParameters1a sequence of Named Parameters1.
NamedParameters2a sequence of Named Parameters2.
Parameters
sourcethe triangle mesh to be mapped onto target.
targetthe target triangle mesh.
vtma writable vertex property map of source to store the translation vector of the registration.
vrma writable vertex property map of source to store the rotation part of the registration.
np1an optional sequence of Named Parameters 1 of the source and the method among the ones listed below.
np2an optional sequence of Named Parameters 2 of the target providing a vertex point map and a vertex normal map as listed below.
Named Parameters 1
  • the number of registration iterations using ICP, iterative closest point
  • Type: unsigned int
  • Default: 50

  • the weight \(w_2\) of the point to plane energy in the registration.
  • Type: double
  • Default: 1
  • Extra: \(w_2\) needs to be 0 or positive. See Parameters.

  • the weight \(w_1\) of the point to matching point energy in the registration
  • Type: double
  • Default: 1
  • Extra: \(w_1\) needs to be 0 or positive. See Parameters.

  • defines the rigidity of the registration
  • Type: double
  • Default: 50
  • Extra: The weight \(w_3\) needs to be 0 or positive. See Parameters.

  • the maximal distance for a vertex in source to match with a point in target. The value 0 means no maximal matching distance.
  • Type: double
  • Default: average edge length in the target mesh.

  • a range of matching vertex pairs between the source and the target.
  • Type: ConstRange whose value type is a pair of boost::graph_traits<TriangleMesh1>::vertex_descriptor and boost::graph_traits<TriangleMesh2>::vertex_descriptor.
  • Default: empty
  • Extra: to avoid copies, this parameter can be passed using std::cref.

  • a property map associating points to the vertices of source
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<TriangleMesh1>::vertex_descriptor as key type and Point_3 as value type
  • Default: get_const_property_map(CGAL::vertex_point, source)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in TriangleMesh1.

  • an instance of a geometric traits class
  • Type: a class model of Kernel
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
  • Extra: The geometric traits class must be compatible with the vertex point type.
Named Parameters 2
  • a property map associating points to the vertices of target
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<TriangleMesh2>::vertex_descriptor as key type and Point_3 as value type
  • Default: get_const_property_map(CGAL::vertex_point, target)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in TriangleMesh2.

◆ non_rigid_mesh_to_points_registration()

template<typename TriangleMesh , typename PointRange , typename VertexTranslationMap , typename VertexRotationMap , typename NamedParameters1 = parameters::Default_named_parameters, typename NamedParameters2 = parameters::Default_named_parameters>
void CGAL::Polygon_mesh_processing::non_rigid_mesh_to_points_registration ( const TriangleMesh &  source,
const PointRange &  target,
VertexTranslationMap &  vtm,
VertexRotationMap &  vrm,
const NamedParameters1 &  np1 = parameters::default_values(),
const NamedParameters2 &  np2 = parameters::default_values() 
)

#include <CGAL/Polygon_mesh_processing/non_rigid_mesh_registration.h>

computes non-rigid transformation of a mesh onto a set of oriented points.

A non-rigid ICP, iterative closest point, method based on a SIGGRAPH'16 Tutorial. The method uses a few correspondences between the source and the target for the rough alignment. The iterative closest point method iteratively approaches the target by minimizing the distance between vertices of the source and points of the target.

Note
This function requires the Eigen library.
Template Parameters
TriangleMesha const model of FaceGraph.
PointRangeis a model of ConstRange. The value type of its iterator is the key type of the named parameter point_map.
VertexTranslationMapis a property map with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and GeomTraits::Vector_3 as value type, GeomTraits being the type of the parameter geom_traits.
VertexRotationMapis a property map with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and CGAL::Aff_transformation_3<GeomTraits> as value type, GeomTraits being the type of the parameter geom_traits.
NamedParameters1a sequence of Named Parameters.
NamedParameters2a sequence of Named Parameters.
Parameters
sourcethe triangle mesh to be mapped onto target.
targetthe target point set.
vtma writable vertex property map of source to store the translation vector of the registration.
vrma writable vertex property map of source to store the rotation part of the registration.
np1an optional sequence of Named Parameters 1 among the ones listed below.
np2an optional sequence of Named Parameters 2 providing a point_map and normal_map for the PointRange as listed below.
Named Parameters 1
  • the number of registration iterations using ICP, iterative closest point
  • Type: unsigned int
  • Default: 50

  • the weight \(w_2\) of the point to plane energy in the registration.
  • Type: double
  • Default: 1
  • Extra: \(w_2\) needs to be 0 or positive. See Parameters.

  • the weight \(w_1\) of the point to matching point energy in the registration
  • Type: double
  • Default: 1
  • Extra: \(w_1\) needs to be 0 or positive. See Parameters.

  • defines the rigidity of the registration
  • Type: double
  • Default: 50
  • Extra: The weight \(w_3\) needs to be 0 or positive. See Parameters.

  • the maximal distance for a vertex in source to match with a point in target. The value 0 means no maximal matching distance.
  • Type: double
  • Default: average point spacing in the target

  • a range of matching vertex-point pairs between the source and the target.
  • Type: ConstRange whose value type is a pair of boost::graph_traits<TriangleMesh>::vertex_descriptor and the value type of PointRange.
  • Default: empty
  • Extra: to avoid copies, this parameter can be passed using std::cref.

  • a property map associating points to the vertices of source
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and Point_3 as value type
  • Default: get_const_property_map(CGAL::vertex_point, source)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in TriangleMesh.

  • an instance of a geometric traits class
  • Type: a class model of Kernel
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
  • Extra: The geometric traits class must be compatible with the vertex point type.
Named Parameters 2
  • a property map associating points to the elements of the point set target.
  • Type: a model of ReadablePropertyMap whose key type is the value type of the iterator of PointRange and whose value type is geom_traits::Point_3.
  • Default: CGAL::Identity_property_map<geom_traits::Point_3>.

  • a property map associating normals to the elements of the point set target.
  • Type: a model of ReadablePropertyMap whose key type is the value type of the iterator of PointRange and whose value type is geom_traits::Vector_3.