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

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Phase-Field Model for Image Segmentation

#### 2.1. Mumford–Shah Model

#### 2.2. Chan–Vese Model

#### 2.3. Modified Allen–Cahn Model

## 3. Numerical Solution Algorithm

**Step (1)**- Given a solution ${\varphi}^{n}$ at time $t=n\Delta t$, we solve Equation (4) analytically and the solution after $\Delta t$ is$$\begin{array}{cc}\hfill {\varphi}_{ij}^{n+1,1}=& {e}^{-\lambda [{({f}_{0,ij}-{c}_{1}^{n})}^{2}+{({f}_{0,ij}-{c}_{2}^{n})}^{2}]\Delta t}{\varphi}_{ij}^{n}\hfill \\ \hfill \phantom{\rule{1.em}{0ex}}& +({e}^{-\lambda [{({f}_{0,ij}-{c}_{1}^{n})}^{2}+{({f}_{0,ij}-{c}_{2}^{n})}^{2}]\Delta t}-1){({f}_{0,ij}-{c}_{1}^{n})}^{2}+{({f}_{0,ij}-{c}_{2}^{n})}^{2},\hfill \end{array}$$$$\begin{array}{c}\hfill {c}_{1}^{n}=\frac{{\displaystyle \sum _{i=1}^{{N}_{x}}}{\displaystyle \sum _{j=1}^{{N}_{y}}}{f}_{0,ij}(1+{\varphi}_{ij}^{n})}{{\displaystyle \sum _{i=1}^{{N}_{x}}}{\displaystyle \sum _{j=1}^{{N}_{y}}}(1+{\varphi}_{ij}^{n})}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}\mathrm{and}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}{c}_{2}^{n}=\frac{{\displaystyle \sum _{i=1}^{{N}_{x}}}{\displaystyle \sum _{j=1}^{{N}_{y}}}{f}_{0,ij}(1-{\varphi}_{ij}^{n})}{{\displaystyle \sum _{i=1}^{{N}_{x}}}{\displaystyle \sum _{j=1}^{{N}_{y}}}(1-{\varphi}_{ij}^{n})}.\end{array}$$
**Step (2)**- Next, we solve Equation (5) by using the explicit Euler’s method with homogeneous Neumann boundary condition:$$\begin{array}{c}\hfill {\varphi}_{ij}^{n+1,2}={\varphi}_{ij}^{n+1,1}+{h}^{2}\left({\varphi}_{i-1,j}^{n+1,1}+{\varphi}_{i+1,j}^{n+1,1}-4{\varphi}_{ij}^{n+1,1}+{\varphi}_{i,j-1}^{n+1,1}+{\varphi}_{i,j+1}^{n+1,1}\right).\end{array}$$
**Step (3)**

- (i)
- (ii)
- Normalize the given image f as$$\begin{array}{c}\hfill {f}_{0}=(f-{f}_{min})/({f}_{max}-{f}_{min}),\end{array}$$
- (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 ${\varphi}^{0}$, we simply initialize ${\varphi}^{0}=2{f}_{0}-1$. We can use the other initial condition. We stop the computation if $|{\mathcal{E}}^{h}({\varphi}^{n+1})\phantom{\rule{3.33333pt}{0ex}}-\phantom{\rule{3.33333pt}{0ex}}{\mathcal{E}}^{h}({\varphi}^{n})|<\Delta t\times tol$. Here, the discrete total energy ${\mathcal{E}}^{h}(\varphi )$ is defined by Equation (2). Refer to Algorithm 1 for the procedure.

Algorithm 1 Image segmentation. |

Set the initial condition as ${\varphi}^{0}=2{f}_{0}-1$, N, a tolerance $tol$, and $n=0$.while$n\le N$ doCompute ${\varphi}^{n+1}$ from ${\varphi}^{n}$ by solving Equations (4)–(6). if $|{\mathcal{E}}^{h}({\varphi}^{n+1})\phantom{\rule{3.33333pt}{0ex}}-\phantom{\rule{3.33333pt}{0ex}}{\mathcal{E}}^{h}({\varphi}^{n})|<\Delta t\times tol$ thenStop the calculation. end ifSet $n=n+1$ end while |

## 4. Numerical Experiments

#### 4.1. Effect of $\lambda $

#### 4.2. Effect of $\u03f5$

#### 4.3. Character Image Segmentation

#### 4.3.1. Car License Plate

#### 4.3.2. ‘Allen–Cahn Equation’ Text Image

#### 4.3.3. Barcode Image

#### 4.3.4. Accuracy of the Proposed Method

#### 4.4. Comparison with the Previous Method

#### 4.5. Application in Medical Image: Coronary Artery

#### 4.6. Image Segmentation on Arbitrary Domain

**Step (1)**- Given a solution ${\varphi}^{n}=({\varphi}_{1}^{n},\cdots ,{\varphi}_{{N}_{k}}^{n})$ at time $t=n\Delta t$, we solve Equation (4) analytically as follows: For $k=1,2,\cdots ,{N}_{k}$,$$\begin{array}{c}\hfill {\varphi}_{k}^{n+1,1}={e}^{-\lambda [{({f}_{0,k}-{c}_{1}^{n})}^{2}+{({f}_{0,k}-{c}_{2}^{n})}^{2}]\Delta t}{\varphi}_{k}^{n}+({e}^{-\lambda [{({f}_{0,k}-{c}_{1}^{n})}^{2}+{({f}_{0,k}-{c}_{2}^{n})}^{2}]\Delta t}-1)\frac{{({f}_{0,k}-{c}_{1}^{n})}^{2}-{({f}_{0,k}-{c}_{2}^{n})}^{2}}{{({f}_{0,k}-{c}_{1}^{n})}^{2}+{({f}_{0,k}-{c}_{2}^{n})}^{2}}.\phantom{\rule{2.em}{0ex}}\end{array}$$
**Step (2)**- Next, we solve Equation (5) by using the explicit Euler’s method with homogeneous Neumann boundary condition:$$\begin{array}{c}\hfill {\varphi}_{k}^{n+1,2}={\varphi}_{k}^{n+1,1}+\Delta t{\Delta}_{h}{\varphi}_{k}^{n+1,1},\phantom{\rule{2.em}{0ex}}\mathrm{for}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}\phantom{\rule{3.33333pt}{0ex}}k=1,2,\cdots ,{N}_{k}.\end{array}$$
**Step (3)**- Finally, by using the method of separation of variables, the solution of Equation (6) is$$\begin{array}{c}\hfill {\varphi}_{k}^{n+1}={\varphi}_{k}^{n+1,2}/\sqrt{{e}^{-2\Delta t/{\u03f5}^{2}}+{({\varphi}_{k}^{n+1,2})}^{2}(1-{e}^{-2\Delta t/{\u03f5}^{2}})},\end{array}$$

## 5. Conclusions

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Pal, N.R.; Pal, S.K. A review on image segmentation techniques. Pattern Recognit.
**1993**, 26, 1277–1294. [Google Scholar] [CrossRef] - Zhang, Y.J. Evaluation and comparison of different segmentation algorithms. Pattern Recognit. Lett.
**1997**, 18, 963–974. [Google Scholar] [CrossRef] - Umbaugh, S.E.; Moss, R.H.; Stoecker, W.V.; Hance, G.A. Automatic color segmentation algorithms-with application to skin tumor feature identification. IEEE Eng. Med. Biol. Mag.
**1993**, 12, 75–82. [Google Scholar] [CrossRef] - Wasilewski, M. Active contours using level sets for medical image segmentation. In Medical Imaging: Segmentation; University of Waterloo: Waterloo, ON, Canada, 2014. [Google Scholar]
- Chan, T.; Vese, L. Active contours without edges. IEEE Trans. Image Process.
**2001**, 10, 266–277. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Osher, S.; Sethian, J.A. Fronts propagating with curvature-dependent speed: Algorithms based on Hamilton–Jacobi formulations. J. Comput. Phys.
**1988**, 79, 12–49. [Google Scholar] [CrossRef] [Green Version] - Brown, E.S.; Chan, T.F.; Bresson, X. Completely convex formulation of the Chan–Vese image segmentation model. Int. J. Comput. Vis.
**20012**, 98, 103–121. [Google Scholar] [CrossRef] - Shi, N.; Pan, J. An improved active contours model for image segmentation by level set method. Optik
**2016**, 127, 1037–1042. [Google Scholar] [CrossRef] - Çataloluk, H.; Çelebi, F.V. A novel hybrid model for two-phase image segmentation: GSA based Chan–Vese algorithm. Eng. Appl. Artif. Intell.
**2018**, 73, 22–30. [Google Scholar] [CrossRef] - Boykov, Y.; Funka-Lea, G. Graph cuts and efficient N-D image segmentation. Int. J. Comput. Vis.
**2006**, 70, 109–131. [Google Scholar] [CrossRef] [Green Version] - Bauer, S.; Wiest, R.; Nolte, L.P.; Reyes, M. A survey of MRI-based medical image analysis for brain tumor studies. Phys. Med. Biol.
**2013**, 58, R97–R129. [Google Scholar] [CrossRef] - Chen, B.; Zhou, X.H.; Zhang, L.W.; Wang, J.; Zhang, W.Q.; Zhang, C. A new nonlinear diffusion equation model for noisy image segmentation. Adv. Math. Phys.
**2016**, 2016, 8745706. [Google Scholar] [CrossRef] [Green Version] - Li, Y.; Kim, J. An unconditionally stable hybrid method for image segmentation. Appl. Numer. Math.
**2014**, 82, 32–43. [Google Scholar] [CrossRef] - Trottenberg, U.; Oosterlee, C.W.; Schüller, A. Multigrid; Academic Press: London, UK, 2001. [Google Scholar]
- Mumford, D.; Shah, J. Optimal approximation by piecewise smooth functions and associated variational problems. Commun. Pure Appl. Math.
**1989**, 42, 577–685. [Google Scholar] [CrossRef] [Green Version] - Oyjinda, P.; Pochai, N. Numerical simulation to air pollution emission control near an industrial zone. Adv. Math. Phys.
**2017**, 2017, 5287132. [Google Scholar] [CrossRef] [Green Version] - Jeong, D.; Kim, J. An explicit hybrid finite difference scheme for the Allen–Cahn equation. J. Comput. Appl. Math.
**2018**, 340, 247–255. [Google Scholar] [CrossRef] - Stuart, A.; Humphries, A.R. Dynamical System and Numerical Analysis; Cambridge University Press: Cambridge, UK, 1998. [Google Scholar]
- Li, Y.; Lee, H.G.; Jeong, D.; Kim, J. An unconditionally stable hybrid numerical method for solving the Allen–Cahn equation. Comput. Math. Appl.
**2010**, 60, 1591–1606. [Google Scholar] [CrossRef] [Green Version] - Biswas, S.; Hazra, R. A new binary level set model using L
_{0}regularizer for image segmentation. Signal. Process.**2020**, 174, 107603. [Google Scholar] [CrossRef] - Yang, X.; Gao, X.; Tao, D.; Li, X.; Li, J. An efficient MRF embedded level set method for image segmentation. IEEE Trans. Image Process.
**2015**, 24, 9–21. [Google Scholar] [CrossRef] - D’Ambra, P.; Tartaglione, G. Solution of Ambrosio—Tortorelli model for image segmentation by generalized relaxation method. Commun. Nonlinear Sci. Numer. Simul.
**2015**, 20, 819–831. [Google Scholar] [CrossRef] - Ramirez-Cortes, J.M.; Gomez-Gil, P.; Sanchez-Perez, G.; Prieto-Castro, C. Shape-based hand recognition approach using the morphological pattern spectrum. J. Electron. Imaging
**2009**, 18, 013012. [Google Scholar] - Yang, Y.; Tannenbaum, A.; Giddens, D. Knowledge-based 3D segmentation and reconstruction of coronary arteries using CT images. In Proceedings of the 26th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, San Francisco, CA, USA, 1–5 September 2004; pp. 1664–1666. [Google Scholar]
- Berenguer, A.; Mainar, V.; Bordes, P.; Valencia, J.; Arrarte, V. Spontaneous coronary artery dissection. An infrequent cause of acute coronary syndromes. Rev. Esp. Cardiol.
**2003**, 56, 1017–1021. [Google Scholar] [CrossRef] - Dai, L.; Ding, J.; Yang, J. Inhomogeneity-embedded active contour for natural image segmentation. Pattern Recognit.
**2015**, 48, 2513–2529. [Google Scholar] [CrossRef]

**Figure 4.**Zero level set (top row) and cross section (bottom row) along the $y=50$ of given image f (solid line) and numerical solution $\varphi $ (circle-marked line) for different $\lambda $.

**Figure 6.**Korean car license plate image segmentation: (

**a**) zero contour line with original image. (

**b**) Segmented image.

**Figure 7.**Allen–Cahn equation text image segmentation with a small circle initial condition. (

**a**) Original image and contour line. (

**b**) Filled contours.

**Figure 8.**Allen–Cahn equation text image segmentation with a random initial condition. (

**a**) Original image and contour line. (

**b**) Filled contours.

**Figure 9.**Barcode image segmentation with a rectangle initial condition. (

**a**) Original image and contour line. (

**b**) Segmented image.

**Figure 10.**Rice image with salt-and-paper noise segmentation. From left to right columns, the noise density level are $0.01,0.1,0.2$. (

**a**) Original image with noise and numerical results by (

**b**) previous method in [20] and (

**c**) proposed method used $\lambda =100,200,300$ according to each noise density level $0.01,0.1,0.2$, respectively.

**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].

**Figure 13.**Time evolution of normalized total discrete energy for numerical solution by previous method [13] and new proposed method.

**Figure 14.**Coronary image having intensity inhomogeneity. Original image from [25] which permissions by Elsevier and temporal segmented results. Here, the initial conditions are used by (

**a**) ${\varphi}_{0}=2{f}_{0}-1$ and (

**b**) two designated rectangles.

**Figure 15.**(

**a**) Schematic of the complex domain ${\mathsf{\Omega}}_{\mathrm{in}}$ containing the target image T on the whole domain $\mathsf{\Omega}$. (

**b**) Its corresponding discrete domain ${\mathsf{\Omega}}_{\mathrm{in}}^{h}$ which is represented by open circles.

**Figure 16.**Rice image (

**a**) target domain, (

**b**) segmented image, and (

**c**) segmented contour line with original image.

**Table 1.**Comparison of performance between our proposed method and previous method in [13].

Case | (a) | (b) | (c) | (d) | (e) | |
---|---|---|---|---|---|---|

parameters | pixels | $256\times 256$ | $256\times 256$ | $64\times 64$ | $256\times 256$ | $256\times 256$ |

$\lambda $ | 1 | 1.8 | 10 | 1 | 1.5 | |

$\u03f5$ | ${\u03f5}_{2}$ | ${\u03f5}_{40}$ | ${\u03f5}_{4}$ | ${\u03f5}_{5}$ | ${\u03f5}_{30}$ | |

$tol$ | 810 | 0.004 | 20 | 10 | 1.2 | |

proposed method | Iterations | 13 | 196 | 36 | 85 | 196 |

CPU time (s) | 0.437 | 6.235 | 0.078 | 2.859 | 6.266 | |

Li et al. [13] | Iterations | 12 | 200 | 36 | 87 | 195 |

CPU time (s) | 0.796 | 12.687 | 0.141 | 5.531 | 12.125 |

**Table 2.**Time step size $\Delta t$, the number of iterations, and CPU time (s) used in Figure 12c,d.

Method | Pixels | $\Delta \mathit{t}$ | Iterations | CPU Time (s) |
---|---|---|---|---|

Proposed method | $89\times 97$ | 0.1 | 13 | $0.826$ |

Li et al. [13] | $96\times 96$ | 0.1 | 13 | $1.061$ |

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Jeong, D.; Kim, S.; Lee, C.; Kim, J.
An Accurate and Practical Explicit Hybrid Method for the Chan–Vese Image Segmentation Model. *Mathematics* **2020**, *8*, 1173.
https://doi.org/10.3390/math8071173

**AMA Style**

Jeong D, Kim S, Lee C, Kim J.
An Accurate and Practical Explicit Hybrid Method for the Chan–Vese Image Segmentation Model. *Mathematics*. 2020; 8(7):1173.
https://doi.org/10.3390/math8071173

**Chicago/Turabian Style**

Jeong, Darae, Sangkwon Kim, Chaeyoung Lee, and Junseok Kim.
2020. "An Accurate and Practical Explicit Hybrid Method for the Chan–Vese Image Segmentation Model" *Mathematics* 8, no. 7: 1173.
https://doi.org/10.3390/math8071173