# Spatial \(\alpha \)-Trimmed Fuzzy C-Means Algorithm to Image Segmentation

- 86 Downloads

## Abstract

An important aspect should be taken into account, when an image is segmented, the presence of atypical information. In this investigation an algorithm is proposed that is noise tolerant in the segmentation process. A method to image segmentation that combines Fuzzy C-Means (FCM) algorithm and Trimmed Means filter, called Spatial \(\alpha \) Trimmed Fuzzy C-means, using local information to achieve better segmentation. The FCM is very sensitive to noise, and the Trimmed Means filter is used to eliminate outliers with a lower computational cost. Compared to some state-of-the-art algorithms, the proposed is faster and noise tolerant, demonstrating better performance in the metrics considered.

## Keywords

Image segmentation Fuzzy C-Means \(\alpha \)-Trimmed means filter Spatial information## 1 Introduction

Image segmentation is defined as a process by which an image is divided into homogeneous areas, each belonging to different objects with similar features (i.e. color, contrast, brightness, texture and so on) [16]. Segmentation has a many applications medical image analysis, autonomous vehicles, video surveillance, and augmented reality to count a few [8]. Generally, the image segmentation method are divided into histogram-based approaches [11], edge detection approaches [19], region-based approaches [15], clustering approaches [12].

One of the most popular image segmentation algorithms is Fuzzy C-means (FCM), which gives each data a degree of membership through a distance measure to assign to the nearest group [6, 17]. FCM is a noise sensitive algorithm, some investigations try to improve this algorithm, some guarantee noise immunity and preserve image details by incorporating local spatial and gray information together to enhances the clustering performance [5]; other try to reduce the high computational complexity that surge an iterative calculation of the distance between pixels within local spatial neighbors and clustering centers, based on morphological reconstruction and membership filtering [10]. There algorithms used to determinate the parameters by introducing density for each sample, where the density peaks are use to determinate the number of clusters and the initial membership matrix [13].

In this context, this paper considers the use of \(\alpha \)-Trimmed Means filter to add robustness to FCM and to ensure better performance spatial relationship is added using a median and a mean filter. An important contribution is that \(\alpha \) is not a simple parameter, it depends on the standard deviation of the data to be processed. Another important feature is the use of spatial information, since nearby pixels are more likely to belong to the same group. So, the objective of this paper is to segmented images that was corrupted with atypical information, specifically additive, multiplicative and fixed impulsive noise. The experimental results in different databases demonstrate that the proposed algorithm have a better performance compared to some algorithms of the state of the art being more tolerant to noise.

## 2 Background

### 2.1 Fuzzy C-Means

*X*in

*c*groups is defined to be optimal when it minimizes the following objective function [4]:

*jth*cluster, \(d^2_{ij}\) is a norm metric, and the parameter

*m*controls the fuzziness of the resulting partition, and \(m=2\) is regularly used. The objective function \( J_ {f} \) is minimized by two steps. First the degrees of membership are optimized by setting the parameters of the groups, then the prototypes of the groups are optimized by setting the degrees of membership. The equations resulting from the two iterative steps form the Fuzzy C-Means clustering algorithm [4].

### 2.2 \(\alpha \)-Trimmed Means Filter

It has been observed that the mean filter is more efficient in deleting Gaussian noise than the median filter, but it is less efficient in eliminating impulsive noise; while the median filter completely eliminates impulse noise. However, when there is Gaussian and impulsive noise, the trimmed means filter becomes an alternative between the mean and median filters.

## 3 Method

In this section, we present the proposed method to segment images with atypical information, this method combines the theory of the Fuzzy C-means algorithm and the \(\alpha \)-Trimmed Means filter, It also incorporates the spatial relationship of the pixels.

### 3.1 Mathematical Formulation of \(\alpha \)-Trimmed Fuzzy C-Means Algorithm with Spatial Information

*i*extends only in the subset of the non-trimmed objects I. To avoid defining different parameters in the proposed method, it was decided to use the standard deviation, as a way to establish a reference value based on the dispersion that exists in the data. This mainly applies to the \(\alpha \) parameter, and then extends over \(\alpha _1\) and \(\alpha _2\). \(\alpha \) and \(\alpha _2\) in most experiments remain at 0.2, while \(\alpha _1\) ranges from 0.5 to 0.6.

## 4 Experimental Results

In this section, we first describe the considered metrics to measure the quality of Image Segmentation, second, the databases where the algorithm proposed was tested, and finally the comparatives results with others algorithms.

### 4.1 Metrics

- Accuracy, to measure the quality of the clustering.$$\begin{aligned} Accuracy = \frac{TP + TN}{TP + TN + FP + FN} \end{aligned}$$(13)
- Recall, measure the positive data that were clustered correctly.$$\begin{aligned} Recall = \frac{TP}{TP+FN} \end{aligned}$$(14)
- DICE similarity coefficient (DSC), quantify the overlap between segmentation results with the ground truth.$$\begin{aligned} DSC = 2 \bullet \frac{\text {Area}(X \cap Y)}{\text {Area}(X) + \text {Area}(Y)} \end{aligned}$$(15)
- Jaccard similarity coefficient (JSC), was used to measure the quality of segmentation.$$\begin{aligned} JSC = \frac{\text {Area}(X \cap Y)}{\text {Area}(X) + \text {Area}(Y) -\text {Area}(X \bigcap Y)} \end{aligned}$$(16)

Where *TP* are the true positives, *TN* the true negatives, *FP* the false positives and *FN* the false negatives. *X* and *Y* represent the ground truth and segmented images, respectively.

### 4.2 Databases

### 4.3 Experimental Results

**Medical Image Database.** In Fig. 2 we can observe the quantitative results of the experiments with the three types of noise considered (Gaussian, Salt and Pepper and Speckle noise) on ISIC 2019 Database, the means value is zero to Gaussian and Speckle noise and the variance is defining by densities between 0.03 to 0.40 and 0.10 to 0.40, respectively; Salt and pepper noise images with densities between \( 3\% \) to \(40\%\). We can observe that the higher the density of the noise that corrupts the images, the algorithm of the proposal in most of the metrics considered shows a higher performance compared to the other algorithms, with an accuracy of approximately 95%. The qualitative results of the experiment are presented in Fig. 3, just to depict the results of the proposal algorithm, the segmentation result is shown by selecting the highest noise density with which the experiments were performed. Each row shows a result of the segmentation of each algorithm corrupted with the three types of noise considered. In all the type noises, the proposal algorithm shows a segmentation superior to the other methods, reinforcing the quantitative results.

**Real Image Database.**The second experiment performed on real image databases, Weizmann and Sky database, on Fig. 4 summarizes the quantitative results of the experiments performed in these databases, these demonstrate that the proposed method has an advantage over the other techniques with which it was compared, showing that the higher the noise the performance is better.

The result of the previous segmentation shows that the algorithm of the proposal is tolerant to different types of noise. So, the qualitative result are presented on Fig. 5, just to depict the experiments, an image is shown, where each row is the result of segmentation with the three different types of noise, and the columns are the algorithms with which the comparison was made, here it is shown that the proposed algorithm has a higher performance than the other techniques.

Execution time (seconds) of tested algorithms

FCM | FCM_S2 | SOM | FRFCM | STrFCM | |
---|---|---|---|---|---|

Time | 0.05 | 0.853 | 1.58 | 0.73 | 0.61 |

## 5 Conclusions and Future Work

This article focuses on the segmentation of images with atypical information, mainly adding to the images tested additive, multiplicative and impulsive fixed noise, with different densities. A technique was proposed that combines the Fuzzy C-Means algorithm and Trimmed Means filter, improving the segmentation performance since it also considers the spatial relationship between the pixels. We try to demonstrate that if spatial information is added to an algorithm, this will have a better performance. In the experiments we were able to verify this hypothesis, since our proposal algorithm had a better result than the rest of the selected algorithms. In addition it was experimented in different types of databases, medical and real images, obtaining high performance and demonstrating an average accuracy of 92%. Furthermore to the precision obtained, the algorithm proved to be faster than the other techniques. In many cases, our algorithm shows inferior performance in noise-free images, this happens because it was designed to be tolerant to image noise, which means that the algorithm result when there is no noise will not always be better than the methods for comparison. As future work, we plan to add texture or other characteristics to the images.

## Notes

### Acknowledgments

The authors of this work express their gratitude to CONACYT, as well as to the Tecnologico Nacional de Mexico/CENIDET for financing through the project "Diffuse Controller for adjusting stiffness coefficients of a deformable model for real-time simulation of the tissues of the human liver.

## References

- 1.Alexandre, E.B.: IFT-SLIC: geração de superpixels com base em agrupamento iterativo linear simples e transformada imagem-floresta. Ph.D. thesis, Universidade de São Paulo (2017)Google Scholar
- 2.Bednar, J., Watt, T.: Alpha-trimmed means and their relationship to median filters. IEEE Trans. Acoustics, Speech, Signal Process.
**32**(1), 145–153 (1984)CrossRefGoogle Scholar - 3.Bezdek, J.C., Ehrlich, R., Full, W.: FCM: the fuzzy c-means clustering algorithm. Comput. Geosci.
**10**(2–3), 191–203 (1984)CrossRefGoogle Scholar - 4.Bezdek, J.C., Keller, J., Krisnapuram, R., Pal, N.: Fuzzy models and algorithms for pattern recognition and image processing, vol. 4. Springer, New York (1999). https://doi.org/10.1007/b106267CrossRefGoogle Scholar
- 5.Cai, W., Chen, S., Zhang, D.: Fast and robust fuzzy c-means clustering algorithms incorporating local information for image segmentation. Pattern Recogn.
**40**(3), 825–838 (2007)CrossRefGoogle Scholar - 6.Chen, S., Zhang, D.: Robust image segmentation using FCM with spatial constraints based on new kernel-induced distance measure. IEEE Trans. Syst. Man Cybern. Part B (Cybernetics)
**34**(4), 1907–1916 (2004)CrossRefGoogle Scholar - 7.Combalia, M., et al.: BCN20000: dermoscopic lesions in the wild. arXiv preprint arXiv:1908.02288 (2019)
- 8.Forsyth, D.A., Ponce, J.: Computer Vision: A Modern Approach. Prentice Hall Professional Technical Reference, New Jersey (2002)Google Scholar
- 9.Kohonen, T.: The self-organizing map. Proc. IEEE
**78**(9), 1464–1480 (1990). https://doi.org/10.1109/5.58325CrossRefGoogle Scholar - 10.Lei, T., Jia, X., Zhang, Y., He, L., Meng, H., Nandi, A.K.: Significantly fast and robust fuzzy c-means clustering algorithm based on morphological reconstruction and membership filtering. IEEE Trans. Fuzzy Syst.
**26**(5), 3027–3041 (2018)CrossRefGoogle Scholar - 11.Li, M., Wang, L., Deng, S., Zhou, C.: Color image segmentation using adaptive hierarchical-histogram thresholding. PLoS ONE
**15**(1), e0226345 (2020)CrossRefGoogle Scholar - 12.Mújica-Vargas, D., Gallegos-Funes, F.J., Rosales-Silva, A.J., de Jesús Rubio, J.: Robust c-prototypes algorithms for color image segmentation. EURASIP J. Image Video Process.
**2013**(1), 63 (2013)CrossRefGoogle Scholar - 13.Pei, H.X., Zheng, Z.R., Wang, C., Li, C.N., Shao, Y.H.: D-FCM: density based fuzzy c-means clustering algorithm with application in medical image segmentation. Procedia Comput. Sci.
**122**, 407–414 (2017)CrossRefGoogle Scholar - 14.Rockafellar, R.T.: Lagrange multipliers and optimality. SIAM Rev.
**35**(2), 183–238 (1993)MathSciNetCrossRefGoogle Scholar - 15.Sima, H., Guo, P., Zou, Y., Wang, Z., Xu, M.: Bottom-up merging segmentation for color images with complex areas. IEEE Trans. Syst. Man Cybern. Syst.
**48**(3), 354–365 (2017)CrossRefGoogle Scholar - 16.Szeliski, R.: Computer Vision: Algorithms and Applications. Springer, London (2010). https://doi.org/10.1007/978-1-84882-935-0CrossRefGoogle Scholar
- 17.Wang, M., Wan, Y., Gao, X., Ye, Z., Chen, M.: An image segmentation method based on fuzzy c-means clustering and cuckoo search algorithm. In: Ninth International Conference on Graphic and Image Processing (ICGIP 2017), vol. 10615, p. 1061525. International Society for Optics and Photonics (2018)Google Scholar
- 18.Winn, J., Criminisi, A., Minka, T.: Object categorization by learned universal visual dictionary. In: Tenth IEEE International Conference on Computer Vision (ICCV 2005) vol. 1. vol. 2, pp. 1800–1807. IEEE (2005)Google Scholar
- 19.Zhou, S., Lu, Y., Li, N., Wang, Y.: Extension of the virtual electric field model using bilateral-like filter for active contours. Signal Image Video Process.
**13**(6), 1131–1139 (2019)CrossRefGoogle Scholar