{ } Raw JSON

bundles / skimage latest / skimage / morphology / _skeletonize / _skeletonize_lee

function

skimage.morphology._skeletonize:_skeletonize_lee

source: /dev/scikit-image/src/skimage/morphology/_skeletonize.py :591

Signature

def   _skeletonize_lee ( image )

Summary

Compute the skeleton of a binary image.

Extended Summary

Thinning is used to reduce each connected component in a binary image to a single-pixel wide skeleton.

Parameters

image : ndarray, 2D or 3D

An image containing the objects to be skeletonized. Zeros or False represent background, nonzero values or True are foreground.

Returns

skeleton : ndarray of bool

The thinned image.

Notes

The method of [Lee94] uses an octree data structure to examine a 3x3x3 neighborhood of a pixel. The algorithm proceeds by iteratively sweeping over the image, and removing pixels at each iteration until the image stops changing. Each iteration consists of two steps: first, a list of candidates for removal is assembled; then pixels from this list are rechecked sequentially, to better preserve connectivity of the image.

The algorithm this function implements is different from the algorithms used by either skeletonize or medial_axis, thus for 2D images the results produced by this function are generally different.

See also

medial_axis
skeletonize

Aliases

  • skimage.morphology._skeletonize._skeletonize_lee