0% found this document useful (0 votes)
20 views7 pages

Project 44

Ww
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views7 pages

Project 44

Ww
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Unsupervised Medical Image Segmentation

Using Local Center of Mass

1 Ahmed M. Abed
2 Department of Electrical and Computer Science
3 University of Missouri
4 Columbia, MO, 65201
5 [email protected]

6 Abstract
7 Image segmentation became a current trend in numerous medical imaging
8 studies. Besides the supervised learning algorithms, unsupervised learning
9 algorithms can give results better than supervised algorithms in some cases.
10 Unlike supervised learning, in the absence of training data, the
11 unsupervised learning methods can do the segmentation without training
12 data. They are more generally related and more robust to typical or unseen
13 situations. Iman et al. [1] introduced a new approach to unsupervised image
14 segmentation that uses the local Center of Mass (CM). This grouping
15 method can group the pixels of a one-dimensional signal, 2D images and
16 3D objects. It is based on an iterative algorithm to make two- and three-
17 dimensional image segmentation. In this work, I validate the method on a
18 2D X-ray image and 2D magnetic resonance (MR) image, in addition, I add
19 spatial Gaussian blurring filter and/or median filter before applying the CM
20 method. The added filters improved the segmentation accuracy.
21
22 1 I n tro d u cti on
23 Medical Image Segmentation is a process of automatic or semi-automatic detection of boundaries
24 within a 2D or 3D image. Many approaches were suggested to segment the image pixels into
25 separated groups. The approaches are either supervised or unsupervised approaches. The cons of
26 supervised learning are the huge data needed for the training, manually-labeling the dataset and the
27 calculation expensive. On the other hand, unsupervised learning does not need prior data
28 knowledge to do segmentation; therefore, it is more powerful at unseen data and can be used for
29 pretraining the supervised algorithms.
30 The local Center of Mass (CM) as proposed by Iman et. al. [1] has given results better than
31 several unsupervised methods in medical imaging field. Comparing CM algorithm with three
32 other unsupervised segmentation algorithms: the watershed segmentation [2], a Gaussian-mixture-
33 model-based hidden-Markov-random-field (GMM-HMRF) model initialized with k-means
34 clustering [3] and the simple linear iterative clustering (SLIC) super-pixel algorithm [4] is
35 approved to be the best.
36 In this work, I consider the 2D image segmentation using CM algorithm, and I will compare it
37 with other approaches like Gaussian-mixture-model (GMM) model initialized with k-means
38 clustering.
39
40 2 Meth o d s
41 2. 1. Computation of 1D Local Center of Mass
42 Considering figure (1), where 𝑓𝑓 is the pixel value, where 𝑓𝑓: 𝛺𝛺 → 𝑅𝑅 and with Ω: = {1, …, N}.
43 Grouping of f values into disjoint sections based on the computed CM of each pixel’s
44 putative section, that we will refer to as the local CM. The local CM 𝐶𝐶𝑛𝑛 is calculated as:
∑𝑁𝑁
𝑚𝑚=1 𝑊𝑊𝑚𝑚𝑚𝑚 𝑚𝑚
45 𝐶𝐶𝑛𝑛 = (1)
∑𝑁𝑁
𝑚𝑚=1 𝑊𝑊𝑚𝑚𝑚𝑚

46
47 where 𝑤𝑤𝑚𝑚𝑚𝑚 is a non-negative weighting and computed from 𝑓𝑓. If the 𝑚𝑚𝑡𝑡ℎ and 𝑛𝑛𝑡𝑡ℎ pixels are
48 in the same region, then 𝑤𝑤𝑚𝑚𝑚𝑚 is large and small otherwise. Accordingly, pixels that are
49 located in the same region, the function 𝐶𝐶 will have the same value (the region’s CM), thus
50 assigning those pixels to the same segment. Therefore, a pixel is clustered/segmented
51 according to the data provided by the entire signal instead of using only the neighboring
52 pixels

Figure 1. Left: Image intensity profile (𝑓𝑓𝑛𝑛 , blue), local CM (𝐶𝐶𝑛𝑛 , red) and the identity line (n,
dotted green). Right: The weighting (𝑤𝑤𝑚𝑚𝑛𝑛 ) [1].

53 w h e r e 𝑤𝑤 i s c a l c u l a t e d a s :
54
55 𝑤𝑤𝑚𝑚𝑚𝑚 = 𝑒𝑒 −|𝐷𝐷𝑚𝑚 −𝐷𝐷𝑛𝑛 | (2)
56
57 where
58
𝑛𝑛

59 𝐷𝐷𝑛𝑛 = 𝛼𝛼 �|𝑓𝑓𝑖𝑖+1 − 𝑓𝑓𝑖𝑖 |𝑝𝑝 (3)


𝑖𝑖=1
60
61 Where 𝛼𝛼, 𝑝𝑝 > 0 are chosen manually. The more and stronger the signal edges between the
62 𝑚𝑚𝑡𝑡ℎ and 𝑛𝑛𝑡𝑡ℎ pixels are, the larger |𝐷𝐷𝑚𝑚 − 𝐷𝐷𝑛𝑛 | and hence the smaller 𝑤𝑤𝑚𝑚𝑚𝑚 is, demonstrating
63 that the two pixels are in different regions.
64 𝑤𝑤𝑚𝑚𝑚𝑚 can be rewritten as 𝑒𝑒 −𝐷𝐷𝑛𝑛 𝑒𝑒 𝐷𝐷𝑚𝑚 for 𝑚𝑚 ≤ 𝑛𝑛 and 𝑒𝑒 𝐷𝐷𝑛𝑛 𝑒𝑒 −𝐷𝐷𝑚𝑚 for 𝑚𝑚 > 𝑛𝑛, leading to the
65 following expansion of Eq. (1) to compute the elements of 𝐶𝐶:
66
67
68 (4)
69
70
71 Figure 1 (left) shows the plot of 𝐶𝐶𝑛𝑛 (red). Also, the identity line (dotted green) for the
72 reference.
73
74 2.2 Image Segmentation
75 Using the aforementioned 1D local CM method, we can calculate the local CM of 2D and 3D
76 images. Essentially, for the 2D images, as shown in figure (2), we calculate the local CM
77 along with directions which are extended to the edge of the image. These directions are
78 labeled as 𝐶𝐶𝑛𝑛,𝑘𝑘 , where k is {1, 2, 3, 4, … K}. Principally, the pixels that have the same local
79 CM are labeled as the same segment.
80

Figure 2. Local CMs of the 2D images [1].

81 The image labels L are initialized with N unique randomly-located labels. Then an iterative loop
82 consisting of two phases is started. The image labels, L, are updated at each iteration. For each nth
83 pixel, its label Ln is reassigned using the pre-computed set 𝐶𝐶𝑛𝑛 indifferent orientations. Finally, the
84 results L are expected to have l ≪ N unique values. These labels values L are mapped to {1, …,
85 l}, before assigning L as the segmentation results. Also, because of the randomness used in the
86 first phase, the results may have slightly different when repeating the segmentation experiment.
87
88 3 Previ o u s res u l ts
89 Iman et al. [1] have given results better than several unsupervised methods in the medical
90 imaging field. Comparing CM algorithm with three other unsupervised segmentation algorithms:
91 the watershed segmentation, a Gaussian-mixture-model-based hidden-Markov-random-field
92 (GMM-HMRF) model initialized with k-means clustering and the simple linear iterative clustering
93 (SLIC) super-pixel algorithm is approved to be the best as shown in figure (3). The hand image
94 can be downloaded from [5]. They used MATLAB to implement their unsupervised segmentation
95 algorithm. They evaluated it on 2D and 3D medical images. Besides, they used three other

Figure 3. Iman et. al. [1] results.


96 unsupervised segmentation algorithms to compare the results. These algorithms are the watershed
97 segmentation, a Gaussian-mixture-model-based hidden-Markov-random-field (GMM-HMRF) model
98 initialized with k-means clustering and the simple linear iterative clustering (SLIC) superpixel
99 algorithm (with constant compactness). MATLAB Image Processing Toolbox™ for
100 watershed and SLIC and a public MATLAB exchange file code for GMM-HMRF are used to
101 produce these segmentations. Also, before applying the watershed transform, Sobel filter is
102 used for watershed segmentation to create the edge map of the image, where its h-minima
103 transform is computed to removed its local minima that were shallower than the scalar h.
104 Also, they set the maximum number of iterations to the suggested value of 10 for GMM-
105 HMRF, for the EM algorithm and MAP estimation. First, the images were normalized to
106 have intensity values between 0 and 1. Also, they chose an angular resolution of 1° and
107 computed the local CMs in K = 180 directions that are uniformly distributed on the
108 semicircle. They used 𝑝𝑝 value of 2 as it gave them the best results. Also, they used total
109 iterations of 10,000 and optimal α = 1400 (middle) and α = 2000 (right) as shown in figure
110 (3). Also, for Watershed method, they found an optimal h = 0.116 (left), and for the GMM-
111 HMRF model, they found an optimal r = 11 and g = 2 (middle), and for the SLIC method,
112 they found the optimal s equal to 130 (right) as shown in figure (3).
113
114 4 Med i an fi l ter
115 In medical images, there is some like Salt-and-pepper noise. As it is known, this noise can be
116 reduced hugely using a median filter [3]. I propose the median filter to be used for reducing
117 these non-uniform areas to reduce the over-segmentation process. The median filter works in
118 𝑃𝑃 × 𝑃𝑃 area, where P is the length of rectangular in pixels.

Figure 4. Left: Image intensity profile (𝑓𝑓𝑛𝑛 , blue), local CM (𝐶𝐶𝑛𝑛 , red) and the identity line (n,
dotted green). Right: The weighting (𝑤𝑤𝑚𝑚𝑛𝑛 ) [1].

119
120 5 G au s s i an Fil ter
121 As aforementioned in section four, medical images, there is some like Salt-and-pepper noise.
122 However, these areas are wide and can be spread to the near regions using spatial Gaussian
123 filter [7]. As it is known, this noise can be reduced hugely using the Gaussian filter [7]. I
124 propose the Gaussian filter to be used for reducing these non-uniform areas to reduce the
125 over-segmentation process. Also, the Gaussian filter has a low affect on the edges of images
126 [8]. The Gaussian filter works in 𝑃𝑃 × 𝑃𝑃 area, where P is the length of rectangular in pixels.
127
128 6 Mi x ed fi l ter
129 Since the median filter and Gaussian filter have different functions. Therefore, I applied used
130 the two filters in the same image. However, since the median filter works better on Salt-and-
131 pepper noise. Thus, I applied the median filter first; then, I used the Gaussian filter. Also, I
132 applied tenderization on the image values on another process to see the effect. The
133 standardization process includes subtracting the mean and divides the results by the standard
134 deviation value.
135
136
137 7 Res u l ts
138 In my calculation, I reduced the number of iterations to 500 instead of 10,000 used by
139 original work aforementioned. Also, I used 𝑝𝑝 value of 2 and the number of directions K of
140 180 directions. By computing the median filter with 3x3, 5x5 and 7x7 area in pixels on the
141 images as a preprocessing and the results are shown in figure (5) using an alpha value of
142 2000. From this figure, we notice the results are better than the results in the original paper
143 in some aspects such as there is no over-segmentation and the parts are better segmented in
144 terms of image recovering details.
145 Besides, using Gaussian filter, with 3x3, 5x5 and 7x7 area in pixels on the images as a
146 preprocessing. The results are shown in figure (6). Where the alpha value of 2000 is used as
147 it is recommended for gray and normalized values by [1]. From this figure, we notice the
148 results are better than the results in the original paper in some aspects such as there is no
149 over-segmentation and the parts are better segmented in terms of image recovering details.
150 Also, using the median filter with 3x3 then using Gaussian filter, with 3x3, 5x5 and 7x7 area
151 in pixels on the images as a preprocessing. The results are shown in figure (7) without the
152 standardization process and figure (8) for the standardization used on the image before
153 applying the median and Gaussian filters. Where the alpha value of 2000 is used as it is
154 recommended for gray and normalized values by [1]. From this figure, we notice the results
155 are better than the results in the original paper in some aspects such as there is no over-
156 segmentation and the parts are better segmented in terms of image recovering details.
157
α=2000, filter size 3x3 α=2000, filter size 5x5 α=2000, filter size 7x7

Figure 5. Top: Image segmentation using Local CM and median filter with different sizes.
Down: The original image and image segmented using Local CM only.
α=2000, filter size 3x3 α=2000, filter size 5x5 α=2000, filter size 7x7

Figure 6. Top: Image segmentation using Local CM and Gaussian filter with different
sizes. Down: The original image and image segmented using Local CM only.

α=2000, filter size 3x3 α=2000, filter size 5x5 α=2000, filter size 7x7

Figure 7. Top: Image segmentation using Local CM, median filter 3x3 and Gaussian
filter with different sizes. Down: The original image and image segmented using
158 Local CM only.
Figure 8. Top: Image segmentation using Local CM, using standrization process first
then median filter 3x3 and Gaussian filter with different 5x5 are applyed.

159 8 Con cl u s i o n
160 In Conclusion, in this work, we apply unsupervised image segmentation using new approach
161 referred to as the local CM and compare this approach with many unsupervised approaches
162 such as the watershed segmentation, a Gaussian-mixture-model-based hidden-Markov-
163 random-field (GMM-HMRF) model initialized with k-means clustering and the simple linear
164 iterative clustering (SLIC) super-pixel algorithm. Moreover, we proposed a preprocessing
165 for the medical images before using Local CM. These preprocessing includes using the
166 median filter or/and Gaussian filter, in addition to do the standardization process some times.
167 Our proposals approve of giving better image segmentation experience and less over-
168 segmentation effect among the other approaches.

169

170 R e f e re n c e s
171 [1] Iman Aganj, Mukesh G. Harisinghani, Ralph Weissleder and Bruce Fischl “Unsupervised Medical
172 Image Segmentation Based on the Local Center of Mass,” Nature, Scientific Reports volume 8,
173 Article number: 13012 (2018).
174 [2] Haris, K., Efstratiadis, S. N., Maglaveras, N. & Katsaggelos, A. K. Hybrid image segmentation
175 using watersheds and fast region merging. IEEE Transactions on image processing 7, 1684–1699
176 (1998).
177 [3] Quan Wang, “GMM-Based Hidden Markov Random Field for Color Image and 3D Volume
178 Segmentation,” arXiv preprint arXiv:1212.4527, 2012.
179 [4] Achanta, R. et al. SLIC superpixels compared to state-of-the-art superpixel methods. IEEE
180 Transactions on Pattern Analysis and Machine Intelligence 34, 2274–2282,
181 https://doi.org/10.1109/TPAMI.2012.120 (2012).
182 [5] X-ray hand image from the link: https://openstax.org/books/anatomy-and-physiology/pages/1-7-
183 medical-imaging.
184 [6] T. Huang, G. Yang and G. Tang, "A fast two-dimensional median filtering algorithm," in IEEE
185 Transactions on Acoustics, Speech, and Signal Processing, vol. 27, no. 1, pp. 13-18, February 1979.
186 doi: 10.1109/TASSP.1979.1163188.

187• [7] G. Deng and L. W. Cahill, “An Adaptive Gaussian Filter For Noise Reduction and Edge
188 Detection,” Nuclear Science Symposium and Medical Imaging Conference, 1993., 1993 IEEE
189 Conference Record.
190• [8] Shapiro, L. G. & Stockman, G. C: "Computer Vision", page 137, 150. Prentice Hall, 2001

191

You might also like