An Accurate and Practical Explicit Hybrid Method for the Chan–Vese Image Segmentation Model

: In this paper, we propose a computationally fast and accurate explicit hybrid method for image segmentation. By using a gradient ﬂow, the governing equation is derived from a phase-ﬁeld model to minimize the Chan–Vese functional for image segmentation. The resulting governing equation is the Allen–Cahn equation with a nonlinear ﬁdelity term. We numerically solve the equation by employing an operator splitting method. We use two closed-form solutions and one explicit Euler’s method, which has a mild time step constraint. However, the proposed scheme has the merits of simplicity and versatility for arbitrary computational domains. We present computational experiments demonstrating the efﬁciency of the proposed method on real and synthetic images.


Introduction
Image segmentation is a process of partitioning an image into some non-intersecting regions [1,2]. Image segmentation is important in many computer vision and image processing applications [3]. For example, we need to segment MR brain images to get a 3D brain image. Using segmentation technique, we also can detect the head and abdomen of a fetus from an ultrasound image to provide necessary diagnoses and get quantitative estimates of organ sizes [4]. One of the most widely used methods for binary image segmentation is Chan and Vese model [5], which is based on the level set method [6]. In [7], the authors proposed a completely convex formulation of the algorithm of Chan and Vese when the constant values of each phase are not known a priori. Shi and Pan proposed a local and global binary fitting model using the variational level set approach [8]. Çataloluk and Çelebi implemented an image segmentation algorithm based Chan-Vese algorithm [9]. Boykov and Funka-Lea proposed graph cuts based image segmentation [10]. It uses region-based characteristics using an energy minimization [11]. Chen et al. [12] proposed a new diffusion equation model for noisy image segmentation using classical diffusion equation and the segmental process.
The primary purpose of this paper is to present a practical solution algorithm for the previously developed method by the authors in [13]. In that paper, a multigrid method [14] was used to solve the equation, which has a limitation in choosing a domain size, i.e., it should be close to square and the grid size should be a power of two for best performance. The essential contribution of this article is to present a computationally simple and efficient explicit hybrid scheme for image segmentation on arbitrary domains.
The contents of this paper are: In Section 2, the phase-field method for image segmentation is described. In Section 3, we present the computationally efficient and accurate explicit hybrid scheme.
We perform computational tests for image segmentation using the proposed algorithm in Section 4. The conclusion is made in Section 5.
For the given image f 0 (x), Mumford and Shah [15] showed that the image segmentation can be done by the minimization of the functional: where u is an approximation to f 0 . Its segmenting curve C is the edges in f 0 . Parameters µ and ν are positive constant.

Chan-Vese Model
Chan and Vese [5] presented a level set method for the numerical realization of the minimization of the functional (1). In this approach, the unknown curve C is the zero level set of continuous function φ(x) : Ω → R. Here, φ is the signed distance from the interface C and it satisfies |∇φ| = 1. Using φ, the energy functional is expressed by here, H (φ(x)) is the regularized Heaviside function and δ = H . For example, in the Chan and Vese paper [5], the regularized Heaviside function is defined as By applying the gradient descent method, the associated Euler-Lagrange equation is given as Note that λ 1 = λ 2 was used in the original Chan-Vese model.

Modified Allen-Cahn Model
In the phase-field method, phase function (or order parameter) φ is defined by φ(x) ≈ 1 if x ∈ inside(C) and φ(x) ≈ −1 if x ∈ outside(C) while it is distributed continuously on thin interfacial layers. A phase-field approximation for minimizing the Chan-Vese functional is given as here, F(φ) = 0.25(φ 2 − 1) 2 and is a positive parameter. In addition, c 1 and c 2 are the averages of f 0 in the regions which φ > 0 and φ < 0, respectively: By a variational derivative of energy functional (2) with respect to φ and assuming c 1 and c 2 are constant, we have the following modified Allen-Cahn equation: For more details about the phase-field model for image segmentation, one may refer to [13].

Numerical Solution Algorithm
In this section, we describe a computationally efficient and accurate explicit hybrid numerical method for the modified AC Equation (3). For the AC equation part, we use the recently developed explicit hybrid FDM for the AC equation [16,17]. By applying the operator splitting scheme, we can split Equation (3) as a sequence of simpler subproblems: Let Ω = (a, b) × (c, d) and we discretize the two-dimensional space Ω as the set of cell centers where N x and N y are total number of grid size in xand y-directions, respectively. Here, h = (b − a)/N x = (d − c)/N y is the spatial step size. Let φ n ij be approximations of φ(x i , y j , n∆t), where ∆t is the time step size. In the numerical algorithm, we compute the next time step solution φ n+1 with given φ n by going through the following three steps: Step (1) Given a solution φ n at time t = n∆t, we solve Equation (4) analytically and the solution after ∆t is where c n 1 and c n 2 are .
Step (2) Next, we solve Equation (5) by using the explicit Euler's method with homogeneous Neumann boundary condition: Step (3) Finally, by using the method of separation of variables [18,19], the solution of Equation (6) is Here, we note that Equations (7) and (9) are unconditionally stable [13] since the analytic solutions exist for all time steps. However, Equation (8) has a constraint for stability as ∆t ≤ 0.25h 2 because of the explicit Euler scheme for the heat equation. Therefore, the proposed hybrid scheme is stable if and only if the condition, ∆t ≤ 0.25h 2 , is satisfied. Although the scheme has the restriction for stability, it has the merits of simplicity and versatility for arbitrary computational domains. We define the discrete energy functional as To help readers understand better, we consider a South Korea license plate image as an example. The numerical algorithm of image segmentation method is described as follows: Select the real image f for image segmentation (see Figure 1a) and change it into a grayscale image as shown in Figure 1b. (ii) Normalize the given image f as where f max and f min are the maximum and the minimum values of the given image f , respectively, (see Figure 2). (iii) Obtain numerical approximation to the given image f 0 by the explicit hybrid scheme, that is described from Steps (1)-(3). Since solutions with the proposed numerical algorithm are almost insensitive to the initial condition of φ 0 , we simply initialize φ 0 = 2 f 0 − 1. We can use the other initial condition. We stop the Here, the discrete total energy E h (φ) is defined by Equation (2). Refer to Algorithm 1 for the procedure.
Stop the calculation. end if Set n = n + 1 end while

Numerical Experiments
We perform numerical tests using the proposed method on synthetic and real images. In the AC equation without a fidelity term, across the interfacial regions, φ varies from −0.9 to 0.9 over a distance of approximately 2 , which implies we have approximately m grid points if we use = m .

Effect of λ
We first consider a given image data: To study the effect of λ, we perform numerical tests with several λ values with h = 1, ∆t = 0.001, tol = 0.01, and = 16 . Figure 3 shows the relation between λ and interface thickness of numerical results at steady state. Here, the notation m * means the number of points between the transition layer φ = −0.9 and φ = 0.9. The inserted small figures represent the steady profiles φ(x, y 50 ) when λ = 0.2, 1, and 3. As shown in Figure 3, we see that m * decreases as λ increases, which is also shown in the inserted small figures. As a second test, we consider the following given image: We use the initial condition for φ as on the computational domain Ω = (0, 100) × (0, 100) and use the following parameters: h = 1, ∆t = 0.001, δ = 0.9606, tol = 0.01, and = 16 . Figure 4 represents the numerical results at steady state with respect to λ. To see the difference, we show the contour image and cross view of the given image f (x, y) and the numerical solution φ(x, y). Here, the solid and circle-marked lines are the given image and the numerical solution at steady state, respectively. In this test, we see the standard AC effect when λ = 0, i.e., motion by mean curvature. In addition, the numerical solution failed to capture the given image closely when δ ≤ 0.1. From this numerical test, we know that it is important to choose a proper value for λ.

Effect of
Next, we study the effect of , which means the interface thickness of numerical solution. For this test, the given image and initial condition are Equations (10) and (11), respectively. The parameters used are space step size h = 1, time step size ∆t = 0.01, λ = 0.5, δ = 0.9606, and Ω = (0, 100) 2 . Figure 5 shows that the interfacial transition layer is larger as the value of is larger.

Character Image Segmentation
Now, we apply our proposed method to several character image segmentations. As an example, we consider the car license plate image which is given in Section 3. We use h = 1, ∆t = 0.2, = 10 , and tol = 0.1.

Car License Plate
On Ω = (0, 297) × (0, 122), we implement the numerical algorithm with the given image (see Figure 1b) and λ = 20. Figure 6 shows the temporal evolution of numerical solution. By using our numerical scheme, we obtain the almost segmented image of car license plate in only one iteration and then have final results satisfying the given stop criterion after 29 iterations.

'Allen-Cahn Equation' Text Image
As second test, a character image segmentation is performed for a text image 'Allen-Cahn equation' with 'Vernada' font on a 355 × 50 mesh with λ = 20. Figure 7 represents Allen-Cahn equation text image and its segmented image. The first and second column is the original images and the segmented image, respectively. We can obtain the good segmented image after 11 iterations. In this test, we set the initial condition with a small circle as φ(x, y) = 1.0 if (x − 177.5) 2 + (y − 25) 2 ≤ 15; otherwise φ(x, y) = −1.  Next, we perform Allen-Cahn equation text image segmentation with random initial condition, that is set with 20% salt-and-pepper noise. Figure 8a shows the overlapped original image and zero contour line of φ(x, y) at initial state and after 14 iterations. Additionally, we can see the numerical solution φ(x, y) at each time level in Figure 8b. From these results, we can see that the proposed method presents a good quality segmented image regardless of an initial state.

Barcode Image
Now, we consider the barcode image. For this test, we use λ = 20 on the 554 × 230 mesh. Especially, as shown in first column in Figure 9, we set the initial condition with a rectangle, that is, φ(x, y) = 1 if |x − 277| ≤ 55.4 and |y − 115| ≤ 23; otherwise φ(x, y) = −1. In Figure 9, we can obtain the visually clear results in only one iteration. In addition, we have the final results by the stop criterion after 12 iterations.

Accuracy of the Proposed Method
In this section, we demonstrate the robustness and accuracy of the proposed method through the given image with salt-and-papers noise. In [20], a model for image segmentation was proposed by the binary level-set function using L 0 gradient regularizer as regularizing term. For verification, we perform the same experiments which were presented in [20]. For this test, we use h = 1, ∆t = 1, tol = 1 × 10 −5 , and = 15 on a 250 × 250 mesh grid. Figure 10a shows that the original rice image is degraded by different noise density levels. Here, we use three different levels: 0.01, 0.1, and 0.2 from left to right columns in Figure 10a. Figure 10b shows the numerical result by the previous method [20]. We can observe that the rice grains in bottom region are not well segmented using the previous method. However, the proposed model can segment almost all rice grains as shown in Figure 10c. In the noisy image, the proposed model has a relatively high accuracy compared to the other model [20].

Comparison with the Previous Method
We demonstrate the performance of the five test problems that are fingerprint, Europe night-lights, blood vessel, brain MRI, and texture images used in [13] and compare the results between the two methods. Figure 11 shows the initial image and segmented results of the previous method [13], and the proposed method. Tests were performed on a 2.70 GHz Intel Core i5-6400 CPU with 4.00 GB of RAM. We used h = 1 and ∆t = 0.1. Other parameters are in Table 1.   Figure 11. Various image segmentation: (a) fingerprint, (b) Europe night-lights, (c) blood vessel, (d) brain MRI, and (e) texture images. From top to bottom, original images, the segmented results using our proposed method and previous method in [13].
In recent researches, a multigrid method is known as one of the fastest technique in solving the common discretized equation [14]. Therefore, it is frequently used for image segmentation [13,21,22] since the method can overcome convergence rate degradation and speed up the computation. However, the multigrid method has a restriction in choosing the number of pixels of input image because of its methodology. In this section, we show the advantage of our proposed method by comparing with the previous method [13]. Figure 12a-c represent the original image, the initial condition, and segmented result with 89 × 97 pixels, respectively. Note that 89 and 97 are the prime numbers which have difficulties in using the multigrid method. Figure 12d represents the image segmentation using the previous method in [13], which uses a multigrid method with 96 × 96 pixels. Other parameters are the same as the simulation in the previous section.  Figure 13 shows the evolutions of normalized total discrete energy E h (φ n )/E h (φ 0 ) for numerical solution by the previous method [13] and new proposed method. As we expected, both energies are shown the non-increasing behavior. Especially, the proposed method is slightly lower than the previous method.
t Previous method (Li and Kim, 2004) New proposed method Figure 13. Time evolution of normalized total discrete energy for numerical solution by previous method [13] and new proposed method.
Moreover, we can show the time step size ∆t, the number of iterations, and CPU time (s) in Table 2. Since the previous method in [13] applies an implicit scheme in solving Equation (5), a larger time step can be used than the proposed one and it may reduce the number of iterations for image segmentation. Nevertheless, the CPU time is less when our proposed algorithm is applied in spite of same number of iterations. It results from the cheap computational cost of an explicit scheme.

Application in Medical Image: Coronary Artery
The coronary artery is a vessel that delivers oxygen-rich blood to the myocardium. The effective technique in imaging coronary arteries is important to avoid complicated clinical procedures and risks to the patient [24]. An image of an artery may have large unnecessary area in square-shaped one because of the artery's structure and it is inefficient to perform image processing like segmentation. Figure 14 represents the original coronary artery image from [25], the initial condition, and segmented results with 75 × 127 pixels. Here, the parameters are used as = 1 and λ = 1. As shown in Figure 14, the original image has inhomogeneous intensity. By this property, segmentation of the original image is sensitive to the initial condition. In this case, the active contour scheme [5,26] is more suitable for image segmentation because we can capture the target object with intensity inhomogenity using the active contours and they can handle intensity variations across the regions in the domain. Therefore, it is important to determine the appropriate initial condition for good results. To show this, we implement tests with two different initial conditions; φ 0 = 2 f 0 − 1 and two specific rectangles. See second column in Figure 14. As numerical results, we can see that the test with two specific rectangles has a good segmented image.

Image Segmentation on Arbitrary Domain
Our numerical scheme is based on analytic formulae and explicit scheme. Therefore, it has an advantage to obtain the numerical solution which is defined on complex domain. However, the other solver such as multigrid or FFT is not efficient to solve the discrete equation on complex domain. In this section, we introduce a simple algorithm for image segmentation on arbitrary domain. Let T be a target image which we want to extract. Let Ω in be an user-selected arbitrary domain which contains the target image T and is embedded in the whole domain Ω. Figure 15a illustrates the target image T and its user-selected arbitrary domain Ω in . In this figure, we construct the closed domain Ω in with 13 points. Furthermore, let Ω h in be a discrete domain, ∂Ω h in be its discrete boundary as shown in Figure 15b with spatial step size h. Here, the computational domain Ω in is approximated by Ω h in as h → 0. Now, we only proceed the three steps for image segmentation on an arbitrary domain Ω h in . Note that for efficient calculation, we convert φ ij in Ω h in into a vector form (φ 1 , φ 2 , · · · , φ N k ), where N k = Ω h in .
Step (3) Finally, by using the method of separation of variables, the solution of Equation (6) is for k = 1, 2, · · · , N k .
As the example, we segment original rice image into a part which we want. For numerical test, we use = 10 and λ = 100. Figure 16a-c show rice image and target domain, segmented image, and segmented contour line with original image, respectively. We can observe the flexibility of the proposed method.

Conclusions
In this paper, we presented a computationally fast and accurate explicit hybrid method for image segmentation. By using a gradient flow, the governing equation is derived from a phase-field model to minimize the Chan-Vese functional for image segmentation. The resulting governing equation is the Allen-Cahn equation with a nonlinear fidelity term. The numerical solution algorithm consists of the two closed-form solutions and one explicit Euler's method. Even though the scheme is explicit, the proposed scheme has the merits of simplicity and versatility for arbitrary computational domains. We presented computational experiments to demonstrate the efficiency of the proposed image segmentation algorithm on real and synthetic images.