PMCCPMCCPMCC

Search tips
Search criteria 

Advanced

 
Logo of plosonePLoS OneView this ArticleSubmit to PLoSGet E-mail AlertsContact UsPublic Library of Science (PLoS)
 
PLoS One. 2017; 12(4): e0174813.
Published online 2017 April 4. doi:  10.1371/journal.pone.0174813
PMCID: PMC5380353

Active contours driven by local and global fitted image models for image segmentation robust to intensity inhomogeneity

Dzung Pham, Editor

Abstract

This paper presents a region-based active contour method for the segmentation of intensity inhomogeneous images using an energy functional based on local and global fitted images. A square image fitted model is defined by using both local and global fitted differences. Moreover, local and global signed pressure force functions are introduced in the solution of the energy functional to stabilize the gradient descent flow. In the final gradient descent solution, the local fitted term helps extract regions with intensity inhomogeneity, whereas the global fitted term targets homogeneous regions. A Gaussian kernel is applied to regularize the contour at each step, which not only smoothes it but also avoids the computationally expensive re-initialization. Intensity inhomogeneous images contain undesired smooth intensity variations (bias field) that alter the results of intensity-based segmentation methods. The bias field is approximated with a Gaussian distribution and the bias of intensity inhomogeneous regions is corrected by dividing the original image by the approximated bias field. In this paper, a two-phase model is first derived and then extended to a four-phase model to segment brain magnetic resonance (MR) images into the desired regions of interest. Experimental results with both synthetic and real brain MR images are used for a quantitative and qualitative comparison with state-of-the-art active contour methods to show the advantages of the proposed segmentation technique in practical terms.

Introduction

Image segmentation is an important stage in image processing and computer vision [1]. Intensity inhomogeneity is one of the well-known problems in image segmentation, which arises from the imperfections of the image acquisition process or due to external interferences. It manifests as a smooth intensity variation across the image that complicates the segmentation of the objects contained in it. For instance, in medical image analysis, segmentation and registration stages are highly sensitive to spurious variations of image intensity. Therefore, the complexity of intensity inhomogeneity can lead to false results and assumptions that can be critical for decision making by both doctors and radiologists. This is why numerous methods for intensity inhomogeneity correction have been proposed in the past [2].

Thus, intensity inhomogeneity correction is often a pre-processing stage necessary for achieving better image segmentation. In turn, correct segmentation makes intensity inhomogeneity correction rather trivial. Actually, both intensity inhomogeneity correction and segmentation can be viewed as two intertwined processes. In segmentation-based intensity inhomogeneity correction methods, both processes are merged such that they benefit from each other.

The techniques that aim to avoid intensity inhomogeneity in the image acquisition process are known as prospective methods. They are only capable of correcting intensity inhomogeneity caused by the imaging device, not being able to segment the objects affected by intensity inhomogeneity. On the other hand, techniques that can correct an image and also segment the objects affected by intensity inhomogeneity are called retrospective methods. Retrospective methods are further classified according to the image segmentation method they apply into: filtering methods [3, 4], surface fitting methods [5, 6], histogram-based methods [7, 8], and active contours [915]. Segmentation-based methods [1012] are the most versatile, since they unify segmentation and bias correction in a single framework. In these methods, segmentation and bias correction are applied in conjunction to benefit from each other.

Active contours are retrospective methods suitable for both image segmentation and bias correction [1012, 1618]. The first active contour method was proposed in [19] in order to segment an image by evolving a curve towards the boundary of an object contained in the image. An energy functional is first defined by using image statistics, curvature and gradient information. The curve is evolved by minimizing that energy functional. Active contour methods can be categorized into edge-based [1921] and region-based [2236] methods.

Edge-based active contour methods typically use image gradient information to define an inflating balloon force that is used in the curve evolution process [20]. However, in case of intense noise or weak edges, edge-based active contours can hardly converge to the right contours. Therefore, edge-based methods are not suitable for that kind of images.

Alternatively, region-based active contour methods use statistical and curvature information from the image in the formulation of the energy functional. They can be further characterized into global [2226] and local [2734] methods. Mumford and Shah [22] devised a global region-based active contour method by assuming image homogeneity. Thus, traditional active contour methods based on [22], such as the active contours without edges (ACWE) method [23], cannot segment images with intensity inhomogeneity. These methods usually compute intensity averages over the whole image. Therefore, they cannot deal with small changes between distinct regions nor segment objects with weak or blurred boundaries. On the other hand, local-based methods [27, 28] are able to distinguish small changes between the background and the foreground. Therefore, they are suitable for intensity inhomogeneous images.

A region-based active contour model able to process image information in local regions was proposed by Li et al. in [27, 28]. The major contribution of that work was the introduction of a local binary fitting (LBF) energy with a kernel function that enables the extraction of accurate local image information. Therefore, that model can be used to segment images with intensity inhomogeneity, which overcomes the limitation of piecewise constant models [23].

Fig 1(a) shows that a traditional region based active contour method (such as ACWE) is unable to segment an image with an intensity inhomogeneous object. However, a local active contour method (such as LBF) is able to properly segment such object as shown in Fig 1(b). Taking Fig 1 as a reference, it can be concluded that active contour methods which use local statistical information of an image are able to produce fairly acceptable segmentation results in the context of intensity inhomogeneity.

Fig 1
Intensity inhomogeneous image segmentatation using (a) ACWE and (b) LBF methods.

A region-based active contour model with a variational level-set formulation for image segmentation was presented in [29]. It uses local intensity means for computing the level-set curve. Local image intensities are described by local Gaussian distributions (LGD) to guide the motion of the contour toward the object boundaries. Therefore, it can be used to segment images in the presence of intensity inhomogeneity and noise. In particular, the model is able to distinguish regions with different intensity variances.

A local active contour model for segmenting images with intensity inhomogeneity was proposed by Zhang et al. in [30]. Local image information is used to define a local image fitting (LIF) energy functional, which can be interpreted as a constraint on the differences between the fitting image [27, 28] and the original image. Furthermore, a new method is used to regularize the level-set function by using Gaussian kernel filtering after each iteration. In addition, re-initialization of the level-set curve is not required.

In [25], a region-based active contour method is formulated by using a global signed pressure force (SPF) function in the energy function. The global SPF function is defined by using global intensity means from the ACWE model [23]. A Gaussian kernel is used to regularize the level-set and prevent re-initialization.

Alternatively, a region-based active contour method is formulated in [31] in the context of intensity inhomogeneity by utilizing local intensity means. It uses an SPF function based on a local fitted image in its energy formulation in order to segment images with intensity inhomogeneity. A Gaussian kernel is used to smooth the level-set function after every step. Therefore, this method does not require re-initialization.

A variational level-set approach for bias correction and segmentation (VLSBCS) for images corrupted with intensity inhomogeneity was proposed by Li et al. in [9, 10]. The computed bias field is intrinsically ensured to be smooth by the data term in the variational formulation, without any additional effect to maintain the smoothness of the bias field.

A local statistical active contour model (LSACM) for image segmentation in the presence of intensity inhomogeneity was proposed by Zhang et al. in [11, 12]. The inhomogeneous objects are modelled as Gaussian distributions of different means and variances, and a moving window is used to map the original image into a new domain in which the intensity distributions of inhomogeneous objects are still Gaussian but better separated. The means of the Gaussian distributions in the transformed domain can be adaptively estimated by multiplying the bias field with the original signal within the window. A statistical energy functional is then defined for each local region, which combines the bias field, the level-set function, and the constant approximating the true signal of the corresponding object.

The present paper proposes a new region-based active contour method that incorporates both local and global fitted images in the energy functional. The local term helps segment objects with intensity inhomogeneity, whereas the global term accelerates the evolution of the contour over smooth homogeneous regions. The new energy functional is formulated with the assumption that the local fitted image from [30] can be divided into two different local and global components. In the gradient descent solution of the proposed energy functional, both local and global signed pressure force (SPF) functions are introduced. The local SPF function is formulated by using local image differences and deals with inhomogeneous regions. In turn, the global SPF function is formulated by using the global image difference in order to segment homogeneous regions while reducing the convergence time of the level-set curve. The replacement of the local and global image differences by their respective SPF functions makes the gradient descent solution more stable. Finally, a Gaussian kernel is used to regularize the level-set curve, which also avoids the computationally expensive re-initialization. In this paper, the proposed two-phase model is also extended to a four-phase model in order to successfully segment a brain MR image into three regions: white matter (WM), grey matter (GM) and cerebrospinal fluid (CSF) regions, which is not possible with a two-phase model. Experiments with both synthetic and real images demonstrate that the proposed method yields better segmentation results and offers bias-corrected images with more detail than state-of-the-art methods.

This paper is organized as follows. The theoretical foundations are discussed in section 2. The proposed method is described in section 3. Experimental results and comparisons are shown in section 4 using both synthetic and real brain magnetic resonance images as a practical application scope. Quantitative analysis is presented in section 5 using a public database of brain anatomical models [37]. Finally, conclusions and further research lines are given in section 6.

Theoretical foundations

Mumford-Shah energy model

In the image segmentation problem, Mumford and Shah proposed an active contour method to find an optimum piecewise smooth approximation function u of an image. Let I: Ω → R2, where u varies within each sub-region Ωi of the image domain smoothly, and rapidly or discontinuously across the boundaries of Ωi in order to approximate a closed curve C [subset or is implied by] Ω along the object boundary. They proposed the following energy functional:

EMS=λΩ|I(x)-u(x)|2dx+vΩ\C|u(x)|2dx+μL(C),xΩ
(1)

where L(C) is the length of the curve C, and μ and v ≥ 0 are fixed parameters. The unknown contour C and the non-convexity of the above energy functional make it difficult to minimize it. Some alternative methods were later proposed to simplify or modify the above functional, as described below.

Chan-Vese model

Chan and Vese [23] proposed an active contour method based on the Mumford and Shah model [22]. Let I: Ω → R2 be an input image, ϕ: Ω → R2 a level set, and C a closed curve corresponding to the zero level set: C = {x [set membership] Ω|ϕ(x) = 0}. The following energy functional is defined:

ECV=λ1Ω|I(x)m1|2Hϵ(ϕ)dx+λ2Ω|I(x)m2|2(1Hϵ(ϕ))dx+μΩ|Hϵ(ϕ)|2dx+vΩHϵ(ϕ)dx
(2)

where μ ≥ 0, v ≥ 0, (λ1, λ2)>0 are fixed parameters and Hϵ(ϕ) is the regularized version of the Heaviside function:

Hϵ(ϕ)=12+1πarctanϕϵ
(3)

Parameter ϵ controls the smoothness of the Heaviside function. For ϵ → 0, the Heaviside function is the ideal unit step function. Parameter μ scales the Euclidian length of the curve C in (Eq 2), which is used to regularize the contour. In turn, parameter v scales the area term in (Eq 2), which is used to compute the area of the region inside C. Constants m1 and m2 approximate the image intensities inside and outside contour C, respectively. By minimizing the above energy functional with respect to ϕ through steepest gradient descent [38], the following gradient descent flow is obtained:

ϕt=(λ1(I(x)m1)2+λ2(I(x)m2)2+μ div(ϕ|ϕ|)v)δϵ(ϕ),
(4)

where δϵ(ϕ) is the regularized Dirac function:

δϵ(ϕ)=ϵπ(ϕ2+ϵ2)
(5)

In addition to specifying the smoothness of the Heaviside function (3), parameter ϵ also controls the width of the Dirac function. For ϵ→ 0, the Dirac function is the ideal unit impulse. By minimizing (Eq 2) with respect to m1 and m2 while keeping ϕ constant, m1 and m2 are defined as:

m1=ΩI(x)Hϵ(ϕ)dxΩHϵ(ϕ)dx,m2=ΩI(x)(1Hϵ(ϕ))dxΩ(1Hϵ(ϕ))dx
(6)

The data fitting term − λ1(Im1)2 + λ2(Im2)2 in (Eq 4) plays a key role in the curve evolution. Parameters λ1 and λ2 weight the first and the second term, respectively. In most cases, λ1 = λ2 and v = 0 when the image is smooth and the signal-to-noise ratio is low. Parameter μ is a scale factor. If it is low enough, small objects are likely to be extracted. Alternatively, if it is high, big objects can be detected [23]. Obviously, m1 and m2 in (Eq 6) are related to the global properties of the image contents inside and outside curve C, respectively. However, such a global image segmentation is not accurate if the image intensity inside and/or outside the curve is inhomogeneous.

Local Binary Fitted (LBF) model

Li et al. [27, 28] proposed the LBF model by embedding local image information in the energy functional. LBF is able to segment images with intensity inhomogeneity. The basic idea is to introduce a Gaussian kernel function to define the LBF energy functional as follows:

ELBF=λ1ΩKσ(xy)|I(y)f1(x)|2Hϵ(ϕ)dydx+λ2ΩKσ(xy)|I(y)f2(x)|2(1Hϵ(ϕ))dydx,
(7)

where (λ1, λ2) > 0 are fixed parameters, I: Ω → R2 is an input image, Kσ is a Gaussian kernel with standard deviation σ, and f1 and f2 are two smooth functions that approximate the local image intensities inside and outside curve C, respectively.

In LBF, C [subset or is implied by] Ω can be represented by the zero level-set of a Lipschitz function ϕ: Ω [subset or is implied by] R. Minimizing the energy functional ELBF with respect to ϕ, the gradient descent flow is defined as follows:

ϕt=-(λ1e1-λ2e2)δϵ(ϕ),
(8)

where e1 and e2 are defined as follows:

e1(x)=ΩKσ(xy)|I(y)f1(x)|2dy,e2(x)=ΩKσ(xy)|I(y)f2(x)|2dy
(9)

In (Eq 8), parameters λ1 and λ2 weight the two integrals over the regions inside and outside curve C, respectively, which are defined in (Eq 9). In most cases, λ1 = λ2. Functions f1 and f2 are the local intensity means inside and outside curve C, which are computed in a local neighbourhood:

f1(x)=Kσ*[I(x)Hϵ(ϕ)]Kσ*Hϵ(ϕ),f2(x)=Kσ*[I(x)(1Hϵ(ϕ))]Kσ*(1Hϵ(ϕ))
(10)

Functions f1 and f2 in (Eq 10) represent weighted averages of image intensities in a Gaussian window inside and outside the curve, respectively. In that way, the LBF model can handle images with intensity inhomogeneity.

The standard deviation σ of the Gaussian kernel plays an import role in practical applications. It behaves as a scale parameter that controls the region-scalability from the small neighbourhood to the whole image domain [28]. It must be properly chosen according to the images. A too small σ may cause an undesirable result, whereas a too large σ will yield a high computational cost.

In order to guarantee a stable evolution of the level-set function, the distance regularized term defined in [21] is incorporated into (Eq 8). Moreover, the Euclidean length term is used to regularize the zero contour of ϕ. Finally, the total variational formulation is as follows:

ϕt=γ(2ϕdiv(ϕ|ϕ|))+(μ div(ϕ|ϕ|)(λ1e1λ2e2))δϵ(ϕ),
(11)

where γ is a scaling parameter of the distance regularized energy penalization term that controls the energy leakage and μ is a scaling parameter of the Euclidian length of the curve.

Local Image Fitted (LIF) model

In [30], a local image fitting energy functional is proposed in which the difference between the fitted image and the original image is minimized as follows:

ELIF=12Ω|I(x)ILFI(x)|2dx,
(12)

where ILFI is the local fitted image defined as:

ILFI(x) = f1(x)M1f2(x)M2
(13)

where M1 = Hϵ(ϕ), M2 = (1 − Hϵ(ϕ)), and f1 and f2 are local intensity means in the given image (Eq 10). Hϵ(ϕ) is the regularized version of the Heaviside function (3). Using the calculus of variations and steepest gradient descent [38], ELIF in (Eq 12) is minimized with respect to ϕ to yield the corresponding gradient descent flow:

ϕt=I(x)-ILFI(x)f1(x)-f2(x)δϵ(ϕ),
(14)

where δϵ(ϕ) is the regularized Dirac function (11).

Variational Level-Set approach for Bias Correction and Segmentation (VLSBCS)

In [9, 10], a variational level-set method for the segmentation and bias correction of images corrupted with intensity inhomogeneity is formulated. In this method, the computed bias field is ensured to be smooth exclusively through the data term defined in the energy functional formulation. This method is based on an image model commonly used to describe images with intensity inhomogeneity:

I(x) = b(x)J(x) + n(x), 
(15)

where I(x) is the input image with intensity inhomogeneity, J(x) is the image to be restored without intensity inhomogeneity, b(x) is the bias field, which represents the modulation of the restored image with the intensity inhomogeneity, and n(x) is noise. The model assumes that the restored image J(x) is constant within each object in the image, i.e., J(x)i=1NciMi for x[set membership] Ωi, with x{Ωi}i=1N being a sub-region of Ω.

In traditional active contour methods, the image domain Ω is assumed to be divided into N disjoint regions, Ωi, i = 1, 2, …., N, based on the input image I(x). However, due to the intensity inhomogeneity caused by the bias field b(x), the measured intensities are not separable by using traditional intensity-based segmentation methods.

In [9, 10], a K-means clustering method based on the minimization of the following objective function is proposed:

Ei=1NΩiKσ(x-y)|I(y)-b(x)ci|2dydx,
(16)

where b(x) is the approximated bias field and ci is the computed intensity mean in the presence of intensity inhomogeneity for each of the phases of the two-phase active contour method (i = 1, 2). Term b(x)ci can be considered to be the approximation of the means mi of the clusters corresponding to each of the phases of the two-phase active contour method: mib(x)ci.

Directly minimizing the above energy functional with the partition {Ωi}i=1N as a variable is not feasible. Therefore, multiple level-set functions are used to represent a partition {Ωi}i=1N. In the simplest case of N = 2, the image domain is partitioned into two regions {Ω1, Ω2}. These regions are separated by the zero-level contour of a function ϕ, that is, Ω1 [congruent with] {ϕ > 0} and Ω2 [congruent with] {ϕ< 0}. Using the Heaviside function Hϵ, the energy E in (Eq 16) becomes:

E=i=1NΩKσ(x-y)|I(y)-b(x)ci|2Mi(ϕ)dydx,
(17)

where Mi is the characteristic function of a given image based on the regularized Heaviside function (3). When the image domain is partitioned in two regions {Ω1, Ω2}, Mi is defined as M1 = Hϵ(ϕ) and M2 = (1 − Hϵ(ϕ)). By taking the Gateaux derivative (the first order functional derivative) [38] of the energy E, the following expressions for b(x) and ci are obtained:

b(x)=i=12Kσ*I(x)ciMi(ϕ)i=12Kσ*ci2Mi(ϕ),
(18)

ci=Kσ*I(x)b(x)Mi(ϕ)dxKσ*b2(x)Mi(ϕ)dx,
(19)

For N = 4, the image is partitioned into four regions (Ω1, Ω2, Ω3, Ω4) using two level sets ϕ1 and ϕ2. Then, Mi is defined as M1(Φ) = Hϵ(ϕ1)Hϵ(ϕ2), M2(Φ) = Hϵ(ϕ1) (1 − Hϵ(ϕ2)), M3(Φ) = (1 − Hϵ(ϕ1))Hϵ(ϕ2) and M4(Φ) = (1 − Hϵ(ϕ1)) (1 − Hϵ(ϕ2)).

Local Statistical Active Contour Model (LSACM)

In order to segment and correct bias in an intensity inhomogeneous image a local statistical active contour model is devised in [11, 12], in which the inhomogeneous objects are modelled as Gaussian distributions of different means and variances. The means of the Gaussian distributions are adaptively estimated by multiplying the bias field by the original signal within a Gaussian window. Let I: Ω → R2 be the input image, Φ: Ω → R2 a level set function, which yields a closed curve C = {x[set membership] Ω|Φ(x) = 0}, b(x) is the approximated bias field, ciand σiare intensity means and variances, respectively. Φ is a function of one level set ϕ for a two-phase segmentation and Φ is a function of two level sets (ϕ1, ϕ2) for four-phase segmentation. Based on the above assumptions, an energy functional is defined as:

E(Φ)=ΩKβ(x,y)log(σi)+(I(y)-b(x)ci)2/2σi2Mi(Φ)dx,N=2orN=4
(20)

where Kβ(x, y) is a Gaussian kernel with a standard deviation β. For N = 2, the energy functional in (Eq 20) acts as a two-phase active contour method (with one level set). The two characteristic terms are: M1(Φ) = Hϵ(ϕ) and M2(Φ) = 1 − Hϵ(ϕ)). In turn, for N = 4, the energy functional in (Eq 20) acts as a four-phase active contour method (with two level sets ϕ1and ϕ2). The four characteristic terms are defined as: M1(Φ) = Hϵ(ϕ1)Hϵ(ϕ2), M2(Φ) = Hϵ(ϕ1) (1 − Hϵ(ϕ2)), M3(Φ) = (1 − Hϵ(ϕ1))Hϵ(ϕ2) and M4(Φ) = (1 − Hϵ(ϕ1))Hϵ(ϕ2) Hϵ(ϕ2)). In (Eq 20), bias correction b(x), intensity means ci and variance σi are defined as:

b(x)=i=1NKβ*(IMi(Φ(x)))·ciσi2i=1NKβ*Mi(Φ(x))·ci2σi2
(21)

ci=(Kβ*b)I(x)Mi(ϕ(x))dx(Kβ*b2)Mi(ϕ(x))dx,
(22)

σi=Kβ(x,y)(I(x)b(x)ci)2Mi(ϕ(x))dydxKβ(x,y)Mi(ϕ(x))dydx
(23)

Proposed method

The generally accepted assumption on intensity inhomogeneity is that it manifests itself as a smooth spatially varying function that alters image intensities that otherwise would be constant for a same object regardless its position in an image. In its simplest form, the model assumes that intensity inhomogeneity is multiplicative or additive, that is, the intensity inhomogeneity field multiplies or adds to the image intensities. Most frequently, the multiplicative model has been used as it is consistent with the inhomogeneous sensitivity of the reception coil of magnetic resonance imaging devices. Therefore, a multiplicative model has been considered for the bias field estimation. Let I: Ω → R2 be the input image with intensity inhomogeneity, J(x) the restored image without intensity inhomogeneity, b(x) the bias field approximated with a Gaussian distribution, and n(x) additive noise (Eq 15).

J(x) is assumed to be constituted by k piecewise constant image components. I(x) can thus be represented as:

I(x) = b(x){c1M1c2M2 + ...... + ckMk}, 
(24)

where ci are intensity means computed for the piecewise regions {Ωi}i=1N and Mi is the characteristic function of each region.

In order to segment intensity inhomogeneous images, the following energy functional is defined:

Eg,LGFIELGFI(ϕ) + μLg(ϕ) + vAg(ϕ), 
(25)

where ELGFI (ϕ) is a term based on a local and global fitted image, which will be explained later in this section. μ ≥ 0 and v ≥ 0 are fixed parameters. Lg(ϕ) and Ag(ϕ) are length and area terms, respectively [21]:

Lg(ϕ)=Ωg(I)δϵ(ϕ)|ϕ|dx,
(26)

Ag(ϕ)=Ωg(I)Hϵ(-ϕ)dx,
(27)

The energy functional Ag(ϕ) is introduced to speed up the curve evolution. It is the area of the region Ωϕ-={(x,y)|ϕ(x,y)<0} [21]. Ag(ϕ) can be viewed as the weighted area of Ωϕ-. In (Eq 27), g(I) is a positive monotonously decreasing edge indicator function ranging in [0, 1]:

g(I)=11+|Kσ*I|2
(28)

ELGFI is defined according to the following reformulation of (Eq 12):

ELGFI=ΩI(x)-IbLFI(x)I(x)-IGFI(x)dx,
(29)

Two-phase active contours formulation

In (Eq 29), let IbLFI(x) be a two-phase bias local fitted image and IGFI(x) a global fitted image, using a level set ϕ, which are defined as:

IbLFI(x) = b(x)(c1M1c2M2), 
(30)

IGFI(x) = m1M1m2M2
(31)

where c1and c2 are local intensity means and m1and m2 are global intensity means of the given image as defined in Eqs (19) and (6), respectively. M1 = Hϵ(ϕ) and M2 = (1 − Hϵ(ϕ)), where Hϵ(ϕ) is the regularized Heaviside function (3). Models based on global intensity means are not sufficient to solve intensity inhomogeneity segmentation problems. In turn, models based on local intensity means have a very high time complexity. Using both local and global fitted images, the proposed method is able to tackle the intensity inhomogeneity problem with a reduced time complexity.

As discussed earlier, an energy functional only based on a global fitted image cannot segment images with intensity inhomogeneity since global intensity means are computed under the assumption that the input image is homogeneous. Therefore, the bias field b(x) from (Eq 18) is only introduced in the local fitted image difference.

By using calculus of variations and steepest gradient descent [38], ELGFI in (Eq 29) is minimized with respect to ϕ, leading to the corresponding gradient descent flow (refer to the appendix for a detailed derivation):

ϕt=((I(x)IbLFI(x))(m1m2)+b(x)(I(x)IGFI(x))(c1c2))δϵ(ϕ),
(32)

where b(x) is the bias field defined in (Eq 18), and {m1, m2} and {c1, c2} are global and local intensity means defined in Eqs (6) and (19), respectively. The above gradient descent flow is not stable around object boundaries. Moreover, it does not yield proper segmentation when the boundaries between inhomogeneous objects and the background are undistinguishable. (IIbLFI) (m1m2) and (IIGFI) (f1f2) generate large values that cross a maximum threshold resulting in an unstable contour. Therefore, (IIbLFI) and (IIGFI) are replaced by local and global signed pressure force (SPF) functions, which normalize values to [-1,1] to obtain a smooth version of the gradient descent flow:

ϕt=λ1LSPF(m1-m2)+λ2bGSPF(c1-c2)δϵ(ϕ),
(33)

where the proposed local and global SPF functions are defined as:

LSPF(I)=I(x)-IbLFI(x)max|I(x)-IbLFI(x)|,I(x)00,I(x)=0
(34)

GSPF(I)=I(x)-IGFI(x)max|I(x)-IGFI(x)|,I(x)00,I(x)=0
(35)

By using the calculus of variations and steepest gradient descent, the solution of Eg,LGFI from (Eq 25) using Eqs (26) and (27) is:

ϕt=(λ1LSPF(m1m2)+λ2bGSPF(c1c2)+μ div(gϕ|ϕ|)+vg)δϵ(ϕ)
(36)

The two scaling parameters λ1and λ2in Eqs (33) and (36) are used to tune the model to different types of images.

Four-phase active contours formulation

In (Eq 29), let IbLFI(x) be a four-phase bias local fitted image and IGFI(x) a global fitted image, using two level sets Φ(ϕ1, ϕ2), which are defined as:

IbLFI(x) = b(x)(c1M1c2M2c3M3c4M4), 
(37)

IGFI(x) = m1M1m2M2m3M3m4M4
(38)

where M1(Φ) = Hϵ(ϕ1)Hϵ(ϕ2), M2(Φ) = Hϵ(ϕ1) (1 − Hϵ(ϕ2)), M3(Φ) = (1 − Hϵ(ϕ1))Hϵ(ϕ2) and M4(Φ) = (1 − Hϵ(ϕ1)) (1 − Hϵ(ϕ2)), which are the characteristic terms that partition a given image into four segments. b(x) is the bias term defined for the four-phase energy functional. c1, c2, c3 and c4 are local intensity means from VLSBCS [9, 10] and m1, m2, m3and m4 are global intensity means from the multiphase level set framework (MLSF) [24], which is a multiphase extension of the two-phase energy functional defined by Chan-Vese [23].

By substituting the four-phase fitted equations in (Eq 29) using steepest gradient descent [38] the following solutions are obtained for ϕ1 and ϕ2 (for detailed formulation see appendix B):

ϕ1t=[b(IIGFI)((c1c3)Hϵ(ϕ2)+(c2c4)(1Hϵ(ϕ2)))+(IIbLFI)((m1m3)Hϵ(ϕ2)+(m2m4)(1Hϵ(ϕ2))]δϵ(ϕ1)
(39)

ϕ2t=[b(IIGFI)((c1c2)Hϵ(ϕ1)+(c3c4)(1Hϵ(ϕ1)))+(IIbLFI)((m1m2)Hϵ(ϕ1)+(m3m4)(1Hϵ(ϕ1))]δϵ(ϕ2)
(40)

Four-phase local and global SPF functions can be obtained by substituting IbLFI and IGFI from Eqs (37) and (38) in Eqs (34) and (35), respectively. By replacing the four-phase local and global fitted differences with their respective SPF functions, Eqs (39) and (40) are updated as follows:

ϕ1t=[λ1bGSPF((c1c3)Hϵ(ϕ2)+(c2c4)(1Hϵ(ϕ2)))+λ2LSPF((m1m3)Hϵ(ϕ2)+(m2m4)(1Hϵ(ϕ2))]δϵ(ϕ1)
(41)

ϕ2t=[λ1bGSPF((c1c2)Hϵ(ϕ1)+(c3c4)(1Hϵ(ϕ1)))+λ2LSPF((m1m2)Hϵ(ϕ1)+(m3m4)(1Hϵ(ϕ1))]δϵ(ϕ2)
(42)

The SPF functions defined in Eqs (34) and (35) are used to normalize the local and global image differences in the range [-1, 1] inside and outside the region of interest. SPF functions have been formulated in numerous ways (e.g., [25, 26, 31, 36]), some of them incorporating global intensity means and others using local intensity means. The new SPF functions proposed in this work are based on both global and local intensity-based fitted images. Fig 2 shows the signs of an SPF function based on a global fitted image inside and outside the region of interest. In turn, Fig 3 shows the sign of an SPF function based on a local fitted image inside and outside the region of interest.

Fig 2
Signs of a global SPF function.
Fig 3
Signs of a local SPF function.

Since the local SPF function uses local intensity means, it is able to distinguish small changes at the boundaries of intensity inhomogeneous objects. Since the local intensity means are computed in a local neighbourhood, the positive and negative values are distributed close to the inner and outer boundaries of the image contours. In the rest of the image, the SPF function becomes zero. In Fig 3, white shows negative values of the local SPF function, black shows positive values of the local SPF function, and blue represents the region where the local SPF function becomes zero.

In contrast, the global SPF function is unable to segment intensity inhomogeneous regions, since global intensity means are computed all over the image. It has positive and negative values inside and outside the region of interest, and is zero at its boundary, as shown in Fig 2.

In level-set methods, it is essential to initialize the level-set function ϕ as a signed distance function (SDF) ϕ0. If the initial level-set function is significantly different from the SDF, re-initialization schemes are unable to re-initialize the function to the SDF. In the proposed formulation, not only is the re-initialization procedure completely eliminated, but the level-set function ϕ no longer needs to be initialized as an SDF. The initial level set function ϕ0 is defined as:

ϕ(x,t=0)=-ρ,xΩ0-Ω00,xΩ0ρ,xΩ-Ω0
(43)

where ρ is a positive constant, Ω0 is the inner region of the initial contour, Ω is the image domain and [partial differential]Ω0 refers to the initial contour. The stages of the proposed method can be summarized as:

  1. Initialize the level-set function ϕ to ϕ0 using (Eq 43) and the bias field to b(x) = 0.
  2. Compute the edge indicator function g(I) using (Eq 28).
  3. Compute the local intensity means, c1, c2, and the global means, m1, m2, using Eqs (19) and (6), respectively. Compute the bias field b(x) from (Eq 18).
  4. Calculate LSPF(I) and GSPF(I) using Eqs (34) and (35), respectively.
  5. Solve the partial differential equation (PDE) of ϕ using (Eq 36).
  6. Regularize the level-set function ϕ at time t by applying a Gaussian kernel Gχ, i.e. ϕ = Gχ*ϕ, where χ is the standard deviation of the regularizing Gaussian kernel.
  7. Check whether the regularized level-set function is stationary. If not, iterate from step (c).

The steps described above correspond to the two-phase segmentation algorithm. However, for the four-phase algorithm, these steps are replaced with the variables corresponding to two level sets using their respective definitions and solutions.

Results and comparisons

The proposed method was implemented using MATLAB and run on a 3.4 GHz Intel Core-i7 with 16 GB of RAM, testing it on both synthetic images and real brain magnetic resonance (MR) images of 250 × 250 pixels with 256 grey levels (8bpp). The parameters used for all experiments in this section are shown in Table 1.

Table 1
Parameters for the experiments in result and comparison section.

Fig 4 shows the result of the proposed segmentation method and the comparison with the different state-of-the-art methods that have been tested. In this experiment, we used an image with a single homogeneous object and then progressively changed its intensity distribution to a point at which it is even difficult to manually segment it, thus making the object inhomogeneous.

Fig 4
Intensity inhomogeneous image segmentation and comparison with state-of-the-art methods by using images with intensity varying objects.

The first column shows the five input images with the initial contour, whereas the segmentation results are shown using LIF [30] in the second column, LBF [27, 28] in the third column, LGD [29] in the fourth column, VLSBCS [9, 10] in the fifth column, LSACM [11, 12] in the sixth column and the proposed method in the last column, respectively. Visual inspection clearly shows that both the proposed method and LBF provide the best segmentation results. LIF also yields acceptable segmentation results, although the final contour in this method is not quite smooth along the object boundaries. Segmentation results of both LSACM and LGD show that they are not able to strictly find the object boundary. Moreover, the contour in LGD is also stuck in the background, which is undesirable. VLSBCS properly segmented the first two images, but its segmentation results are not acceptable for the last three images. In LGD, σ was set to 10 for all experiments in Fig 4, since with a small value of σ, this method is unable to segment the objects in all images. For all the examples in Fig 4, the parameters of all methods were kept constant. The only change is the initial position of the level set.

Fig 5 shows the experiments conducted with synthetic images with different types of region properties. The first column shows the input images with their respective initial contours. In the first row, both the object and the background are homogeneous. In the second row, the background is homogeneous while the object is inhomogeneous. In the third row, the background is inhomogeneous while the object is homogeneous. In the fourth row, both the background and the object are inhomogeneous. In the last row, the background is homogeneous and there are different inhomogeneous regions with one of the regions having an extra inhomogeneous region within it.

Fig 5
Segmentation results using images with different homogeneity and inhomogeneity possibilities.

The second column shows the segmentation results with LIF [30]. Notice that it is not able to accurately segment the last image. Although this method is able the segment the objects in the first four images, the results are not acceptable because the contour is not quite smooth along the boundaries of the objects. The segmentation results with LBF [27, 28] are shown in the third column. This method is only able to properly segment the first image, while the segmentation results are not acceptable for the other images. The fourth column shows the segmentation results using LGD [29]. This method is able to properly segment the first image. As for the second image, the contour is not quite smooth along the boundary of the object. Although it is able to segment the objects in the third and fourth images, some undesirable contour is stuck in the background. Furthermore, this method is not able to segment the nested inhomogeneous object in the fifth image.

The fifth column shows the segmentation results using VLSBCS [9, 10]. This method is able to properly segment the first, second and fourth images. It can segment the object in third image. However, some undesirable contour is stuck in the background. Moreover, this method is not able to properly segment the fifth image. The sixth column shows the results with LSACM [11, 12]. This method is able to properly segment the third and fourth images. Although it is able to segment the objects in the first and second images, the final contour is not smooth and does not properly follow the object boundaries. Moreover, this method is unable to segment the nested inhomogeneous object in the fifth image. The last column shows the segmentation results using the proposed method, which is able to properly segment all images.

Table 2 shows a time complexity analysis in terms of CPU time and iterations. The proposed method yields the lowest time complexity for the examples shown in rows 1, 2 and 4, 5. It took 1.58 and 2.19 seconds for the examples shown in the first two rows, respectively. In turn, it took 5.09 and 5.78 seconds for the examples shown in rows 4 and 5, respectively. On the other hand, VLSBCS yields the lowest time complexity for the example shown in row 3. It took 2.27 seconds while the proposed method took 4.17 seconds to obtain the final contour. Although VLSBCS yields the lowest time complexity for this example it is unable to properly segment the object as shown in Fig 4.

Table 2
Iterations and CPU time for the examples shown in Fig 4.

In Fig 6, the segmentation and bias correction results using the proposed method (third row) are compared with the ones computed with VLSBCS [9, 10] (first row) and LSACM [11, 12] (second row) using real brain MR images as a practical application. The first column shows the input image with the initial contour. The second column shows the final contours for each method. The third column shows the estimated bias field. Finally, the last column shows the bias-corrected image. The proposed method can segment more detailed regions than the other methods, as highlighted by the green arrows in the second column. Moreover, the bias-corrected image using the proposed method has more details than the ones computed with the other methods, as highlighted by the red circles in the fourth column. The corrected image obtained using the proposed method also has more details in the nose area.

Fig 6
Segmentation and bias correction using Li et al. [9, 10] (first row), Zhang et al. [11, 12] (second row) and the proposed method (third row).

In Fig 7, the segmentation results and bias correction using the proposed method (third row) are compared with the ones computed with VLSBCS [9, 10] (first row) and LSACM [11, 12] (second row) using real brain MR images. The first column shows the input image with the initial contour. The second column shows the final contours. The third column shows the computed bias field. Finally, the last column shows the bias-corrected image. The results show that the proposed method can segment more detailed regions than the other methods, as highlighted by the green arrows in the second column. Moreover, the bias-corrected image using the proposed method has more details than the ones computed with the other methods, as highlighted by the red circles in the fourth column.

Fig 7
Segmentation and bias correction using Li et al. [9, 10] (first row), Zhang et al. [11, 12] (second row) and the proposed method (third row).

Fig 8 shows the effect of the position of the initial level set on the segmentation for all the tested methods. The first column shows the input image with different initial level sets, whereas the segmentation results with LIF [30] are shown in the second column, with LBF [27, 28] in the third column, with LGD [29] in the fourth column, with VLSBCS [9, 10] in the fifth column, with LSACM [11, 12] in the sixth column and with the proposed method in the last column. These results show that the proposed method is not affected by the position of the initial level set and yields the segmentation with the best accuracy. In contrast, the segmentation results of all the tested state-of-the-art methods are affected by the position of the initial level set.

Fig 8
Effect of position of initial contour on the final segmentation results.

Table 3 shows the number of iterations and CPU time for all the tested methods when applied to the example in Fig 8. The proposed method yields the best performance in the examples shown in rows 2 and 4. It took 2.48 and 1.42 seconds to obtain the final contours for rows 2 and 4, which is significantly lower than the time required by the other methods. In turn, LGD has the best performance for the example in row 1. Thus, LGD took 3.3 seconds while the proposed method took 5.15 seconds to obtain the final contour. In turn, LIF yields the best performance for the example shown in row 3. LIF took 3.86 seconds while the proposed method took 16.06 seconds to obtain the final contour.

Table 3
Iterations and CPU time for the examples shown in Fig 8.

Fig 9 shows the segmentation result on a synthetic image, which contains three different regions with intensity inhomogeneity, both without noise and after applying additive Gaussian noise. Fig 9(b) and 9(d) show that proposed method is able to properly segment intensity inhomogeneous objects without and with noise, respectively. Fig 9(e) shows the central row intensity profile of the input synthetic image with both clean and noisy data along with the final contour. It shows that the resultant contour followed the object boundaries perfectly.

Fig 9
Segmentation results on synthetic images with intensity inhomogeneity with and without noise.

Fig 10 shows some segmentation results by applying the proposed method to different intensity inhomogeneous noisy images. Although noise affected the crispness of edges in the input data, the proposed method is able to yield acceptable segmentation results.

Fig 10
Segmentation results on different intensity inhomogeneous noisy images.

Quantitative analysis

The segmentation of brain MR images into disjoint regions based on white matter (WM), grey matter (GM) and cerebrospinal fluid (CSF) is a well-known problem in brain image analysis. Due to the geometric complexity of the human brain cortex, manual slice-by-slice segmentation is cumbersome and time consuming [1]. Thus, numerous methods have been devised to solve such problems. Active contours are quite popular in this context. Because of the complex intensity inhomogeneous regions, brain MR images are hard to be successfully segmented with high accuracy [39]. Therefore, this is a good test bench to test the proposed method in a practical application and compare it with other state-of-the-art methods.

Two-phase active contours

This section shows segmentation results for all tested two-phase active contour methods using 2D brain MR images from a public database of 20 brain anatomical models [37]. All images have 250 × 250 pixels and 8 bits per pixel.

Active contour methods behave differently for different types of images. Because the images used in this section have different characteristics compared to the ones used in results and comparison section, the parameters had to be tuned in order to obtain the best possible segmentation results. The parameters used for all experiments in this section are shown in Table 4.

Table 4
Parameters for the experiments in quantitative analysis section.

In order to partition a brain MR image into WM and GM regions, the segmentation result is split into two regions based on two phases: ϕ> 0 and ϕ< 0. The WM and GM regions represent the brain region, which is the region of interest, while the regions outside the brain (e.g., skull, fat and vacuum) can be taken as irrelevant regions. Therefore, we manually extracted the brain area to segment the WM and GM regions, removing the other irrelevant regions out of the brain. Fig 11 shows the WM and GM regions computed from the two phases of the proposed method and the comparison with the ground truth (GT). In the first row of Fig 11, the first image shows the input image with the initial contour. The second image shows the final contour using the proposed method. The third image shows a manually defined brain mask. The main purpose of the brain mask is to extract the brain region in order to carefully analyse and compare the segmented WM and GM regions with their respective ground truths. The last image in the first row shows the final contour after scaling with the brain mask. Let ϕ(x, y) be the final computed contour shown in the second column of the first row, and m(x, y) the manually defined brain mask shown in the third column of the first row. The scaled final contour ξ(x, y), which is shown in the last column of the first row, is computed as ξ(x, y) = ϕ(x, y)m(x, y). In the second row of Fig 11, the first image shows the WM region computed from the positive phase (ξ> 0) of the final contour scaled with the brain mask. The second image shows the GM region computed using the negative phase (ξ< 0) of the scaled final contour. In the second row, the third and fourth images show the ground truths of the WM and GM regions, respectively.

Fig 11
WM and GM regions computed with the proposed method and their respective ground truths.

Fig 12 shows the accuracy analysis of the region of interest in the brain MR images. A total of 100 2D slices from 20 brain anatomical models [37] were used. Five 2D slices from every patient were considered. The WM and GM regions for all methods were computed as depicted in Fig 11. The segmentation accuracy corresponding to the WM and GM regions presented in Fig 12 was obtained as:

Accuracy=|AB||AB|×100,
(44)

Where A is the computed WM or GM region after brain scaling and B is the ground truth for that region. Different methods can behave differently based on the type of images. Therefore, five slices from each patient were used and average accuracies for those slices were computed to obtain a representative value for each case. Fig 12 and Table 5 show that the proposed method yields the best segmentation accuracy in most cases for both the WM and GM regions.

Fig 12
Segmentation accuracy analysis of (a) WM and (b) GM regions using two-phase active contours.
Table 5
Segmentation accuracy of WM and GM regions using the two-phase active contour methods.

Four-phase active contours

A two-phase method is limited to segmenting images into two regions, which is its big weakness in its application to brain MR image segmentation. In the last subsection, all of the two-phase tested methods are evaluated for WM and GM region segmentation. However, the segmented GM region was a combination of GM and CSF regions, resulting into a high amount of false positives. In this subsection, the four-phase model of the proposed active contour method is evaluated along with the state-of-the-art four-phase active contour methods with respect to the segmentation accuracy of WM, GM and CSF regions. All methods are tested using the same brain MR image database mentioned in the previous subsection with the same image size and intensity. The parameters used for the proposed method are: λ1 = 2, λ2 = 2, μ = 5, σ = 3, χ = 0.45, ρ = 1 ϵ = 1.5 and Δt = 1.

In brain MR images, WM, GM and CSF regions represent the brain, which is the region of interest. The regions outside the brain (e.g., skull, fat and vacuum) can be assumed to be irrelevant regions. In order to remove those unwanted regions, it is necessary to strip the skull from the brain MR image using a manually drawn brain mask. A brain mask is used as shown in Fig 11, although it is used for the four-phase method. Let ϕ1(x, y) and ϕ2(x, y) be the final computed contours for two level sets, m(x, y) be the manually defined brain mask and ξ1(x, y) and ξ2(x, y) scaled final contours with the brain mask which are computed as: ξ1(x, y) = ϕ1(x, y)m(x, y) and ξ2(x, y) = ϕ2(x, y)m(x, y). By using the proposed method, the four regions are computed as follows: R1 = (ξ1> 0) ∩ (ξ2> 0), R2 = (ξ1> 0) ∩ (ξ2< 0), R3 = (ξ1< 0) ∩ (ξ2> 0) and R4 = (ξ1< 0) ∩ (ξ2< 0). In brain MR images, R1, R2 and R3regions usually refer to WM, GM and CSF regions, respectively, and R4 is an empty region, which is discarded.

Fig 13 shows the accuracy analysis of the regions of interest (i.e., WM, GM and CSF regions) in the brain MR images. A total of 100 2D slices from 20 brain anatomical models [37] were used. Five 2D slices (namely 150, 175, 200, 225 and 250) from every patient were considered. The WM, GM and CSF regions are segmented using MLSF, VLSBCS, LSACM and the proposed methods. The accuracy of WM, GM and CSF regions for the mentioned four-phase active contour methods are computed using (44). In (44), A is the computed WM, GM or CSF region and B is the respective ground truth.

Fig 13
Segmentation accuracy analysis of (a) WM (b) GM and (c) CSF regions using four-phase active contours.

Fig 13 and Table 6 show that the proposed method yields the best segmentation results for GM and CSF regions. In turn, MLSF method yields the best segmentation results for the WM region with an accuracy of 92.52%. The proposed method yields an accuracy of 91.02% for the WM region, which is 1.5% less than the one with the MLSF method. LSACM and VLSBCS methods yield unsatisfactory segmentation results compared to both the proposed and the MLSF method. Table 6 also shows the CPU time comparison between the evaluated methods. It shows that MLSF is the quickest among the compared four-phase active contour methods. It took an average of 15.12 seconds to get the final segmentation result. In turn, the proposed method took an average of 19.01 seconds to fully converge, which is approximately 4 seconds more than the MLSF method.

Table 6
Segmentation accuracy of WM, GM and CSF regions using the four-phase active contour methods.

Comparison with brain MR image segmentation softwares

In this section, the segmentation results of the proposed method are compared with three alternative open source brain MR image segmentation softwares: SPM [40, 41], LSF [42, 43] and BrainSuite [44, 45] using the Brain Web database. In order to compare the segmentation results, the brain region was extracted by stripping the skull using a brain mask. Fig 14 shows a skull stripped brain region and the visual comparison of the segmented regions with their respective ground truth. It shows that all the compared methods yield similar segmentation results from a qualitative point of view.

Fig 14
Visual comparison of the segmentation results of the proposed method with alternative brain MR image segmentation softwares.

Table 7 shows the segmentation accuracy of the evaluated methods using two similarity metrics. Both the mean and standard deviation of the evaluated metrics are considered for all three brain regions, i.e., WM, GM and CSF. These similarity metrics are the Jaccard index [46] and the Dice coefficient [47], which are frequently used when the ground truth of the regions of interest is available. These similarity metrics are defined as:

J(S,G)=|SG||SG|,D(S,G)=2|SG||S|+|G|
(45)

where S is the segmented region and G its respective ground truth.

Table 7
Segmentation accuracy of WM, GM and CSF regions for the proposed method and the evaluated brain segmentation softwares.

Table 7 shows that the proposed method yields the best segmentation accuracy using both similarity measures for all three brain regions, i.e., WM, GM and CSF. For the GM region, if we consider the mean error (standard deviation) then the Dice coefficient computed using SPM is 0.95, which is the same as the proposed method. However, SPM yields a Jaccard index of 0.91, which is 0.01 more than the Jaccard index computed by the proposed method.

Conclusion

This paper proposes a new region-based active contour method for image segmentation and bias correction by using an energy functional based on both local and global fitted images. In order to minimize that energy functional, the square image fitted difference is formulated by using The energy functionalboth local and global fitted differences. In the gradient descent solution, both the local and global image differences are replaced by local and global signed pressure force (SPF) functions. Finally, a Gaussian kernel is applied to regularize the curve at each step and avoid the computationally expensive re-initialization.

The main contribution of this paper is the formulation of a new energy functional from the LIF method [30] and the modification of the attained gradient descent solution with new SPF functions based on local and global fitted images to make the solution more stable. Qualitative and quantitative analysis show that the proposed method yields significantly better segmentation results and correction of homogeneous regions than alternative state-of-the-art methods. MR images have been used as a practical test bench.

One of the drawbacks of a local fitted region-based active contour method is its high time complexity. In future work, we aim to formulate a new region-based active contour method by modifying the proposed energy functional in a way to reduce time complexity. In order to do that, we plan to integrate a phase-shift approach similar to the one proposed in [48].

Appendix

A. Derivation of the gradient descent flow of the two-phase model In (Eq 25), the variation η is added to the level-set function ϕ such that ϕ=ϕ˜+ϵη. Keeping c1, c2, m1, m2 and b(x) fixed, differentiating with respect to ϕ and letting ϵ→ 0, we have:

ELGFIφ=limϵ0ddϵ(12Ω(Ib(c1Hϵ(ϕ˜)+c2(1Hϵ(ϕ˜))))(I(m1Hϵ(ϕ˜)+m2(1Hϵ(ϕ˜))))dx)=12limϵ0(Ω[(Ib(c1Hϵ(ϕ˜)+c2(1Hϵ(ϕ˜))))(m1m2)b(I(m1Hϵ(ϕ˜)+m2(1Hϵ(ϕ˜))))(c1c2)]δϵ(ϕ˜)ηdx)=12limϵ0(Ω[(Ib(c1Hϵ(ϕ)+c2(1Hϵ(ϕ))))(m1m2)b(I(m1Hϵ(ϕ)+m2(1Hϵ(ϕ))))(c1c2)]δϵ(ϕ)ηdx)

The following Euler Lagrange equation is obtained:

[(Ib(c1Hϵ(ϕ)+c2(1Hϵ(ϕ))))(m1m2)+b(I(m1Hϵ(ϕ)+m2(1Hϵ(ϕ))))(c1c2)]δϵ(ϕ)=0

By applying steepest gradient descent [38], the final gradient descent flow is obtained:

ϕt=[(Ib(c1Hϵ(ϕ)+c2(1Hϵ(ϕ))))(m1m2)+b(I(m1Hϵ(ϕ)+m2(1Hϵ(ϕ))))(c1c2)]δϵ(ϕ)=((IIbLFI)(m1m2)+b(IIGFI)(c1c2))δϵ(ϕ)

B. Derivation of the gradient descent flow of the four-phase model By using the definitions of Eqs (33) and (34) in (Eq 25), and adding the variations η1 and η2 to the level set functions ϕ1 and ϕ2, respectively, such that ϕ1˜=ϕ1+ϵη1 and ϕ2˜=ϕ2+ϵη2. Keeping c1, c2, c3, c4, m1, m2, m3, m4 and ϕ2 fixed, differentiating with respect to ϕ1and letting ϵ→ 0, we have:

ELGFIϕ=limϵ0ddϵ(12Ω(Ib(c1Hϵ(ϕ1˜)Hϵ(ϕ2˜)+c2Hϵ(ϕ1˜)(1Hϵ(ϕ2˜))+c3(1Hϵ(ϕ1˜))Hϵ(ϕ2˜)+c4(1Hϵ(ϕ1˜))(1Hϵ(ϕ2˜))))(I(m1Hϵ(ϕ1˜)Hϵ(ϕ2˜)+m2Hϵ(ϕ1˜)(1Hϵ(ϕ2˜))+m3(1Hϵ(ϕ1˜))Hϵ(ϕ2˜)+m4(1Hϵ(ϕ1˜))(1Hϵ(ϕ2˜))))dx)=12limϵ0(Ωb(I(m1Hϵ(ϕ1˜)Hϵ(ϕ2˜)+m2Hϵ(ϕ1˜)(1Hϵ(ϕ2˜))+m3(1Hϵ(ϕ1˜))Hϵ(ϕ2˜)+m4(1Hϵ(ϕ1˜))(1Hϵ(ϕ2˜))))((c1c3)Hϵ(ϕ2˜)+(c2c4)(1Hϵ(ϕ2˜)))(Ib(c1Hϵ(ϕ1˜)Hϵ(ϕ2˜)+c2Hϵ(ϕ1˜)(1Hϵ(ϕ2˜))+c3(1Hϵ(ϕ1˜))Hϵ(ϕ2˜)+c4(1Hϵ(ϕ1˜))(1Hϵ(ϕ2˜))))((m1m3)Hϵ(ϕ2˜)+(m2m4)(1Hϵ(ϕ2˜)))δϵ(ϕ1˜)η1dx)=12limϵ0(Ωb(I(m1Hϵ(ϕ1)Hϵ(ϕ2)+m2Hϵ(ϕ1)(1Hϵ(ϕ2))+m3(1Hϵ(ϕ1))Hϵ(ϕ2)+m4(1Hϵ(ϕ1))(1Hϵ(ϕ2))))((c1c3)Hϵ(ϕ2)+(c2c4)(1Hϵ(ϕ2)))(Ib(c1Hϵ(ϕ1)Hϵ(ϕ2)+c2Hϵ(ϕ1)(1Hϵ(ϕ2))+c3(1Hϵ(ϕ1))Hϵ(ϕ2)+c4(1Hϵ(ϕ1))(1Hϵ(ϕ2))))((m1m3)Hϵ(ϕ2)+(m2m4)(1Hϵ(ϕ2)))δϵ(ϕ1)η1dx)

The following Euler Lagrange equation is obtained:

[b(I(m1Hϵ(ϕ1)Hϵ(ϕ2)+m2Hϵ(ϕ1)(1Hϵ(ϕ2))+m3(1Hϵ(ϕ1))Hϵ(ϕ2)+m4(1Hϵ(ϕ1))(1Hϵ(ϕ2))))((c1c3)Hϵ(ϕ2)+(c2c4)(1Hϵ(ϕ2)))+(Ib(c1Hϵ(ϕ1)Hϵ(ϕ2)+c2Hϵ(ϕ1)(1Hϵ(ϕ2))+c3(1Hϵ(ϕ1))Hϵ(ϕ2)+c4(1Hϵ(ϕ1))(1Hϵ(ϕ2))))((m1m3)Hϵ(ϕ2)+(m2m4)(1Hϵ(ϕ2))]δϵ(ϕ1)=0

By using the steepest gradient descent method [38], the final gradient descent flow obtained for ϕ1 is:

ϕ1t=[b(I(m1Hϵ(ϕ1)Hϵ(ϕ2)+m2Hϵ(ϕ1)(1Hϵ(ϕ2))+m3(1Hϵ(ϕ1))Hϵ(ϕ2)+m4(1Hϵ(ϕ1))(1Hϵ(ϕ2))))((c1c3)Hϵ(ϕ2)+(c2c4)(1Hϵ(ϕ2)))+(Ib(c1Hϵ(ϕ1)Hϵ(ϕ2)+c2Hϵ(ϕ1)(1Hϵ(ϕ2))+c3(1Hϵ(ϕ1))Hϵ(ϕ2)+c4(1Hϵ(ϕ1))(1Hϵ(ϕ2))))((m1m3)Hϵ(ϕ2)+(m2m4)(1Hϵ(ϕ2))]δϵ(ϕ1)=[b(IIGFI)((c1c3)Hϵ(ϕ2)+(c2c4)(1Hϵ(ϕ2)))+(IIbLFI)((m1m3)Hϵ(ϕ2)+(m2m4)(1Hϵ(ϕ2))]δϵ(ϕ1)

Similarly, keeping c1, c2, c3, c4, m1, m2, m3, m4and ϕ1fixed, differentiating with respect to ϕ2and by the steepest gradient descent method [38], the following gradient descent flow for ϕ2 is obtained:

ϕ2t=[b(IIGFI)((c1c2)Hϵ(ϕ1)+(c3c4)(1Hϵ(ϕ1)))+(IIbLFI)((m1m2)Hϵ(ϕ1)+(m3m4)(1Hϵ(ϕ1))]δϵ(ϕ2)

Supporting information

S1 Dataset

Contains synthetic and real brain MR images used in Figs Figs1,1, ,4,4, ,5,5, ,6,6, ,7,7, ,88 and and99.

(RAR)

S2 Dataset

Contains .mat files of brain masks used for image segmentation.

(RAR)

S1 Supporting Information

Contains MATLAB code of the two-phase active contours formulation.

(RAR)

S2 Supporting Information

Contains MATLAB code of the four-phase active contours formulation.

(RAR)

Acknowledgments

This work is supported by the research project DPI2016-77415-R and the predoctoral grant FI-DGR-(2014-2016) from the Agency of Management of University and Research Grants (AGAUR), Catalunya, Spain.

Funding Statement

This work is supported by the research project DPI2016-77415-R and the predoctoral grant FI-DGR-(2014-2016) from the Agency of Management of University and Research Grants (AGAUR), Catalunya, Spain. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

Data Availability

Data Availability

We have uploaded the real brain MR images to the Figshare public repository, which can be accessed from: https://figshare.com/articles/Brain_MRI_Dataset_MINC_files_mnc_/4764853 Synthetic images are within the paper and can be accessed in Supporting Information section.

References

1. Elnakib A, Gimel’farb G, Suri JS, El-Baz A. Medical Image Segmentation: A Brief Survey. vol. 1; 2011. p. 235–280. Available at: http://link.springer.com/10.1007/978-1-4419-8195-0 doi: 10.1007/978-1-4419-8204-9_1
2. Vovk U, Pernus F, Likar B. A Review of Methods for Correction of Intensity Inhomogeneity in MRI. IEEE Transactions on Medical Imaging. 2007;26(3):405–421. doi: 10.1109/TMI.2006.891486 [PubMed]
3. Lewis EB, Fox NC. Correction of differential intensity inhomogeneity in longitudinal MR images. NeuroImage. 2004;23(1):75–83. doi: 10.1016/j.neuroimage.2004.04.030 [PubMed]
4. Studholme C, Cardenas V, Song E, Ezekiel F, Maudsley A, Weiner M. Accurate Template-Based Correction of Brain MRI Intensity Distortion with Application to Dementia and Aging. IEEE Transactions on Medical Imaging. 2004;23(1):99–110. doi: 10.1109/TMI.2003.820029 [PMC free article] [PubMed]
5. Meyer CR, Bland PH, Pipe J. Retrospective correction of intensity inhomogeneities in MRI. IEEE Transactions on Medical Imaging. 1995;14(1):36–41. doi: 10.1109/42.370400 [PubMed]
6. Vokurka EA, Thacker NA, Jackson A. A fast model independent method for automatic correction of intensity nonuniformity in MRI data. Journal of Magnetic Resonance Imaging. 1999;10(4):550–562. doi: 10.1002/(SICI)1522-2586(199910)10:4%3C550::AID-JMRI8%3E3.3.CO;2-H [PubMed]
7. Vovk U, Pernus F, Likar B. MRI intensity inhomogeneity correction by combining intensity and spatial information. Physics in Medicine and Biology. 2004;49(17):4119–4133. doi: 10.1088/0031-9155/49/17/020 [PubMed]
8. Vovk U, Pernus F, Likar B. Intensity inhomogeneity correction of multispectral MR images. NeuroImage. 2006;32(1):54–61. doi: 10.1016/j.neuroimage.2006.03.020 [PubMed]
9. Li C, Huang R, Ding Z, Gatenby C, Metaxas D, Gore J. A variational level set approach to segmentation and bias correction of images with intensity inhomogeneity In: Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics). vol. 5242 LNCS; 2008. p. 1083–1091. doi: 10.1007/978-3-540-85990-1_130 [PMC free article] [PubMed]
10. Li C, Huang R, Ding Z, Gatenby JC, Metaxas DN, Gore JC. A level set method for image segmentation in the presence of intensity inhomogeneities with application to MRI. IEEE Transactions on Image Processing. 2011;20(7):2007–2016. doi: 10.1109/TIP.2011.2146190 [PubMed]
11. Zhang K, Liu Q, Song H, Li X. A Variational Approach to Simultaneous Image Segmentation and Bias Correction. IEEE Transactions on Cybernetics. 2015;45(8):1426–1437. doi: 10.1109/TCYB.2014.2352343 [PubMed]
12. Zhang K, Zhang L, Lam K, Zhang D. A Level Set Approach to Image Segmentation With Intensity Inhomogeneity. IEEE Transaction on Cybernetics. 2016;46(2):546–557. doi: 10.1109/TCYB.2015.2409119 [PubMed]
13. Li C, Gatenby C, Wang L, Gore JC. A robust parametric method for bias field estimation and segmentation of MR images. In: 2009 IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops, CVPR Workshops; 2009. p. 218–223.
14. Li C, Xu C, Anderson AW, Gore JC. MRI tissue classification and bias field estimation based on coherent local intensity clustering: A unified energy minimization framework In: Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics). vol. 5636 LNCS; 2009. p. 288–299. doi: 10.1007/978-3-642-02498-6_24 [PubMed]
15. Huang C, Zeng L. An Active Contour Model for the Segmentation of Images with Intensity Inhomogeneities and Bias Field Estimation. PLoS ONE. 2015;10(4):e0120399 doi: 10.1371/journal.pone.0120399 [PMC free article] [PubMed]
16. Li C, Gore JC, Davatzikos C. Multiplicative intrinsic component optimization (MICO) for MRI bias field estimation and tissue segmentation. Magnetic Resonance Imaging. 2014;32(7):913–923. doi: 10.1016/j.mri.2014.03.010 [PMC free article] [PubMed]
17. Ivanovska T, Laqua R, Wang L, Schenk A, Yoon JH, Hegenscheid K, Völzke H, Liebscher V. An efficient level set method for simultaneous intensity inhomogeneity correction and segmentation of MR images. Computerized Medical Imaging and Graphics. 2016;48:9–20. doi: 10.1016/j.compmedimag.2015.11.005 [PubMed]
18. Kahali S, Adhikari SK, Sing JK. On estimation of bias field in MRI images: polynomial vs Gaussian surface fitting method. Journal of Chemometrics. 2016;30(10):602–620. doi: 10.1002/cem.2825
19. Kass M, Witkin A, Terzopoulos D. Snakes: Active contour models. International Journal of Computer Vision. 1988;1(4):321–331. doi: 10.1007/BF00133570
20. Caselles V, Kimmel R, Sapiro G. Geodesic Active Contours. International Journal of Computer Vision. 1997;22(1):61–79. doi: 10.1109/ICCV.1995.466871
21. Chunming Li, Chenyang Xu, Changfeng Gui, Fox MD. Level Set Evolution without Re-Initialization: A New Variational Formulation. In: 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05). vol. 1; 2005. p. 430–436. Available at: http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=1467299
22. Mumford D, Shah J. Optimal approximations by piecewise smooth functions and associated variational problems. Communications on Pure and Applied Mathematics. 1989;42(5):577–685. doi: 10.1002/cpa.3160420503
23. Chan TF, Vese LA. Active contours without edges. IEEE Transactions on Image Processing. 2001;10(2):266–277. doi: 10.1109/83.902291 [PubMed]
24. Vese LA, Chan TF. A multiphase level set framework for image segmentation using the Mumford and Shah model. International Journal of Computer Vision. 2002;50(3):271–293.
25. Zhang K, Zhang L, Song H, Zhou W. Active contours with selective local or global segmentation: A new formulation and level set method. Image and Vision Computing. 2010;28(4):668–676. doi: 10.1016/j.imavis.2009.10.009
26. Akram F, Kim J, Lee C, Choi KN. Segmentation of Regions of Interest Using Active Contours with SPF Function. Computational and Mathematical Methods in Medicine. 2015;2015:710326:1–710326:14. doi: 10.1155/2015/710326 [PMC free article] [PubMed]
27. Li C, Kao CY, Gore JC, Ding Z. Implicit active contours driven by local binary fitting energy. In: Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’07). 2007. p.1–7.
28. Li C, Kao C, Gore JC, Ding Z. Minimization of Region-Scalable Fitting Energy for Image Segmentation. IEEE Transactions on Image Processing. 2008;17(10):1940–1949. doi: 10.1109/TIP.2008.2002304 [PMC free article] [PubMed]
29. Wang L, He L, Mishra A, Li C. Active contours driven by local Gaussian distribution fitting energy. Signal Processing. 2009;89(12):2435–2447. doi: 10.1371/journal.pone.0143105 [PubMed]
30. Zhang K, Song H, Zhang L. Active contours driven by local image fitting energy. Pattern Recognition. 2010;43(4):1199–1206. doi: 10.1016/j.compmedimag.2009.04.010 [PubMed]
31. Akram F, Kim J, Lim HU, Choi KN. Segmentation of Intensity Inhomogeneous Brain MR Images Using Active Contours. Computational and Mathematical Methods in Medicine. 2014;2014:194614:1–194614:14. doi: 10.1155/2014/194614 [PMC free article] [PubMed]
32. Peng Y, Liu F, Liu S. Active contours driven by normalized local image fitting energy. Concurrency Computation Practice and Experience. 2014;26(5):1200–1214. doi: 10.1016/j.compmedimag.2009.04.010 [PubMed]
33. Xie X, Zhang A, Wang C. Local average fitting active contour model with thresholding for noisy image segmentation. Optik. 2015;126(9-10):1021–1026. doi: 10.1016/j.ijleo.2015.02.073
34. Wang XF, Huang DS, Xu H. An efficient local Chan-Vese model for image segmentation. Pattern Recognition. 2010;43(3):603–618. doi: 10.1016/j.patcog.2009.08.002
35. Wang L, Li C, Sun Q, Xia D, Kao CY. Active contours driven by local and global intensity fitting energy with application to brain MR image segmentation. Computerized Medical Imaging and Graphics. 2009;33(7):520–531. doi: 10.1016/j.compmedimag.2009.04.010 [PubMed]
36. Li X, Jiang D, Shi Y, Li W. Segmentation of MR image using local and global region based geodesic model. Biomedical Engineering Online. 2015;14(8):1–16. doi: 10.1186/1475-925X-14-8 [PMC free article] [PubMed]
37. Brain web: Anatomical models of 20 normal brains. Accessed: April 24, 2015. Available at: http://brainweb.bic.mni.mcgill.ca/brainweb/anatomic_normal_20.html
38. Aubert G, Kornprobst P. Mathematical Problems in Image Processing: Partial Differential Equations and the Calculus of Variations. 2nd ed Springer Publishing Company, Incorporated; 2010.
39. Balafar MA, Ramli AR, Saripan MI, Mashohor S. Review of brain MRI image segmentation methods; 2010. Artificial Intelligence Review. 2010;33(3):261–274.
40. Ashburner J, Friston KJ. Unified segmentation. NeuroImage. 2005;26(3):839–851. doi: 10.1016/j.neuroimage.2005.02.018 [PubMed]
41. Cuadra MB, Cammoun L, Butz T, Cuisenaire O, Thiran JP. Comparison and validation of tissue modelization and statistical classification methods in T1-weighted MR brain images. IEEE Transactions on Medical Imaging. 2005;24(12):1548–1565. doi: 10.1109/TMI.2005.857652 [PubMed]
42. Smith SM, Jenkinson M, Woolrich MW, Beckmann CF, Behrens TEJ, Johansen-Berg H, et al. Advances in functional and structural MR image analysis and implementation as FSL. Neuroimage. 2004;23(SUPPL. 1):S208–S219. doi: 10.1016/j.neuroimage.2004.07.051 [PubMed]
43. Zhang Y, Brady M, Smith S. Segmentation of brain MR images through a hidden Markov random field model and the expectation-maximization algorithm. IEEE Transactions on Medical Imaging. 2001;20(1):45–57. doi: 10.1109/42.906424 [PubMed]
44. Shattuck DW, Leahy RM. Brainsuite: An automated cortical surface identification tool. Medical Image Analysis. 2002;6(2):129–142. doi: 10.1007/978-3-540-40899-4_6 [PubMed]
45. Kasiri K, Javad DM, Kazemi K, Sadegh HM, Kafshgari S. Comparison evaluation of three brain MRI segmentation methods in software tools. 17th Iranian Conference of Biomedical Engineering (ICBME). 2010;(November):1–4.
46. Jaccard P. The distribution of the flora in the alphine zone. The New Phytologist. 1912;XI(2):37–50.
47. Dice LR. Measures of the Amount of Ecologic Association Between Species. Ecology. 1945;26(3):297–302. doi: 10.2307/1932409
48. Lee SH, Seo JK. Level set-based bimodal segmentation with stationary global minimum. IEEE Transactions on Image Processing. 2006;15(9):2843–2852. [PubMed]

Articles from PLoS ONE are provided here courtesy of Public Library of Science