pyFM.spectral.projection_utils.compute_all_dmin

pyFM.spectral.projection_utils.compute_all_dmin(vert_emb, faces, points_emb, vert_sqnorm=None, points_sqnorm=None)

For each vertex in the pointcloud and each face on the surface, gives the minimum distance between the vertex and each of the 3 points of the triangle.

For a given face on the source shape and vertex on the target shape: \(\delta_min = \min_{i=1\cdots 3} \|A_{c_i,*} - b\|_2\) with notations from “Deblurring and Denoising of Maps between Shapes”.

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.

  • vert_sqnorm ((n1,) np.ndarray, optional) – Squared norm of each vertex. Computed on the fly if None.

  • points_sqnorm ((n2,) np.ndarray, optional) – Squared norm of each point. Computed on the fly if None.

Returns:

delta_min – delta_min for each face on the source shape and each point.

Return type:

(m1, n2) np.ndarray