Professional Documents
Culture Documents
Introduction
Original Image
Thinned Image
Figure 1.1
Machine Vision
Thinning Algorithms
Page 1 of 14
Morphology uses Set Theory as the foundation for many functions. The
simplest functions to implement are Dilation and Erosion. Dilation in 1D is
defined as:
1.3
Image enhancement
Image restoration (i.e. removing scratches from digital film)
Edge detection
Texture analysis
Noise reduction
Structuring Element
Machine Vision
Thinning Algorithms
Page 2 of 14
Figure 1.2
Each point in the structuring element may have a value. In the simplest
structuring elements used with binary images for operations such as erosion,
the elements only have one value, conveniently represented as a one. More
complicated elements, such as those used with thinning or greyscale
morphological operations may have other pixel values.
In the structure element 1s are represented as the foreground pixels and 0s
are represented as the background pixels. The Blanks are indicated as dont
care.
When a morphological operation is carried out, the origin of the structuring
element is typically translated to each pixel position in the image in turn, and
then the points within the translated structuring element are compared with the
underlying image pixel values. The details of this comparison and the effect of
the outcome depend on which morphological operator is being used.
Machine Vision
Thinning Algorithms
Page 3 of 14
Thinning Methods
2.1
General
Thinning algorithms can be divided into two broad classes namely iterative and
non-iterative. Although non-iterative algorithms can be faster than iterative
algorithms they do not always produce accurate results.
2.2
Iterative Thinning
Where: Nk is the colour of the eight neighbours of the pixel analyzed. N 0 is the
center pixel. N1 is the colour value of the pixel to the right of the central pixel
and the rest are numbered in counter clockwise order around the center.
S = {1, 3, 5, 7}
Figure 2.1
The following are the connectivity numbers for Figure 2.1:
a) Connectivity number = 0.
b) Connectivity number = 1.
Machine Vision
Thinning Algorithms
Page 4 of 14
c) Connectivity number = 2.
d) Connectivity number = 3.
e) Connectivity number = 4.
Figure 2.2
Machine Vision
Thinning Algorithms
Page 5 of 14
Figure 2.3 shows some examples of the thinning process using the Stentiford
Algorithm.
Figure 2.3
2.2.3 Zhang-Suen Thinning Algorithm
This skeletonization algorithm is a parallel method that means the new value
obtained only depend on the previous iteration value. It is fast and simple to be
implemented. This algorithm is made by two sub-iterations. In the fist one, a
pixel I (i , j) is deleted if the following conditions are satisfied [3]:
1. Its connectivity number is one.
2. It has at least two black neighbours and not more than six.
3. At least one of I(i,j+1), I(i-1,j), and I(i,j-1) are white.
4. At least one of I(i-1,j), I(i+1,j), and I(i,j-1) are white.
In the second sub-iteration the conditions in steps 3 and 4 change.
1. Its connectivity number is one.
2. It has at least two black neighbours and not more than six.
3. At least one of I(i-1,j), I(i,j+1), and I(i+1,j) are white.
4. At least one of I(i,j+1), I(i+1,j), and I(i,j-1) are white.
At the end, pixels satisfying these conditions will be deleted. If at the end of
either sub-iteration there are no pixels to be deleted, then the algorithm stops.
Figure 2.4 shows some examples of the thinning process using the ZhangSuen Algorithm
Machine Vision
Thinning Algorithms
Page 6 of 14
Figure 2.4
2.3
Non-Iterative Thinning
Machine Vision
Thinning Algorithms
Page 7 of 14
Machine Vision
Thinning Algorithms
Page 8 of 14
Figure 3.1
The segmented URT, its central path, and its cross--sectional profile at the
three landmarks (vocal cords, caudal border of the cricoid cartilage, and cranial
border of the sternum) and at the narrowest position (top); the line chart
(bottom).
3.2
Figure 3.2
Machine Vision
Thinning Algorithms
Page 9 of 14
The segmented part of the infrarenal aorta and its central path. Along the
central path the cross-sectional profile was computed. The following
parameters could be derived from this approach: the maximum diameter in 3D
as well as the length of the proximal and distal neck of the aneurysma. Since
size of the aneurysma is regarded to be a prognosticated factor, the volume of
the segmented aneurysma was determined too. At follow-up investigations the
same parameters were derived.
In order to investigate the correctness of the applied 3D thinning algorithms,
some mathematical phantoms were created.
Figure 3.3
Two phantoms and their central paths.
3.3
Unravelling the colon is a new method to visualize the entire inner surface of
the colon without the need for navigation. This is a minimally invasive technique
that can be used for colorectal polyps and cancer detection. Dr. Palgyi has
proposed an algorithm for unravelling the colon which is to digitally straighten
and then flatten using reconstructed spiral/helical computer tomograph (CT)
images. Comparing to virtual colonoscopy where polyps may be hidden from
view behind the folds, the unravelled colon is more suitable for polyp detection,
because the entire inner surface is displayed at one view.
Figure 3.4
The segmented volume of a part of the artificial phantom with two polyps (top)
and the same part of the phantom after unravelling (bottom).
Machine Vision
Thinning Algorithms
Page 10 of 14
Figure 3.5
The segmented volume of a part of the cadavric phantom with polyps (top) and
the unravelled colon (bottom).
Machine Vision
Thinning Algorithms
Page 11 of 14
The Stentiford method tends to produce lines that follow curves very well,
resulting in vectors that most accurately reflect the original image. The Zhang Suen method tends to be better at extracting straight lines from a raster, so
may result in more desirable vectors from an original image which comprises
mainly straight lines [8].
Finally, since sometimes, when thinning is complete, there are still pixels that
could be deleted (principal among these are pixels that form a staircase). It is
possible to use Holts staircase removal algorithm, which allows half of the
pixels in a staircase to be removed without affecting the shape of
connectedness of the overall object by applying a template-matching technique.
The following (figure 4.1) shows the thinned image resulting from the
application of a hybrid implementation based on the merging of the above
algorithms in the following order: Stentifords pre-processing scheme feeding
images into Zhang-Suens basic algorithm, with Holts staircase removal
algorithm as a post-processor [2].
Figure 4.1
Machine Vision
Thinning Algorithms
Page 12 of 14
Although there are many thinning algorithms proposed over the years they
produce some sort of side effects such as necking (figure 4.2(a)), tails (figure
4.2(b)) and hairs (figure 4.2(c)). There is yet to be a thinning algorithm that
does not produce any side effect. There are lot of institutes that are undertaking
research on thinning, and it is hoped that there will be a perfect thinning
algorithm in the near future.
Figure 4.2
Machine Vision
Thinning Algorithms
Page 13 of 14
References
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
Machine Vision
Thinning Algorithms
Page 14 of 14