<s>
The	O
pruning	B-Algorithm
algorithm	O
is	O
a	O
technique	O
used	O
in	O
digital	B-Algorithm
image	I-Algorithm
processing	I-Algorithm
based	O
on	O
mathematical	B-Algorithm
morphology	I-Algorithm
.	O
</s>
<s>
It	O
is	O
used	O
as	O
a	O
complement	O
to	O
the	O
skeleton	B-Algorithm
and	O
thinning	B-Algorithm
algorithms	O
to	O
remove	O
unwanted	O
parasitic	O
components	O
(	O
spurs	O
)	O
.	O
</s>
<s>
These	O
components	O
can	O
often	O
be	O
created	O
by	O
edge	B-Algorithm
detection	I-Algorithm
algorithms	O
or	O
digitization	O
.	O
</s>
<s>
Common	O
uses	O
for	O
pruning	B-Algorithm
include	O
automatic	B-Application
recognition	I-Application
of	I-Application
hand-printed	I-Application
characters	I-Application
.	O
</s>
<s>
The	O
standard	O
pruning	B-Algorithm
algorithm	O
will	O
remove	O
all	O
branches	O
shorter	O
than	O
a	O
given	O
number	O
of	O
points	O
.	O
</s>
<s>
Perform	O
dilation	B-Algorithm
using	O
a	O
3x3	O
matrix	O
(	O
H	O
)	O
consisting	O
of	O
all	O
1	O
's	O
and	O
only	O
insert	O
1	O
's	O
where	O
the	O
original	O
image	O
(	O
A	O
)	O
also	O
had	O
a	O
1	O
.	O
</s>
<s>
In	O
the	O
MATLAB	B-Language
example	O
below	O
,	O
it	O
takes	O
the	O
original	O
image	O
(	O
below	O
left	O
)	O
and	O
skeletonize	O
it	O
40	O
times	O
then	O
prunes	O
the	O
image	O
to	O
remove	O
the	O
spurs	O
as	O
per	O
the	O
MATLAB	B-Language
code	O
above	O
.	O
</s>
