# Local- and Global-Statistics-Based Active Contour Model for Image Segmentation

Authors: Boying Wu; Yunyun Yang
Journal: Mathematical Problems in Engineering
 (2012)

---

## Abstract

This paper presents a local- and global-statistics-based active contour model for image segmentation by applying the globally convex segmentation method. We first propose a convex energy functional with a local-Gaussian-distribution-fitting term with spatially varying means and variances and an auxiliary global-intensity-fitting term. A weight function that varies dynamically with the location of the image is applied to adjust the weight of the global-intensity-fitting term dynamically. The weighted total variation norm is incorporated into the energy functional to detect boundaries easily. The split Bregman method is then applied to minimize the proposed energy functional more efficiently. Our model has been applied to synthetic and real images with promising results. With the local-Gaussian-distribution-fitting term, our model can also handle some texture images. Comparisons with other models show the advantages of our model.


---

## Body

## 1. Introduction

Active contour models have been widely used in image segmentation [1–6] with promising results. Kass et al. proposed the first active contour model in [1]. Compared with the classical image segmentation methods, active contour models have several desirable advantages. For example, they can provide smooth and closed contours as segmentation results and achieve subpixel accuracy of object boundaries [6]. Generally speaking, there are two main kinds of active contour models: edge-based models [1, 3, 6–9] and region-based models [2, 10–14].Edge-based models use the image gradient information to stop the evolving contours on the object boundaries. Typical edge-based active contour models [3, 6] have an edge-based stopping term to control the motion of the contour. These models are very sensitive to noise and the initial curve. These drawbacks limit their applications in practice. Region-based models use the region information of the image instead of the the edge information to segment different regions. Region-based models do not utilize the image gradient and therefore have better performance for images with weak object boundaries. Besides, they are less sensitive to initial contours. Two well-known region-based active contour models are the piecewise constant (PC) models [2, 14]. In [2], Vese and Chan assumed that image intensities are statistically homogeneous in each region and proposed the Chan-Vese (CV) model. Then they extended the CV model to a multiphase level set formulation in [14]. The PC models and other popular region-based active contour models [10–12] rely on intensity homogeneity and thus always fail to segment images with intensity inhomogeneity.Intensity inhomogeneity always exists in the real world. To overcome the disadvantages of the PC models and deal with images with intensity inhomogeneity, two similar region-based models for more general images are proposed independently by Vese and Chan [14] and Tsai et al. [13]. These models are widely known as piecewise smooth (PS) models. The PS models have exhibited certain capability of handling intensity inhomogeneity. However, the PS models are computationally expensive.Recently, Li et al. proposed a region-scalable-fitting (RSF) model [15, 16] to overcome the difficulty caused by intensity inhomogeneity. The authors use the local intensity information to cope with inhomogeneous images. Wang et al. [17] proposed an active contour model driven by local-Gaussian-distribution-fitting (LGDF) energy model to use more complete statistical characteristics of local intensities for more accurate segmentation. Many other active models [18, 19] are also proposed to use more local information for more accurate image segmentation. However, these models are to some extent sensitive to initialization, which limits their practical applications. Then Wang et al. [20] proposed the local- and global-intensity-fitting (LGIF) energy model to combine the advantages of the CV model and the RSF model.Yang et al. [21] applied the split Bregman method [22–25] to the RSF model to deal with images with inhomogeneity efficiently. The efficiency of the split Bregman method has been demonstrated in [21, 25].In this paper, a local- and global-statistics-based active contour model is presented for image segmentation. We first define a new energy functional taking both the local and global information into consideration. The local information is described by Gaussian distribution with different means and variances. We then apply the globally convex segmentation method [26] to make the proposed energy functional convex. The new convex energy functional is then modified by replacing the standard total variation (TV) norm with the weighted TV norm to detect boundaries more easily. Different from [20], our model can balance the weights between the local- and global-fitting terms dynamically by using a weight function that varies with the location of the image. We then use the split Bregman method to deal with the minimization problem in a more efficient way.The remainder of this paper is organized as follows. Section2 reviews some related models and their limitations. We introduce the main work in Section 3. Our model is proposed in Section 3.1. We explain how to choose the weight function in Section 3.2, while the split Bregman method is applied to our model in Section 3.3. The experimental results and some discussion of our model are given in Section 4. In Section 5 we give a brief conclusion.


## 2. Background

### 2.1. The CV Model

Chan and Vese [2] proposed the CV model without using the image gradient to the Mumford-Shah problem [27] for image segmentation. Let Ω⊂ℜ2 be the image domain, and I:Ω→ℜ be a given gray level image. Their idea is to find a contour C that segments the given image I and two constants c1 and c2 that approximate the image intensities outside and inside the contour C. The energy they proposed to minimize is as follows:(2.1)FCV(C,c1,c2)=λ1∫outside(C)|I(x)-c1|2dx+λ2∫inside(C)|I(x)-c2|2dx+ν|C|,
where λ1, λ2, and ν are positive constants. outside(C) and inside(C) represent the regions outside and inside the contour C, respectively. One of the most attractive properties of the CV model is that it is much less sensitive to the initialization. However, the optimal constants c1 and c2 will not be accurate if the intensities outside and inside the contour C are not homogeneous. Local intensity information which is crucial for inhomogeneous image segmentation is not considered in this model. This is the reason why the CV model cannot handle image inhomogeneity. Similarly, more general piecewise constant models in a multiphase level set framework [11, 14] are still not suitable for images with intensity inhomogeneity.


### 2.2. The LGDF Model

Li et al. [15, 16] proposed the RSF model to segment images with intensity inhomogeneity by using the local intensity information. Then Wang et al. [17] proposed the LGDF model by considering more complete statistical characteristics of local intensities. In the LGDF model, the local image intensities are described by Gaussian distributions with different means and variances. The Gaussian-distribution-fitting energy they defined is:(2.2)ELGDF(ϕ,u1,u2,σ12,σ22)=∫ExLGDF(ϕ,u1(x),u2(x),σ1(x)2,σ2(x)2)dx,
where(2.3)ExLGDF(ϕ,u1(x),u2(x),σ1(x)2,σ2(x)2)=-∑i=12∫ω(x-y)log⁡pi,x(I(y))Mi(ϕ(y))dy,(2.4)pi,x(I(y))=12πσi(x)exp⁡(-(ui(x)-I(y))22σi(x)2),i=1,2,
where ϕ is the level set function, ui(x), and σi(x) are local intensity means and standard deviations, respectively. M1(ϕ)=H(ϕ) and M2(ϕ)=1-H(ϕ). H is the Heaviside function. ω(x-y) is a nonnegative weighting function.By adding the arc length termℒ(ϕ) [2, 14] and the level set regularization term 𝒫(ϕ) [9], the energy functional they proposed is(2.5)FLGDF(ϕ,u1,u2,σ12,σ22)=ELGDF(ϕ,u1,u2,σ12,σ22)+νL(ϕ)+μP(ϕ),L(ϕ)=∫|∇H(ϕ(x))|dx,P(ϕ)=∫12(|∇ϕ(x)|-1)2dx,
where ν and μ are two positive constants.The LGDF model can distinguish regions with similar intensity means but different variances by using the local-Gaussian-distribution-fitting energy. However, this model also has the disadvantage just as the RSF model that it may introduce many local minimums which has been deeply explained in [20]. Consequently, the result is more dependent on the initialization of the contour.


## 2.1. The CV Model

Chan and Vese [2] proposed the CV model without using the image gradient to the Mumford-Shah problem [27] for image segmentation. Let Ω⊂ℜ2 be the image domain, and I:Ω→ℜ be a given gray level image. Their idea is to find a contour C that segments the given image I and two constants c1 and c2 that approximate the image intensities outside and inside the contour C. The energy they proposed to minimize is as follows:(2.1)FCV(C,c1,c2)=λ1∫outside(C)|I(x)-c1|2dx+λ2∫inside(C)|I(x)-c2|2dx+ν|C|,
where λ1, λ2, and ν are positive constants. outside(C) and inside(C) represent the regions outside and inside the contour C, respectively. One of the most attractive properties of the CV model is that it is much less sensitive to the initialization. However, the optimal constants c1 and c2 will not be accurate if the intensities outside and inside the contour C are not homogeneous. Local intensity information which is crucial for inhomogeneous image segmentation is not considered in this model. This is the reason why the CV model cannot handle image inhomogeneity. Similarly, more general piecewise constant models in a multiphase level set framework [11, 14] are still not suitable for images with intensity inhomogeneity.


## 2.2. The LGDF Model

Li et al. [15, 16] proposed the RSF model to segment images with intensity inhomogeneity by using the local intensity information. Then Wang et al. [17] proposed the LGDF model by considering more complete statistical characteristics of local intensities. In the LGDF model, the local image intensities are described by Gaussian distributions with different means and variances. The Gaussian-distribution-fitting energy they defined is:(2.2)ELGDF(ϕ,u1,u2,σ12,σ22)=∫ExLGDF(ϕ,u1(x),u2(x),σ1(x)2,σ2(x)2)dx,
where(2.3)ExLGDF(ϕ,u1(x),u2(x),σ1(x)2,σ2(x)2)=-∑i=12∫ω(x-y)log⁡pi,x(I(y))Mi(ϕ(y))dy,(2.4)pi,x(I(y))=12πσi(x)exp⁡(-(ui(x)-I(y))22σi(x)2),i=1,2,
where ϕ is the level set function, ui(x), and σi(x) are local intensity means and standard deviations, respectively. M1(ϕ)=H(ϕ) and M2(ϕ)=1-H(ϕ). H is the Heaviside function. ω(x-y) is a nonnegative weighting function.By adding the arc length termℒ(ϕ) [2, 14] and the level set regularization term 𝒫(ϕ) [9], the energy functional they proposed is(2.5)FLGDF(ϕ,u1,u2,σ12,σ22)=ELGDF(ϕ,u1,u2,σ12,σ22)+νL(ϕ)+μP(ϕ),L(ϕ)=∫|∇H(ϕ(x))|dx,P(ϕ)=∫12(|∇ϕ(x)|-1)2dx,
where ν and μ are two positive constants.The LGDF model can distinguish regions with similar intensity means but different variances by using the local-Gaussian-distribution-fitting energy. However, this model also has the disadvantage just as the RSF model that it may introduce many local minimums which has been deeply explained in [20]. Consequently, the result is more dependent on the initialization of the contour.


## 3. The Main Work

### 3.1. Our Model

Our model first combines the advantages of the CV model and theLGDF model to propose a new energy functional. Then we use the globally convex segmentation method [26] to give a convex energy functional.In Section2.1, the first two terms of the CV model [2] are called the global intensity fitting (GIF) energy:(3.1)EGIF(ϕ,c1,c2)=λ1∫|I(x)-c1|2H(ϕ(x))dx+λ2∫|I(x)-c2|2(1-H(ϕ(x)))dx.The local-Gaussian-distribution-fitting (LGDF) energy [17] is defined as:(3.2)ELGDF(ϕ,u1,u2,σ12,σ22)=-∑i=12λi∫(∫ω(x-y)log⁡pi,x(I(y))Mi(ϕ(y))dy)dx,
where ω(x-y) is chosen as the Gaussian kernel Kσ(x-y) in this paper. pi,x(I(y))(i=1,2) is defined in (2.4).Now we define the global and local-Gaussian-distribution-fitting (GLGDF) energy as follows:(3.3)EGLGDF(ϕ,u1,u2,σ12,σ22,c1,c2)=ELGDF(ϕ,u1,u2,σ12,σ22)+ωEGIF(ϕ,c1,c2),
where ω (0≤ω≤1) is the weight of the global fitting term.Then the arc length termℒ(ϕ)=∫|∇H(ϕ(x))|dx is also needed to regularize the contour C. The energy functional is now as follows:(3.4)FGLGDF(ϕ,u1,u2,σ12,σ22,c1,c2)=EGLGDF(ϕ,u1,u2,σ12,σ22,c1,c2)+νL(ϕ).In practice, the Heaviside functionH is approximated by a smooth function Hϵ defined by:(3.5)Hϵ(z)=12[1+2πarctan(zϵ)],
where ϵ is a positive constant.The energy functional is then approximated by:(3.6)FϵGLGDF(ϕ,u1,u2,σ12,σ22,c1,c2)=EϵGLGDF(ϕ,u1,u2,σ12,σ22,c1,c2)+νLϵ(ϕ).By applying the standard gradient descent method,  the optimal meansu1,u2, variances σ12,σ22, constants c1,c2, and level set function ϕ that minimize the energy functional (3.6) are obtained by(3.7)ui(x)=∫Kσ(x-y)Miϵ(ϕ(y))I(y)dy∫Kσ(x-y)Miϵ(ϕ(y))dy,i=1,2,σi(x)2=∫Kσ(x-y)Miϵ(ϕ(y))(ui(x)-I(y))2dy∫Kσ(x-y)Miϵ(ϕ(y))dy,i=1,2,ci=∫I(y)Miϵ(ϕ(y))dy∫Miϵ(ϕ(y))dy,i=1,2,∂ϕ∂t=δϵ(ϕ)(F1+F2)+νδϵ(ϕ)div⁡(∇ϕ|∇ϕ|),
where δϵ is the derivative of Hϵ:  δϵ(z)=ϵ/(π(ϵ2+z2)). F1 and F2 are defined as follows:(3.8)F1(x)=-λ1d1(x)+λ2d2(x),F2(x)=ω(-λ1|I(x)-c1|2+λ2|I(x)-c2|2),
where di(i=1,2) is defined as:(3.9)di(x)=∫Kσ(y-x)[log⁡(2πσi(y))+(I(x)-ui(y))22σi(y)2]dy,i=1,2.Now we consider the gradient flow equation in (3.7). We take ν=1 without loss of generality. Then the gradient flow equation in (3.7) becomes(3.10)∂ϕ∂t=δϵ(ϕ)((F1+F2)+div⁡(∇ϕ|∇ϕ|)).We then apply the globally convex segmentation idea of Chan et al. [26], the stationary solution of (3.10) coincides with the stationary solution of(3.11)∂ϕ∂t=((F1+F2)+div⁡(∇ϕ|∇ϕ|)).
We now propose a new energy functional as follows:(3.12)E(ϕ)=∫|∇(ϕ(x))|dx+∫ϕ(x)r(x)dx,
where r(x)=-(F1(x)+F2(x)).It can be clearly seen that the simplified flow (3.11) is just the gradient descent flow of the new proposed energy functional (3.12). Thus the minimization problem we want to solve is(3.13)min⁡a0≤ϕ≤b0E(ϕ)=min⁡(∫|∇(ϕ(x))|dx+∫ϕ(x)r(x)dx).Here the solution is restricted to lie in a finite intervala0≤ϕ≤b0 to guarantee the global minimum.The segmented region can be found by thresholding the level set function for someα∈(a0,b0) if the optimal ϕ is found:  Ω1={x:ϕ(x)>α}. In this paper the thresholding value α is chosen as α=(a0+b0)/2.We then replace the standard total variation (TV) normTV(ϕ)=∫|∇ϕ(x)|dx=|∇ϕ|1 with the weighted TV norm TVg(ϕ)=∫g(|∇I(x)|)|∇ϕ(x)|dx=|∇ϕ|g by adding an edge detector function g which is defined as [28]:  g(ξ)=1/(1+β|ξ|2). β is a parameter that determines the detail level of the segmentation.Thus the proposed minimization problem becomes(3.14)min⁡a0≤ϕ≤b0E(ϕ)=min⁡a0≤ϕ≤b0(|∇ϕ|g+〈ϕ,r〉),
where 〈ϕ,r〉=∫ϕ(x)r(x)dx.Remark 3.1.
The proposed model is different from the model in our previous paper [29]. The local information in the new proposed model is described with different means and variances, while the model in [29] only considers different means as the local information. There the variances σ12  and  σ22 are both considered to be equal to 0.5. Thus our new proposed model here can distinguish regions with similar intensity means but different variances, for example, our model can handle some texture images while the model in [29] cannot. Besides the energy functionals are also different.


### 3.2. The Choice forω

The parameterω is the weight of the global-intensity-fitting term. When the images are corrupted by severe intensity inhomogeneity, the parameter value ω should be chosen small enough. Otherwise, larger ω should be chosen. In [20], ω is chosen as a constant for a given image. Wang et al. need to choose an appropriate value for ω according to the degree of inhomogeneity.In our paper, we chooseω in a different way as [30]. Instead of a constant value for ω, a weight function that varies dynamically with the location of the image is chosen in this paper. The weight function ω is defined as follows:(3.15)ω=γ⋅average(LCRW)⋅(1-LCRW),
where γ is a fixed parameter and LCRW represents the local contrast ratio of the given image, which is defined as(3.16)LCRW(x)=Vmax⁡-Vmin⁡Vg,
where W denotes the size of the local window, Vmax and Vmin are the maximum and minimum of the intensities within this local window, respectively. Vg represents the intensity level of the image. For gray images, it is usually 255. LCRW(x) varies between 0 and 1. It reflects how rapidly the intensity changes in a local region. It is larger in regions close to boundaries and smaller in smooth regions.In the above weight function (3.15), average(LCRW) is the average value of LCRW over the whole image. It can reflect the overall contrast information of the image. For an image with a strong overall contrast, we should increase the weight of the global term on the whole. (1-LCRW) can adjust the weight of the global term dynamically in all regions, making it larger in regions with low local contrast and smaller in regions with high local contrast. Thus the weight value can vary dynamically with different locations. It’s determined by the intensity of the given image.


### 3.3. Application of the Split Bregman Method to Our Model

The efficiency of the split Bregman method for image segmentation has been demonstrated in [21, 25]. We now apply the split Bregman method to solve the proposed minimization problem (3.14) in a more efficient way. We introduce an auxiliary variable, d⃗←∇ϕ. We add a quadratic penalty function to weakly enforce the resulting equality constraint and get the unconstrained problem as follows:(3.17)(ϕ*,d⃗*)=argmin⁡a0≤ϕ≤b0(|d⃗|g+〈ϕ,r〉+λ2‖d⃗-∇ϕ‖2).We then apply the Bregman iteration to strictly enforce the constraintd⃗=∇ϕ. The optimization problem becomes(3.18)(ϕk+1,d⃗k+1)=argmin⁡a0≤ϕ≤b0(|d⃗|g+〈ϕ,r〉+λ2‖d⃗-∇ϕ-b⃗k‖2),b⃗k+1=b⃗k+∇ϕk+1-d⃗k+1.Whend⃗ is fixed, the Euler-Lagrange equation of the optimization problem (3.18) with respect to ϕ is(3.19)Δϕ=rλ+∇⋅(d⃗-b⃗),whenevera0≤ϕ≤b0.For (3.19), we use the central difference for the Laplace operator and the backward difference for the divergence operator, and the numerical scheme is(3.20)αi,j=di-1,jx-di,jx+di,j-1y-di,jy-(bi-1,jx-bi,jx+bi,j-1y-bi,jy),βi,j=14(ϕi-1,j+ϕi+1,j+ϕi,j-1+ϕi,j+1-rλ+αi,j),ϕi,j=max⁡{min⁡{βi,j,b0},a0}.Whenϕ is fixed, we minimize (3.18) with respect to d⃗ and obtain(3.21)d⃗k+1=shrinkg(b⃗k+∇ϕk+1,1λ)=shrink(b⃗k+∇ϕk+1,gλ),
where(3.22)shrink(x,γ)={x|x|max⁡(|x|-γ,0),x≠0,0,x=0.The algorithm for the proposed minimization problem (3.14) is similar to the algorithm in our previous work [21] except when updating r. Thus we do not give the algorithm in detail here. In this paper r is updated by rk=-(F1k+F2k), where F1k and F2k are updated through (3.8). The means ui(x), variances σi(x)2 and constants ci are updated at every iteration according to (3.7) before the update of the level set function ϕ.


## 3.1. Our Model

Our model first combines the advantages of the CV model and theLGDF model to propose a new energy functional. Then we use the globally convex segmentation method [26] to give a convex energy functional.In Section2.1, the first two terms of the CV model [2] are called the global intensity fitting (GIF) energy:(3.1)EGIF(ϕ,c1,c2)=λ1∫|I(x)-c1|2H(ϕ(x))dx+λ2∫|I(x)-c2|2(1-H(ϕ(x)))dx.The local-Gaussian-distribution-fitting (LGDF) energy [17] is defined as:(3.2)ELGDF(ϕ,u1,u2,σ12,σ22)=-∑i=12λi∫(∫ω(x-y)log⁡pi,x(I(y))Mi(ϕ(y))dy)dx,
where ω(x-y) is chosen as the Gaussian kernel Kσ(x-y) in this paper. pi,x(I(y))(i=1,2) is defined in (2.4).Now we define the global and local-Gaussian-distribution-fitting (GLGDF) energy as follows:(3.3)EGLGDF(ϕ,u1,u2,σ12,σ22,c1,c2)=ELGDF(ϕ,u1,u2,σ12,σ22)+ωEGIF(ϕ,c1,c2),
where ω (0≤ω≤1) is the weight of the global fitting term.Then the arc length termℒ(ϕ)=∫|∇H(ϕ(x))|dx is also needed to regularize the contour C. The energy functional is now as follows:(3.4)FGLGDF(ϕ,u1,u2,σ12,σ22,c1,c2)=EGLGDF(ϕ,u1,u2,σ12,σ22,c1,c2)+νL(ϕ).In practice, the Heaviside functionH is approximated by a smooth function Hϵ defined by:(3.5)Hϵ(z)=12[1+2πarctan(zϵ)],
where ϵ is a positive constant.The energy functional is then approximated by:(3.6)FϵGLGDF(ϕ,u1,u2,σ12,σ22,c1,c2)=EϵGLGDF(ϕ,u1,u2,σ12,σ22,c1,c2)+νLϵ(ϕ).By applying the standard gradient descent method,  the optimal meansu1,u2, variances σ12,σ22, constants c1,c2, and level set function ϕ that minimize the energy functional (3.6) are obtained by(3.7)ui(x)=∫Kσ(x-y)Miϵ(ϕ(y))I(y)dy∫Kσ(x-y)Miϵ(ϕ(y))dy,i=1,2,σi(x)2=∫Kσ(x-y)Miϵ(ϕ(y))(ui(x)-I(y))2dy∫Kσ(x-y)Miϵ(ϕ(y))dy,i=1,2,ci=∫I(y)Miϵ(ϕ(y))dy∫Miϵ(ϕ(y))dy,i=1,2,∂ϕ∂t=δϵ(ϕ)(F1+F2)+νδϵ(ϕ)div⁡(∇ϕ|∇ϕ|),
where δϵ is the derivative of Hϵ:  δϵ(z)=ϵ/(π(ϵ2+z2)). F1 and F2 are defined as follows:(3.8)F1(x)=-λ1d1(x)+λ2d2(x),F2(x)=ω(-λ1|I(x)-c1|2+λ2|I(x)-c2|2),
where di(i=1,2) is defined as:(3.9)di(x)=∫Kσ(y-x)[log⁡(2πσi(y))+(I(x)-ui(y))22σi(y)2]dy,i=1,2.Now we consider the gradient flow equation in (3.7). We take ν=1 without loss of generality. Then the gradient flow equation in (3.7) becomes(3.10)∂ϕ∂t=δϵ(ϕ)((F1+F2)+div⁡(∇ϕ|∇ϕ|)).We then apply the globally convex segmentation idea of Chan et al. [26], the stationary solution of (3.10) coincides with the stationary solution of(3.11)∂ϕ∂t=((F1+F2)+div⁡(∇ϕ|∇ϕ|)).
We now propose a new energy functional as follows:(3.12)E(ϕ)=∫|∇(ϕ(x))|dx+∫ϕ(x)r(x)dx,
where r(x)=-(F1(x)+F2(x)).It can be clearly seen that the simplified flow (3.11) is just the gradient descent flow of the new proposed energy functional (3.12). Thus the minimization problem we want to solve is(3.13)min⁡a0≤ϕ≤b0E(ϕ)=min⁡(∫|∇(ϕ(x))|dx+∫ϕ(x)r(x)dx).Here the solution is restricted to lie in a finite intervala0≤ϕ≤b0 to guarantee the global minimum.The segmented region can be found by thresholding the level set function for someα∈(a0,b0) if the optimal ϕ is found:  Ω1={x:ϕ(x)>α}. In this paper the thresholding value α is chosen as α=(a0+b0)/2.We then replace the standard total variation (TV) normTV(ϕ)=∫|∇ϕ(x)|dx=|∇ϕ|1 with the weighted TV norm TVg(ϕ)=∫g(|∇I(x)|)|∇ϕ(x)|dx=|∇ϕ|g by adding an edge detector function g which is defined as [28]:  g(ξ)=1/(1+β|ξ|2). β is a parameter that determines the detail level of the segmentation.Thus the proposed minimization problem becomes(3.14)min⁡a0≤ϕ≤b0E(ϕ)=min⁡a0≤ϕ≤b0(|∇ϕ|g+〈ϕ,r〉),
where 〈ϕ,r〉=∫ϕ(x)r(x)dx.Remark 3.1.
The proposed model is different from the model in our previous paper [29]. The local information in the new proposed model is described with different means and variances, while the model in [29] only considers different means as the local information. There the variances σ12  and  σ22 are both considered to be equal to 0.5. Thus our new proposed model here can distinguish regions with similar intensity means but different variances, for example, our model can handle some texture images while the model in [29] cannot. Besides the energy functionals are also different.


## 3.2. The Choice forω

The parameterω is the weight of the global-intensity-fitting term. When the images are corrupted by severe intensity inhomogeneity, the parameter value ω should be chosen small enough. Otherwise, larger ω should be chosen. In [20], ω is chosen as a constant for a given image. Wang et al. need to choose an appropriate value for ω according to the degree of inhomogeneity.In our paper, we chooseω in a different way as [30]. Instead of a constant value for ω, a weight function that varies dynamically with the location of the image is chosen in this paper. The weight function ω is defined as follows:(3.15)ω=γ⋅average(LCRW)⋅(1-LCRW),
where γ is a fixed parameter and LCRW represents the local contrast ratio of the given image, which is defined as(3.16)LCRW(x)=Vmax⁡-Vmin⁡Vg,
where W denotes the size of the local window, Vmax and Vmin are the maximum and minimum of the intensities within this local window, respectively. Vg represents the intensity level of the image. For gray images, it is usually 255. LCRW(x) varies between 0 and 1. It reflects how rapidly the intensity changes in a local region. It is larger in regions close to boundaries and smaller in smooth regions.In the above weight function (3.15), average(LCRW) is the average value of LCRW over the whole image. It can reflect the overall contrast information of the image. For an image with a strong overall contrast, we should increase the weight of the global term on the whole. (1-LCRW) can adjust the weight of the global term dynamically in all regions, making it larger in regions with low local contrast and smaller in regions with high local contrast. Thus the weight value can vary dynamically with different locations. It’s determined by the intensity of the given image.


## 3.3. Application of the Split Bregman Method to Our Model

The efficiency of the split Bregman method for image segmentation has been demonstrated in [21, 25]. We now apply the split Bregman method to solve the proposed minimization problem (3.14) in a more efficient way. We introduce an auxiliary variable, d⃗←∇ϕ. We add a quadratic penalty function to weakly enforce the resulting equality constraint and get the unconstrained problem as follows:(3.17)(ϕ*,d⃗*)=argmin⁡a0≤ϕ≤b0(|d⃗|g+〈ϕ,r〉+λ2‖d⃗-∇ϕ‖2).We then apply the Bregman iteration to strictly enforce the constraintd⃗=∇ϕ. The optimization problem becomes(3.18)(ϕk+1,d⃗k+1)=argmin⁡a0≤ϕ≤b0(|d⃗|g+〈ϕ,r〉+λ2‖d⃗-∇ϕ-b⃗k‖2),b⃗k+1=b⃗k+∇ϕk+1-d⃗k+1.Whend⃗ is fixed, the Euler-Lagrange equation of the optimization problem (3.18) with respect to ϕ is(3.19)Δϕ=rλ+∇⋅(d⃗-b⃗),whenevera0≤ϕ≤b0.For (3.19), we use the central difference for the Laplace operator and the backward difference for the divergence operator, and the numerical scheme is(3.20)αi,j=di-1,jx-di,jx+di,j-1y-di,jy-(bi-1,jx-bi,jx+bi,j-1y-bi,jy),βi,j=14(ϕi-1,j+ϕi+1,j+ϕi,j-1+ϕi,j+1-rλ+αi,j),ϕi,j=max⁡{min⁡{βi,j,b0},a0}.Whenϕ is fixed, we minimize (3.18) with respect to d⃗ and obtain(3.21)d⃗k+1=shrinkg(b⃗k+∇ϕk+1,1λ)=shrink(b⃗k+∇ϕk+1,gλ),
where(3.22)shrink(x,γ)={x|x|max⁡(|x|-γ,0),x≠0,0,x=0.The algorithm for the proposed minimization problem (3.14) is similar to the algorithm in our previous work [21] except when updating r. Thus we do not give the algorithm in detail here. In this paper r is updated by rk=-(F1k+F2k), where F1k and F2k are updated through (3.8). The means ui(x), variances σi(x)2 and constants ci are updated at every iteration according to (3.7) before the update of the level set function ϕ.


## 4. Experimental Results

Synthetic and real images have been tested with our model in this section. We compare our model with other models with different images. We also discuss the influences of the parametersβ and γ on the segmentation results. In this paper, the level set function ϕ is simply initialized as a binary step function which takes a constant value b0 inside a region and another constant value a0 outside. The following parameters are used for all images in this paper: a0=-2, b0=2, σ=3.0, ϵ=1, γ=0.1, and λ=0.001. Unless otherwise specified, we use β=100 for gray images and β=1 for color images. The values chosen for the parameters λ1 and λ2 are specified in each figure.


### 4.1. Comparisons with Other Models

Figure1 compares the results for a synthetic image with different methods. In our previous work [21], we have proposed a convex model by applying the split Bregman method to the RSF model. We call it the SBRSF model here. The object and the background of this image have the same intensity means but different variances. Figures 1(a) and 1(b) give the original image and the initial contour. Figures 1(c)–1(f) show the results of the CV model, the RSF model, the SBRSF model, and our model, respectively. It can be seen that our model can get the correct segmentation result while other models fail. This is because that our model considers not only the intensity mean but also the intensity variance. We choose λ1=λ2=1e-5 for this image.Results of a synthetic image with different methods. (a) The original image. (b) The initial contour. (c) The CV model. (d) The RSF model. (e) The SBRSF model. (f) Our model.
(a)(b)(c)(d)(e)(f)In Figure2 we show the results for another synthetic inhomogeneous image using different methods. Both the background and the two objects are corrupted by severe intensity inhomogeneity. λ1=1.1e-5 and λ2=1e-5 are chosen for this image. Figure 2(a) shows the original image with the initial contour. Figure 2(b) shows the result of the CV model, which fails to segment the background correctly. The RSF model will trap into local minimum as shown in Figure 2(c). Figure 2(d) shows the result of the LGDF model, the active contour moves slowly and can not reach the right boundary using only the local information. Figure 2(e) shows that the LGIF model can not get the correct segmentation with a constant value for ω. our model can segment this image correctly as shown in Figure 2(f).Results of a synthetic inhomogeneous image with different methods. (a) The original image with the initial contour. (b) The CV model. (c) The RSF model. (d) The LGDF model. (e) The LGIF model. (f) Our model.
(a)(b)(c)(d)(e)(f)Figure3 shows the comparison of the results with different methods for a real image. λ1=λ2=1e-5 is used for this image. The original image with the initial contour, the final contours with the CV model, the RSF model, the LGIF model, and our model are shown in Figures 3(a)–3(e), respectively. From this example, we can observe that the result obtained by our model is the best.Comparison of different methods for a real image. (a) The original image with the initial contour. (b) The CV model. (c) The RSF model. (d) The LGIF model. (e) Our model.
(a)(b)(c)(d)(e)Results of another real image with different methods are shown in Figure4. Figure 4(a) shows the original image with the initial contour, while Figures 4(b)–4(e) show the segmentation results of the CV model, the RSF model, the LGIF model, and our model, respectively. It can seen clearly that our model can handle this inhomogeneous image well while other models fail to segment it. We choose λ1=λ2=1e-7 and β=10 for this image.Results of a real inhomogeneous image with different methods. (a) The original image with the initial contour. (b) The CV model. (c) The RSF model. (d) The LGIF model. (e) Our model.
(a)(b)(c)(d)(e)Figure5 shows an application of our model to a real image of bird. λ1=1.1e-6, λ2=1e-6 and β=1 are used for this image. Row 1 shows the active contour evolving process from the initial contour to the final contour. Our model can segment this image correctly which can be seen from Figure 5(d). Row 2 shows the corresponding fitting images f=∑i=12Miϵ(ϕ)ui at different iterations. We can see that the final fitting image Figure 5(h) can fit the original image well.Results of our model for an image of bird. Row 1: the curve evolution process from the initial contour to the final contour. Row 2: the corresponding fitting imagesf=∑i=12Miϵ(ϕ)ui at different iterations.
(a)(b)(c)(d)(e)(f)(g)(h)


### 4.2. Applications to Texture Images and Color Images

By considering the comprehensive local statistic, our model can be applied to some texture images. The active contour evolving process for an image of tiger with our model is shown in Figure6. It can been observed that the variances of the tiger and the background are different which enables our model to detect the boundary. We choose λ1=λ2=1e-5 for this image. This image has also been used in [17], it can be seen that our model can obtain similar result as [17].The active contour evolving process from the initial contour to the final contour for a tiger image with our model.
(a)(b)(c)(d)Our model can also be easily extended to be applied to color images. Figures7 and 8 show the results of our model for two color images of birds and flowers. We choose λ1=λ2=1e-6 for the image of birds and λ1=λ2=1e-7 for the image of flowers. In Figure 7 the active contour evolving process is shown in Column (a). Column (b) and Column (c) show the evolutions of two means u1 and u2. The fitting images f=∑i=12Miϵ(ϕ)ui at different iterations are shown in Column (d). Figure 8 shows the curve evolution and the corresponding fitting image evolution for the color image of flowers in Row 1 and Row 2, respectively. These two examples demonstrate that our model can be applied to color images well.Results of our model for a real color image. Column (a): the active contour evolving process from the initial contour to the final contour. Columns (b) and (c): the evolution processes of two meansu1 and u2. Column (d): the corresponding evolution of the fitting image f=∑i=12Miϵ(ϕ)ui.
(a)(b)(c)(d)Results of our model for another color image. Row 1: the curve evolution process. Row 2: The evolution process of the corresponding fitting imagef.
(a)(b)(c)(d)(e)(f)(g)(h)


### 4.3. Discussion on the Parametersβ and γ

In our proposed model we have replaced the standard TV norm with the weighted TV norm by using an edge detector functiong(ξ)=1/(1+β|ξ|2). We have declared that β is a parameter that determines the detail level of the segmentation. Now we show how the parameter β can influence the details of segmentation in Figure 9. Figures 9(a) and 9(b) show the original image and the initial contour. Figures 9(c)–9(f) show the results by applying our model with different parameters β=1,10,20,50, respectively. We choose λ1=λ2=1e-6 for this image. It can be observed that with the increase of β, more details of the image will be detected. Thus if we want to detect more details, larger β should be used. Otherwise if we only want to detect the outline, smaller β should be chosen.Influence of the parameterβ on the detail level of segmentation. (a) The original image. (b) The initial contour. (c) β=1. (d) β=10. (e) β=20. (f) β=50.
(a)(b)(c)(d)(e)(f)In Figure10 we apply our model to a synthetic inhomogeneous image. The original image with the initial contour is shown in Figure 10(a). The final contour and the final level set function ϕ are shown in Figures 10(b) and 10(c), respectively. λ1=λ2=1e-5 is used for this image.Results of our model for a synthetic inhomogeneous image. (a) The original image with the initial contour. (b) The final contour. (c) The final level set functionϕ.
(a)(b)(c)From (3.15), the parameter γ can influence the weight function ω of the global-intensity-fitting term. To see how the parameter γ can influence the change of the total energy, we show the energy change figures with different values for γ in Figure 11. For the same image with the same initial contour in  of Figure 10(a), we will obtain the same segmentation result shown in  of Figure 10(b) when using different values for γ. However, the energy change figures are different. The energy change figures with different γ=0.1,1,5 are shown in Figures 10(a), 10(b), and 10(c), respectively. From Figure 11, we can see that when γ=0.1, the energy change curve is a little irregular and has some fluctuation which can be seen in Figure 11(a). When larger values of γ are used, the energy change curves become more regular as shown in Figures 11(b) and 11(c).Influence of the parameterγ on the energy change. (a) γ=0.1. (b) γ=1. (c) γ=5.
(a)(b)(c)Our model is a little sensitive to the parametersλ1 and λ2 which can be seen from the experimental results. In fact, the SBRSF model also has this problem. It may be caused by the application of the split Bregman method. This is what we should study more in the future work.


## 4.1. Comparisons with Other Models

Figure1 compares the results for a synthetic image with different methods. In our previous work [21], we have proposed a convex model by applying the split Bregman method to the RSF model. We call it the SBRSF model here. The object and the background of this image have the same intensity means but different variances. Figures 1(a) and 1(b) give the original image and the initial contour. Figures 1(c)–1(f) show the results of the CV model, the RSF model, the SBRSF model, and our model, respectively. It can be seen that our model can get the correct segmentation result while other models fail. This is because that our model considers not only the intensity mean but also the intensity variance. We choose λ1=λ2=1e-5 for this image.Results of a synthetic image with different methods. (a) The original image. (b) The initial contour. (c) The CV model. (d) The RSF model. (e) The SBRSF model. (f) Our model.
(a)(b)(c)(d)(e)(f)In Figure2 we show the results for another synthetic inhomogeneous image using different methods. Both the background and the two objects are corrupted by severe intensity inhomogeneity. λ1=1.1e-5 and λ2=1e-5 are chosen for this image. Figure 2(a) shows the original image with the initial contour. Figure 2(b) shows the result of the CV model, which fails to segment the background correctly. The RSF model will trap into local minimum as shown in Figure 2(c). Figure 2(d) shows the result of the LGDF model, the active contour moves slowly and can not reach the right boundary using only the local information. Figure 2(e) shows that the LGIF model can not get the correct segmentation with a constant value for ω. our model can segment this image correctly as shown in Figure 2(f).Results of a synthetic inhomogeneous image with different methods. (a) The original image with the initial contour. (b) The CV model. (c) The RSF model. (d) The LGDF model. (e) The LGIF model. (f) Our model.
(a)(b)(c)(d)(e)(f)Figure3 shows the comparison of the results with different methods for a real image. λ1=λ2=1e-5 is used for this image. The original image with the initial contour, the final contours with the CV model, the RSF model, the LGIF model, and our model are shown in Figures 3(a)–3(e), respectively. From this example, we can observe that the result obtained by our model is the best.Comparison of different methods for a real image. (a) The original image with the initial contour. (b) The CV model. (c) The RSF model. (d) The LGIF model. (e) Our model.
(a)(b)(c)(d)(e)Results of another real image with different methods are shown in Figure4. Figure 4(a) shows the original image with the initial contour, while Figures 4(b)–4(e) show the segmentation results of the CV model, the RSF model, the LGIF model, and our model, respectively. It can seen clearly that our model can handle this inhomogeneous image well while other models fail to segment it. We choose λ1=λ2=1e-7 and β=10 for this image.Results of a real inhomogeneous image with different methods. (a) The original image with the initial contour. (b) The CV model. (c) The RSF model. (d) The LGIF model. (e) Our model.
(a)(b)(c)(d)(e)Figure5 shows an application of our model to a real image of bird. λ1=1.1e-6, λ2=1e-6 and β=1 are used for this image. Row 1 shows the active contour evolving process from the initial contour to the final contour. Our model can segment this image correctly which can be seen from Figure 5(d). Row 2 shows the corresponding fitting images f=∑i=12Miϵ(ϕ)ui at different iterations. We can see that the final fitting image Figure 5(h) can fit the original image well.Results of our model for an image of bird. Row 1: the curve evolution process from the initial contour to the final contour. Row 2: the corresponding fitting imagesf=∑i=12Miϵ(ϕ)ui at different iterations.
(a)(b)(c)(d)(e)(f)(g)(h)


## 4.2. Applications to Texture Images and Color Images

By considering the comprehensive local statistic, our model can be applied to some texture images. The active contour evolving process for an image of tiger with our model is shown in Figure6. It can been observed that the variances of the tiger and the background are different which enables our model to detect the boundary. We choose λ1=λ2=1e-5 for this image. This image has also been used in [17], it can be seen that our model can obtain similar result as [17].The active contour evolving process from the initial contour to the final contour for a tiger image with our model.
(a)(b)(c)(d)Our model can also be easily extended to be applied to color images. Figures7 and 8 show the results of our model for two color images of birds and flowers. We choose λ1=λ2=1e-6 for the image of birds and λ1=λ2=1e-7 for the image of flowers. In Figure 7 the active contour evolving process is shown in Column (a). Column (b) and Column (c) show the evolutions of two means u1 and u2. The fitting images f=∑i=12Miϵ(ϕ)ui at different iterations are shown in Column (d). Figure 8 shows the curve evolution and the corresponding fitting image evolution for the color image of flowers in Row 1 and Row 2, respectively. These two examples demonstrate that our model can be applied to color images well.Results of our model for a real color image. Column (a): the active contour evolving process from the initial contour to the final contour. Columns (b) and (c): the evolution processes of two meansu1 and u2. Column (d): the corresponding evolution of the fitting image f=∑i=12Miϵ(ϕ)ui.
(a)(b)(c)(d)Results of our model for another color image. Row 1: the curve evolution process. Row 2: The evolution process of the corresponding fitting imagef.
(a)(b)(c)(d)(e)(f)(g)(h)


## 4.3. Discussion on the Parametersβ and γ

In our proposed model we have replaced the standard TV norm with the weighted TV norm by using an edge detector functiong(ξ)=1/(1+β|ξ|2). We have declared that β is a parameter that determines the detail level of the segmentation. Now we show how the parameter β can influence the details of segmentation in Figure 9. Figures 9(a) and 9(b) show the original image and the initial contour. Figures 9(c)–9(f) show the results by applying our model with different parameters β=1,10,20,50, respectively. We choose λ1=λ2=1e-6 for this image. It can be observed that with the increase of β, more details of the image will be detected. Thus if we want to detect more details, larger β should be used. Otherwise if we only want to detect the outline, smaller β should be chosen.Influence of the parameterβ on the detail level of segmentation. (a) The original image. (b) The initial contour. (c) β=1. (d) β=10. (e) β=20. (f) β=50.
(a)(b)(c)(d)(e)(f)In Figure10 we apply our model to a synthetic inhomogeneous image. The original image with the initial contour is shown in Figure 10(a). The final contour and the final level set function ϕ are shown in Figures 10(b) and 10(c), respectively. λ1=λ2=1e-5 is used for this image.Results of our model for a synthetic inhomogeneous image. (a) The original image with the initial contour. (b) The final contour. (c) The final level set functionϕ.
(a)(b)(c)From (3.15), the parameter γ can influence the weight function ω of the global-intensity-fitting term. To see how the parameter γ can influence the change of the total energy, we show the energy change figures with different values for γ in Figure 11. For the same image with the same initial contour in  of Figure 10(a), we will obtain the same segmentation result shown in  of Figure 10(b) when using different values for γ. However, the energy change figures are different. The energy change figures with different γ=0.1,1,5 are shown in Figures 10(a), 10(b), and 10(c), respectively. From Figure 11, we can see that when γ=0.1, the energy change curve is a little irregular and has some fluctuation which can be seen in Figure 11(a). When larger values of γ are used, the energy change curves become more regular as shown in Figures 11(b) and 11(c).Influence of the parameterγ on the energy change. (a) γ=0.1. (b) γ=1. (c) γ=5.
(a)(b)(c)Our model is a little sensitive to the parametersλ1 and λ2 which can be seen from the experimental results. In fact, the SBRSF model also has this problem. It may be caused by the application of the split Bregman method. This is what we should study more in the future work.


## 5. Conclusion

In this paper, we propose a local- and global-statistics-based active contour model for image segmentation in a variational level set formulation. Both the local and global information are taken into consideration to get better segmentation results. Local Gaussian distribution information is used to identify regions with similar intensity means but different variances. A weight function that varies dynamically with the location of the image is applied in this paper. The split Bregman method is then used to minimize the proposed energy functional in a more efficient way. Our model has been compared with other models for different images. Experimental results have shown the advantages of our model for image segmentation. Our model can also be applied to some texture images and color images. A short discussion on the parametersβ and γ is also given.



---

*Source: 791958-2012-04-12.xml*