pyFM.spectral.convert.mesh_p2p_to_FM

pyFM.spectral.convert.mesh_p2p_to_FM(p2p_21, mesh1, mesh2, dims=None, subsample=None)

Compute a functional map from a vertex to vertex map (with possible subsampling).

Parameters:
  • p2p_21 ((n2,) np.ndarray) – Vertex to vertex map from target to source. For each vertex on the target shape, gives the index of the corresponding vertex on mesh 1. Can also be given as a (n2, n1) sparse matrix.

  • mesh1 (TriMesh) – Source mesh for the functional map. Requires enough processed eigenvectors.

  • mesh2 (TriMesh) – Target mesh for the functional map. Requires enough processed eigenvectors.

  • dims (int or (int, int), optional) – Dimension of the functional map to return. If None uses all the processed eigenvectors. If a single int k, returns a (k, k) functional map. If a 2-uple of int (k1, k2), returns a (k2, k1) functional map.

  • subsample ((2,) iterable, optional) – None or size 2 iterable ((n1’,), (n2’,)). Subsample of vertices for both meshes. If specified the p2p map is between the two subsamples.

Returns:

FM_12 – Functional map corresponding to the p2p map given.

Return type:

(k2, k1) np.ndarray