cows.separate_skeleton

cows.separate_skeleton(skel, periodic=False)[source]

Separate the skeleton.

Set all the skeleton cells with more than 2 neighbours to the background value of zero. This results in a set of individual objects of arbitrary length and 2 endpoints.

Parameters:
  • skel (ndarray, 3D) – A binary image containing the skeletonized objects. Zeros represent background, nonzero values are foreground.

  • periodic (bool) – If True, the skeletonization uses periodic boundary conditions for the input array. Input array must be 3D.

Returns:

result (ndarray) – The separated skeleton.