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

This paper presents a localand 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 termwith spatially varyingmeans 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.


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 edgebased 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.Regionbased 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, 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.Section 2 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.

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 c 1 and c 2 that approximate the image intensities outside and inside the contour C. The energy they proposed to minimize is as follows:

The LGDF Model
where where φ is the level set function, u i x , and σ i x are local intensity means and standard deviations, respectively.M 1 φ H φ and M 2 φ 1 − H φ .H is the Heaviside function.ω x − y is a nonnegative weighting function.

Mathematical Problems in Engineering
By adding the arc length term L φ 2, 14 and the level set regularization term P φ 9 , the energy functional they proposed is 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.

Our Model
Our model first combines the advantages of the CV model and the LGDF model to propose a new energy functional.Then we use the globally convex segmentation method 26 to give a convex energy functional.
In Section 2.1, the first two terms of the CV model 2 are called the global intensity fitting GIF energy: The local-Gaussian-distribution-fitting LGDF energy 17 is defined as: where ω x − y is chosen as the Gaussian kernel K σ x − y in this paper.p i,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: where ω 0 ≤ ω ≤ 1 is the weight of the global fitting term.
Then the arc length term L φ |∇H φ x |dx is also needed to regularize the contour C. The energy functional is now as follows: In practice, the Heaviside function H is approximated by a smooth function H defined by: where is a positive constant.The energy functional is then approximated by: By applying the standard gradient descent method, the optimal means u 1 , u 2 , variances σ 2  1 , σ 2 2 , constants c 1 , c 2 , and level set function φ that minimize the energy functional 3.6 are obtained by where δ is the derivative of H : δ z / π 2 z 2 .F 1 and F 2 are defined as follows: where d i i 1, 2 is defined as: Mathematical Problems in Engineering 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 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 We now propose a new energy functional as follows: where r x − F 1 x F 2 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 min Here the solution is restricted to lie in a finite interval a 0 ≤ φ ≤ b 0 to guarantee the global minimum.
The segmented region can be found by thresholding the level set function for some α ∈ a 0 , b 0 if the optimal φ is found: Ω 1 {x : φ x > α}.In this paper the thresholding value α is chosen as α a 0 b 0 /2.We then replace the standard total variation TV norm TV φ

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: where γ is a fixed parameter and LCR W represents the local contrast ratio of the given image, which is defined as where W denotes the size of the local window, V max and V min are the maximum and minimum of the intensities within this local window, respectively.V g represents the intensity level of the image.For gray images, it is usually 255.LCR W 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 LCR W is the average value of LCR W 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−LCR W 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.

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
We then apply the Bregman iteration to strictly enforce the constraint d ∇φ.The optimization problem becomes arg min

3.18
When d is fixed, the Euler-Lagrange equation of the optimization problem 3.18 with respect to φ is 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
When φ is fixed, we minimize 3.18 with respect to d and obtain

3.22
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 where F k 1 and F k 2 are updated through 3.8 .The means u i x , variances σ i x 2 and constants c i are updated at every iteration according to 3.7 before the update of the level set function φ.

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 b 0 inside a region

Comparisons with Other Models
Figure 1 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.
In Figure 2 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 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 .Figure 3 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.
Results of another real image with different methods are shown in Figure 4. 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.
Figure 5 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

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 Figure 6.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 .
Our model can also be easily extended to be applied to color images.Figures 7 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

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 function g ξ 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.
In Figure 10 we apply our model to a synthetic inhomogeneous image.The original image with the initial contour is shown in Figure 10  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.

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.

Figure 1 :
Figure 1: 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.

Figure 2 :
Figure 1 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.Figures1 c -1f 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.In Figure2we 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

Figure 3 :Figure 4 :Figure 5 :Figure 6 :
Figure 3: 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.

2 i 1
the active contour evolving process is shown in Column a .Column b and Column c show the evolutions of two means u 1 and u 2 .The fitting images f M i φ u i 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.

Figure 7 : 2 i 1
Figure 7: 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 means u 1 and u 2 .Column d : the corresponding evolution of the fitting image f 2 i 1 M i φ u i .

Figure 8 :Figure 9 :Figure 10 :
Figure 8: Results of our model for another color image.Row 1: the curve evolution process.Row 2: The evolution process of the corresponding fitting image f.
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 .
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 σ 2 1 and σ 2 2 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.