A novel fuzzy energy based level set method for medical image segmentation

: Segmentation is a very important step in the field of image processing. Noise and intensity inhomogeneity make challenging the segmentation of images, especially for medical images. Fuzzy C-means (FCM) clustering is one of the most widely used methods in medical image segmentation, but it can not deal effectively with noise and intensity inhomogeneity. Accurate segmentation capability of level set-based active contour models make them attractive in medical image analysis but they also fail to perform better when medical images are corrupted by noise. To deal with Gaussian noise and intensity inhomogeneity, a new region-based level set model is proposed by integrating active contour and FCM clustering. In this method, FCM-based energy function is used with level set method to overcome local minimum problem of active contour modal. Distance Regularized Level Set Evolution (DRLSE) is used in proposed method to deal with re-initialization problem of traditional level set method. These two modifications in level set modal effectively deal with intensity inhomogeneity of medical image. A mean filter-like spatial term is also utilized with the proposed energy function, which makes this method advantageous for segmenting noisy images. The planned scheme is verified on diverse real medical images and synthetic images, which contain noise as well as intensity inhomogeneity. The proposed method is compared with other state-of-the-art methods in terms of Segmentation Accuracy, Precision, and Recall. Results show that the proposed method offers better performance compared to other latest methods for segmentation of noisy images.


PUBLIC INTEREST STATEMENT
Image segmentation is the division of an image into its elements/regions and it is a very important aspect of medical image processing used for pathological diagnosis. Segmentation Accuracy is commonly used parameter for performance analysis of any techniques used for image segmentation. Intensity inhomogeneity and noise are the prime hurdles for precise segmentation of medical images. Proposed method deals efficiently with noise and intensity inhomogeneity of medical images.

Introduction
For medical images, active contour models are very efficient in distinguishing the boundaries. Active contours, referred as snakes, are the models which are used to extract the objects by making curves evolve by minimizing a defined energy. The energies used in these models are such that they are minimized when the curves evolve at the borders of the required object. Usually, these energies have two main components; internal energy and external energy. Internal energy makes the evolving curve smooth regularizing it, and external energy guides the motion of the curve toward its optimal position. The commonly used external energies are edge based (Caselles & Kimmel, 1997;Kichenassamy, Kumar, Olver, Tannenbaum, & Yezzi, 1995;Malladi, Sethian, & Vemuri, 1995) and region based (Chan & Vese, 2001;Mumford & Shah, 1989;Vese & Chan, 2002). The active contour models make an automatic search for their minimum energy positions, but sometimes they may settle at a local minimum which makes them less effective. Integration of level sets approaches with edge-based active contour models and then applying them to image processing application was pioneered by Malladi et al. (1995). Until then, Snake models were implemented based on parameterized approaches which face a lot of complexities. Their proposed method includes an energy term based on edge information into a level set model which normally utilizes curvature motion. A similar approach based on level sets was proposed by Caselles, Catte, Coll, and Dibos (1993). After several years, Caselles and Kimmel (1997) propose one more approach based on edge information called as Geodesic Active Contours. A gradient flowbased model which is similar to Caselles and Kimmel (1997) was planned by Kichenassamy (1995) in the same year. Mumford and Shah (1989) proposed a region-based approach to approximate an image using a piecewise smooth model of it. In this approach, energy term is minimized when the approximation contains smooth regions as well as a sufficient number of edges that can model the given image. The implementation approach for a particular solution of the Mumford-Shah model is given by Chan and Vese (2001). In this model, a piecewise constant approximation of an image is obtained instead of piecewise smooth. The required approximation of the image is achieved by using a level set model developed by Osher and Sethian (1988). The multiphase extension of (Chan & Vese, 2001) is proposed in (Vese & Chan, 2002) by Vese et al. In the recent years, many advance models are made based on the Chan and Vese (2001) model. One of such is proposed by C.  to overcome the intensity inhomogeneity. An energy function based on K-means clustering model is used in the suggested technique. The intensity is modeled using a multiplicative bias field term, and a local intensity clustering property is utilized to deal efficiently with inhomogeneity. Chen, Zhang, and Macione (2009) also suggested a method to deal with intensity inhomogeneity almost with the similar approach as in  but using an additive bias field. The region-based model depends less on initial level set but edge-based models commonly suffer from the problem of level set initialization. B.N. Li, Chui, Chang, and Ong (2011) have used Fuzzy C-means (FCM) clustering's membership function to initialize level set to overcome this problem. They also used the membership function to select the parameters required in the level set model. Cui, Wang, Fan, Feng, and Lei (2013) have utilized the local intensity clustering property in forming a new FCM-based clustering. L. Tang (2014) has utilized the concept of introducing fuzziness into the level set approach. They suggested an energy function by integrating FCM_S1&S2 model proposed by Chen and Zhang (2004) and level set model proposed by Samson, Blanc-F´eraud, Aubert, and Zerubia (2000). This model successfully segments out images with high noise, but most of the methods fail to perform better when medical images have noise and intensity inhomogeneity; so in proposed work, a novel fuzzy energy-based level set method along with Distance Regularized Level Set Evolution (DRLSC) and mean filter-based spatial term is proposed for medical image segmentation. The main contributions of the paper are as follows: (1) Proposed method effectively deals with intensity inhomogeneity of medical image using FCM-based energy function and DRLSC.
(2) FCM membership function with multiplicative bias field term is used to overcome the problem of local minimum and DRLSC is used to deal with irregularities, developed due to re-initialization during level set evolution.
(3) Proposed mean filter-based spatial term along with FCM-based energy function is used to minimize noise effect.
(4) Proposed method provides superior segmentation results for medical images with intensity inhomogeneity as well as noise, and results are compared with other state-of-the-art methods in terms of Segmentation Accuracy (SA), Precision, and Recall.
The composition of the research paper is in this way. Section-2 of the research paper deals with background work in this field. The proposed method is discussed in section-3. Section-4 includes results/performance analysis with algorithm and implementation issues. Conclusion, which is followed by references, is explained in section-5.

Background
The proposed method is based on Mumford-Shah Model (1989) and Two-Phase Chan-Vese Model (2001) for image segmentation so these methods are explained in this section with the implementation of Chan-Vese Model for two-level Sets. Mumford and Shah (1989) proposed a piecewise smooth model to segment the image, based on the following assumptions:

Mumford-Shah model
(1) The image varies smoothly in the region (2) The image varies discontinuously across the boundaries between regions.
Let us assume that I : Ω ! R is a gray-level image, where Ω represents the image domain. Segmentation of the image is achieved by dividing Ω into different regions Ω 1 ; Ω 2 ; . . . ; Ω N f g , those are separated by a contour C and represented as: To achieve piecewise smooth approximation of the image I, the energy function proposed by Mumford-Shah model should be minimized, which is given by: where μ and v are fixed parameters. u signifies the piecewise soft approximation of the observed image I. Value of u is such that it contains smoothly varying values in a region Ω and varies rapidly across the boundaries. The first and second terms in the above model ensure that u follows the above-described properties of the image. The first term makes sure that u is close to the image, I.
Smoothness of uis controlled by the second term. Term C j j gives the length of the curve to regularize the contour.

Two-phase Chan-Vese model
The implementation approach for Mumford-Shah (1989) model was proposed by Chan&Vese (2001) by taking a special case of the piecewise constant model, where the piecewise smooth model uis replaced by a piecewise constant approximation of it. In this case, energy function given by Equation (2) is represented like: For two-phase Chan-Vese model, two separate regions Ω 1 and Ω 2 in the image are achieved by minimization of abovementioned Chan-Vese model. Regions Ω 1 and Ω 2 are separated by a contour C and Ω 1 ; Ω 2 are inside and outside regions, respectively, with reference to contour C. It is assumed that the intensities inside these two regions are approximately constant. The fitting energy function used for this purpose is given by: where c 1 and c 2 represent the average intensity of an image in the regions Ω 1 ; Ω 2 , respectively.
The fitting function has value as per contour C like: By adding regularization terms to the fitting function given by Equation (4), energy function given by Chan&Vese becomes: where μ and v are constant parameters whose values can be positive or zero. Values of λ 1 ; λ 2 affect the weight given to the regions, most of the cases they are taken as unity. Length (C) is the length of curve/contour and Area (Ω) is the area of the image, I. This model will be equivalent to the Mumford-Shah model if v ¼ 0; λ 1 ¼ λ 2 ¼ λ and the constant approximations c 1 ; c 2 are replaced by piecewise smooth approximations.

Implementation of Chan-Vese model for two-level set
If curve/contour C is represented by zero-level set ϕ 0 x ð Þ of level set function ϕ x ð Þ : Ω ! R, twolevel sets function is defined (Osher & Sethian, 1988) as: and Length (C) and Area (Ω) are given by: where Hðϕ x ð Þ represents Heaviside function and δ 0 ϕ x ð Þ ð Þrepresents Dirac delta function. They are defined as: The fitting energy terms for two-level sets function become: and The Chan-Vese energy function for two level sets become:

Proposed method
To deal with noise and intensity inhomogeneity of medical image, FCM-based energy function is used in the level set method to overcome the local minimum problem of active contour modal. Distance Regularized Level Set Evolution (DRLSE) is used in the proposed method to deal with the re-initialization problem of traditional level set method. These two modifications in level set modal effectively deal with intensity inhomogeneity of medical image by solving local minimum and reinitialization problems of active contour modal. A mean filter-like spatial term is also utilized with the proposed energy function to minimize noise effect, which makes this method advantageous for segmenting noisy images. Important characteristics of the proposed method are: (1) It is implemented using the level set method.
(2) A fuzzy-based energy function is derived with consideration of region information and multiplied by a weight factor.
(3) The intensity of the image is assumed to be modeled by original intensity multiplied by a biased field. The estimation of the biased field is carried out parallel to the evolution of level set using DRLSE, which makes it helpful to deal with inhomogeneity of medical image.
(4) An improvement to membership of updating function is done by considering the spatial information and second update of membership values by using a spatial term, which results in de-noising of the medical image.
The workflow diagram of proposed method is depicted in Figure 1 as The proposed method is explained and implemented using following steps: (1) Image preprocessing (2) Calculation of local region-based energy function for image by using the FCM concept

Image preprocessing
Edge preserving filtering is used to preserve edge information in images. In the proposed research work, the median filter is used for edge-preserving smoothing of medical images. The median filter is a sliding-window spatial filter which replaces the center value with the median of all the pixel values in the window. Usually, the square kernel is used in case of the median filter but other shapes can be also used. A 3 × 3 window is used in proposed research work for edge-preserving smoothing of medical images.

Local region-based energy function
The Local region-based model is used to define energy function of proposed model by using the FCM concept. This fuzzy factor assigns each pixel to a particular region based on its membership function. For the medical image, this arrangement of pixel assignment is more suitable instead of hard assignment (Chen & Zhang, 2004) and this membership function is also utilized to decrease the result of noise. There are two purposes to be achieved using energy function, one is segmentation of image and other is to estimate the bias field. Real-world images can be modeled as a multiplicative field, added by noise. This can be represented as: where I is the observed image, J is the true image, b represents bias filed term, which represents intensity inhomogeneity, and n is the additive noise. Salt and Pepper noise, Speckles noise, Blurred noise, Gaussian noise, and Poisson noise are commonly affected noises in medical images. Additive Gaussian noise with zero mean and constant variance is targeted in this research work. It is the most common type of noise in medical images results from the contributions of many independent signals (Gravel, Beaudoin, & De Guise, 2004).
The assumptions made in this model are: (1) The true image J is assumed as a piecewise constant. i.e. in a given region Ω i , it takes a constant value c i .
(2) Bias field b varying very slowly which implies that in a small neighborhood, b is constant.
In given image, I which is modeled using the Equation (14) and based on the above assumptions, the value of bias field, b in a local neighborhood region is considered as constant. i.e. for a circular region, O y & x : jx À yj r f g of the image, shown in Figure 2, where r represents the radius of circular region and y 2 Ω, the value of bias field is: By using Equations (14) and (15), intensity in the local region is modeled as: By using the first postulation aboutJðxÞ, I(x) given by Equation (16) The additive Gaussian noise term can be eliminated if pixels in a region Ω i , are considered to be part of a Gaussian distribution with mean m i ¼ b y ð Þc i The local region O y can be divided into N clusters, having centers at m i % b y ð Þc i , i varying from 1 to N. In this case, energy term of local region by using the FCM is given by: The fuzzy factor mdecides the fuzziness and its value is normally taken as 2. In a local region O y , center of the cluster m i can be replaced by b y ð Þc i and a window function is characterized as: By using Equations (18) and (19) energy can be written in term of window function as: The overall energy by considering the total image domain Ω is given by: where c ¼ c 1; c 2 . . . :c N È É represents the constants. The selection of Kernel W is flexible. It should take null values outside the local region i.e. W (z) = 0 for z j j>r and inside the region, it should have a sum of unity i.e. òW z ð Þ ¼ 1.

W (z) used in this model is:
Àu 2 = 2σ 2 ; for u j j r 0; otherwise 8 > < > : Selection of the parameter a will depend on the value of σ (standard deviation) such that relation ò W z ð Þ ¼ 1 is satisfied. The selection of r is one of the crucial factors and the assumptions made on bias field are valid only when the neighborhood is small. The bias field varies faster so the value of r should be small.

Two-phase level set formulation
In the two-phase level set model of the proposed model, the image is divided into two regions Ω 1 and Ω 2 using a single-level set ϕ. The two regions are defined using the level set as: (1) In the region Energy function is rewritten using these definitions and Equation (21) as: By exchanging order of integration, Equation (23) becomes: where e i ðxÞ is defined as: e i x ð Þ can be rearranged in matrix form as: where * represents the convolution and The energy used for level set model is given by In this equation, F b; c; u; ϕ ð Þis used as data term. L ϕ ð Þ and R ϕ ð Þ act as regularizing terms which are defined as: and L ϕ ð Þ represents length of contour or zero-level set of ϕ, which serves purpose of keeping the curve smooth by punishing length of it, and term R p ϕ ð Þ is used to avoid re-initialization in level set evolution. Re-initialization is one of the disadvantages of the traditional level set model. During level set evolution, they develop irregularities and leads to numerical errors (Caselles & Kimmel, 1997). To overcome this, formal approach is to stop the evolution by using a signed distance function to redesign it. It is quite tricky to predict suitable time to apply re-initialization. To overcome this conflict, Li, Xu, Gui, and Fox (2010) planned a term called DRLSC. In level set functions signed, distance is maintained by this term. The gradient descent form for evolution of level set function is specified as when energy term F b; c; u; ϕ ð Þis minimized with reference to ϕ (b, c as constants), Equation (31) results in To achieve optimal solution using energy function along with level sets function, values of bias field b and constants c are also updated in a repetitive manner.

Multiphase level set formulation
The two-phase model can be extended to multiphase model, which is utilized for image segmentation using proposed energy function. In this case, k ≥ log 2 N-level sets are required to solve the N-Phase problem. Ω can be divided into N regions, which are represented by M i ϕ 1 x ð Þ; ϕ 2 x ð Þ . . . . . . . . . ϕ k x ð Þ f g and are defined as Energy function for multiphase is given by where ϕ ¼ ϕ 1 ; ϕ 2 . . . . . . . . . ϕ k f g represents the level set vector.
The final energy function with regularizing terms is given by: The gradient descent equations are obtained by minimizing F b; c; u; ϕ ð Þwith respect to ϕ (b, c as constants) as: where j = 1, 2,. . .. . .. . .k

Equations updation
The updating equations for the bias field b, member ship function u, and constants c are obtained by minimizing F b; c; u; ϕ ð Þwith respect to b, u, or c by keeping other variables constant. To get the update equation for c, F b; c; u; ϕ ð Þis minimized with reference to c by keeping b; u and ϕ as constants. For derivative of F b; c; u; ϕ ð Þwith respect to c j by taking b; u and ϕ as constant, all other terms of the summation in Equation (35) are independent of c j , except the j th term so by putting derivative of F b; c; u; ϕ ð Þequal to zero, following relation is obtained: And by taking derivative of e i x ð Þ (given by Equation (25)) with respect to c j with taking b; u and ϕ as constant: By using Equations (38) and (39): so, where j ¼ 1; 2 . . . : :N The equation for bias field is updated by minimizing F b; c; u; ϕ ð Þwith respect to b by keeping c; u; ϕ as constants. To minimize F b; c; u; ϕ ð Þ , derivative of F b; c; u; ϕ ð Þ (given by Equation (35)) with respect to b is set equal to zero, which results in the following relation: And by taking derivative of e i x ð Þ (given by Equation (25)) with respect to b by taking c; u and ϕ as constant: By using Equations (43) and (44): and To get updating equation for u j , energy term is solved using Lagrange multiplier as and These equations are updated by considering derivative of F m with reference to u j (with c; b; ϕ as constants) and equating it to zero. The estimated value of u j can be found as: and By using Equations (53) and (54): By substituting value of λ in Equation (53) gives: 3.6. Spatial term for reducing noise effect A spatial term for fuzzy clustering using membership function is used in the level set formulation of the proposed method to subjugate noise effect. At every step along with bias filed, constants, and membership functions, the spatial term is also calculated. In the proposed method, spatial term is average of membership values of neighboring pixels and given as: By taking this extra spatial term into consideration, a pixel membership value is decided by the neighboring pixels. i.e. even if the center pixel is noisy, its effect can be truncated. Using this spatial term, the membership function is updated as: where p and q represent the weight given to each term. If noisy is heavy, more weight is given to the spatial term by considering large values for q. Median filter, Wiener filter, and Gaussian filter are also tested in the proposed method in place of mean filter-based spatial term. The median filter performs better for removing Salt and Pepper noise and Poisson noise, Wiener filter performs for removing Speckles noise and Gaussian filter for the Blurred noise. But in case of additive Gaussian noise with zero mean and constant variance, mean filter-based spatial term gives best results.

Results
The proposed method is verified with numerous synthetic images and real medical images, and results are compared with some of the states-of-the-art techniques. A CT scan image of the heart is taken from Cornell university database (www.via.cornell.edu/database) and MRI images are taken from database (www.humanconnectome.org) of Connectome Coordination Facility (CCF). Figure 3 displays corresponding results against evaluation of proposed method on a CT scan image of heart as: Initial contour in Figure 3(a) and Figure 3(f) is inside of the region of interest and in Figure 3(e), it is completely outside of the region. In all cases, the final contour is same and results are independent of initialization of initial contour. Here, proposed method is used without the spatial term. If the spatial term is also included in the proposed method, results are same since these images are without noise.
The original CT scan image, final segmented image, and bias field and corrected image using the bias filed are given in Figure 4 as:    In Figures 5-7, Brain MRI images obtained from web data set of CCF are used. The MRI data used are T1 normal MRI of 1 mm thickness with noise density of 9% and intensity non-uniformity of 40%.
It can be observed from the images that final contour obtained by other methods is affected by the noise, and in case of the proposed method, the noise effect is either almost zero or very less. The proposed method gives superior results both in terms of bias field and final contour.
Results of the proposed method are compared with results of other methods for many synthesis images corrupted by different Gaussian noise (noise density,σ ¼ 0 to 0:1) and corresponding results of a synthesis image, added with Gaussian noise density (σ) of 0.02, are publicized in Figure 8.
The proposed method is compared with other latest methods on the basis of SA for same synthetic image corrupted by different Gaussian noise (noise density,σ ¼ 0 to 0:1). The values obtained by experimental evaluation are shown in Table 1 It can be observed that in case of segmentation of synthesis image, the proposed method has the minimum effect of noise compared to other methods. Precision and Recall curves are also commonly used for quantitative evaluation of image segmentation methods. In case of classification, Precision and Recall are referred as Positive Predictive Value (PPV) and True Positive Rate (TPR) or sensitivity, respectively. Precision and Recall are defined as where TP, FP, TN and FN are True Positive, False Positive, True Negative and False Negative, respectively, as per Figure 9 (Confusion Matrix) Precision and Recall curves of the proposed method along with state-of-the-art methods are plotted in Figure 10 for synthesis image corrupted with Gaussian noise (σ) of 0.02.
The Precision and Recall curves also verify that proposed method produces better segmentation. Larger Recall and Precision values in case of other methods come at the cost of undesirable over segmentation or under segmentation. The proposed method is verified with different types of medical images like CT scan images of heart and brain MRI images. The results show that proposed method efficiently deals with noise as well as intensity inhomogeneity problem of synthesis and real-time medical images.

Conclusion
Results show that, in the proposed method, contour evaluation results are independent of the initialization of initial contour and final contour obtained by the proposed method is less affected by noise in comparison to other methods. Proposed method results in smooth contour even in existence of noise and non-uniformity. When the proposed method is compared with other methods in terms of SA of synthesis image corrupted by Gaussian Noise along with Precision and Recall curves, it shows  W. Cui et al. (2013): Localized FCM clustering with spatial information for medical image segmentation and bias field estimation.
Y. Chen et al. (2009): An improved level set method using additive bias field for brain MRI images segmentation.

True Condition
Predicted Condition  better results. Median filter, Wiener filter, and Gaussian filter are also tested in the proposed method in place of mean filter-based spatial term. In case of additive Gaussian noise with zero mean and constant variance, mean filter-based spatial term gives best results. The proposed method has the better segmentation of medical images corrupted by both intensity inhomogeneity as well as noise, so proposed method can be utilized for medical applications, where high quality and precise segmentation are required. The proposed method is computationally complex since multiple similar convolutions are used repeatedly. As a future work, complexity can be reduced by using different types of level set methods for implementation of active contours and energy function using different FCM variations Choudhry and Kapoor (2016).