bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / 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 3DAn image containing the objects to be skeletonized. Zeros or
Falserepresent background, nonzero values orTrueare foreground.
Returns
skeleton: ndarray of boolThe 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
Aliases
-
skimage.morphology._skeletonize._skeletonize_lee