# Fast Image Segmentation Based on Efficient Implementation of the Chan-Vese Model with Discrete Gray Level Sets

Authors: Songsong Li; Qingpu Zhang
Journal: Mathematical Problems in Engineering
 (2013)

---

## Abstract

A new image segmentation based on fast implementation of the Chan-Vese model is proposed. This approach differs from previous methods in that we do not need to solve the Euler-Lagrange equation of the underlying variational problem. First, through experiments, we observe that for the smooth image segmentation, Chan-Vese model (CVM) can be simplified. Utilizing the Gaussian low pass filter, we pretreat the original image and regularize the level curves. Then, we calculate the energy directly on discrete gray level sets, find the minimizer of the energy, and obtain the segmentation results. We analyze the algorithm and prove that under discrete gray level sets, the global minimum of the energy is  same as the one obtained by the previous methods. Another advantage of this method is that the reinitialization is not needed. Since there are at most 255 discrete gray level sets, the algorithm improves the computational speed dramatically. And the complexity of the algorithm isO(N), where N is the number of pixels in the image. So even for the large images, it is also very efficient. We apply our segmentation algorithm to synthetic and real world images to emphasize the performances of our model compared with other segmentation models.


---

## Body

## 1. Introduction

Images are the proper 2D projections of the 3D world containing various objects. To successfully reconstruct the 3D world, at least approximately, the first crucial step is to identify the regions in images that correspond to individual objects. This is the well-known problem of image segmentation. It has broad applications in variety of important fields such as computer vision and medical image processing.Variational methods [1–16] have been extensively used and studied in image segmentation in the past decade because of their flexibility modeling and various advantages in the numerical implementation. These methods drive one or more initial curve(s), based on gradient and/or region information in the image, to the boundaries of objects in that image. The basic idea of variational methods is to minimize an energy. This functional generally depends on the features of the image. The classical way to solve the minimization problem is to solve the corresponding Euler-Lagrange equation. For instance, relatively early, Mumford and Shah [1] introduced a celebrated segmentation model by minimizing an energy functional that penalizes smoothness within regions and the length of their discontinuity contours. Recently, Chan and Vese [4] developed an active contour without edge model to deal with the problem of image segmentation by using the level-set framework introduced by Osher and Paragios [17]. Tsai et al. [5] also independently developed a segmentation method which is similar to it. The active contour methods [4–8, 10, 13] based on level-set framework have several advantages. First, they can deal with topological changes such as break and merger. Second, intrinsic geometric elements such as the normal vector and the curvature can be easily expressed with respect to the level-set function. Third, this level-set framework can be extended and applied in any dimension.However, the active contour methods based on level-set framework have some limitations. First, these methods are usually implemented by solving the partial differential equations (PDEs) and thus computational efficiency sharply decline because of numerical stability constraints. Particularly, the signed distance reinitialization procedure is necessary. It severely limits the efficiency of Chan-Vese model. Second, most methods have the initialization problem [6]: different initial curves produce different segmentations because of the nonconvexity of Chan-Vese model. More recently, some of the researchers develop fast algorithms [14–16, 18–20] for the Chan-Vese image segmentation model. In [14, 15, 18], the authors develop fast algorithms based on calculating the variational energy of the Chan-Vese model directly without the length term, that is, solving PDEs. In [14], the authors develop a fast method for image segmentation without solving the Euler-Lagrange equation of the underlying variational problem proposed by Chan and Vese [4]. Instead, they calculate the energy directly and check if the energy is decreased when they change a point inside the level-set to outside or vice versa. Later, various modifications of Chan-Vese model, related to different aspects of the image analysis, have been proposed, such as adaptive segmentation of vector images [7, 8, 19, 20] knowledge-based segmentation [13].An efficient implementation method for the Chan-Vese model is proposed in this paper. Since the simplified Chan-Vese model is without the length term, the new method does not have to solve PDEs. Our method is the hybrid of the discrete simplified Chan-Vese model and the discrete gray level-set framework. First, we decouple the Chan-Vese model into two stages: in the first stage, utilizing Gaussian low pass filter to pretreat the original image and obtaining some appropriate smooth versions of the original image; in the second stage, segmenting the smooth image by Chan-Vese model without the length term. Second, we implement the previous algorithm based on the discrete gray level-set framework. Our segmentation method is also divided into two stages: in the first stage, we smooth the image into required scale; in the second stage, we calculate the energy directly on discrete gray level sets and find the minimizer of the energy. Each stage is independent and at each stage the method is flexible. The new method bears some similarities to [14, 15, 18], but we calculate the energy directly on discrete gray level sets, which is a new framework. More complicated issues which are not considered in [14], such as sensitivity to noise, are discussed. The segmentation method can also deal with complicated image, and the CPU time of large size/complicated images is not too long. First, we do not need to solve the Euler-Lagrange equation of the underlying variational problem, so the initial conditions and the procedure of reinitiation are not needed. Second, in the second stage of our algorithm, the main computation process is adding operators and logical operators, which costs little CPU time, so the complexity of the algorithm is O(N).This paper is organized as follows. In Section2, we present the Chan-Vese piecewise smooth active contours model [4] (also the algorithm of Tsai et al. [5]) for image segmentation. In Section 3, we give a full account of our model. Experimental results are presented in Section 4, and the final section is our conclusion.


## 2. The Main Idea of the Chan-Vese Active Contours Model

In this section, we present the main idea of the Chan-Vese active contours model in order to develop the idea of the new fast hybrid level-set algorithm.The active contour model proposed by Chan and Vese [4] is a particular case of the Mumford-Shah model [1]. Consider an image u0 with the domain Ω⊂ℝ2. Let the segmenting closed curve C (active contour) divide Ω into two partitions Ω1 and Ω2, which is corresponding to the image subdomains inside and outside the curve C, respectively. It minimizes the following energy functional:
(1)F(c1,c2,C)=ν·Length(C)+∑i=12∫Ω1(u0(x,y)-ci)2dxdy,i=1,2,
where ci is the average value of u0(x,y) in each region Ωi and ν is a positive constant.Using the level-set method in [17], the authors replace the unknown curve C by the level-set function ϕ(x,y) defined by
(2)C={(x,y)∣ϕ(x,y)=0},Ω1=inside(C)={(x,y)∣ϕ(x,y)>0},Ω2=outside(C)={(x,y)∣ϕ(x,y)<0}.
Denote the Heaviside function H(3)H(z)={1,ifz≥0,0,ifz<0.
Then the energy functional (1) can be written in terms of the level-set formulation as
(4)F(c1,c2,ϕ)=ν∫Ω|∇H(ϕ)|dxdy+∫Ω(u0-c1)2H(ϕ)dxdy+∫Ω(u0-c2)2(1-H(ϕ))dxdy.
The finial segmentation curve could be obtained from the minimizer of the energy functional (4) with respect to ϕ. Using a gradient descent method, minimizing (4) yields the following problem:
(5)∂ϕ∂t=δ(ϕ)[ν·div(∇ϕ|∇ϕ|)-(u0-c1)2+(u0-c2)2],
where δ(ϕ)=H′(ϕ) in the distribution sense and
(6)c1=∫Ωu0H(ϕ)dx∫ΩH(ϕ)dx,c2=∫Ωu0(1-H(ϕ))dx∫Ω(1-H(ϕ))dx.
From the solution of the problems (5) and (6), we obtain the evolution of C(t), defined by {(x,y)∣ϕ(x,y,t)=0}, which is the boundary between the sets {(x,y)∣u0≈c1} and {(x,y)∣u0≈c2}. Therefore, the original image is segmented u0 into two parts.It is noticed that (5) is a nonlinear parabolic partial differential equation. So it requires expensive computation since the solution is on a large time domain (i.e., from the initial curve location to the finally achieved steady state). In particular, we need to reinitialize the level-set function ϕ to a signed distance function in each iteration. If we do not do it, when the level-set function ϕ becomes very sharp or flat during the evolution, it makes computation highly inaccurate. Although some semi-implicit methods in [21, 22] could be used to partially alleviate the computational burden, the process of reinitialization is very important and may not be avoided by using some level-set methods. All in all, the Chan and Vese algorithm works very well for image segmentation, but solving the Euler-Lagrange equations (5) and (6) and re-initializing the level-set function cost a lot of CPU time.In Section3, we will propose a fast hybrid gray level-set algorithm in order to overcome the previous shortcomings of the Chan-Vese model.


## 3. Our Method

In this section, we show a two-stage scheme for implementation of the piecewise constant segmentation model. More precisely, the smooth version of the original image is first obtained by some smooth filters, and then minimizing the modified Chan-Vese energy functional on the gray level sets, the image is divided into two subregions.


### 3.1. Segmentation for the Smooth Image

In the Chan-Vese segmentation model, the parameterν in (4) is a weight of the regularizing term, which controls the length of the zero level-set. When the noise level is high, the parameter ν should be large and only large objects are detected. When the noise level is low, the parameter ν could be small and objects of small size are detected. Because the Chan-Vese model is independent of the gradient of the image, the input image can be smooth enough [4]. So the segmentation method for the smooth image should be different from the method for the noise image. In Figure 1, we present results of the noise image and some smooth versions of the noise image by the Chan-Vese model with the same parameter ν=0, respectively. It is noticed that for the smooth image, the parameter ν could vanish in Chan-Vese model, and the good segmentation is also obtained.Segmentation results of the CV model. (a) The noise image with Gaussian white noise of mean0 and variance 0.1. (b) The segmentation result of the noise image. (c) The smooth image by Gaussian low pass filter with σ=0.9. (d) The segmentation result of the smooth image.
(a)
(b)
(c)
(d)Now, based on the previous facts, we assume that the input image is reasonably smooth, and then the parameterν could vanish in (4). Hence the following simplified Chan-Vese model without the length term is considered:
(7)F(c1,c2,ϕ)=∫Ω(u-c1)2H(ϕ)dxdy+∫Ω(u-c2)2(1-H(ϕ))dxdy.
Using the gradient descent method, minimizing (7) can solve the following problem:
(8)∂ϕ∂t=δ(ϕ)(-(u-c1)2+(u-c2)2),
where δ(ϕ)=H′(ϕ) in the distribution sense and
(9)c1=∫Ω‍uH(ϕ)dx∫Ω‍H(ϕ)dx,c2=∫Ω‍u(1-H(ϕ))dx∫Ω‍(1-H(ϕ))dx.
The simplified Chan-Vese algorithm is sketched in the following.Algorithm 1.
The simplified Chan-Vese algorithm is the following two-stage scheme.(1)
By the smooth filter obtain some appropriate smooth versionsu of the noise image u0.(2)
Calculate the minimum of the simplified Chan-Vese energy (7).
(i)
Initializeϕ0, n=0.(ii)
Computec1(ϕn) and c2(ϕn) by (9).(iii)
Solve the equation inϕ from (8), to obtain ϕn+1.(iv)
Reinitializeϕ locally (this step is optional).(v)
Check whether the solution is stationary. If not,n=n+1 and repeat (ii)–(v).The main difference between Algorithm1 and the original Chan-Vese model is whether the input image requires smooth pretreatment. In Algorithm 1, there are a lot of methods to smooth image, such as Gaussian low pass filter, averaging filter, Laplacian filter, and enhancing filter based on PDEs. In this paper, we choose the simplest and possibly one of the most popular ways, Gaussian low pass filter. Though all image information, such as the noise and edges, will be indistinguishably destroyed by this filter, it tampers with the segmentation result little, since the Chan-Vese model makes use of a stopping edge function based on the density of the image instead of the gradient. It is notice that if the images are noisy, we do a preprocessing step to smooth or enhance the images firstly, or else this step is needless. In Figures 2 and 3, we present the other two experiments by Algorithm 1. In the two experiments, Figure 3(a) is smoother than Figure 2(a), so Figure 3(a) needs to be smoothed more. For the level-set method, it is inevitable to reinitialize the level-set function for the stability of algorithms. However, for Algorithm 1, we need not reinitialize the level-set function ϕ to a signed distance function in each iteration, which is different from the Chan-Vese model. In Section 4, from the numerical experiments, we show the interesting phenomenon.Segmentation results by Algorithm1. (a) The noise image. (b) The smooth image by Gaussian low pass filter with σ=0.8. (c) The segmentation contour line. (d) The segmentation result.
(a)
(b)
(c)
(d)Segmentation results of Algorithm1. (a) The noise image. (b) The smooth image by Gaussian low pass filter with σ=0.1. (c) The segmentation contour line. (d) The segmentation result.
(a)
(b)
(c)
(d)Now, let us observe the following facts: for the noise image, the gray level lines are disorderly and irregular, while for the smooth image, the gray level lines are smooth and regular. These basic remarks are illustrated in Figure4. In Figure 4(j), the contour line is very approximate to the real edges of the original image. Hence, we think the best segmentation result is one of the contour lines. How can the best segmentation result, that is, the most appropriate contour line, be obtained? In the next subsection, we will answer the question and then propose the new algorithm.The level lines at different gray levels. (a) The noise image with Gaussian white noise of mean0 and variance 0.2. (b) The smooth image by Gaussian low pass filter with σ=1.5. (c)–(g) The level lines of the noise image at the gray level, 60, 80, 120, 180, and 200. (h)–(l) The level lines of the smooth image at the gray level, 60, 80, 120, 180, and 200.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)


### 3.2. The Discrete Simplified Chan-Vese Energy Functional on the Discrete Gray Level Sets

Letui,j, for (i,j)∈D≡{1,…,M}×{1,…,N}, be the gray level of a true M-by-N image u at pixel location (i,j), and let [smin,smax] be the range of u, that is, smin≤ui,j≤smax. Let D1⊂D and D2=D∖D1, and then the image u is divided into two regions by the pixel location. Instead u0 by u, H(ϕ) by D1, and (1-H(ϕ)) by D2, respectively. Then minimizing the energy (7) is changed into minimizing
(10)F1(c1,c2,D1,D2)=∑(i,j)∈D1(ui,j-c1)2+∑(i,j)∈D2(ui,j-c2)2,
with
(11)c1=∑(i,j)∈D1ui,j|D1|,c2=∑(i,j)∈D2ui,j|D2|,
where |D1|=∑(i,j)∈D11 is the number of pixels in D1 and |D2|=∑(i,j)∈D21 is the number of pixels in D2. When the energy F1 reaches a minimum, the best segmentation results are obtained, that is, the subregion D1 and subregion D2. It is noticed that since the selection of D1 and D2 is arbitrary, there are  lots of combinations (D1,D2), so minimizing the energy F1 is difficult. Now, we try to narrow the scope of the probable combinations. For any K∈[smin,smax], the image u is divided into two subregions, that is, D1K≡{(k,l):uk,l<K} and D2K≡{(k,l):uk,l≥K}.Definition 2 (discrete gray level-set).
TheK-discrete gray level-set DK which is the set of pixel location (i,j) is defined as follows:
(12)DK≡{(i,j):ui,j<K},
where ui,j is the gray level of the image u at pixel location (i,j).ThenD2K=D∖D1, for D1K≡{(k,l):uk,l<K}. Let 𝒜≡{(D1K,D2K),K∈[smin,smax]}, and then the element number of the set 𝒜 is smax-smin+1. For every level K, the image u is always divided into two disjointed subregions by D1K and D2K. In Figure 4, the boundary of D1K(D2K) is displayed at the different levels K, for the image u.Theorem 3.
Minimizing the energy functionalF1 is equivalent to
(13)min(D1,D2)∈𝒜F2(c1,c2,D1,D2)=∑(i,j)∈D1(ui,j-c1)2+∑(i,j)∈D2(ui,j-c2)2,
where c1 and c2 are defined as (11).Proof.
If(D1,D2)∈𝒜, then for any (i,j)∈D1, (i′,j′)∈D2, we have ui,j≤ui′,j′ and c1≤c2, where c1 and c2 are defined as (11). It is obvious that minF1≤F2. We only need to prove F2≤F1.
Assume there exist two subdomainsD1 and D2 such that F1 attains its minimizer. If there exist (i1,j1)∈D1 and (i2,j2)∈D2 such that ui1,j1>ui2,j2, then we denote D1′=D1-(i1,j1)+(i2,j2) and  D2′=D2-(i2,j2)+(i1,j1).
Comparing the energyF1(c1,c2,D1,D2) and F1′(c1′,c2′,D1′,D2′), we get
(14)F1-F1′=∑(i,j)∈D1(ui,j-c1)2+∑(i,j)∈D2(ui,j-c2)2-∑(i,j)∈D1′(ui,j-c1)2-∑(i,j)∈D2′(ui,j-c2)2=-|D1|c12-|D2|c22+|D1′|c1′2+|D2′|c2′2=|D1|(c1′+c1)(c1′-c1)+|D2|(c2′+c2)(c2′-c2)=(c1′+c1)(ui2,j2-ui1,j1)+(c2′+c2)(ui1,j1-ui2,j2)=(c1′+c1-c2′-c2)(ui2,j2-ui1,j1).
Since c1≤c2, we have
(15)c1′+c1-c2′-c2=2c1-ui1,j1-ui2,j2|D1|-2c2+ui2,j2-ui1,j1|D2|<0.
So we get
(16)F1′<F1.
Since the energy F1 obtains its minimizer, it is a contradiction. We complete the proof of the theorem.By the proof mentioned previously, we can easily see that(17)F1=∑(i,j)∈D1(ui,j-c1)2+∑(i,j)∈D2(ui,j-c2)2=∑(i,j)∈D‍ui,j2-|D1|c12-|D2|c22.
Hence we have the following.Theorem 4.
Minimizing the energy functionalF1 is equivalent to
(18)max(D1K,D2K)∈𝒜E(K)≡{|D1K|c12+|D2K|c22},
where K∈[smin,smax] and c1 and c2 are defined as (11).Now, if the energy functionalE reaches a maximum, the best segmentation results are obtained, that is, the subregion D1K and subregion D2K. Since K=smin,smin+1,…,smax, the energy functional E has smax-smin+1 cases, and then the maximum of E is easily found. The algorithm is sketched here in the following.Algorithm 5.
The method of maximizing the following functionalE.(1)
Sweep the imageu once, record the number of all pixels at every gray level of the image u which range from smin to smax.(2)
Calculate the energyE(K) by (18), for K∈[smin,smax], and find the maximizer 𝒦.(3)
The imageu is divided into two subregions, that is, D1𝒦={(i,j):u<𝒦} and D2𝒦={(i,j):u≥𝒦}.Remark 6.
In fact, we restrictD1K={(i,j):u<K,(i,j)∈D}, D2K={(i,j):u≥K,(i,j)∈D}, since if two pixels with the same value K belong to both D1K and D2K, it will be ambiguous to determinant. However, the pixel number of u at K gray level is a little and cannot influence the maximizer of the energy E(K). The experiment result shows that our approximated method is still efficient.


### 3.3. The Final Method

Based on Algorithm5, the following is the new two-phase scheme for image segmentation.Algorithm 7.
(i) (Smooth the original image): For the input noise image u0, use the Gaussian smooth filter to obtain the smooth image uS (If the input image is noiseless, this step is optional).
(ii) (Segmentation): Use Algorithm 5 to obtain the segmentation results for the smooth image uS, that is. (1)
Sweep the imageuS once, record the number of all pixels at every gray level of the image uS which range from smin to smax.(2)
Calculate the energyE(K) by (18), for K∈[smin,smax], and find the maximizer 𝒦.(3)
The imageu0 is divided into two subregions, that is, D1𝒦={(i,j):uS(i,j)<𝒦} and D2𝒦={(i,j):uS(i,j)≥𝒦}, and this completes a segmentation.Remark 8 (segmentation for various types of noisy image).
There are lots of methods to obtain the smooth image in the first phase of the new method.(i)
If the type of noise is “salt and pepper,” for example, the AMF (adaptive median filter) can be selected.(ii)
If the noise is “addition gauss noise,” for example, the gaussian lower-pass filter, the TV method [23], the PM method [24], and the other anisotropic diffusion method can be used to smooth the original image.(iii)
If the noise is “Poisson noise,” for example, the Variational method [25] can be used to denoise the original image.
In the new algorithm, the segmentation is only dependent on the smooth image but not sensitive to the smoothing scale. In Figure5, using the new algorithm, we deal with the image with different types of noise.Segmentations for theCameraman image with different types of noise. (a) The noise image corrupted by 50% salt and pepper noise. (b) The noise image corrupted by Poisson noise with the variance 4. (c)-(d) The segmentation results of the new algorithm. (e)-(f) The segmentation counter of the new algorithm.
(a)
(b)
(c)
(d)
(e)
(f)Remark 9.
In the new algorithm, we select the Gauss low pass filter to obtain the smooth image. However the filter is not necessary. If the image is corrupted by the different way, we will select the different filters, such as average filter, Laplacian filter, and unsharp filter. For the addition Gaussian noise, the gaussian lower-pass filter may be the best tradeoff between time and segmentation.


## 3.1. Segmentation for the Smooth Image

In the Chan-Vese segmentation model, the parameterν in (4) is a weight of the regularizing term, which controls the length of the zero level-set. When the noise level is high, the parameter ν should be large and only large objects are detected. When the noise level is low, the parameter ν could be small and objects of small size are detected. Because the Chan-Vese model is independent of the gradient of the image, the input image can be smooth enough [4]. So the segmentation method for the smooth image should be different from the method for the noise image. In Figure 1, we present results of the noise image and some smooth versions of the noise image by the Chan-Vese model with the same parameter ν=0, respectively. It is noticed that for the smooth image, the parameter ν could vanish in Chan-Vese model, and the good segmentation is also obtained.Segmentation results of the CV model. (a) The noise image with Gaussian white noise of mean0 and variance 0.1. (b) The segmentation result of the noise image. (c) The smooth image by Gaussian low pass filter with σ=0.9. (d) The segmentation result of the smooth image.
(a)
(b)
(c)
(d)Now, based on the previous facts, we assume that the input image is reasonably smooth, and then the parameterν could vanish in (4). Hence the following simplified Chan-Vese model without the length term is considered:
(7)F(c1,c2,ϕ)=∫Ω(u-c1)2H(ϕ)dxdy+∫Ω(u-c2)2(1-H(ϕ))dxdy.
Using the gradient descent method, minimizing (7) can solve the following problem:
(8)∂ϕ∂t=δ(ϕ)(-(u-c1)2+(u-c2)2),
where δ(ϕ)=H′(ϕ) in the distribution sense and
(9)c1=∫Ω‍uH(ϕ)dx∫Ω‍H(ϕ)dx,c2=∫Ω‍u(1-H(ϕ))dx∫Ω‍(1-H(ϕ))dx.
The simplified Chan-Vese algorithm is sketched in the following.Algorithm 1.
The simplified Chan-Vese algorithm is the following two-stage scheme.(1)
By the smooth filter obtain some appropriate smooth versionsu of the noise image u0.(2)
Calculate the minimum of the simplified Chan-Vese energy (7).
(i)
Initializeϕ0, n=0.(ii)
Computec1(ϕn) and c2(ϕn) by (9).(iii)
Solve the equation inϕ from (8), to obtain ϕn+1.(iv)
Reinitializeϕ locally (this step is optional).(v)
Check whether the solution is stationary. If not,n=n+1 and repeat (ii)–(v).The main difference between Algorithm1 and the original Chan-Vese model is whether the input image requires smooth pretreatment. In Algorithm 1, there are a lot of methods to smooth image, such as Gaussian low pass filter, averaging filter, Laplacian filter, and enhancing filter based on PDEs. In this paper, we choose the simplest and possibly one of the most popular ways, Gaussian low pass filter. Though all image information, such as the noise and edges, will be indistinguishably destroyed by this filter, it tampers with the segmentation result little, since the Chan-Vese model makes use of a stopping edge function based on the density of the image instead of the gradient. It is notice that if the images are noisy, we do a preprocessing step to smooth or enhance the images firstly, or else this step is needless. In Figures 2 and 3, we present the other two experiments by Algorithm 1. In the two experiments, Figure 3(a) is smoother than Figure 2(a), so Figure 3(a) needs to be smoothed more. For the level-set method, it is inevitable to reinitialize the level-set function for the stability of algorithms. However, for Algorithm 1, we need not reinitialize the level-set function ϕ to a signed distance function in each iteration, which is different from the Chan-Vese model. In Section 4, from the numerical experiments, we show the interesting phenomenon.Segmentation results by Algorithm1. (a) The noise image. (b) The smooth image by Gaussian low pass filter with σ=0.8. (c) The segmentation contour line. (d) The segmentation result.
(a)
(b)
(c)
(d)Segmentation results of Algorithm1. (a) The noise image. (b) The smooth image by Gaussian low pass filter with σ=0.1. (c) The segmentation contour line. (d) The segmentation result.
(a)
(b)
(c)
(d)Now, let us observe the following facts: for the noise image, the gray level lines are disorderly and irregular, while for the smooth image, the gray level lines are smooth and regular. These basic remarks are illustrated in Figure4. In Figure 4(j), the contour line is very approximate to the real edges of the original image. Hence, we think the best segmentation result is one of the contour lines. How can the best segmentation result, that is, the most appropriate contour line, be obtained? In the next subsection, we will answer the question and then propose the new algorithm.The level lines at different gray levels. (a) The noise image with Gaussian white noise of mean0 and variance 0.2. (b) The smooth image by Gaussian low pass filter with σ=1.5. (c)–(g) The level lines of the noise image at the gray level, 60, 80, 120, 180, and 200. (h)–(l) The level lines of the smooth image at the gray level, 60, 80, 120, 180, and 200.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)


## 3.2. The Discrete Simplified Chan-Vese Energy Functional on the Discrete Gray Level Sets

Letui,j, for (i,j)∈D≡{1,…,M}×{1,…,N}, be the gray level of a true M-by-N image u at pixel location (i,j), and let [smin,smax] be the range of u, that is, smin≤ui,j≤smax. Let D1⊂D and D2=D∖D1, and then the image u is divided into two regions by the pixel location. Instead u0 by u, H(ϕ) by D1, and (1-H(ϕ)) by D2, respectively. Then minimizing the energy (7) is changed into minimizing
(10)F1(c1,c2,D1,D2)=∑(i,j)∈D1(ui,j-c1)2+∑(i,j)∈D2(ui,j-c2)2,
with
(11)c1=∑(i,j)∈D1ui,j|D1|,c2=∑(i,j)∈D2ui,j|D2|,
where |D1|=∑(i,j)∈D11 is the number of pixels in D1 and |D2|=∑(i,j)∈D21 is the number of pixels in D2. When the energy F1 reaches a minimum, the best segmentation results are obtained, that is, the subregion D1 and subregion D2. It is noticed that since the selection of D1 and D2 is arbitrary, there are  lots of combinations (D1,D2), so minimizing the energy F1 is difficult. Now, we try to narrow the scope of the probable combinations. For any K∈[smin,smax], the image u is divided into two subregions, that is, D1K≡{(k,l):uk,l<K} and D2K≡{(k,l):uk,l≥K}.Definition 2 (discrete gray level-set).
TheK-discrete gray level-set DK which is the set of pixel location (i,j) is defined as follows:
(12)DK≡{(i,j):ui,j<K},
where ui,j is the gray level of the image u at pixel location (i,j).ThenD2K=D∖D1, for D1K≡{(k,l):uk,l<K}. Let 𝒜≡{(D1K,D2K),K∈[smin,smax]}, and then the element number of the set 𝒜 is smax-smin+1. For every level K, the image u is always divided into two disjointed subregions by D1K and D2K. In Figure 4, the boundary of D1K(D2K) is displayed at the different levels K, for the image u.Theorem 3.
Minimizing the energy functionalF1 is equivalent to
(13)min(D1,D2)∈𝒜F2(c1,c2,D1,D2)=∑(i,j)∈D1(ui,j-c1)2+∑(i,j)∈D2(ui,j-c2)2,
where c1 and c2 are defined as (11).Proof.
If(D1,D2)∈𝒜, then for any (i,j)∈D1, (i′,j′)∈D2, we have ui,j≤ui′,j′ and c1≤c2, where c1 and c2 are defined as (11). It is obvious that minF1≤F2. We only need to prove F2≤F1.
Assume there exist two subdomainsD1 and D2 such that F1 attains its minimizer. If there exist (i1,j1)∈D1 and (i2,j2)∈D2 such that ui1,j1>ui2,j2, then we denote D1′=D1-(i1,j1)+(i2,j2) and  D2′=D2-(i2,j2)+(i1,j1).
Comparing the energyF1(c1,c2,D1,D2) and F1′(c1′,c2′,D1′,D2′), we get
(14)F1-F1′=∑(i,j)∈D1(ui,j-c1)2+∑(i,j)∈D2(ui,j-c2)2-∑(i,j)∈D1′(ui,j-c1)2-∑(i,j)∈D2′(ui,j-c2)2=-|D1|c12-|D2|c22+|D1′|c1′2+|D2′|c2′2=|D1|(c1′+c1)(c1′-c1)+|D2|(c2′+c2)(c2′-c2)=(c1′+c1)(ui2,j2-ui1,j1)+(c2′+c2)(ui1,j1-ui2,j2)=(c1′+c1-c2′-c2)(ui2,j2-ui1,j1).
Since c1≤c2, we have
(15)c1′+c1-c2′-c2=2c1-ui1,j1-ui2,j2|D1|-2c2+ui2,j2-ui1,j1|D2|<0.
So we get
(16)F1′<F1.
Since the energy F1 obtains its minimizer, it is a contradiction. We complete the proof of the theorem.By the proof mentioned previously, we can easily see that(17)F1=∑(i,j)∈D1(ui,j-c1)2+∑(i,j)∈D2(ui,j-c2)2=∑(i,j)∈D‍ui,j2-|D1|c12-|D2|c22.
Hence we have the following.Theorem 4.
Minimizing the energy functionalF1 is equivalent to
(18)max(D1K,D2K)∈𝒜E(K)≡{|D1K|c12+|D2K|c22},
where K∈[smin,smax] and c1 and c2 are defined as (11).Now, if the energy functionalE reaches a maximum, the best segmentation results are obtained, that is, the subregion D1K and subregion D2K. Since K=smin,smin+1,…,smax, the energy functional E has smax-smin+1 cases, and then the maximum of E is easily found. The algorithm is sketched here in the following.Algorithm 5.
The method of maximizing the following functionalE.(1)
Sweep the imageu once, record the number of all pixels at every gray level of the image u which range from smin to smax.(2)
Calculate the energyE(K) by (18), for K∈[smin,smax], and find the maximizer 𝒦.(3)
The imageu is divided into two subregions, that is, D1𝒦={(i,j):u<𝒦} and D2𝒦={(i,j):u≥𝒦}.Remark 6.
In fact, we restrictD1K={(i,j):u<K,(i,j)∈D}, D2K={(i,j):u≥K,(i,j)∈D}, since if two pixels with the same value K belong to both D1K and D2K, it will be ambiguous to determinant. However, the pixel number of u at K gray level is a little and cannot influence the maximizer of the energy E(K). The experiment result shows that our approximated method is still efficient.


## 3.3. The Final Method

Based on Algorithm5, the following is the new two-phase scheme for image segmentation.Algorithm 7.
(i) (Smooth the original image): For the input noise image u0, use the Gaussian smooth filter to obtain the smooth image uS (If the input image is noiseless, this step is optional).
(ii) (Segmentation): Use Algorithm 5 to obtain the segmentation results for the smooth image uS, that is. (1)
Sweep the imageuS once, record the number of all pixels at every gray level of the image uS which range from smin to smax.(2)
Calculate the energyE(K) by (18), for K∈[smin,smax], and find the maximizer 𝒦.(3)
The imageu0 is divided into two subregions, that is, D1𝒦={(i,j):uS(i,j)<𝒦} and D2𝒦={(i,j):uS(i,j)≥𝒦}, and this completes a segmentation.Remark 8 (segmentation for various types of noisy image).
There are lots of methods to obtain the smooth image in the first phase of the new method.(i)
If the type of noise is “salt and pepper,” for example, the AMF (adaptive median filter) can be selected.(ii)
If the noise is “addition gauss noise,” for example, the gaussian lower-pass filter, the TV method [23], the PM method [24], and the other anisotropic diffusion method can be used to smooth the original image.(iii)
If the noise is “Poisson noise,” for example, the Variational method [25] can be used to denoise the original image.
In the new algorithm, the segmentation is only dependent on the smooth image but not sensitive to the smoothing scale. In Figure5, using the new algorithm, we deal with the image with different types of noise.Segmentations for theCameraman image with different types of noise. (a) The noise image corrupted by 50% salt and pepper noise. (b) The noise image corrupted by Poisson noise with the variance 4. (c)-(d) The segmentation results of the new algorithm. (e)-(f) The segmentation counter of the new algorithm.
(a)
(b)
(c)
(d)
(e)
(f)Remark 9.
In the new algorithm, we select the Gauss low pass filter to obtain the smooth image. However the filter is not necessary. If the image is corrupted by the different way, we will select the different filters, such as average filter, Laplacian filter, and unsharp filter. For the addition Gaussian noise, the gaussian lower-pass filter may be the best tradeoff between time and segmentation.


## 4. Simulations

In this section, numerical examples on some synthetic and real world images are presented to illustrate the effectiveness of the new two-phase scheme in Section4 by comparing it with Chan-Vese model.


### 4.1. Configuration

In the new algorithm, the first stage is smoothing the original image by low pass filter. The low pass filter is generally made by convolution with Gaussian of increasing variance, which is as follows:(19)u=Gσ*u0,
where Gσ=(1/σ)exp{-|x|2/4σ2} and * denotes the convolution operation. Koenderink [26] noticed that the convolution of signal with Gaussian at each scale is equivalent to the solution of the heat equation with the signal as initial datum u0; that is,
(20)∂u∂t=Δu,u(x,0)=u0.
Assuming a time step size of Δt and a space grid size of h, we quantize the time and space coordinates as follows:
(21)t=nΔt,n=0,1,2,…,x=ih,i=0,1,2,…,I,y=jh,j=0,1,2,…,J,
where Ih×Jh is the size of image support. The classical five-point explicit numerical schemes of the heat equation (20) are as follows:
(22)ui,jn+1-ui,jnΔt=ui+1,jn+ui-1,jn+ui,j+1n+ui,j-1n-4ui,jnh2,
or equivalently
(23)ui,jn+1=ui,jn+λ(ui+1,jn+ui-1,jn+ui,j+1n+ui,j-1n-4ui,jn),
where λ=Δt/h2<1/4 is for the stable of numerical scheme.The simulations are performed in Matlab R2007b on a 2.8 GHz Pentium 4 processor. For comparison purpose, the Chan-Vese method (CVM) [4] is also tested. We utilize a locally one-dimensional (LOD) scheme for CVM, which is an unconditional scheme [10].


### 4.2. Segmentation Performance

In Figures6 and 7, we illustrate the performance of CVM, Algorithms 1 and 7 on synthetic noise Test01 and Test02 images. Among the segmentations, all algorithms give similar and good performances. For CVM (the Chan-Vese method), utilizing the unconditionally LOD scheme, the time step size can be sufficiently large to reduce the iteration steps (only 6/7 steps in Table 1). However, re-initializing the level-set function costs a lot of CPU time (in Table 1).Table 1
Comparison of CPU time in seconds and iterative step.
Image
CVM
Algorithm1
Algorithm7
CPU (s)
Steps
CPU (s)
Steps
CPU (s)
Steps
Test01
482.3674
7
130.0337
5
0.0554
4
Test02
277.7851
6
126.7503
6
0.0540
4
CT
437.8700
8
1.9336
36
0.0406
3
Stone
6.7793
81
0.0798
5Segmentations for the noiseTest01 image. (a) The original image. (b) Corrupted Test01 image with Gaussian noise (1.93 dB). (c) Smoothed Test01 image with the numerical scheme (23) (λ=0.2). (d) Algorithm 7. (e) Algorithm 1. (f) CVM. (g)–(i) The segmentation counter of Algorithm 7, Algorithm 1, and CVM, respectively.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)Segmentations for the noiseTest02 image. (a) The original image. (b) Corrupted Test02 image with Gaussian noise (5.34 dB). (c) Smoothed Test02 image with the numerical scheme (23) (λ=0.1). (d) Algorithm 7. (e) Algorithm 1. (f) CVM. (g)–(i) The segmentation counter of Algorithms 7, 1, and CVM, respectively.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)In Figure8, on the synthetic noise Test03 image, we illustrate the results of Algorithm 1 with reinitialization and without reinitialization, respectively. One can see that in the segmentation process, reinitializing the level-set function or not influences the results of Algorithm 1 little (Figures 8(d)–8(g)). In CVM, reinitialization lets the level-set function ϕ not be very sharp, and |∇ϕ|=1 in mathematics. Algorithm 1 does not need ∇ϕ, so reinitialization is not necessary.Segmentations for the noiseTest03 image. (a) The original image (size 256×256). (b) Corrupted Test02 image with Gaussian noise (4.47 dB). (c) Smoothed Stone image with the numerical scheme (23) (λ=0.1 and 4 steps). (d) Algorithm 1 without re-initializing the level-set function. (e) Algorithm 1 with re-initializing the level-set function. (f)-(g) The segmentation counter of (d) and (e), respectively.
(a)
(b)
(c)
(d)
(e)
(f)
(g)In Figures9 and 10, we illustrate the results of Algorithm 1 without reinitialization and Algorithm 7 about a real CT and Stone image. Few differences between the segmented images are observed, but our method works much more faster than CVM (in Table 1).Segmentations for the noiseCT image. (a) The original image. (b) Smoothed CT image with the numerical scheme (23) (λ=0.1). (c) Algorithm 7. (d) Algorithm 1. (e) CVM. (f)–(h) The segmentation counter of Algorithms 7, 1, and CVM, respectively.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)Segmentations for the noiseStone image. (a) The original image. (b) Smoothed Stone image with the numerical scheme (23) (λ=0.1). (c) Algorithm 7. (d) Algorithm 1. (e)–(f) The segmentation counter of Algorithms 7 and 1, respectively.
(a)
(b)
(c)
(d)
(e)
(f)


### 4.3. Robustness with the Smooth Scaleσ

Instead of the low pass filter, we use the scheme (23) to smooth the image. Hence, the smooth scale σ depends on the parameter λ and the iteration step. The smoother of the original image, the more regular of the optimal gray level line. But if we regularize too much, we will remove details from the image (in figures, the corner information is lost). In Figure 11, we illustrate how our model works on a real nebula image with λ=0.1 and different iteration steps. In Figure 11, we can see that in different smooth scales σ, the gray level lines are different and evolved into the more regular ones. Compared with CVM, Algorithm 1 need not the initial level-set function ϕ0 and reinitialization. In Algorithm 1, we just adjust the parameter λ and the iteration step, and always obtain the global minimum of the energy functional.Segmentations for the noiseStar image. (a) The original image. (b) Smoothed Star image with the numerical scheme (23) (λ=0.1 and 3 steps). (c) Smoothed Star image (λ=0.1 and 10 steps). (d)–(g) Segmentation for the original image by Algorithms 7 and 1, respectively. (h)–(k) The segmentation for the smooth image (b). (l)–(o) The segmentation for the smooth image (c).
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
(n)
(o)


### 4.4. Computational Complexity

We end this section by considering the complexity of our algorithm. Our algorithm requires two phases: smoothing the original image and segmenting. The first phase is done by the scheme (23). Similar to other low pass filters, it is fast. It is also worth mentioning that one of the efficient implementations of the scheme (23) is FFT (Fast Fourier Transform Algorithm) and the complexity of this stage is O(N), where N is the number of pixels in the image. In the second segmentation phase, our algorithm only sweeps the image once, so the complexity of the stage is no more than O(N). In Table 1, we compare the CPU time needed of all three algorithms. We summarize that the CPU time of our Algorithm 7 is about 0.01–0.08 seconds which is the fastest in three algorithms.


### 4.5. Comparison with Some Other Segmentation Methods

There are some classical segmentation methods, such as the watershed algorithm [27], the Canny filter [28], and the Sobel filter. In Figure 12, the smooth versions of the images mentioned previously are processed by these algorithms. Watershed algorithm provides the advantages of stabilization and speediness, but is prone to oversegmentation in Figures 12(a)–12(c). In Figures 12(d)–12(f), the segmentation result of the Sobel operator is sensitive to the threshold: if the threshold is too small, the redundant edges will be detected; if the threshold is too big, the detected edges will be broken. The Canny filter is sensitive to noise in Figures 12(h)–12(i).Some classical segmentation methods for the smooth images. (a)–(c) The segmentations based on the watershed Algorithm. (d)–(f) The segmentations from the Sobel operator. (g)–(i) The segmentations from the Canny filter.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)


## 4.1. Configuration

In the new algorithm, the first stage is smoothing the original image by low pass filter. The low pass filter is generally made by convolution with Gaussian of increasing variance, which is as follows:(19)u=Gσ*u0,
where Gσ=(1/σ)exp{-|x|2/4σ2} and * denotes the convolution operation. Koenderink [26] noticed that the convolution of signal with Gaussian at each scale is equivalent to the solution of the heat equation with the signal as initial datum u0; that is,
(20)∂u∂t=Δu,u(x,0)=u0.
Assuming a time step size of Δt and a space grid size of h, we quantize the time and space coordinates as follows:
(21)t=nΔt,n=0,1,2,…,x=ih,i=0,1,2,…,I,y=jh,j=0,1,2,…,J,
where Ih×Jh is the size of image support. The classical five-point explicit numerical schemes of the heat equation (20) are as follows:
(22)ui,jn+1-ui,jnΔt=ui+1,jn+ui-1,jn+ui,j+1n+ui,j-1n-4ui,jnh2,
or equivalently
(23)ui,jn+1=ui,jn+λ(ui+1,jn+ui-1,jn+ui,j+1n+ui,j-1n-4ui,jn),
where λ=Δt/h2<1/4 is for the stable of numerical scheme.The simulations are performed in Matlab R2007b on a 2.8 GHz Pentium 4 processor. For comparison purpose, the Chan-Vese method (CVM) [4] is also tested. We utilize a locally one-dimensional (LOD) scheme for CVM, which is an unconditional scheme [10].


## 4.2. Segmentation Performance

In Figures6 and 7, we illustrate the performance of CVM, Algorithms 1 and 7 on synthetic noise Test01 and Test02 images. Among the segmentations, all algorithms give similar and good performances. For CVM (the Chan-Vese method), utilizing the unconditionally LOD scheme, the time step size can be sufficiently large to reduce the iteration steps (only 6/7 steps in Table 1). However, re-initializing the level-set function costs a lot of CPU time (in Table 1).Table 1
Comparison of CPU time in seconds and iterative step.
Image
CVM
Algorithm1
Algorithm7
CPU (s)
Steps
CPU (s)
Steps
CPU (s)
Steps
Test01
482.3674
7
130.0337
5
0.0554
4
Test02
277.7851
6
126.7503
6
0.0540
4
CT
437.8700
8
1.9336
36
0.0406
3
Stone
6.7793
81
0.0798
5Segmentations for the noiseTest01 image. (a) The original image. (b) Corrupted Test01 image with Gaussian noise (1.93 dB). (c) Smoothed Test01 image with the numerical scheme (23) (λ=0.2). (d) Algorithm 7. (e) Algorithm 1. (f) CVM. (g)–(i) The segmentation counter of Algorithm 7, Algorithm 1, and CVM, respectively.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)Segmentations for the noiseTest02 image. (a) The original image. (b) Corrupted Test02 image with Gaussian noise (5.34 dB). (c) Smoothed Test02 image with the numerical scheme (23) (λ=0.1). (d) Algorithm 7. (e) Algorithm 1. (f) CVM. (g)–(i) The segmentation counter of Algorithms 7, 1, and CVM, respectively.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)In Figure8, on the synthetic noise Test03 image, we illustrate the results of Algorithm 1 with reinitialization and without reinitialization, respectively. One can see that in the segmentation process, reinitializing the level-set function or not influences the results of Algorithm 1 little (Figures 8(d)–8(g)). In CVM, reinitialization lets the level-set function ϕ not be very sharp, and |∇ϕ|=1 in mathematics. Algorithm 1 does not need ∇ϕ, so reinitialization is not necessary.Segmentations for the noiseTest03 image. (a) The original image (size 256×256). (b) Corrupted Test02 image with Gaussian noise (4.47 dB). (c) Smoothed Stone image with the numerical scheme (23) (λ=0.1 and 4 steps). (d) Algorithm 1 without re-initializing the level-set function. (e) Algorithm 1 with re-initializing the level-set function. (f)-(g) The segmentation counter of (d) and (e), respectively.
(a)
(b)
(c)
(d)
(e)
(f)
(g)In Figures9 and 10, we illustrate the results of Algorithm 1 without reinitialization and Algorithm 7 about a real CT and Stone image. Few differences between the segmented images are observed, but our method works much more faster than CVM (in Table 1).Segmentations for the noiseCT image. (a) The original image. (b) Smoothed CT image with the numerical scheme (23) (λ=0.1). (c) Algorithm 7. (d) Algorithm 1. (e) CVM. (f)–(h) The segmentation counter of Algorithms 7, 1, and CVM, respectively.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)Segmentations for the noiseStone image. (a) The original image. (b) Smoothed Stone image with the numerical scheme (23) (λ=0.1). (c) Algorithm 7. (d) Algorithm 1. (e)–(f) The segmentation counter of Algorithms 7 and 1, respectively.
(a)
(b)
(c)
(d)
(e)
(f)


## 4.3. Robustness with the Smooth Scaleσ

Instead of the low pass filter, we use the scheme (23) to smooth the image. Hence, the smooth scale σ depends on the parameter λ and the iteration step. The smoother of the original image, the more regular of the optimal gray level line. But if we regularize too much, we will remove details from the image (in figures, the corner information is lost). In Figure 11, we illustrate how our model works on a real nebula image with λ=0.1 and different iteration steps. In Figure 11, we can see that in different smooth scales σ, the gray level lines are different and evolved into the more regular ones. Compared with CVM, Algorithm 1 need not the initial level-set function ϕ0 and reinitialization. In Algorithm 1, we just adjust the parameter λ and the iteration step, and always obtain the global minimum of the energy functional.Segmentations for the noiseStar image. (a) The original image. (b) Smoothed Star image with the numerical scheme (23) (λ=0.1 and 3 steps). (c) Smoothed Star image (λ=0.1 and 10 steps). (d)–(g) Segmentation for the original image by Algorithms 7 and 1, respectively. (h)–(k) The segmentation for the smooth image (b). (l)–(o) The segmentation for the smooth image (c).
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(m)
(n)
(o)


## 4.4. Computational Complexity

We end this section by considering the complexity of our algorithm. Our algorithm requires two phases: smoothing the original image and segmenting. The first phase is done by the scheme (23). Similar to other low pass filters, it is fast. It is also worth mentioning that one of the efficient implementations of the scheme (23) is FFT (Fast Fourier Transform Algorithm) and the complexity of this stage is O(N), where N is the number of pixels in the image. In the second segmentation phase, our algorithm only sweeps the image once, so the complexity of the stage is no more than O(N). In Table 1, we compare the CPU time needed of all three algorithms. We summarize that the CPU time of our Algorithm 7 is about 0.01–0.08 seconds which is the fastest in three algorithms.


## 4.5. Comparison with Some Other Segmentation Methods

There are some classical segmentation methods, such as the watershed algorithm [27], the Canny filter [28], and the Sobel filter. In Figure 12, the smooth versions of the images mentioned previously are processed by these algorithms. Watershed algorithm provides the advantages of stabilization and speediness, but is prone to oversegmentation in Figures 12(a)–12(c). In Figures 12(d)–12(f), the segmentation result of the Sobel operator is sensitive to the threshold: if the threshold is too small, the redundant edges will be detected; if the threshold is too big, the detected edges will be broken. The Canny filter is sensitive to noise in Figures 12(h)–12(i).Some classical segmentation methods for the smooth images. (a)–(c) The segmentations based on the watershed Algorithm. (d)–(f) The segmentations from the Sobel operator. (g)–(i) The segmentations from the Canny filter.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)


## 5. Summary and Further Research Directions

In this paper, we have proposed and implemented a new image segmentation algorithm based on the Chan-Vese active contour model. The discrete gray level-set method is employed in our numerical implementation. This algorithm works in two steps, smoothing the noisy image by using the heat equation filter method and then using the new discrete gray level-set method to segment the region of the original image.In the Chan-Vese segmentation algorithm, the initialization of the level-set functions is a difficult problem. In the proposed new segmentation algorithm, the initialization is not required. And each step is simple and easily achieved. In the first step, there are a lot of algorithms to get the smooth version of the original image, and in the second step, we sweep the image only once and calculate (18) at every gray level (in fact, only 256 gray level sets) and then find the optimal gray level. In Table 1, we show the CPU time of the Chan-Vese method and our proposed method. Obviously, our method is more efficient than the Chan-Vese method.Compared with the previous simultaneous segmentation methods [4, 5, 10], the proposed method is more simple, efficient, and flexible. First, we separate the segmentation processes into smoothing the original image and segmenting the smooth image into two regions, and in the second step, the mass of the computation process is adding operators and logical operators. Therefore, the CPU time of the second step is only a little (Tables 1 and 2). Second, the first step is just to get some smooth versions of the original image, so in some sense the second step is independent of the result of the first step, and the second step must have a result (of course, it is not always good).Table 2
The CPU time in seconds and iterative step.
λ
Algorithm1
Algorithm5
CPU (s)
Steps
CPU (s)
Steps
0.4154
4
0.0202
0
0.1
1.7060
20
0.0323
3
0.1
1.7703
26
0.0640
10While we have not pursued it in this paper, one of the potential advantages of our method is that we can also use it to color image. For example, one method for the color image segmentation is that we replace (1) by the new energy function proposed by Chan et al. [8], and other processes are similar to this paper.



---

*Source: 508543-2013-03-14.xml*