Next: Communicating Applets
Up: Applets
Previous: Thresholding
Figure 8: Thinning structuring elements
Thinning takes the form of a hit-and-miss transform [12] and
operates as follows:
- Sweep the image with one of the structuring elements shown in
Figure 8.
- If the 3x3 image pattern matches the structuring element
(blanks denote don't-care points) then put a one on the
corresponding location of the result image, otherwise put a zero.
- Invert the resulting image and perform a binary AND of
it with the initial image. This removes the points produced by the
first structuring element.
- Repeat processes 1-3 until all structuring elements have passed
over the image (each element takes as input the output of the
previous one).
- Repeat processes 1-4 until the image doesn't change anymore.
This algorithm guarantees that connectivity will be preserved so the
overall geometric structure of the object in the image is preserved.
One obvious disadvantage of this technique is that it takes
a long time.
In interpreted JAVA code a straightforward convolution of a
256x256 image with a 3x3 kernel takes approximately five seconds.
As thinning requires 8 passes (ie. one pass with each of the 8 different maske)
for each iteration, and may require
an unknown number of iterations, then this operator is going to be too slow
for interactive use and tutorial use.
Bob Fisher
Fri Jul 4 16:11:50 BST 1997