tightbinder.utils.alpha_shape_2d#

alpha_shape_2d(points, alpha, only_outer=True)[source]#

Compute the alpha shape (concave hull) of a set of 2D points. From: https://stackoverflow.com/questions/50549128/boundary-enclosing-a-given-set-of-points

Parameters:
  • points (ndarray) – np.array of shape (n, 2) points.

  • alpha (float) – alpha value.

  • only_outer (bool) – boolean value to specify if we keep only the outer border or also inner edges.

Returns:

set of (i,j) pairs representing edges of the alpha-shape. (i,j) are the indices in the points array.