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:
In (Lantuéjoul 1977),[1] Lantuéjoul derived the following morphological formula for the skeleton of a continuous binary image
X\subsetR2
S(X)=cup\rhocap\mu\left[(X\ominus\rhoB)-(X\ominus\rhoB)\circ\mu\overlineB\right]
where
\ominus
\circ
\rhoB
\rho
\overlineB
B
Let
\{nB\}
n=0,1,\ldots
nB=\underbrace{B ⊕ … ⊕ B}ntimes
0B=\{o\}
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
X\subsetZ2
\{Sn(X)\}
n=0,1,\ldots,N
Sn(X)=(X\ominusnB)-(X\ominusnB)\circB
The original shape X can be reconstructed from the set of skeleton subsets
\{Sn(X)\}
X=cupn(Sn(X) ⊕ nB)
Partial reconstructions can also be performed, leading to opened versions of the original shape:
cupn\geq(Sn(X) ⊕ nB)=X\circmB
Let
nBz
nB
nBz=\{x\inE|x-z\innB\}
A shape
nBz
nBz\inA
nBz\subseteqmBy
mBy\not\subseteqA
Each skeleton subset
Sn(X)
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