pyFM.refine.icp

Functions

icp_iteration(FM_12, evects1, evects2[, ...])

Performs an iteration of ICP.

icp_refine(FM_12, evects1, evects2[, nit, ...])

Refine a functional map using the standard ICP algorithm.

mesh_icp_refine(FM_12, mesh1, mesh2[, nit, ...])

Refine a functional map using the ICP algorithm.

mesh_icp_refine_p2p(p2p_21, mesh1, mesh2, k_init)

Refine a functional map using the auxiliar ICP algorithm (different conversion from functional map to vertex-to-vertex).

pyFM.refine.icp.icp_iteration(FM_12, evects1, evects2, use_adj=False, n_jobs=1)

Performs an iteration of ICP. Conversion from a functional map to a pointwise map is done by comparing embeddings of dirac functions on the second mesh Phi_2.T with embeddings of dirac functions of the first mesh Phi_1.T. The diracs are transposed using the functional map or its adjoint.

Parameters:
  • FM_12 – (k2,k1) functional map in reduced basis

  • evects1 – (n1,k1’) first k’ eigenvectors of the first basis (k1’>k1).

  • evects2 – (n2,k2’) first k’ eigenvectors of the second basis (k2’>k2)

  • use_adj – use the adjoint method

  • n_jobs – number of parallel jobs. Use -1 to use all processes

Returns:

FM_refined – (k2,k1) An orthogonal functional map after one step of refinement

Return type:

np.ndarray

pyFM.refine.icp.icp_refine(FM_12, evects1, evects2, nit=10, tol=1e-10, use_adj=False, return_p2p=False, n_jobs=1, verbose=False)

Refine a functional map using the standard ICP algorithm. One can use the adjoint instead of the functional map for pointwise map computation.

Parameters:
  • FM_12 – (k2,k1) functional map functional map from first to second basis

  • evects1 – (n1,k1’) first k’ eigenvectors of the first basis (k1’>k1).

  • evects2 – (n2,k2’) first k’ eigenvectors of the second basis (k2’>k2)

  • nit (int) – Number of iterations to perform. If not specified, uses the tol parameter

  • tol (float) –

    Maximum change in a functional map to stop refinement

    (only used if nit is not specified)

  • use_adj – use the adjoint method

  • n_jobs – number of parallel jobs. Use -1 to use all processes

  • return_p2p (bool) – if True returns the vertex to vertex map from 2 to 1

Returns:

  • FM_12_icp (np.ndarray) – ICP-refined functional map

  • p2p_21_icp (np.ndarray) –

    only if return_p2p is set to True - the refined pointwise map

    from basis 2 to basis 1

pyFM.refine.icp.mesh_icp_refine(FM_12, mesh1, mesh2, nit=10, tol=1e-10, use_adj=False, return_p2p=False, n_jobs=1, verbose=False)

Refine a functional map using the ICP algorithm.

Parameters:
  • FM_12 – (k2,k1) functional map from mesh1 to mesh2

  • mesh1 (TriMesh) – Source mesh

  • mesh2 (TriMesh) – Target mesh

  • nit (int) – Number of iterations to perform. If not specified, uses the tol parameter

  • tol (float) –

    Maximum change in a functional map to stop refinement

    (only used if nit is not specified)

  • use_adj – use the adjoint method

  • n_jobs – number of parallel jobs. Use -1 to use all processes

  • return_p2p (bool) – if True returns the vertex to vertex map from 2 to 1

Returns:

  • FM_12_icp (np.ndarray) – ICP-refined functional map

  • p2p_21_icp (np.ndarray) –

    only if return_p2p is set to True - the refined pointwise map

    from basis 2 to basis 1

pyFM.refine.icp.mesh_icp_refine_p2p(p2p_21, mesh1, mesh2, k_init, nit=10, tol=1e-10, use_adj=False, return_p2p=False, n_jobs=1, verbose=False)

Refine a functional map using the auxiliar ICP algorithm (different conversion from functional map to vertex-to-vertex). This algorithm starts from an initial pointwise map instead of a functional map.

Parameters:
  • p2p_21 (np.ndarray) – (n2,) initial pointwise map from mesh2 to mesh1

  • mesh1 (TriMesh) – Source mesh

  • mesh2 (TriMesh) – Target mesh

  • k_init (int) – Initial number of eigenvectors to use

  • nit (int) – Number of iterations to perform. If not specified, uses the tol parameter

  • tol (float) –

    Maximum change in a functional map to stop refinement

    (only used if nit is not specified)

  • use_adj – use the adjoint method

  • n_jobs – number of parallel jobs. Use -1 to use all processes

  • return_p2p (bool) – if True returns the vertex to vertex map from 2 to 1

Returns:

  • FM_12_icp (np.ndarray) – ICP-refined functional map

  • p2p_21_icp (np.ndarray) –

    only if return_p2p is set to True - the refined pointwise map

    from basis 2 to basis 1