{'fraction_non_alphanumeric': 0.03417338133607635, 'fraction_numerical': 0.01182924738556489, 'mean_word_length': 4.874454514937899, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Segmentation of Brain Tissues from MRI using Bilateral Filter Based Fuzzy C-Means Clustering

This paper represents a segmentation method that incorporates both local spatial information and intensity information in an efficient fuzzy way. The newly introduced segmentation method BWFCM is an abbreviation of Bilateral weighted fuzzy C-Means. BWFCM uses the advantage of the bilateral filter in its objective function as a bilateral kernel that replaced the spatial neighborhood term with Gaussian weighted Euclidean distance mean of the intensity value of neighbor pixels. BWFCM preserves the damping extent of adjacent pixels while removing the noise because of its averaging behavior. The BWFCM segmentation method is perceived to be very focused on several state-of-the-art methods on a range of images.Experiment analysis on simulated and real MR images show that the proposed method BWFCM provides superior performance over the conventional FCM method and several FCM based methods. The proposed method BWFCM has weakened the impact of Rician noise and other artifact and gives more accurate and efficient segmentation results.


I. INTRODUCTION
Medical imaging is an advanced research topic in the area of clinical research and an exceptional increment the accuracy of medical diagnosis.Medical imaging technique has a current emphasis on medical resonance (MR) [1] images that visualize the functional information and anatomical information of the brain. Segmentation [2] can be defined as a procedure of partitioning an image into meaningful regions. MRI [3] technique provides high-quality contrast imaging among the various soft tissue of the brain and derives meaningful information on brain tissues. MRI technique segment the brain tissuesin gray matter (GM), white matter (WM) and cerebrospinal fluid (CSF) that is an important step in neurological diagnose. There are various approaches for MR segmentation such as threshold approaches, region-based approaches, neural network approaches, and clustering. As one of the most popular unsupervised approaches, clustering is the most used method for MR segmentation. Clustering [4], [5] is a procedure to segment different groups with the aim that objects of the same group are comparable. Clustering has two main clustering strategies: the hard clustering and the fuzzy clustering. In a hard clustering approach, each pixel belongs to a single cluster. Hard mean clustering is suffered from many issues like poor contrast, overlapping, spatial resolution and intensity in homogeneity that degrade the effectiveness of hard clustering methods. Fuzzy clustering [6] is a soft segmentation method for image segmentation and clustering. Based on fuzzy clustering, the most adopted and popular method is FCM because of its robustness and it retains more information about the segmented image as compared to hard clustering approach. In fuzzy clustering, every pixel belongs to all clusters at different degree of membership. The traditional approach FCM clustering algorithm was first presented by Dunn et al. [7], and later it was extended by Bezdeket al. [8]. FCM is noise sensitive and it considers only gray level information and it does not take the spatial level information under consideration. Ahmed et al. [9] modified the FCM objective function by adding spatial variant FCM_S that consider both the gray level as well as spatial level information. In FCM_S spatial information is calculated iteratively, so it becomes a time-consuming process. Chen and Zhang et al. [10] applied to mean filter and median filter and spatial neighborhood information is computed in advance. Experimentally parameter selection is a tough task. Krinidis and Chatziset al. [11] addressed a parameter-free method FLICM that introduced a weighted fuzzy factor that simultaneously computes the spatial level and gray level information. Gong et al. [12] introduced a reformulated Fuzzy Local Information C-Means Algorithm (RFLICM) that replaces the spatial distance with the local coefficient of variation as a local similarity measure. Gong et al. [12] improve FLICM that extend the FLICM trade-off fuzzy factor with the weighted fuzzy factor to keep balance the relationship of local neighbor pixels. Gong et al. [12] modified FLICM algorithm with Kernel Weighted FLICM that extend the FLICM trade-off fuzzy factor with the weighted fuzzy factor in balancing the relationship of local neighbor pixels and replacing Euclidian distance with a kernel function.

A. The Proposed Method Bilateral Weighted Fuzzy C-Means (BWFCM)
To incorporate with intensity information and local spatial information into standard FCM method, the new method BWFCM is proposed. The BWFCM segmentation algorithm is a bilateral kernel-based approach to enhance the accuracy of standard FCM and segmented noise free MR images. BWFCM aggregate the weights of the pixels in a local neighborhood, and the weights are based on both the intensity level and the spatial level. The FCM improved version FCM_S1 based method is working with spatial information; the proposed method assigned an aggregate weight to each pixel coefficient according to spatial location and intensity level of adjacent pixel like pixel which has high-intensity difference from the central pixel is assigned with less weight. BWFCM has characteristics that contribute to make it more robust: 1) BWFCM has simple formulation, it working with the bilateral kernel that replaces the spatial neighborhood pixels with Gaussian weighted distance.
2) BWFCM is developed to preserve the damping extent of adjacent pixels in a fuzzy way. 3) BWFCM remove noise as well as it smoothes the image. 4) BWFCM weighted the spatial level and intensity level of the local neighboring pixel. BWFCM is developed under the framework of FCM_S1 method by using the bilateral kernel to improve the accuracy of segmentation.

B. Gaussian Weighted Pixel Using Bilateral Filter
Nonlinearbilateral filtering was firstly introduced by Tomasiet al. [13]. The bilateral filter is working with both spatial information and intensity information within the local neighborhood window, so it is considered as a combination of both domain filter and range filter. The conventional Gaussian bilateral filter takes domain kernels and Gaussian range under consideration, mathematically, it is given at the position of pixel X, the bilateral filter is calculated as follows: where the parameters of the Gaussian bilateral filter are . is spatial weight parameter and is intensity weight parameter, both parameters are smoothing parameter that balance the fall-off weight in spatial and intensity domain. is the input image under the local neighborhood window. x is coordinate of the current pixel. is a local pixel within the local window. is a local neighborhood window around central pixel and C is the normalization constant:

C. General Framework Of Bilateral Weighted Fuzzy C-Means (BWFCM) Algorithm
To incorporate bilateral filtering into the framework FCM_S1 method, the objective function of the proposed method is defined as follows: where the bilateral kernel is . The trade-off parameter is that controls the impact between filtered image and the original input image.
is a local neighbor window around central pixel ( window is used for filters throughout the whole work). The number of the clusters is . The fuzzy parameter is weighting exponent of each fuzzy membership. The number of gray levels isN. The minimization of the objective function (1) can be completed via iteratively updating the membership value and center of cluster of the objective function (3) by the following equation: The defuzzification process assigns the pixel to the class with the highest membership as principles, = .
The solution of the objective function can be acquired through a repeated process, which is conveyed as follows: 1) Fix the parameter c (the number of the cluster), m (fuzzification parameter), (local window size) and ε (stopping condition).
2) For BWFCM compute bilateral filter by using equation (1). 3) Randomly initialize the fuzzy membership matrix . 4) Set loop counter count=0. 5) Update the fuzzy membership matrix using the equation (4). 6) Update the cluster center by using equation (5). 7) If max { } then stop, else step increment by 1 and go back step 4.

A. Cluster Validity
To measure the performance evaluation of various MR brain images segmentation methods. Several quantitative and qualitative performance metrics are adopted. Few of this performance metric are given respectively by: Quantitative performance metrics Similarity Index ( Similarity index [14] can be defined as the degree of common pixels between tissues classes of MR ground truth and MR segmentation results. Mathematically, it can be represented as follows:- where represents the "ground truth" and represents MR segmentation, and individually, and indicates the number of elements in and . Jaccard Similarity ( ) The Jaccard similarity [15] is the ration between common pixels and the total pixels of MR ground truth tissues classes and MR segmented tissues classes. Mathematically, it can be represented as follows:- Jaccard similarity is calculated between is acquired from MR ground truth and is acquired from MR segmented results. Qualitative Mean Square Error is calculated between is acquired from MR distorted image and is acquired from MR segmented results. If the result of MSE is lower, it means error will be lesser.
Peak Signal to NoiseRatio (PSNR) PSNR [17] metric estimates the quality of the imagethat is based on the mean squared error (MSE). The quality of the image is good if the value of PSNR is high.Mathematically, it can be represented as follows:- log 10 = PSNR (9) Where S=255 in the case of grayscale images.

B. Results and Discussion
In this section, the performance of the proposed method is reported on both simulated and real MR images. Furthermore the efficiency and the robustness of BWFCM is compared with eight algorithms FCM [8], FCM_S [9], FCM_S1 [10], FCM_S2 [10], FLICM [11], RFLICM [12], WFLICM [12], and KWFLICM [12]. To check the robustness of the BWFCM with other eight algorithms, the Rician distribution is added to the image at a different level on noise ( ). Jaccard similarity (%) and similarity index ( ) (%) are used to evaluate the quantitative segmentation performance.Mean Square Error (MSE) and PeakSignaltoNoiseRatio (PSNR) are used to qualitative segmentation performance.
Simulated MR Image-The first experiment of the proposed method and existing methods applied on T1-weighted with size MR simulated image with different slice thickens, modality, and noise level and intensity inhomogeneity.Simulated MR images are downloaded from simulated Brainweb [18].The ground truth image is available in the databases to evaluate the performance of segmentation.It is known that MR images always contaminated with noise, so we generate Rician noise at the level of = 3%, = 5%, = 7%, and = 9%. The intensity value of the simulated image is divided into four classes according to the tissues CSF, WM, and GM where pixels of the background are ignored. To perform the accurate comparison of the algorithms that are applied to the noised image, the intensity value of the ground truth image is divided into four different classes that are 0, 85, 170 and 255. Jaccard similarity (%) and similarity Index ( ) (%) validity functions are used to quantitatively measure overlap between given ground truth and segmented MR simulated images.Mean Square Error (MSE) and Peak Signal to Noise Ratio (PSNR) are used to qualitative measure overlap between given ground truth and segmented MR simulated images.
The parameter selection is by experience and trial-and-error methods. We set the parameter, the number of the clusters is set equal to 4 ( ), fuzzy membership is set equal to 2 ( ), = 0.00001 (stopping condition). The local window size is set equal to 9 ( = 9) ( ). In existing methods, the parameter is set to equal = 3 for the methods FCM_S, FCM_S1, and FCM_S2. The proposed method BWFCM is tested on simulated MR image at a different level of noise . The parameters of the proposed method BWFCM are and . By experimentally selection, it observed that for noise level =3 we choose the best value of =20 and =10, for noise level =5 we choose the best value of =25 and =15, for noise level =7 we choose the best value of =35 and =25 and for noise level =9 we choose the best value of =50 and =40. The parameter =5.5 for the proposed method BWFCM at all level of noise. TableI represent the results of BWFCM segmentation from Jaccard similarity (%)at a different level of noise on simulate MR image. At different noise level, optimal selection of parameter is different.  Fig. (a) Illustration of simulated MR image segmentation results that is corrupted at 9% level of Rician noise: (i) Ground truth image (ii) Original image (iii) FCM [8] (iv) FCM_S [9] (v) FCM_S1 [10] (vi) FCM_S2 [10] (vii) FLICM [11] (viii) RFLICM [12] (ix) WFLICM [12] (x) KWFLICM [12] (xi) BWFCM (proposed).  Table II and Table III providesquantitative results of segmentation accuracy of eight algorithms on simulated MR image that is corrupted by Rician noise at different level of noise. Table IV and Table Vprovides qualitative results of segmentation accuracy of eight algorithms on simulated MR images that corrupted by Rician distribution at different level of noise. It is cleared from Table II, Table III, Table IV and  Table V that BWFCM provide better segmentation over FCM based methods.
Real image-The second experiment of the proposed method and existing methods applied on T1-weighted with size MR real image with different slice thickens, modality, and noise level and intensity inhomogeneity. Real MR images are downloaded from the Internet Brain Segmentation Repository (IBSR) [19]. The ground truth image is available in the databases to evaluate the performance of segmentation. It is known that MR images always contaminated with noise, so we generate Rician noise at the level of = 3%, = 5%, = 7%, and = 9%. The intensity value of the real image is divided into four classes according to the tissues CSF, WM, and GM where pixels of the background are ignored. To perform the accurate comparison of the algorithms that are applied to the noised image, the intensity value of the ground truth image is divided into four different classes that are 0, 85, 170 and 255. Jaccard similarity (%) and similarity Index ( ) (%) validity functions are used to quantitatively measure overlap between given ground truth and segmented MR real images.
The parameter selection is by experience and trial-and-error methods. We set the parameter, the number of the clusters is set equal to 4 ( ), fuzzy membership is set equal to 2 ( ), = 0.00001 (stopping condition). The local window size is set equal to 9 ( = 9) ( ). In existing methods, the parameter is set to equal = 3 for the methods FCM_S, FCM_S1, and FCM_S2. The proposed method BWFCM is tested on simulated MR image at a different level of noise . The parameters of the proposed method BWFCM are and . By experimentally selection, it observed that for a noise level =3 we choose the best value of =50 and =40, for noise level =5 we choose the best value of =50 and =40, for noise level =7 we choose the best value of =55 and =45 and for noise level =9 we choose the best value of =70 and =60. The parameter =5.5 for the proposed method BWFCM at all level of noise. Table VI represents the results of BWFCM segmentation from Jaccard similarity (%) at a different level of noise on real MR image. At different noise level, optimal selection of parameter is different.  Fig. (b) Illustration of real MR image segmentation results that is corrupted at 9% level of Rician noise: (i) Ground truth image (ii) Original image (iii) FCM [8] (iv) FCM_S [9] (v) FCM_S1 [10] (vi) FCM_S2 [10] (vii) FLICM [11] (viii) RFLICM [12] (ix) WFLICM [12] (x) KWFLICM [12] (xi) BWFCM (proposed).

IV. CONCLUSION
The proposed Bilateral weighted fuzzy C-Means (BWFCM) method for segmentation of MR images is designed to decrease the noise of the image and to preserve the image detail. The existing method is working with Euclidean distance and local neighbor information which provide no robust segmentation results. The bilateral filter is incorporated into the existing method to replace the intensity of every pixel by Gaussian weighted Euclidean distance average of intensity value from neighbor pixels to reduce the effect of noisy pixels. The neighbor pixels of the center pixel is accessed by a bilateral filter to generate a new membership function. BWFCM fulfilled its characteristics; it reduces the noise as well as smoothest the images. The proposed method and existing methods applied to both simulated and real MR images. To check the accuracy of proposed segmentation methods over the existing methods, BWFCM and existing methods applied on the simulated and real images corrupted by different level of Rician noise. Performance metrics Jaccard similarity and similarity index are applied for the analytical experiment to evaluate the performance and accuracy of the proposed as well as existing FCM methods. BWFCM segmentation reported superior performance of segmentation as compared to existing methods. The performance of the proposed method proved that BWFCM is one of the most noise-robust segmentation techniques that give more accurate and efficient segmentation results.