This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)


finds the skeletons of foreground regions in image by applying morphological thinning until convergence.
performs n iterations of morphological thinning.
treats values above t as foreground.
  • Thinning yields a binary image in which pixels representing the morphological skeleton have value 1 and others have value 0.
  • Thinning works with binary, grayscale, and arbitrary multichannel images, as well as real matrices.
  • Thinning takes a Padding option that specifies the values to assume for pixels outside the image. The default setting is Padding.
  • Thinning supports a Method option which specifies what thinning algorithm to be used. Possible settings include:
"Morphological"morphological thinning (default)
"MedialAxis"approximate medial axis
Morphological thinning of an image:
Morphological thinning of an image:
Click for copyable input
Applying the morphological thinning to a label matrix:
Thinning a grayscale image using a specific foreground threshold:
Find the approximate medial axis:
The padding value affects objects adjacent to the boundary:
Pad with the foreground value:
Simplify features in a fingerprint image:
Use the image skeleton to construct a graph:
Extract possible paths through a maze:
Find the approximate Voronoi diagram of the foreground objects:
New in 8