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 also return the distance from each point to its projection.

  • batch_size (int, optional) – If given, projects batches of points instead of precomputing all of dmin, which trades speed for memory. None (default) precomputes.

  • n_jobs (int, optional) – Number of parallel processes for the nearest neighbor precomputation.

Returns:

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

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

  • dists ((n2,) np.ndarray) – Distance from each point to its projection on the mesh, not to the nearest vertex. Returned ONLY if return_dist is True.