Back to Adaptive Vision Library website

You are here: Start » Function Reference » Region » Region Features » RegionMedialAxis


Header: AVL.h
Namespace: avl
Module: FoundationBasic

Computes an array of paths corresponding to the skeleton of the input region.


void avl::RegionMedialAxis
	const avl::Region& inRegion,
	avl::RegionSkeletonMethod::Type inRegionSkeletonMethod,
	atl::Array<avl::Path>& outSkeletonPaths


Name Type Default Description
inRegion const Region& Input region
inRegionSkeletonMethod RegionSkeletonMethod::Type TwelveConnected
outSkeletonPaths Array<Path>&


The operation performs skeletonization presenting result as an array of paths.

Skeleton of a region is a connected set of medial axis of its limbs. It is a useful tool when one is interested only in general structure of a shape and wants to disregard width of its limbs. Two methods are available, depending on the value of inRegionSkeletonMethod being chosen:

  • EightConnected: the input region is thinned as long as the thinning procedure affects it; the structuring elements come from the well known Golay alphabet
  • TwelveConnected: the input region is thinned also, but the structuring elements being used are slightly larger than in previous method (they consider 12-neighborhood of the given pixel instead of 8-neighborhood). The method comes from the paper of U. Eckhardt and G. Maderlechner "Invariant thinning"

The second method is slower than the first one, but its results look in most cases much better than the first one's results.

This filter is a cousin of SkeletonizeRegion which represents the results as a region instead of an array of paths.


The resulting outSkeletonPaths paths drawn onto the input region, inRegionSkeletonMethod = TwelveConnected.

See Also