Let
, and consider the eight composite structuring elements, composed by:
and
,
and 
and the three rotations of each by
,
, and
. The corresponding composite structuring elements are denoted
.
For any i between 1 and 8, and any binary image X, define
,
where
denotes the set-theoretical difference and
denotes the hit-or-miss transform.
The thinning of an image A is obtained by cyclically iterating until convergence:
.