Implicit Active Contour Model with Local and Global Intensity Fitting Energies

We propose a new active contour model which integrates a local intensity fitting (LIF) energy with an auxiliary global intensity fitting (GIF) energy.The LIF energy is responsible for attracting the contour toward object boundaries and is dominant near object boundaries, while the GIF energy incorporates global image information to improve the robustness to initialization of the contours. The proposedmodel not only can provide desirable segmentation results in the presence of intensity inhomogeneity but also allows for more flexible initialization of the contour compared to the RSF and LIF models, and we give a theoretical proof to compute a unique steady state regardless of the initialization; that is, the convergence of the zero-level line is irrespective of the initial function. This means that we can obtain the same zero-level line in the steady state, if we choose the initial function as a bounded function. In particular, our proposed model has the capability of detecting multiple objects or objects with interior holes or blurred edges.


Introduction
Implicit active contour models have been extensively studied and successfully used in image segmentation [1][2][3].The basic idea is to evolve a contour under some constraints to extract the desired object.According to the nature of constraints, the existing active contour models can be categorised into two classes: edge-based models [4][5][6][7], and region-based models [8][9][10][11][12][13][14][15][16][17].Each of them has its own pros and cons; the choice of them in applications depends on different characteristics of images.In this study, we focus on region-based models and consider images with intensity inhomogeneity.
Unlike edge-based models that utilize typically an edge indicator depending on image gradient to perform contour extraction, region-based models usually use global and/or local statistics inside regions rather than gradient on edges to find a partition of image domain.They generally have better performances in the presence of weak or discontinuous boundaries than edge-based models.Early popular regionbased models tend to rely on intensity homogeneous (roughly constant or smooth) statistics in each of the regions to be segmented.Therefore, they either lack the ability to deal with intensity inhomogeneity like the PC (piecewise constant) model [8] or are excessively expensive in computation like the PS (piecewise smooth) model [9].
To handle intensity inhomogeneity efficiently, some localized region-based models [11][12][13][14][15][16] have been proposed recently.For example, Li et al. [12] recently proposed a regionscalable fitting (RSF) active contour model (originally termed as local binary fitting (LBF) model [11]).The RSF model draws upon intensity information in spatially varying local regions depending on a scale parameter, so it is able to deal with intensity inhomogeneity efficiently.Very recently, Zhang et al. [15] proposed a novel active contour model driven by local image fitting energy, which also can handle intensity inhomogeneity efficiently.The experimental results in [15] show that this model is more efficient than the RSF model, while yielding similar results.However, these two models easily get stuck in local minimums for the most of contour initializations.This makes it need user intervention to define the initial contours professionally.
In this study, based on the PC model [8] and RSF model [12], we propose a new active contour model, which integrates a local intensity fitting (LIF) energy with an auxiliary global intensity fitting (GIF) energy.The LIF energy is responsible for attracting the contour toward object boundaries and is dominant near object boundaries, while the GIF energy incorporates global image information to improve the robustness to initialization of the contours.The proposed model can efficiently handle intensity inhomogeneity, while allowing for more flexible initialization and maintaining the subpixel accuracy.
The remainder of this paper is organized as follows.Section 2 briefly reviews the PC model [8] and RSF model [12].Section 3 introduces the proposed model.Section 4 presents experimental results using a set of synthetic and real images.This paper is summarized in Section 5. Let  : Ω ⊂ R 2 → R be an input image, and let   be the regularized Heaviside function; the energy functional of the CV model is defined as

Related Works
where  1 ,  2 > 0, ] > 0 are constants.The regularized version of () is chosen as 1 and  2 are the global averages of the image intensities in the region {x : (x) > 0} and {x : (x) < 0}, respectively; that is, The solution of the CV model in fact leads to a piecewise constant segmentation of the original image (x): where  1 and  2 are the averages of the image intensities in the region {x : (x) > 0} and {x : (x) < 0}, respectively.Such constants may be far away from the original image data, if the intensities outside or inside the contour  = {x : (x) = 0} are not homogeneous.As a result, the CV model generally fails to segment images with intensity inhomogeneity.

Region-Scalable Fitting Model.
In order to improve the performance of the global CV model [8] and the PS model [9] on images with inhomogeneity, Li et al. [11,12] recently proposed a novel region-based active contour model.They introduced a kernel function and defined the following energy functional: where   is a Gaussian kernel with standard deviation , and  1 (x) and  2 (x) are two smooth functions that approximate the local image intensities inside and outside the contour, respectively.They are computed by The solution of the RSF model leads to a piecewise smooth approximation of the original image (x): (7) where the smooth functions  1 (x) and  2 (x) are computed by (6). 1 (x) and  2 (x) are the averages of local intensities on the two sides of the contour, which are different from the constants  1 and  2 in the CV model, the averages of the image intensities on the two sides of the contour.Therefore, the RSF model can deal with intensity inhomogeneity efficiently.However, it is sensitive to contour initialization (initial locations, sizes, and shapes).

The Proposed Model
3.1.Description of Our Model.Given a positive constant  (0 ≤  ≤ 1), from (4) and (7), we define the following energy functional: Mathematical Problems in Engineering 3 where Keeping  fixed and minimizing the functional (,  1 ,  2 ,  1 ,  2 ) with respect to  1 ,  2 ,  1 , and  2 , we have Keeping  1 ,  2 ,  1 , and  2 fixed and minimizing the functional (,  1 ,  2 ,  1 ,  2 ) with respect to , we obtain the corresponding gradient descent flow equation: where Like the CV and RSF models, our model is also implemented using an alternative procedure: for each iteration and the corresponding level set function   , we first compute the fitting values   (  ) and   (  ) and then obtain  +1 by minimizing (,  1 (  ),  2 (  ),  1 (  ),  2 (  )) with respect to .This process is repeated until the zero-level set of  +1 is exactly on the object boundary.
In the following, we first discuss the properties of   () and   () and then analyze the behavior of (11).

Properties of 𝐹 𝐺 (𝜙) and 𝐹 𝐿 (𝜙).
For the sake of simplicity, we state and prove the properties of   () and   () only for an image consisting of only two distinct gray levels: where  1 ,  2 ≥ 0 with  1 ̸ =  2 ,  and Ω \  represent the objects of interest and the background, respectively.Theorem 1.Let (x) be an image by (13).Then one has and so, where in which |Ω| is the area of the region Ω and similarly for others.
Remarks.(i) Due to the discrete nature of image, |Ω| is in fact the number of pixels in the image (x), and similarly to others.
(ii) The cases of  = ,  = , and  = 0 correspond to the zero-level lines of (x) which are encircling the object (), inside the object and within the background (Ω \ ), respectively.The cases of  ̸ =  ̸ =  and  =  =  correspond to the zero-level line of (x) that are partially inside the object and exactly on the object edge, respectively.
(iii) The significance of ( 15) is that the function   () has the opposite sign in  (object) and Ω \  (background), respectively.
The proof of Theorem 1 is provided in Appendix A. The following result will be used in the proof of Theorem 7, which guarantees that the evolution by (10) converges to a unique stable value after finite time.
Corollary 2. Let (x) be an image by (13).Then one has the following.
The proof of Corollary 2 is given in Appendix A.
We call the property in Theorem 1 an adaptive signchanging property of   ().Such property also holds for   (), which can be expressed by the following theorem.Theorem 3. Let (x) be an image given by (13).Then one has and so, where This theorem shows that the local force   () has exactly opposite sign in  (object) and in Ω \  (background).
The following result together with Corollary 2 will be used in the proof of Theorem 7 mentioned later. where The proofs of Theorem 3 and Corollary 4 are similar to Theorem 1 and Corollary 2, respectively; see Appendix B for details.

Behavior of Our Model.
In this section, we analyze the behavior of our model (10) for image segmentation.We will show that the zero-level line of the evolution function starting with a bounded function finally comes to a unique steady state, which separates the object from the background.
Due to the discrete nature of image, the continuous equation (10) can be discretized in space with space step 1 (implied pixel spacing), but also in time with a time step Δ as follows: where  ×  corresponds to the image size,  , = (, ) and   , = (Δ, , ) with  ≥ 0 and  0 , =  0 (, ). where We provide the proof of Corollary 5 in Appendix C. Similar analysis can prove the following corollary, Corollary 6. where Theorem 7. If  0 (x) is a bounded function with ( 0 −  0 )( 0 −  0 ) > 0, then there exists a positive integer  such that, for  ≥ , We provide the proof of Theorem 7 in Appendix D. The significance of Theorem 7 is that if we choose  0 (x) such that ( 0 −  0 )( 0 −  0 ) > 0, then the zero-level line of (x) starting with such initial function  0 (x) can finally come to a unique steady state, which separates object from the background.
Remark.Mathematically there does exist  0 (x) such that ( 0 − 0 )( 0 − 0 ) ≤ 0; in practice, however, we always can guarantee that (34) 3.4.Discussion of Initial Function.Theorem 7 guarantees that the proposed model computes a unique steady state regardless of the initialization; that is, the convergence of the zerolevel line { = 0} is irrespective of the initial function.This means that we can obtain the same zero-level line in the steady state if we choose the initial function as a bounded function  0 with ( 0 −  0 )( 0 −  0 ) > 0.
In applications, the initial function  0 can be defined via a simple curve (closed curve or line segment) in image domain.For example, we can choose the initial function as a signed distance to a circle, which is widely used in most of image segmentation models with level set methods.For the proposed model, however, we prefer to define the initial function  0 (x) as a piecewise constant or constant function as follows.
(1) If the curve  is a closed curve (e.g., circle or square), then  0 (x) is defined by where  ̸ = 0 is a constant.

Mathematical Problems in Engineering
(3) We can also define a zero function as follows: Next, we prove the fact that, with  0 (x) = 0, (x) becomes a sign-changing function and satisfy the condition of ( 1 −  1 )( 1 −  1 ) > 0 after the first iteration.Theorem 8.If the initial function  0 (x) = 0 in Ω and then after the first iteration, one has where We provide the proof of Theorem 8 in Appendix E. By (25) and Theorem 8, we have Therefore,  1 (x) became a sign-changing function.Then, using two distinct gray levels of (13) and the above demonstration, we have =  ( −  1 ) ( −  1 ) > 0. (41)

Implementation and Experimental Results
4.1.Implementation.In tradition PDE-based methods, a certain diffusion term is usually included in the evolution equation to regularize the evolving function, but which increases the computational cost.Recently, [16] proposed a novel scheme to regularize the evolving function, that is, Gaussian filtering the evolving function after each of iterations.We adopt this scheme to regularize the evolving function  at each of iteration; that is,   =   *   , where  controls the regularization strength.Such regularization procedure has some advantages over the traditional regularization term, such as computational efficiency and better smoothing effect; see [16] for more explanations.
The main procedures of the proposed algorithm can be summarized as follows.
(5) Check whether the evolution is finished.If not, return to step 2.

Experimental Results.
In this section, we show experimentally that the proposed model not only can provide desirable segmentation results in the presence of intensity inhomogeneity but also allows for more flexible initialization of the contour compared to the RSF and LIF models.
We will utilize two region overlap metrics to evaluate the performances of the three models quantitatively.The two metrics are the ratio of segmentation error (RSE) [18] and the dice similarity coefficient (DSC) [14,18,19].If  1 and  2 represent a given baseline foreground region (e.g., true object) and the foreground region found by the model, respectively, then the two metrics are defined as follows: where (⋅) indicates the number of pixels in the enclosed region, and Ω is image domain.The closer the DSC value to 1, the better the segmentation.Since ( 1 \ 2 )+( 2 \ 1 ) is the number of the pixels mistakenly classified by the model, lower RSE means that there are fewer pixels misclassified; that is, the image can be segmented more accurately.Thus, a perfect segmentation will give DSC = 1, RSE = 0.
In the first example (Figures 1-3), we mainly verify the computation of a unique steady state of the zero-level line of , starting with three types of representative initial functions, that is, signed distance function, piecewise constant functions by ( 26)-( 27), and zero function, respectively.The top row of Figure 1 shows the evolution of an active contour (i.e., zero-level line { = 0}), with the function  initialized to a signed distance function, piecewise constant functions by ( 26)-( 27) with  = 1, and zero function, respectively, while the bottom row shows the corresponding evolution of .With such initializations, the zero-level line of  converges to the same steady state.
In Figure 2, we show that our model has the capability of detecting multiple objects or objects with interior holes or blurred edges, only starting with a zero function.The contours (zero-level lines) evolution processes are shown in the second column to the forth column.We choose the segmentation results of the RSF and LIF models as baseline foreground regions and then compute DSC values for the corresponding images.The RSE and DSC values for the four real images are given in Table 1, from which we can see that the proposed algorithm works as well as the RSF and LIF models for images with intensity inhomogeneity.The experimental results shown in Figure 4 validate that our method can also achieve subpixel segmentation accuracy as in [15].As can be seen from Figures 4(b) and 4(d), both models achieve subpixel segmentation accuracy of the finger boundaries.The final contour accurately reflects the true hand shape.

Conclusion
In this study, we propose a new active contour model integrating a local intensity fitting (LIF) energy with an auxiliary global intensity fitting (GIF) energy.The LIF energy is responsible for attracting the contour toward object boundaries and is dominant near object boundaries, while the GIF energy incorporates global image information to improve the robustness to initialization of the contours.The proposed model can efficiently handle intensity inhomogeneity, while allowing for more flexible initialization and maintaining the subpixel accuracy.The utility model has the advantages of allowing for more flexible initialization of the contour and the capability of detecting multiple objects or objects with interior holes or blurred edges.But [14] has not been implemented.
Mathematical Problems in Engineering and by ( 14) and (A.6), This completes the proof of ( 17), and similarly for (18).The proof is completed.

B. Proofs of Theorem 3 and Corollary 4
Proof of Theorem 3. By (6), we have This completes the proof of (19).The last assertion (20) follows clearly from the following fact: we have by ( 19) and (B.6) and by ( 19) and (B.7), This completes the proof of (19), and similarly to (20).The proof is completed.

C. Proof of Corollary 5
Proof.(i) By Corollary 2 (i), we have At the first iteration, by (25) and (C.1), we have or equivalently,

Corollary 4 .
Under the assumption of Theorem 3, one has the following.

Figure 1 :
Figure 1: Segmentations of our model for two real images with  initialized as different functions.Columns 1 to 4: signed distance function, piecewise constant functions by (26)-(27) with  = 1, and zero function.

Figure 2 :
Figure 2: Applications of our model to four images (slug, cell, ventriculus sinister MR, and real plane images).The curve evolution process from the initial contour (in the first column) to the final contour (in the fourth column) is shown in every row for the corresponding image.

Figure 4 :
Figure 4: Segmentation results of both models for a hand phantom.Upper row: LIF model.Lower row: our model with  0 = 0. Column 2: zoomed view of the narrow parts in hand fingers.

Table 1 :
RSE and DSC for RSF and LIF models and our model.