Morphological Reconstruction-Based Image-Guided Fuzzy Clustering with a Novel Impact Factor

The guided filter is a novel explicit image filtering method, which implements a smoothing filter on “flat patch” regions and ensures edge preserving on “high variance” regions. Recently, the guided filter has been successfully incorporated into the process of fuzzy c-means (FCM) to boost the clustering results of noisy images. However, the adaptability of the existing guided filter-based FCM methods to different images is deteriorated, as the factor ε of the guided filter is fixed to a scalar. To solve this issue, this paper proposes a new guided filter-based FCM method (IFCM_GF), in which the guidance image of the guided filter is adjusted by a newly defined influence factor ρ. By dynamically changing the impact factor ρ, the IFCM_GF acquires excellent segmentation results on various noisy images. Furthermore, to promote the segmentation accuracy of images with heavy noise and simplify the selection of the influence factor ρ, we further propose a morphological reconstruction-based improved FCM clustering algorithm with guided filter (MRIFCM_GF). In this approach, the original noisy image is reconstructed by the morphological reconstruction (MR) before clustering, and the IFCM_GF is performed on the reconstructed image by utilizing the adjusted guidance image. Due to the efficiency of the MR to remove noise, the MRIFCM_GF achieves better segmentation results than the IFCM_GF on images with heavy noise and the selection of the influence factor for the MRIFCM_GF is simple. Experiments demonstrate the effectiveness of the presented methods.


Introduction
Image segmentation is considered an indispensable component in image processing, comprehension, and computer vision [1][2][3]. In the last few decades, prototype-based clustering has been broadly applied in image segmentation [4][5][6]. Owing to the inherent vagueness of the image, fuzzy clustering, such as FCM, can achieve better performance in image segmentation tasks than hard clustering [7,8].
However, because the FCM-based image segmentation methods only reflect the intensity of the pixel itself, they are ineffective when images are corrupted by noise [9,10]. To solve this issue, a novel FCM approach with spatial constraints (FCM_S) is developed in [11], which partitions a pixel into a cluster according to both the intensity value of itself and the ones of its neighbor pixels. However, FCM_S needs to spend countless time to compute the spatial neighbor term. To alleviate the computation time in the FCM_S, two improved versions (FCM_S1 and FCM_S2) are explored by utilizing average filter and median filter to attain the spatial information beforehand [12]. e two aforementioned clustering algorithms with spatial constraints are robust to noise, but they get poor segmentation results on the image edges [11][12][13]. is is because the computation of spatial information smooths the whole image and leads to the damage of boundary information.
en, the guided filter is considered to address this issue, which not only implements a smoothing filter on "flat patch" regions to relieve the impacts of noise but also ensures edge preserving on "high variance" regions [14,15]. e image-guided FCM (IGFCM) method is exploited by adding a guided filter to the optimization of FCM [16], but the complexity of the IGFCM model leads to vast calculation time. To tackle this problem, a new method called FCM + GF is further developed in [17], in which the FCM is employed to segment the raw noise image and the guided filter is implemented on the membership metrics by adopting the raw noise image as the guidance.
is method achieves good segmentation results with low computational complexity. Nevertheless, in FCM + GF, the factor ε regarding guided filter is fixed to a scalar, which deteriorates the capability of FCM + GF to divide images in the case of various noise rates. Actually, the value of ε is considered to differ with the increase of the noise level.
In this paper, a guided filter-based FCM algorithm with an impact factor named IFCM_GF is presented, in which a novel positive impact factor ρ is defined to adapt the guidance image. is adjustment on the guidance image is proved to be equivalent to the change of parameter ε. Given different ρ, the IFCM_GF obtains better performance on various noisy rates images than FCM + GF with the fixed ε.
However, there are still two shortcomings of the IFCM_GF. e first one is that it is uneasy to choose an appropriate value ρ empirically because the good value of ρ varies according to different noise rates. e second one is that the IFCM_GF is not robust to noise type and obtains poor segmentation results on the images with heavy noise. is is because both the image to be partitioned and the image to provide guidance information are the original noisy image. To overcome the above two shortcomings simultaneously, we introduce morphological reconstruction (MR) [18] to the IFCM_GF and propose a morphological reconstruction-based improved FCM clustering algorithm with guided filter, named MRIFCM_GF. In the approach, the FCM is conducted on the reconstructed image obtained by MR, and the guided filter is implemented on the membership metrics with the guidance of the raw noise image adjusted by the impact factor ρ. e MR adopts a marker image to recast raw noise image so as to acquire a better image [19]. On the one hand, there is a little difference between the reconstructed images of the original images with different noise rates, so it is easier to set a good ρ for MRIFCM_GF. On the other hand, since MR can remove noise without knowing the type of noise and preserve the edge information of image, MRIFCM_GF can achieve better performance on images with heavy noise than IFCM_GF. What is more, as the reconstructed image is calculated beforehand, the employment of the MR brings little extra calculation time. e main contributions of this paper are briefly summarized as follows.
Firstly, the IFCM_GF method with a newly defined factor ρ is proposed to enhance the adaptability for different noisy images.
Secondly, the MRIFCM_GR method is further developed by incorporating MR technique into IFCM_GF for better segmentation performance on images with heavy noise and easier selection of proper values of factor ρ. e rest part of this paper is organized as follows. Some related works are reviewed in Section 2. e presented algorithms and the proof are detailed in Section 3. e experiments are elaborated in Section 4. Finally, Section 5 summarizes the conclusion.

Related Works
FCM is a prototype-based clustering approach which is extensively applied in image segmentation. Let x n , n � 1, 2, ..., N stand for N pixels in an image, C indicates the number of clusters, and FCM partitions the N pixels into C clusters by solving the following minimization problem: where U � [u cn ] is the membership degree matrix and u cn means the membership of pixel x n in cluster c. V � [v c ] denotes the cluster prototype matrix, and v c denotes the center vector of cluster c. e parameter m(m > 1) indicates the fuzzification index, and the norm ‖ · ‖ represents the Euclidean norm.
Minimizing J(U, V) is a nonlinear optimization problem with a constraint. e Picard iteration is used to solve it. First, V is fixed to find U minimizing J(U). en, U is fixed to find V minimizing J(V).
When V is fixed, the Lagrange multiplier technique is applied to convert the min J(U, V) into an unconstrained optimization problem regarding U asfollows: where Λ � [λ n ] is a Lagrange multipliers matrix corresponding to the constraint C c�1 u cn � 1. Set the partial derivatives of J(U, Λ) regarding u cn and λ n to zero as follows: From, (3) and (4), (5) is obtained.
When U is fixed, set the gradient of J(V) with respect to v c to zero to make J(V) locally minimized as follows: From (6), (7) is obtained.
for 1 ≤ c ≤ C, 1 ≤ n ≤ N. Equations (5) and (7) are repeatedly implemented until the difference between the optimization problem regarding two successive iterations is small enough.

Guided Filter.
Guided filter is widely utilized in linear filtering area. Considering an input image p and the guidance image I, the output image q is obtained as follows: where i and k are pixel indexes and ω k denotes a window centralized at the pixel k. a k and b k indicate some linear scalars with respect to the pixel of ω k . is local linear model is able to preserve the edge information due to ∇q � a∇I.
And the capability of this model is proved in image processing.
To get the linear coefficients, the minimization of the difference between the input image p and the output image q is adopted to establish the cost equation as follows: where ε indicates a regularized indicator to prevent a k from being too big. Let the gradients of E(a k , b k ) regarding a k and b k be equal to zero as follows: From (10) and (11), a k and b k are obtained as follows: where |ω| denotes the number of pixels, μ k and σ k indicate the mean and variance of I, and p k represents the mean of p in window ω k . a k and b k are associated with the window ω k , so q i may be different when calculated in different ω k . e final output q i is the average of all the possible values and is computed as follows: where a i � (1/|ω|) k∈ω i a k and b i � (1/|ω|) k∈ω i b k .

Morphological Reconstruction.
As an effective method for image denoising and edge preservation simultaneously, morphological reconstruction includes two basic operations, that is, morphological dilation and erosion reconstructions. Morphological dilation is defined as where f denotes the mask image, g indicates the marker image and g ≤ f, δ denotes the dilation operator, and Morphological erosion is defined as where g ≥ f, ε denotes erosion operator, and Morphological dilation and erosion operations apply a structuring element B including center element to an input image, constructing an output image with the same size. e shape and size of structuring element B determine the degree of dilation and erosion. e structuring element of size 3 × 3 is always exploited in dilation and erosion operation. If the size of B is 1 × 1, the output image is identical to the input image or else the output image will be dilated or eroded to a different degree according to the size of B.
e choice of mask images and marker images determines the reconstruction effect of an image. In general, if the raw noise image is selected as the mask image, the marker image is obtained by transforming the original noise image. In practical application, the marker image is always obtained is is because ε(f) ≤ f and δ(f) ≥ f, and they meet the condition of dilation and erosion operation.
Morphological opening and closing reconstructions are derived from the composition of morphological dilation and erosion reconstructions, which have a stronger filter capability.
Morphological opening operation firstly carries out morphological erosion operation on the image and then carries out morphological expansion operation on the image obtained by erosion operation. Morphological opening reconstruction, denoted by R O , is given as Morphological closing operation firstly carries out morphological expansion operation on the image and then carries out morphological erosion operation on the image obtained by expansion operation. Morphological closing reconstruction, denoted by R C , is depicted as Morphological opening reconstruction is suitable for accurately recovering the shape of the object after erosion, Journal of Healthcare Engineering while the morphological closing reconstruction is more effective for smoothing the texture details. In this paper, we employ R C to obtain reconstructed image due to the superiority of morphological closing reconstruction for texture detail smoothing.

Morphological Reconstruction-Based Improved FCM Clustering Algorithm with Guided Filter
In this section, we first propose a guided filter-based FCM with an influence factor, in which the influence factor ρ is set to adapt guidance image. en we give the proof that the adjustment on guidance image is equal to changing parameter ε. Last, we propose the morphological reconstruction-based improved FCM clustering algorithm with guided filter.

A Guided Filter-Based FCM Method with an Influence
Factor. Because the factor ε regarding guided filter in FCM + GF is defined as the scalar, the capability of FCM + GF to images in the case of various rate noise is weakening. To handle this issue, a guided filter-based fuzzy c-means method with an influence factor is proposed, in which a novel impact factor ρ is set to adapt the guidance image. e pseudocode of the IFCM_GF algorithm is depicted in Algorithm 1.

Proof.
e parameter ε controls the ability of the guided filter to recognize "flat patch" and "high variance", so ε should change with different noises in the image. us, we give the proof that multiplying the guidance image by an influence factor ρ is the same as changing parameter ε to ε/ρ 2 .
From (12) and (13), we can know that a k and b k associated with ω k can be regarded as functions of parameter ε. en, (12) and (13) can be rewritten as follows: en, the output q i is defined as follows: Let the image I * ρ be defined as the guidance image, the new linear coefficients a k ′ and b k ′ are computed as (22) and (23), respectively, and the new output q i ′ is calculated as follows: Comparing (22) and (23) with (19) and (20), we can see that Embedding (25) and (26) into (24), we get As shown in (27), the new output of the guided filter with guidance image I * ρ is equal to the original output of the guided filter with parameter ε/ρ 2 . erefore, adjusting the guidance image with an influence factor ρ is equivalent to changing parameter ε.
In this way, the proposed IFCM_GF method simplifies the selection of guiding filter parameters and improves the segmentation effect of different noise images. e MRIFCM_GF clustering algorithm is developed in this subsection. Herein, by leveraging the morphological closing reconstruction, the reconstructed image β of the raw noise image f is firstly computed as follows: Subsequently, FCM is employed to segment the reconstructed image and the guide filter is implemented on the membership matrix with the guidance of the raw noise image adjusted by ρ.
e minimization problem of MRIFCM_GF is written as follows: where β n denotes the n-th pixel of the reconstructed image β, u cn indicates the membership of pixel β n in cluster c, and υ c means the prototype vector of cluster c. e U matrix and V matrix are updated according to the following equations: Journal of Healthcare Engineering In each iteration, the guided filter is implemented on the membership metrics. e flowchart of the proposed MRIFCM_GF algorithm is shown in Figure 1. Firstly, input a noisy image to be segmented, reconstruct it by MR, and initialize cluster centers. en, calculate memberships, adjust the guidance image by multiplying the influence factor, filter membership matrix by GF method, and update cluster centers iteratively until the stopping condition is satisfied. e pseudocode of the MRIFCM_GF algorithm is summarized in Algorithm 2.
By introducing the MR method, MRIFCM_GF solves the problem that IFCM_GF is not robust to different types of noisy images and high-noise images, and it is difficult to select influence factors when the noise ratio is unknown.

Experiments
e experiments are executed on synthetic images and Brain images. FCM [9], FCM + GF [17], FCM_S1 [12], FCM_S2 [12], and FRFCM [20] are selected for comparison analysis. e number of clusters is predetermined according to the prior information of the image to be clustered. e fuzzification index m is fixed to 2 and the error threshold ξ is defined as 10 − 8 in all methods. For FCM + GF, IFCM_GF, and MRIFCM_GF, the factor ε regarding guided filter is fixed to 0.1 4 , and the filtering window size is 3 × 3. For FCM_S1 and FCM_S2, α that trades off the influence of the neighbor term is set to 3.8, and the window size is 3 × 3. For IFCM_GF and MRIFCM_GF, the impact factors ρ are changed by various noise levels and types. For FRFCM and MRIFCM_GF, the mask image is the raw noise image, and a structuring element of size 3 × 3 is utilized to get the marker image.

Performance Measurement.
e segmentation accuracy (SA) is adopted for quantitative comparison, and it is depicted as follows: Input: e original noise image including N pixels, the cluster number C, the influence factor ρ, the fuzzification index m, and a small error threshold ξ. Initialization: Select the raw noise image as the guidance image. Adjust the guidance image by multiplying the influence factor ρ. Randomly pick C pixels as the initialized cluster centers. Set the iteration index t � 0.

Repeat:
Update the membership matrix U by (5). For every cluster c, reshape the membership vector [u c1 , u c2 , ..., u cN ] into an image with the size of the input image, and implement a guided filter on it. en reshape the filtered membership image back to the vector shape.
Update the cluster center matrix V by (7). Calculate the objective function J t by (1).
where D means the number of properly clustered pixels and N indicates the whole number of pixels. All tested approaches are repeatedly conducted 100 times, so the average SA (ASA) is applied for comparative analysis.  Figure 2 illustrates the filtering results of MR, mean filter, and median filter on ST image with Gaussian noise (zero means and 5% variance) and Salt & Pepper noise (20% noise intensity). As shown in Figures 2(d) and 2(h), the median filter achieves a good denoising result on Salt & Pepper noise ST image, while it fails to remove Gaussian noise. At the same time, from Figures 2(c) and 2(g), it can be seen that the performance of the mean filter on the Gaussian noise ST image is slightly better than that of the median filter, but the mean filter performs worse on Salt & Pepper noise. e above observations denote that the mean filter and the median filter are sensitive to noise type. Conversely, as shown in Figures 2(b) and 2(f ), the MR obtains excellent denoising results on both Gaussian noise image and Salt & Pepper image. is proves the ability of the MR to remove different type of noise. Figure 3 shows the filtering results of MR and mean filter on ST image with various rate Gaussian noise. From  Figures 3(i)-3(l), we can see that the denoising effects of the mean filter decrease with the increase of noise rate. In contrast, as shown in Figures 3(e)-3(h), the MR achieves good denoising results on all noise rates. e efficiency of the MR in denoising is helpful to get better segmentation results. More importantly, as the images with different noise rates are all well denoised by MR, they have similar grey level distributions, which are beneficial to simplify the selection of the influence factor in the MRIFCM_GF. Figure 4 exhibits the segmentation results on the ST image with Gaussian noise (zero means and 5% variance). Table 1 reflects the ASA of all testing methods on ST image with various noises. From Table 1, we can see that FCM obtains poor segmentation results on ST image due to its sensitivity to noise. Compared with the FCM, the FCM + GF achieves higher ASA.

Results on Synthetic
is reflects the superiority of the guided filter. But the improvement on ASA is very slight, which is because the fixed factor ε of the guided filter decreases the efficiency of FCM + GF. In contrast, by using an influence factor to adapt guidance image, the IFCM_GF can effectively segment different noise rate images and improve the segmentation results to some extent.
is proves the benefit of the introduction of the influence factor ρ. When MRIFCM_GF is compared with IFCM_GF, we can see that the MRIFCM_GF achieves better ASA on image with Gaussian and high rate Salt & Pepper noise. is is because the MR can efficiently remove noise. Except the MRIFCM_GF, the other three methods (FCM_S1, FCM_S2, and FRFCM), which own the denoising operation, also get good ASA. However, FCM_S1 and FCM_S2 are greatly affected by the type of noise by virtue of the limitation of mean filter and median filter, and the FRFCM gets bad segmentation on edges. Different from FCM_S1, FCM_S2, and FRFCM algorithm, MRIFCM_GF obtains the best ASA on almost all ST images. is is because the introduced MR is effective in removing any type of noise, and the guided filter whose guidance image is adjusted by the influence factor can improve the segmentation on edges. From the segmented result of MRIFCM_GF (Figure 4(j)), we can see that the Gaussian noise is removed and the edge of the object is completely preserved. Figure 5 reveals the ASA of the IFCM_GF with varying impact factors on ST images with various rate Gaussian noise. It can be seen that each curve makes a peak value; that is, no matter what the noise rate is, there is an optimal impact factor ρ which leads to the highest accuracy. What is Input: e raw noise image including N pixels, the cluster number C, the influence factor ρ, the fuzzification index m, and a small error threshold ξ. Initialization: Compute the reconstructed image of the raw noise image as (28). Select the raw noise image as the guidance image of the guided filter. Adjust the guidance image by multiplying the influence factor. Randomly pick C pixels as the initialized cluster centers. Set the iteration index t � 0.

Repeat:
Update the membership matrix U by (30  Journal of Healthcare Engineering (a)  more, the optimal impact factors at various noise rates change with a certain rule. It gets smaller with the increase in the noise rate. is finding is beneficial in the selection of ρ for the IFCM_GF if the noise rate of the image is known. However, it is challenging to know the noise rate of an image in advance, and the good influence factor values of different curves locate in different intervals, so it is not easy to select an appropriate ρ for IFCM_GF in practice. Figure 6 shows the ASA of the MRIFCM_GF with different influence factors on ST images with various rate Gaussian noise. Firstly, we can see that the best value of ρ (0.014, 0.009, 0.008, and 0.005) still varies regularly. In addition, the curves of the 3% and 5% noise rate vary gently, which means the good value of ρ locates in a large scale. For example, as long as the value of ρ is set in interval (0, 0.1), the MRIFCM_GF will achieve high ASA on ST image with 3% rate Gaussian noise. What is more, when dealing with the image corrupted by high rate Gaussian noise, the good value of ρ is around zero. For instance, the good value of ρ of the MRIFCM_GF on 15% rate Gaussian noise image locates in interval (0, 0.008]. erefore, a small ρ is appropriate for the MRIFCM_GF to segment an image with any rate Gaussian noise. Table 2 presents the ASA of different methods on SF image with different rate Gaussian noises. We can see that the results obtained by different algorithms on SF images are similar to the ones on ST images. e performance of FCM deteriorates sharply as the noise rates increase. e FCM + GF and the IFCM_GF get higher ASA than FCM due to the employment of the guided filter. Moreover, the segmentation results of IFCM_GF are better than the ones of FCM + GF; this is because the IFCM_GF defines an impact factor ρ to adapt the guidance image. e MRIFCM_GF achieves the best ASA on all Gaussian noise images and high rate Salt & Pepper noise images. is is another proof of the superiority of the combination of the MR and the guided filter. Figure 7 displays the segmentation results of tested models on SF image with Gaussian noise (zero means and 5% variance). As shown in Figures 7(d)-7(h), the FCM, the FCM_S1, the FCM_S2, the FCM + GF, and the IFCM_GF suffer from the noise, which leads to numerous misclassifications. From Figures 7(i) and 7(j), it can be seen that there are a few noise points remaining in the segmentation results of the FRFCM and MRIFCM_GF. What is more, the MRIFCM_GF obtains better performances on the edges than the FRFCM. Figures 8 and 9 show the ASA of the IFCM_GF and the MRIFCM_GF with various impact factors on SF images corrupted by Gaussian noise. From Figure 8, it can be seen that the best impact factor of the IFCM_GF on different rate Gaussian noise does not vary regularly. What is more, the   Figure 9, the best influence factors of the MRIFCM_GF on the SF images with Gaussian noise decrease regularly as the noise rates change. In addition, the good influence factor of the MRIFCM_GF on a noise rate is also adapted to another noise rate. For instance, if the influence factor is set to 0.005, the ASA of MRIFCM_GF on SF image with 3% Gaussian noise is 0.9984, and the one on 15% Gaussian noise image is 0.9845. In summary, it is easy to set the influence factor ρ for the MRIFCM_GF.

Results on Brain Images
To further verify the advantage of the MRIFCM_GF, the brain magnetic resonance images (Brian images) collected from "BrainWeb" [21] are considered as the test images in this subsection. e size of the Brain images is 181 × 217. Brain images are corrupted by Rician noise, and the noise rates include 5%, 10%, 15%, 20%, and 25%. e segmentation results of tested algorithms on Brain image with 5% Rician noise are illustrated in Figure 10.

Journal of Healthcare Engineering
More importantly, the proposed MRIFCM_GF method obtains the best ASA when the noise rate is high (15%, 20%, and 25%). e excellent performance of the MRIFCM_GF results from both the ability of the MR to remove heavy noise and the superiority of the influence factor to enhance the capacity of the guided filter to reserve edges. Figures 11 and 12 present the ASA of IFCM_GF and MRIFCM_GF with different influence factors on Brain images. As shown in Figure 11, for the IFCM_GF, the good values of the influence factor ρ for different noise rates locate in different intervals. For instance, the good influence factor values for 10% Rician noise Brain image locate in [0.13, 0.2]; meanwhile, the ones for 25% Rician noise Brain image locate in [0.01, 0.04]. So, it is challenging to set the value of the influence factor ρ for the IFCM_GF without knowing the noise rate. On the contrary, from Figure 12, we can see that the good influence factor values of the MRIFCM_GF on images with different rate noises locate in the same interval. Specifically, if only the value of ρ is set larger than 0.06, the MRIFCM_GF can obtain good ASA on all Brain images whatever the noise rate is.

Conclusions
In this paper, we first present the IFCM_GF method, in which a novel impact factor ρ is designed to adapt the guidance image. e essence of this adjustment on guidance image is proved to be equal to the change on parameter ε of guided filter. IFCM_GF improves the segmentation performance of images with various noise rates by varying the value of ρ. us, to reinforce the heavy noise image segmentation quality and simplify the selection of impact factor, we further propose the MRIFCM_GF algorithm, in which the original noise image is reconstructed by MR  before clustering.
e MR is effective in removing noise ignoring noise type, so the MRIFCM_GF achieves better performance than the IFCM_GF. More importantly, the MR can efficiently remove any rate noise and the reconstructed images of different rate noise images have similar grey distributions, so it is easy to set an appropriate influence factor for the MRIFCM_GF without knowing noise rates.
In the future, we will explore how to automatically get an appropriate influence factor ρ based on the type and rate of noise. Moreover, the choice of mask image and marker image determines the reconstruction result, so we will continue to study how to select mask or marker image in MR to obtain better performance.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.

Authors' Contributions
Qingxue Qin and Guangmei Xu contributed equally to the work. ey are co-first authors.