pyFM.spectral.projection_utils.nn_query_precise_np

pyFM.spectral.projection_utils.nn_query_precise_np(vert_emb, faces, points_emb, return_dist=False, batch_size=None, n_jobs=None)

Project a pointcloud on a p-dimensional mesh.

Parameters:
  • vert_emb ((n1, p) np.ndarray) – Coordinates of the mesh vertices.

  • faces ((m1, 3) np.ndarray) – Faces of the mesh defined as indices of vertices.

  • points_emb ((n2, p) np.ndarray) – Coordinates of the pointcloud.

  • return_dist (bool, optional) – Whether to return the distance to the nearest vertex.

  • batch_size (int, optional) – If precompute_dmin is False, projects batches of points on the surface.

  • n_jobs (int, optional) – Number of parallel jobs. None (default) decides automatically.

Returns:

  • face_match ((n2,) np.ndarray) – Indices of the face assigned to each point.

  • bary_coord ((n2, 3) np.ndarray) – Barycentric coordinates of each point within the face.

  • dists ((n2,) np.ndarray) – Distance to the nearest vertex. Returned ONLY if return_dist is True.