pyFM.spectral.projection_utils.compute_dmin

pyFM.spectral.projection_utils.compute_dmin(vert_emb, faces, points_emb, vertind, vert_sqnorms=None, points_sqnorm=None)

Given a 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.

  • vertind (int) – Index of the vertex for which to compute dmin.

  • vert_sqnorms ((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.

Returns:

delta_min – delta_min for each face on the source shape.

Return type:

(m1,) np.ndarray