Morphological skeleton
In digital image processing, morphological skeleton is a skeleton (or medial axis) representation of a shape or binary image, computed by means of morphological operators.
Morphological skeletons are of two kinds:
- Those defined by means of morphological openings, from which the original shape can be reconstructed,
- Those computed by means of the hit-or-miss transform, which preserve the shape's topology.
Skeleton by openings
Lantuéjoul's formula
Continuous images
In (Lantuéjoul 1977),[1] Lantuéjoul derived the following morphological formula for the skeleton of a continuous binary image [math]\displaystyle{ X\subset \mathbb{R}^2 }[/math]:
- [math]\displaystyle{ S(X)=\bigcup_{\rho \gt 0}\bigcap_{\mu \gt 0}\left[(X\ominus \rho B)-(X\ominus \rho B)\circ \mu \overline B\right] }[/math],
where [math]\displaystyle{ \ominus }[/math] and [math]\displaystyle{ \circ }[/math] are the morphological erosion and opening, respectively, [math]\displaystyle{ \rho B }[/math] is an open ball of radius [math]\displaystyle{ \rho }[/math], and [math]\displaystyle{ \overline B }[/math] is the closure of [math]\displaystyle{ B }[/math].
Discrete images
Let [math]\displaystyle{ \{nB\} }[/math], [math]\displaystyle{ n=0,1,\ldots }[/math], be a family of shapes, where B is a structuring element,
- [math]\displaystyle{ nB=\underbrace{B\oplus\cdots\oplus B}_{n\mbox{ times}} }[/math], and
- [math]\displaystyle{ 0B=\{o\} }[/math], where o denotes the origin.
The variable n is called the size of the structuring element.
Lantuéjoul's formula has been discretized as follows. For a discrete binary image [math]\displaystyle{ X\subset \mathbb{Z}^2 }[/math], the skeleton S(X) is the union of the skeleton subsets [math]\displaystyle{ \{S_n(X)\} }[/math], [math]\displaystyle{ n=0,1,\ldots,N }[/math], where:
- [math]\displaystyle{ S_n(X)=(X\ominus nB)-(X\ominus nB)\circ B }[/math].
Reconstruction from the skeleton
The original shape X can be reconstructed from the set of skeleton subsets [math]\displaystyle{ \{S_n(X)\} }[/math] as follows:
- [math]\displaystyle{ X=\bigcup_n (S_n(X)\oplus nB) }[/math].
Partial reconstructions can also be performed, leading to opened versions of the original shape:
- [math]\displaystyle{ \bigcup_{n\geq m} (S_n(X)\oplus nB)=X\circ mB }[/math].
The skeleton as the centers of the maximal disks
Let [math]\displaystyle{ nB_z }[/math] be the translated version of [math]\displaystyle{ nB }[/math] to the point z, that is, [math]\displaystyle{ nB_z=\{x\in E| x-z\in nB\} }[/math].
A shape [math]\displaystyle{ nB_z }[/math] centered at z is called a maximal disk in a set A when:
- [math]\displaystyle{ nB_z\in A }[/math], and
- if, for some integer m and some point y, [math]\displaystyle{ nB_z\subseteq mB_y }[/math], then [math]\displaystyle{ mB_y\not\subseteq A }[/math].
Each skeleton subset [math]\displaystyle{ S_n(X) }[/math] consists of the centers of all maximal disks of size n.
Performing Morphological Skeletonization on Images
Morphological Skeletonization can be considered as a controlled erosion process. This involves shrinking the image until the area of interest is 1 pixel wide. This can allow quick and accurate image processing on an otherwise large and memory intensive operation. A great example of using skeletonization on an image is processing fingerprints. This can be quickly accomplished using bwmorph; a built-in Matlab function which will implement the Skeletonization Morphology technique to the image.
The image to the right shows the extent of what skeleton morphology can accomplish. Given a partial image, it is possible to extract a much fuller picture. Properly pre-processing the image with a simple Auto Threshold grayscale to binary converter will give the skeletonization function an easier time thinning. The higher contrast ratio will allow the lines to joined in a more accurate manner. Allowing to properly reconstruct the fingerprint.
skelIm = bwmorph(orIm,'skel',Inf); %Function used to generate Skeletonization Images
Notes
- ↑ See also (Serra's 1982 book)
References
- Image Analysis and Mathematical Morphology by Jean Serra, ISBN:0-12-637240-3 (1982)
- Image Analysis and Mathematical Morphology, Volume 2: Theoretical Advances by Jean Serra, ISBN:0-12-637241-1 (1988)
- An Introduction to Morphological Image Processing by Edward R. Dougherty, ISBN:0-8194-0845-X (1992)
- Ch. Lantuéjoul, "Sur le modèle de Johnson-Mehl généralisé", Internal report of the Centre de Morph. Math., Fontainebleau, France, 1977.
- Scott E. Umbaugh (2018). Digital Image Processing and Analysis, pp 93-96. CRC Press. ISBN:978-1-4987-6602-9
Original source: https://en.wikipedia.org/wiki/Morphological skeleton.
Read more |