prune_branches#
- prune_branches(skel, branch_points=None, iterations=1)[source]#
Remove all dangling ends or tails of a skeleton
- Parameters:
skel (ndarray) – A image of a full or partial skeleton from which the tails should be trimmed.
branch_points (ndarray, optional) – An image the same size
skel
withTrue
values indicating the branch points of the skeleton. If this is not provided it is calculated automatically.iterations (int) – The number of times to recursively repeat the process. The default is 1.
- Returns:
An ndarray containing the skeleton with tails removed.
- Return type:
array
Examples
Click here to view online example.