Mathematical Problems in Engineering

Volume 2012, Article ID 791958, 16 pages

http://dx.doi.org/10.1155/2012/791958

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

Department of Mathematics, Harbin Institute of Technology, Harbin 150001, China

Received 9 October 2011; Accepted 24 January 2012

Academic Editor: Francesco Pellicano

Copyright © 2012 Boying Wu and Yunyun Yang. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### 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.

#### 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. 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.

#### 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 be the image domain, and be a given gray level image. Their idea is to find a contour that segments the given image and two constants and that approximate the image intensities outside and inside the contour . The energy they proposed to minimize is as follows: where , , and are positive constants. and represent the regions outside and inside the contour , 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 and will not be accurate if the intensities outside and inside the contour 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: where where is the level set function, , and are local intensity means and standard deviations, respectively. and . is the Heaviside function. 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 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 the 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 is chosen as the Gaussian kernel in this paper. is defined in (2.4).

Now we define the global and local-Gaussian-distribution-fitting (GLGDF) energy as follows: where () is the weight of the global fitting term.

Then the arc length term is also needed to regularize the contour . The energy functional is now as follows:

In practice, the Heaviside function is approximated by a smooth function defined by: where is a positive constant.

The energy functional is then approximated by:

By applying the standard gradient descent method, the optimal means , variances , constants , and level set function that minimize the energy functional (3.6) are obtained by where is the derivative of : . and are defined as follows: where is defined as:

Now we consider the gradient flow equation in (3.7). We take 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 .

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

Here the solution is restricted to lie in a finite interval to guarantee the global minimum.

The segmented region can be found by thresholding the level set function for some if the optimal is found: . In this paper the thresholding value is chosen as .

We then replace the standard total variation (TV) norm with the weighted TV norm by adding an edge detector function which is defined as [28]: . is a parameter that determines the detail level of the segmentation.

Thus the proposed minimization problem becomes where .

*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 and 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: where is a fixed parameter and represents the local contrast ratio of the given image, which is defined as where denotes the size of the local window, and are the maximum and minimum of the intensities within this local window, respectively. represents the intensity level of the image. For gray images, it is usually 255. 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), is the average value of 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. 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, . We add a quadratic penalty function to weakly enforce the resulting equality constraint and get the unconstrained problem as follows:

We then apply the Bregman iteration to strictly enforce the constraint . The optimization problem becomes

When 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

When is fixed, we minimize (3.18) with respect to and obtain where

The algorithm for the proposed minimization problem (3.14) is similar to the algorithm in our previous work [21] except when updating . Thus we do not give the algorithm in detail here. In this paper is updated by , where and are updated through (3.8). The means , variances and constants 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 inside a region and another constant value outside. The following parameters are used for all images in this paper: , , , , , and . Unless otherwise specified, we use for gray images and for color images. The values chosen for the parameters and are specified in each figure.

##### 4.1. 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 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. and 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).

Figure 3 shows the comparison of the results with different methods for a real image. 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 and for this image.

Figure 5 shows an application of our model to a real image of bird. , and 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 at different iterations. We can see that the final fitting image Figure 5(h) can fit the original image well.

##### 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 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 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 for the image of birds and 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 and . The fitting images 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.

##### 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 function . 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 , respectively. We choose 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(a). The final contour and the final level set function are shown in Figures 10(b) and 10(c), respectively. is used for this image.

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 are shown in Figures 10(a), 10(b), and 10(c), respectively. From Figure 11, we can see that when , 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).

Our model is a little sensitive to the parameters and 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.

#### Acknowledgments

This work is supported by Natural Science Foundation of Heilongjiang Province (A200909).

#### References

- M. Kass, A. Witkin, and D. Terzopoulos, “Terzopoulos, Snakes: active contour models,”
*International Journal of Computer Vision*, vol. 1, no. 4, pp. 321–331, 1988. View at Publisher · View at Google Scholar - T. F. Chan and L. A. Vese, “Active contours without edges,”
*IEEE Transactions on Image Processing*, vol. 10, no. 2, pp. 266–277, 2001. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - R. Malladi, J. A. Sethian, and B. C. Vemuri, “Shape modeling with front propagation: a level set approach,”
*IEEE Transactions on Pattern Analysis and Machine Intelligence*, vol. 17, no. 2, pp. 158–175, 1995. View at Publisher · View at Google Scholar - D. Cremers, M. Rousson, and R. Deriche, “A review of statistical approaches to level set segmentation: integrating color, texture, motion and shape,”
*International Journal of Computer Vision*, vol. 72, no. 2, pp. 195–215, 2007. View at Publisher · View at Google Scholar - S. Geman and D. Geman, “Stochastic relaxation, gibbs distributions, and the Bayesian restoration of images,”
*IEEE Transactions on Pattern Analysis and Machine Intelligence*, vol. 6, no. 6, pp. 721–741, 1984. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - V. Caselles, R. Kimmel, and G. Sapiro, “Geodesic active contours,”
*International Journal of Computer Vision*, vol. 22, no. 1, pp. 61–79, 1997. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - R. Kimmel, A. Amir, and A. Bruckstein, “Finding shortest paths on surfaces using level set propagation,”
*International Journal of Computer Vision*, vol. 17, no. 6, pp. 635–640, 1995. View at Google Scholar - A. Vasilevskiy and K. Siddiqi, “Flux maximizing geometric flows,”
*IEEE Transactions on Pattern Analysis and Machine Intelligence*, vol. 24, no. 12, pp. 1565–1578, 2001. View at Google Scholar - C. Li, C. Xu, C. Gui, and M. D. Fox, “Level set evolution without reinitialization: a new variational formulation,”
*Proceedings of IEEE Conference on Computer Vision and Pattern Recognition*, vol. 1, pp. 430–436, 2005. View at Google Scholar - R. Ronfard, “Region-based strategies for active contour models,”
*International Journal of Computer Vision*, vol. 13, no. 2, pp. 229–251, 1994. View at Publisher · View at Google Scholar - N. Paragios and R. Deriche, “Geodesic active regions and level set methods for supervised texture segmentation,”
*International Journal of Computer Vision*, vol. 46, no. 3, pp. 223–247, 2002. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - C. Samson, L. Blanc-Feraud, G. Aubert, and J. Zerubia, “A variational model for image classification and restoration,”
*IEEE Transactions on Pattern Analysis and Machine Intelligence*, vol. 22, no. 5, pp. 460–472, 2000. View at Publisher · View at Google Scholar - A. Tsai, A. Yezzi, and A. S. Willsky, “Curve evolution implementation of the Mumford-Shah functional for image segmentation, denoising, interpolation, and magnification,”
*IEEE Transactions on Image Processing*, vol. 10, no. 8, pp. 1169–1186, 2001. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - L. A. Vese and T. F. Chan, “A multiphase level set framework for image segmentation using the Mumford and Shah model,”
*International Journal of Computer Vision*, vol. 50, no. 3, pp. 271–293, 2002. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - C. Li, C. Kao, J. Gore, and Z. Ding, “Implicit active contours driven by local binary fitting energy,” in
*Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, IEEE Computer Society*, pp. 1–7, Washington, DC, USA, 2007. - C. Li, C. Kao, J. C. Gore, and Z. Ding, “Minimization of region-scalable fitting energy for image segmentation,”
*IEEE Transactions on Image Processing*, vol. 17, no. 10, pp. 1940–1949, 2008. View at Publisher · View at Google Scholar - L. Wang, L. He, A. Mishra, and C. Li, “Active contours driven by local gaussian distribution fitting energy,”
*Signal Process*, vol. 89, no. 12, pp. 2435–2447, 2009. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - C. Darolti, A. Mertins, C. Bodensteiner, and U. G. Hofmann, “Local region descriptors for active contours evolution,”
*IEEE Transactions on Image Processing*, vol. 17, no. 12, pp. 2275–2288, 2008. View at Publisher · View at Google Scholar - S. Lankton and A. Tannenbaum, “Localizing region-based active contours,”
*IEEE Transactions on Image Processing*, vol. 17, no. 11, pp. 2029–2039, 2008. View at Publisher · View at Google Scholar - L. Wang, C. Li, Q. Sun, D. Xia, and C. Kao, “Active contours driven by local and global intensity fitting energy with application to brain MR image segmentation,”
*Computerized Medical Imaging and Graphics*, vol. 33, no. 7, pp. 520–531, 2009. View at Google Scholar - Y. Yang, C. Li, C. Kao, and S. Osher, “Split Bregman method for minimization of region-scalable fitting energy for image segmentation,” in
*Proceedings of the 6th International Symposium on Visual Computing*, vol. part II, LNCS 6454, pp. 117–128, Springer, 2010. - N. Houhou, J.-P. Thiran, and X. Bresson, “Fast texture segmentation based on semi-local region descriptor and active contour,”
*Numerical Mathematics. Theory, Methods and Applications*, vol. 2, no. 4, pp. 445–468, 2009. View at Google Scholar · View at Zentralblatt MATH - T. Goldstein and S. Osher, “The split Bregman method for L1-regularized problems,”
*SIAM Journal on Imaging Sciences*, vol. 2, no. 2, pp. 323–343, 2009. View at Publisher · View at Google Scholar - S. Osher, M. Burger, D. Goldfarb, J. Xu, and W. Yin, “An iterative regularization method for total variation-based image restoration,”
*Multiscale Modeling Simulation*, vol. 4, no. 2, pp. 460–489, 2005. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - T. Goldstein, X. Bresson, and S. Osher, “Geometric applications of the split Bregman method: segmentation and surface reconstruction,”
*Journal of Scientific Computing*, vol. 45, no. 1–3, pp. 272–293, 2010. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - T. Chan, S. Esedo\=glu, and M. Nikolova, “Algorithms for finding global minimizers of image segmentation and denoising models,”
*SIAM Journal on Applied Mathematics*, vol. 66, no. 5, pp. 1632–1648, 2006. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - D. Mumford and J. Shah, “Optimal approximations by piecewise smooth functions and associated variational problems,”
*Communications on Pure and Applied Mathematics*, vol. 42, no. 5, pp. 577–685, 1989. View at Publisher · View at Google Scholar · View at Zentralblatt MATH - X. Bresson, S. Esedoglu, P. Vandergheynst, J. Thiran, and S. Osher, “Fast global minimization of the active contour/snake model,”
*Journal of Mathematical Imaging and Vision*, vol. 28, no. 2, pp. 151–167, 2007. View at Publisher · View at Google Scholar - Y. Yang and B. Wu, “Convex image segmentation model based on local and global intensity fitting energy and split Bregman method,”
*Journal of Applied Mathematics*, vol. 2012, Article ID 692589, 16 pages, 2012. View at Publisher · View at Google Scholar - Y. Yu, C. Zhang, Y. Wei, and X. Li, “Active contour method combining local fitting energy and global fitting energy dynamically,” in
*Proceedings of the of International Conference on Medical Biometrics*, vol. LNCS 6165, pp. 163–172, Springer, 2010.