Thinning (morphology)

Thinning is the transformation of a digital image into a simplified, but topologically equivalent image. It is a type of topological skeleton, but computed using mathematical morphology operators.
Example.
Let formula_1, and consider the eight composite structuring elements, composed by: 
and the three rotations of each by formula_6, formula_7, and formula_8. The corresponding composite structuring elements are denoted formula_9. 
For any "i" between 1 and 8, and any binary image "X", define
where formula_11 denotes the set-theoretical difference and formula_12 denotes the hit-or-miss transform.
The thinning of an image "A" is obtained by cyclically iterating until convergence:
Thickening.
Thickening is the dual of thinning that is used to grow selected regions of foreground pixels. In most cases in image processing thickening is performed by thinning the background 
formula_14
where formula_15 denotes the set-theoretical difference and formula_12 denotes the hit-or-miss transform, and formula_17 is the structural element and formula_18 is the image being operated on.