0% found this document useful (0 votes)
62 views

Image Segmentation Algorithm by Piecewise Smooth Approximation

Uploaded by

أمين سيد
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

Image Segmentation Algorithm by Piecewise Smooth Approximation

Uploaded by

أمين سيد
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Wang and He EURASIP Journal on Image and Video Processing 2012, 2012:16

http://jivp.eurasipjournals.com/content/2012/1/16

RESEARCH Open Access

Image segmentation algorithm by piecewise


smooth approximation
Yan Wang1* and Chuanjiang He2

Abstract
We propose a novel image segmentation algorithm using piecewise smooth (PS) approximation to image. The
proposed algorithm is inspired by four well-known active contour models, i.e., Chan and Vese’ piecewise constant
(PC)/smooth models, the region-scalable fitting model, and the local image fitting model. The four models share
the same algorithm structure to find a PC/smooth approximation to the original image; the main difference is how
to define the energy functional to be minimized and the PC/smooth function. In this article, pursuing the same
idea we introduce different energy functional and PS function to search for the optimal PS approximation of the
original image. The initial function with our model can be chosen as a constant function, which implies that the
proposed algorithm is robust to initialization or even free of manual initialization. Experiments show that the
proposed algorithm is very appropriate for a wider range of images, including images with intensity inhomogeneity
and infrared ship images with low contrast and complex background.
Keywords: Image segmentation, Active contour model, Piecewise smooth approximation, Level set method, Partial
differential equation

Introduction provide smooth and closed contours, which is generally


Image segmentation is a popular problem in image pro- impossible in traditional segmentation methods. Existing
cessing and computer vision, which has been studied ex- implicit models can roughly be categorized into two
tensively in past decades. The segmentation goal is to classes: edge-based models [10,11,13] and region-based
separate image domain into a collection of distinct models [12,14-16]. Edge-based models use local edge infor-
regions, upon which other high-level tasks such as objects mation (image gradient) to perform contour extraction,
recognition and tracking can be further performed. Due to which are usually to noise and weak edges. Region-based
the presence of noise, complex background, low intensity models utilize the global and/or local image statistics inside
contrast with weak edges, and intensity inhomogeneity and outside the active contour (evolving curve) to find a
[1], image segmentation is still a difficult problem in prac- partition of image domain. They generally have better per-
tical applications, especially for traditional segmentation formance in the presence of weak or discontinuous bound-
methods [2-8]. Traditional methods, like Canny edge de- aries and less sensitive to initialization.
tection [7], are simple and fast, but they always need fur- A major category of the region-based level set methods
ther edge linking operation to produce continuous object is proposed to minimize the well-known Mumford and
boundaries [9]. To address these issues, more recent Shah (MS) functional [19]. Due to the difficulty of directly
methods including implicit active contours [9-17] have minimizing the MS functional, different approximation
been developed for image segmentation. methods have been proposed to allow more efficient en-
Implicit active contours are active contour models imple- ergy minimization. For example, the piecewise constant
mented via the level set method [18]. One of the remark- (PC) models [12,20] approximate image domain by a set of
able advantages of active contour models is that it can homogenous regions, but which is not true for images with
intensity inhomogeneity. In [21,22], more advanced piece-
wise smooth (PS) models have been proposed to improve
* Correspondence: [email protected]
1
College of Mathematics, Chongqing Normal University, Chongqing 401331, the PC model performance in terms of intensity inhomo-
China geneity. However, due to rather complicated algorithms,
Full list of author information is available at the end of the article

© 2012 Wang and He; licensee Springer. This is an Open Access article distributed under the terms of the Creative Commons
Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction
in any medium, provided the original work is properly cited.
Wang and He EURASIP Journal on Image and Video Processing 2012, 2012:16 Page 2 of 13
http://jivp.eurasipjournals.com/content/2012/1/16

these models are usually computationally expensive. As classical region-based models and indicate their limita-
indicated in [23], the models using global image statistics tions. The proposed algorithm is introduced in “The LIF
usually have difficulty to segment many real-world images model results in a local fitted image” section. The pro-
with intensity inhomogeneity. posed model presents experimental results using a set of
To address this issue, recently localized region-based synthetic and real images. This article is summarized in
models [14,16,23-25] have been proposed. For example, Li “Experimental results” section.
et al. [14] proposed a region-scalable fitting (RSF) model
(originally termed as local binary fitting (LBF) model [26]), Related studies
which draws upon spatially varying local region informa- Chan–Vese (CV) PC models
tion and thus is able to deal with intensity inhomogeneity. Chan and Vese [12] restricted the MS minimal partition
The RSF model has better performance than PC and PS problem [19] to PC functions and proposed a technique
models in segmentation of accuracy and computational ef- that implements efficiently the PC MS model via level
ficiency. However, since there are totally four convolutions set methods [18]. In level set methods, a contour C is
to be computed at each iteration in the implementation, represented implicitly by the zero-level set of a Lipschitz
the RSF model is still computationally expensive. For more function ϕ : Ω ! R, which is called a level set function.
efficient segmentation, Zhang et al. [16] proposed a novel In what follows, we let the level set function ϕ take posi-
active contour model driven by local image fitting (LIF) en- tive and negative values inside and outside the contour
ergy. The LIF energy is constructed by the local image in- C, respectively.
formation, which can be viewed as a constraint of the Let I : Ω⊂R2 ! R be an input image and H be the
differences between the fitting image and the original Heaviside function, the energy functional of the CV
image. The complexity analysis and experimental results model is defined as:
show that this model is more efficient than the LBF model, Z 2
while yielding similar results. E CV ðc1 ; c2 ; ϕÞ ¼ λ1 jI  c1 j HðϕÞdx þ λ1
These localized methods [14,16,25,26] are, however, to ZΩ 2 Z
some extent sensitive to contour initialization. Since the jI  c2 j ð1  HðϕÞÞdx þ ν jrH ðϕ Þjdx
Ω Ω
segmentation results typically depend on the selection of
initial contours, these methods need user intervention to ð1Þ
define the initial contours professionally. This means that where λ1 ; λ2 > 0 , v > 0 are constants. c1 and c2 are the
they may be fraught with the problems of how and where global averages of the image intensities in the region
to define the initial contours. The multiple-seed fx : ϕ ðxÞ > 0g and fx : ϕ ðxÞ < 0g , respectively, which
initialization used by Vese and Chan [21] also cannot al- are defined as:
ways produce better results than the single-seed Z
initialization [27]. Therefore, it is still a great challenge to I ðxÞH ðϕ ðxÞÞdx
find an efficient way to tackle the initialization problem. c1 ðϕ Þ ¼ ΩZ ; c2 ðϕ Þ
In this article, inspired by the above-mentioned four H ðϕ ðxÞÞdx
models [Chan–Vese (CV), PS, RSF, and LIF models], we Z Ω
propose a novel image segmentation algorithm without ini- I ðxÞð1  H ðϕ ðxÞÞÞdx
tial contours using PS approximation. The four models ¼ ΩZ ð2Þ
share the same algorithm structure to find a PC/smooth ð1  H ðϕ ðxÞÞÞdx
approximation to the original image; the main difference is Ω
how to define the energy functional to be minimized and
The CV model is implemented by an alternative pro-
the PC/smooth function. Pursuing the same idea, in this
cedure: for each iteration and the corresponding level
study, we introduce different energy functional and PS
set function ϕ n , we first compute the optimal constants
functions to search for the optimal PS approximation of
the original image. In the proposed algorithm, the initial c1 ðϕ n Þ and c2 ðϕ n Þ , then obtain ϕ nþ1 by minimizing
function can be chosen as a constant function, which im- E CV ðc1 ðϕ n Þ; c2 ðϕ n Þ; ϕ Þ with respect to ϕ. This process is
plies that the proposed algorithm allows for robustness to repeated until the zero-level set of ϕ nþ1 is exactly on the
initialization or even free of manual initialization. Experi- object boundary.
ments show that the proposed algorithm works well for The solution of the CV model in fact leads to a PC
images with intensity inhomogeneity. Moreover, it is very segmentation of the original image I (x):
appropriate for infrared images with low contrast and com- uðxÞ ¼ c1 HE ðϕ ðxÞÞ þ c2 ð1  HE ðϕ ðxÞÞÞ ð3Þ
plex background.
The remainder of this article is organized as follows. where c1 and c2 are the optimal constants c1 and c2 that
In “Related studies” section, we briefly review several minimize the global fitting energy (1) are the averages of
Wang and He EURASIP Journal on Image and Video Processing 2012, 2012:16 Page 3 of 13
http://jivp.eurasipjournals.com/content/2012/1/16

the image intensities in the region fx : ϕ ðxÞ > 0g and increases the computational cost. In summary, the high
fx : ϕ ðxÞ < 0g , respectively. Such optimal constants can complexity limits the application of PS model in practice.
be far away from the original image data, if the intensities
outside or inside the contour C ¼ fx : ϕ ðxÞ ¼ 0g are not RSF model
homogeneous. As a result, the CV model generally fails to In order to improve the performance of the global CV
segment images with intensity inhomogeneity. [12] and PS models on [21,22] images with inhomogen-
eity, Li et al. [14,26] recently proposed a novel region-
(PS) model based active contour model in a variational level set for-
Intensity inhomogeneity can be addressed by more mulation. They introduced a kernel function and defined
sophisticated models than PC models. Vese and Chan the following energy functional:
[21] and Tsai et al. [22] independently propose two simi- Z Z 
lar region-based models for general images. These mod- E RSF ðf1 ; f2 ; ϕÞ ¼ λ1 Kσ ðx  yÞjI ðyÞ  f1 ðxÞj2 H ðϕ ðyÞÞdy dx
els, widely known as (PS) models, aims at expressing the Z Z 
intensities inside and outside the contour as (PS) func- þλ2 Kσ ðx  yÞjI ðyÞ  f1 ðxÞj2 ð1  H ðϕ ðyÞÞÞdy dx
Z Z
tions instead of constants. The following energy func- 1
þν jrH ðϕ ðxÞÞjdx þ μ ðjrϕ ðxÞj  1Þ2 dx
tional was defined: Ω Ω2

Z 2 Z 2
ð8Þ
E PS ðuþ ; u ; ϕÞ ¼ juþ  I j HðϕÞdx þ μ jruþ j HðϕÞdx
Z Ω Z Ω where Kσ is a Gaussian kernel with standard deviation σ,
2 2
 
þ ju  I j ð1  H ðϕ ÞÞdx þ μ jru j ð1  H ðϕ ÞÞ dx and f1 (x) and f2 (x) are two smooth functions that ap-
Ω Z Ω proximate the local image intensities inside and outside
þν jrH ðϕ Þjdx the contour, respectively. They are computed as:
Ω
Z
ð4Þ
Kσ ðx  yÞI ðyÞH ðϕ ðyÞÞdy
where u+and u- are smooth functions approximating the f1 ðxÞ ¼ ΩZ ; f2 ð x Þ
image I inside and outside the contour, respectively, Kσ ðx  yÞH ðϕ ðyÞÞdy
which are obtained by solving the following two damped Z Ω
Poisson equations: Kσ ðx  yÞI ðyÞð1  H ðϕ ðyÞÞÞdy
¼ ΩZ ð9Þ
@uþ Kσ ðx  yÞð1  H ðϕ ðyÞÞÞdy
uþ  I ¼ μΔuþ in fx : ϕ ðxÞ > 0g;
@n Ω
¼ 0 on fx : ϕ ðxÞ ¼ 0g ð5Þ
The RSF model is implemented via an alternative pro-
@u cedure: for each iteration and the corresponding level
u  I ¼ μΔu in fx : ϕ ðxÞ < 0g; set function ϕ n , we first compute the fitting values
@n
¼ 0 on fx : ϕ ðxÞ ¼ 0g ð6Þ f1 ðϕ n Þ and f2 ðϕ n Þ , then obtain ϕ nþ1 by minimizing
E RSF ðf1 ðϕ n Þ; f2 ðϕ n Þ; ϕ Þ with respect to ϕ. This process is
The PS model is also implemented by an alternative repeated until the zero-level set of ϕ nþ1 is exactly on the
procedure: for each iteration and the corresponding level object boundary.
set function ϕ n , we first obtain uþ ðϕ n Þ and u ðϕ n Þ by Like the PS model, the solution of the RSF model also
solving Equations (5) and (6), then obtain ϕ nþ1 by min- lead to a piecewise smooth approximation of the original
imizing the functional E PS ðuþ ðϕ n Þ; u ðϕ n Þ; ϕ Þ with re- image I (x):
spect to ϕ. Repeat the process until the zero-level set of
ϕ nþ1 is exactly on the object boundary. uðxÞ ¼ f1 HE ðϕ ðxÞÞ þ f2 ð1  HE ðϕ ðxÞÞÞ ð10Þ
The solution of the PS model lead to a PS approxima-
However, the smooth functions f1 and f2 are computed
tion of the original image I(x):
directly from (9) but no longer obtained by solving
uðxÞ ¼ uþ H ðϕ ðxÞÞ þ u ð1  H ðϕ ðxÞÞÞ ð7Þ equations.
The RSF model improves the global PC and PS models
where u+ and u- are obtained by solving Equations (5) and on intensity inhomogeneity and is more computationally
(6). In the PS model, two coupled equations must be solved efficient than the PS models. Nevertheless, four convolu-
to obtain u+ and u- before each iteration, and the computa- tions to be computed at each iteration still demand a high
tional cost is very expensive. Moreover, in the implementa- computational cost. Besides, the RSF model is to some ex-
tion of PS model, u+ and u- must be extended to the whole tent sensitive to contour initialization (initial locations,
image domain, which is difficult to implement and also sizes and shapes); it obtained different segmentation with
Wang and He EURASIP Journal on Image and Video Processing 2012, 2012:16 Page 4 of 13
http://jivp.eurasipjournals.com/content/2012/1/16

different initial contours, even with the same parameter the upper row of Figure 2. The segmentation results in the
settings. second row of Figure 2 show that the RSF model can only
This can be seen from a simple experiment for an X-ray obtain accurate segmentation for the second initial contour
vessel image that used in [14]. Figure 1 shows the segmen- (Figure 2(g)).
tation results of the RSF model for the vessel image with
five different initial contour locations (circles with the same
size but different positions). The initial contours over the LIF model
original image are shown in the upper row of Figure 1. For efficient segmentation, Zhang et al. [16] utilized the
From the second row of Figure 1, we observe that the RSF local image information and proposed a LIF energy
model fails to extract the vessel for the first initial location functional by minimizing the difference between the fit-
(Figure 1(f)), although obtain satisfactory segmentation ted image and the original image. The formulation is
results for the other four locations (Figure 1(g)-(j)). Figure 2 expressed as:
displays the segmentation results of the RSF model for the Z 2
1
vessel image with different initial contour sizes and shapes. E LIF ðϕ Þ ¼ jI ðxÞ  ðm1 H ðϕ Þ þ m2 ð1  H ðϕ ÞÞÞj dx
The initial contours are chosen as circles and squares at 2 Ω
the center of image but with different sizes, as shown in ð11Þ

(a) (b) (c) (d) (e)

(f) (g) (h) (i) (j)

(k) (l) (m) (n) (o)


Figure 1 Results of the RSF and LIF models for a vessel image with five distinct initial contour locations. Upper row: original image and
initial contours. Middle row: segmentation results of the RSF model (2000, 120, 200, 120, 230 iterations). Lower row: segmentation results of the
LIF model (2000, 500, 200, 500, 2000 iterations).
Wang and He EURASIP Journal on Image and Video Processing 2012, 2012:16 Page 5 of 13
http://jivp.eurasipjournals.com/content/2012/1/16

(a) (b) (c) (d) (e)

(f) (g) (h) (i) (j)

(k) (l) (m) (n) (o)


Figure 2 Results of the RSF and LIF models for a vessel image with five distinct initial contour sizes and shapes. Upper row: original
image and initial contours. Middle row: segmentation results of the RSF model (2000, 350, 2000, 2000, 2000 iterations). Lower row: segmentation
results of the LIF model (2000, 500, 200, 500, 2000 iterations).

where I (x) is the image to be segmented, while m1 and This process is repeated until the zero-level set of ϕ nþ1
m2 are two fitting functions defined as is exactly on the object boundary.

 m1 ¼ meanðI 2 ð x 2 Ωjϕ ðxÞ < 0g \ Wk ðxÞÞÞ
The LIF model results in a local fitted image
m2 ¼ meanðI 2 ðfx 2 Ωjϕ ðxÞ≥0g \ Wk ðxÞÞÞ
I LFI ðxÞ ¼ m1 H ðϕ ðxÞÞ þ m2 ð1  H ðϕ ððxÞÞÞÞ: ð13Þ
ð12Þ

Here, Wk (x) is a rectangular window, which is gener- It is also a PS approximation of the original image but
ally chosen as a truncated Gaussian window Kσ (x) with with different fitting values m1 and m2.
standard deviation σ and of size 4 k × 4 k (k is the greatest By using local region information, the LIF model is able
integer smaller than σ). to provide desirable segmentation results in the presence
Similar as the above three models, the LIF is also of intensity inhomogeneity. Although it is more efficient
implemented by an alternative procedure: for each iter- than the RSF model, it is still sensitive to contour
ation and the corresponding level set function ϕ n , we initialization, like most existing localized active contours
first compute the fitting values m1 ðϕ n Þ and m2 ðϕ n Þ, then [14,16,25,26]. In practice, the LIF model initial contour has
obtain ϕ nþ1 by minimizing E LIF ðϕ Þ with respect to ϕ . to carefully be selected for a satisfactory segmentation.
Wang and He EURASIP Journal on Image and Video Processing 2012, 2012:16 Page 6 of 13
http://jivp.eurasipjournals.com/content/2012/1/16

This can be seen from a similar experiment as the RSF define both the energy functional to be minimized and
model in Figures 1 and 2. Figure 1(k)-(o) shows the seg- the PS function approximating the original image. In this
mentation results of the LIF model for the vessel image section, pursuing the same idea we introduce different
with five distinct initial locations, which reveal that the energy functional and PS function to search for the opti-
LIF model extracts accurately the object only for the sec- mal PS approximation of the original image.
ond and fourth initial contours (Figure 1 (l, n)). In For a given image I : Ω⊂R2 ! R and a level set func-
Figure 2(k)-(o), we demonstrate the segmentation results tion ψ, we first define two smooth functions as follows:
of the LIF model for the vessel image with five initial
contours of different sizes and shapes. From the results, Z
we observe that the LIF model fails to segment the ves- Kσ ðx  yÞI ðy ÞH ðψ ðy ÞÞdy
ΩZ
sel image for the third and fifth initial contours (Figure 2 h1 ðx; ψÞ ¼ ; x2Ω
(m, o)), although it better captures the object for the Kσ ðx  y ÞH ðψ ðy ÞÞdy
other three initial contours (Figure 2 (k, l, n)). Z Ω

Kσ ðx  yÞI ðy Þð1  H ðψ ðyÞÞÞdy


ΩZ
The proposed model h2 ðx; ψÞ ¼
The above-mentioned four models share the similar al- Kσ ðx  y Þð1  H ðψ ðyÞÞÞdy
gorithm structure to find a PS (constant) approximation Ω

of the original image. The main difference is how to ð14Þ

Figure 3 The curve evolution process of our model from the automatically generated contours to the final contours, starting with a
constant function ψ0 ¼2. First column: original images. Second and third columns: middle evolution process. Fourth column: final contours.
Wang and He EURASIP Journal on Image and Video Processing 2012, 2012:16 Page 7 of 13
http://jivp.eurasipjournals.com/content/2012/1/16

Figure 4 (See legend on next page.)


Wang and He EURASIP Journal on Image and Video Processing 2012, 2012:16 Page 8 of 13
http://jivp.eurasipjournals.com/content/2012/1/16

(See figure on previous page.)


Figure 4 Segmentations of four models for four real images with non-uniform backgrounds, starting with a constant function ψ0 ¼2.
(a)-(d): original images. (e)-(h): results of the Canny algorithm (left to right: σ ¼ 1; T ¼ ½0:02;0:2; σ ¼ 1; T ¼ ½0:2;0:3; σ ¼ 2:2; T ¼ ½0:09;0:7; σ ¼
2:2; T ¼ ½0:09;0:4). (i)-(l): results of the CV model (5, 5, 300, 500 iterations). (m)-(p): results of the RSF model (left to right: ν ¼ 0:01  255  255
with 300 iterations, ν ¼ 0:008  255  255with 560 iterations, λ2 ¼ 1:2; ν ¼ 0:008  255  255 with 300 iterations, ν ¼ 0:004  255  255 with
300 iterations). (q)-(t): results of our model (12, 24, 45, 87 iterations). (u) and (x): 3D plots of final level set functions.

where H is the Heaviside function, and Kσ is a Gaussian As in typical level set methods [12,14,15,21], it is ne-
kernel function: cessary to smooth the zero-level set by penalizing its
length:
1
ejuj=2σ
2
Kσ ðuÞ ¼ 1=2
ð15Þ Z
ð2π Þ σ
Lðϕ Þ ¼ jrH ðϕ ðxÞÞjdx ð20Þ
Ω
with a scale parameter σ > 0. The functions h1 ðx; ψ Þ and
h2 ðx; ψ Þ are really the weighted averages of the image in- In addition, for more accurate computation and stable
tensities in the regions fx : ψ ðxÞ > 0g and fx : ψ ðxÞ≤0g level set evolution, we need to regularize the level set
respectively, with Kσ ðx  y Þ as the weight assigned to function by penalizing its deviation from a signed dis-
the intensity I(y). The smoothness of h1 ðx; ψ Þ and tance function [13,28], which can be characterized by
h2 ðx; ψ Þ can be confirmed by the Gaussian convolutions the following energy functional
in (14).
Next, we introduce another level set function ϕ to al- Z
1
ternate with ψ, and finally find a level set function ϕ ∗ so P ðϕ Þ ¼ ðjrϕ ðxÞj  1Þ2 dx ð21Þ
that the following PS function: Ω2

The regularizing term P ðϕ Þ intrinsically maintains the


IψPS ðx; ϕ ∗ Þ ¼ h1 ðx; ψÞHðϕ ∗ ðxÞÞ þ h2 ðx; ψÞð1  Hðϕ ∗ ðx ÞÞÞ
regularity of the level set function without the need for

h1 ðx; ψÞ; x 2 fϕ ∗ > 0g extra re-initialization procedures.
¼
h2 ðx; ψÞ; x 2 fϕ ∗ ≤0g Therefore, the total energy functional of the proposed
ð16Þ model is given by

approximates optimally the original image I(x), in the


Eψ ðϕÞ ¼ EψPSF ðϕÞ þ vLðϕÞ þ μPðϕÞ
sense of Z Z
¼ jI  h1 j2 H ðϕ Þdx þ jI  h2 j2 ð1  H ðϕ ÞÞdx
Ω Z Z
Ω
EψPSF ðϕ ∗ Þ ¼ min EψPSF ðϕ Þ ð17Þ 1
ϕ þν jrH ðϕ Þjdx þ μ ðjrϕ j  1Þ2 dx
Ω Ω2
with ð22Þ
Z
EψPSF ðϕ Þ ¼ jI ðxÞ  h1 ðx; ψ Þj2 H ðϕ ðxÞÞdx where v, μ > 0 are constants to balance the terms.
ΩZ In practice, the Heaviside function H(z) needs to be
þ jI ðxÞ  h2 ðx; ψ Þj2 ð1  H ðϕ ðxÞÞÞdx approximated by a smooth function HE ðzÞ, which is typ-
Ω
ically given by
ð18Þ 
1 2 z
where ϕ is a level set function over the image domain HE ðzÞ ¼ 1 þ arctan ð23Þ
2 π E
Ω. The energy functional EψPSF ðϕ Þ can clearly be rewrit-
ten as Following the same algorithm structure as the four
Z  2 models mentioned in “Related studies” section, the pro-
  posed algorithm can simply be described as follows:
EψPSF ðϕ Þ ¼ I ðxÞ  IψPS ðx; ϕ Þ dx ð19Þ
Ω
1. Initialize the level set functionψ 0 ðxÞ, and set n = 0.
The energy functional EψPSF ðϕ Þ in (19) is in fact a 2. Compute the smooth functions h1 ðx; ψ n Þ and
square error of the approximation of the image I (x) by h2 ðx; ψ n Þ.
the PS function IψPS ðx; ϕ Þ; therefore, we call EψPSF ðϕ Þ the 3. Obtain ϕ nþ1 ðxÞ by minimizing the energy functional
piecewise smooth fitting (PSF) energy. Eψn ðϕ Þ.
Wang and He EURASIP Journal on Image and Video Processing 2012, 2012:16 Page 9 of 13
http://jivp.eurasipjournals.com/content/2012/1/16

Figure 5 (See legend on next page.)


Wang and He EURASIP Journal on Image and Video Processing 2012, 2012:16 Page 10 of 13
http://jivp.eurasipjournals.com/content/2012/1/16

(See figure on previous page.)


Figure 5 Segmentations of four models for four images with multiple objects of inhomogeneous intensities or inside holes, starting
with a constant function ψ0 ¼2. (a)-(d): original images. (e)-(h): results of the Canny algorithm (left to right: σ ¼ 1; T ¼ ½0:06;0:17; σ ¼ 2; T ¼
½0:05;0:4; σ ¼ 1; T ¼ ½0:006;0:3; σ ¼ 1; T ¼ ½0:006;0:02). (i)-(l): results of the CV model (left to right: λ1 ¼ 3:5with 500 iterations, ν ¼
0:015  255  255 with 500 iterations, 10, 300 iterations). (m)-(p): results of the RSF model (left to right: λ1 ¼ 1:2with 600 iterations, ν ¼
0:01  255  255with 500 iterations, 500 iterations, λ1 ¼ 1:5; ν ¼ 0:002  255  255 with 240 iterations). (q)-(t): results of our model (left to right:
21, 15, 10, 45 iterations). (u) and (x): 3D plots of final level set functions.

4. If the zero-level set of ϕ nþ1 ðxÞ is exactly on the as the forward difference. The approximation of Equa-
object boundary, then stop; otherwise, let n = n + 1 tion (24) can simply be written as
and ψ n ðxÞ ¼ ϕ n ðxÞ, then return to Step 2.  
ϕ kþ1
i:j ¼ ϕ k
i:j þ Δt:L ϕ ki:j ð27Þ
Note that the minimization problem in step 3 can be
solved by the standard gradient descent method [29]. In  
detail, for ψ n, we minimize Eψ n ðϕ Þ with respect to ϕ by where L ϕ ki:j is the approximation of the right-hand side
solving the following gradient flow equation: of Equation (24) by the above spatial difference scheme.
We next present the experiments on both synthetic

and real images with intensity inhomogeneity, noise and
¼ δ E ðϕÞ ðI  h1 ðx; ψ n ÞÞ2  ðI  h2 ðx; ψ n ÞÞ2
@t complex background. The function ψ is simply initia-
rϕ rϕ
þ νδ E ðϕÞdiv þ μ Δϕ  div lized to a constant function: ψ 0 ¼ 2 . Unless otherwise
jrϕ j jrϕ j
specified, we use the following default setting of the
ð24Þ parameters which are determined by experiments: σ ¼
18 , E ¼ 1:0 , μ ¼ 1 , ν ¼ 0:001  255  255 , space step
with the initial condition ϕ ð0; xÞ ¼ ψ n ðxÞ and Neumann
h ¼ 1(implied pixel spacing) and time step Δt ¼ 0:1. All
boundary condition. In Equation (24), δ E ðzÞ is the deriva-
experiments were run under Matlab R2007a on a PC
tive of the functionHE ðzÞ:
with Dual 2.7 GHz processor.
1 E Figure 3 shows the segmentation process of our model
δ E ðz Þ ¼ H 0 E ðz Þ ¼ ð25Þ for four typical images with intensity inhomogeneity
π E2 þ z 2
taken from [14]. The four images, which are plotted in
Remarks: Figure 3a,f,k,p, are a synthetic image (79 × 75) with
Gaussian noise, a real image of a T-shaped object
 The CV PC model can be considered as an extreme (127 × 90), an X-ray image of blood vessel (103 × 131),
case of the proposed model forσ ! 1. This can be and a brain MR image (119 × 78). The contours (zero-
seen from the fact that limσ!1 hi ðx; ψ Þ ¼ level set) evolution processes are shown in second to
ci ði ¼ 1; 2Þ [14]. forth columns. Although there are no initial contours
 For the regularized Heaviside functionHE , the for such non-zero constant function, we see from the
functions h1 ðx; ψ Þ and h2 ðx; ψ Þ in (14) are well second column that the contours emerge automatically
defined for any ψ. In applications, we suggest that after a few iterations. For the sake of clarity, we also list
the function ψ be simply initialized to a constant the segmentation results of the RSF model as well as ini-
function: tial contours (in red) in the last column of Figure 3. It
ψ 0 ðxÞ ¼ ρ; x2Ω ð26Þ can be seen from Figure 3 that our model obtains the
similar results with the classical RSF model on the seg-
mentation of images with intensity inhomogeneity.
where ρ is a constant. Such constant initialization com- The second example (see Figures 4 and 5) shows that
pletely eliminates the need of initial contours. We do our model can work well for images with noise or non-
not need to consider the problems such as the determin- uniform background and images with multiple objects of
ation of where and how to define the initial contours. inhomogeneous intensities, starting with a constant func-
tion. Meanwhile, to further demonstrate the advantages
Experimental results of our model, we give the segmentation results of one
Equation (24) is numerically implemented using a simple traditional method (Canny edge detector [7]) and two
finite differencing (forward-time central-space finite dif- famous active contour models (the CV model [12] and
ference scheme). All the spatial partial derivatives @ϕ=@x the RSF model [14]) for comparison. Note that, for the
and @ϕ=@y are approximated by the central difference, Canny edge detector, we implement the fix threshold ver-
and the temporal partial derivative @ϕ=@t is discretized sion and optimize the method with respect to σ (the scale
Wang and He EURASIP Journal on Image and Video Processing 2012, 2012:16 Page 11 of 13
http://jivp.eurasipjournals.com/content/2012/1/16

Figure 6 (See legend on next page.)


Wang and He EURASIP Journal on Image and Video Processing 2012, 2012:16 Page 12 of 13
http://jivp.eurasipjournals.com/content/2012/1/16

(See figure on previous page.)


Figure 6 Segmentations of four models for four real infrared images with blurry edges and complex backgrounds, starting with a
constant function ψ0 ¼2. (a)-(d): original images. (e)-(h): results of the Canny algorithm (left to right: σ ¼ 1; T ¼ ½0:01;0:3; σ ¼ 1:3; T ¼ ½0:03;0:4
; σ ¼ 2; T ¼ ½0:03;0:6; σ ¼ 1:5; T ¼ ½0:03;0:9). (i)-(l): results of the CV model (left to right: 500 iterations, 140 iterations, ν ¼ 0:015  255  255
with 500 iterations, λ1 ¼ 1:2; ν ¼ 0:02  255  255 with 500 iterations). (m)-(p): results of the RSF model (left to right: 40 iterations, λ1 ¼ 1:2; ν ¼
0:005  255  255with 500 iterations, λ1 ¼ 1:2; ν ¼ 0:007  255  255 with 1000 iterations, ν ¼ 0:06  255  255 with 280 iterations). (q)-(t):
results of our model (15 iterations). (u) and (x): 3D plots of final level set functions.

parameter in the Gaussian filtering function Kσ) and to images with obvious intensity gradient (Figure 5(f )-(h)),

the gradient thresholds x T ¼ Tlow ; Thigh ; for the CV but the contour detected for another image is disturbed
and RSF models, the initial contours are necessary (we by non-uniform intensity (Figure 5(e)). From the results
choose a square centered at the image with the size of of the CV model shown in Figure 5(i)-(l), we observe
40 × 40 pixels for all the images in Figures 4, 5 and 6). Be- that, the CV model can deal with homogeneous images
sides, we choose the best parameters for them (given in with multiple objects or inside holes (Figure 5(f ) and
the Figure Caption) and list the best results we have (g)), but if the intensity in such images are inhomogen-
obtained. eous, it fails to obtain the whole boundaries for all of the
Figure 4 shows the segmentation results of four methods objects (Figure 5(i) and (l)). Figure 5(m)-(p) shows the
for four real images: a leaf image (122×120) with texture best segmentation results of the RSF model we obtained
background, a chip image (182 × 180), a breast cyst image by tuning parameters; it obtain the exact result only for
(91 × 92), and a CT medical image (117 × 123). Because of the last image (Figure 5(p)). The results of our model
the influence of the texture, material properties, breast tis- and the corresponding 3D plots of final level set func-
sue, and the technical limitations, the backgrounds in these tions are shown in the last two rows of Figure 5. As can
images are non-uniform, noise or even complex. Figure 4 be seen from Figure 5(q)-(t), our method detects all the
(e)-(h) give the contours detected by Canny algorithm; we objects, even though the object intensity is inhomogen-
see that some contours detected by this algorithm are not eous and some edges are blurry.
continuous (Figure 4(e)). From the results of the CV model The third example presented in Figure 6 demonstrates
shown in Figure 4(i)-(l), we observe that, the CV model that our model is especially suitable for segmentation of
works well for images with less non-uniform (Figure 4(i) infrared ship images with low contrast, blurry edges and
and (j)), however, if the level of non-uniform is higher, it complex (noisy) background. Because of the limitation
fails to obtain exact segmentation results and identifies in- of thermal imaging and the actual water-mountain-sky
correctly some part of the background/foreground as the conflicts, infrared images always suffers from low con-
background/foreground (Figure 4(k) and (l)). Figure 4(m)- trast and complex background; thus, it is not a trivial
(p) shows the results of the RSF model; with fine-tuning task for most existing models to extract the objects
parameters (given in the Figure Caption), the RSF model (ships) in such images. As can be seen from Figure 6(e)-
obtain satisfactory segmentation results expect for a little (h), Canny algorithm has difficulty dealing with such in-
deficit in the lower left corner of the object in Figure 4(p). frared ship images, due to the presence of noise, low
The results of our model and the corresponding 3D plots contrast, complex background and so on. To suppress
of final level set functions are shown in the last two rows noise effectively, a larger σ or a higher threshold T is
of Figure 4. As can be seen from Figure 4(q)-(t), our model needed, but a larger σ can result in edge shifting or in-
has effectively extracted object boundaries from the non- accurate edge location (Figure 6(s)) and a higher T al-
uniform and noisy background. For these four images, we ways causes edge leaking (Figure 6(r)). From the results
chose large values for v to enhance the model’s robustness of the CV model shown in Figure 6(i)-(l), we observe
to noise: σ = 5 for Figure 4(a), σ ¼ 20; ν ¼ 0:003  255  that, the CV model obtain acceptable results in Figure 6
255 for Figure 4(b), ν ¼ 0:0085  255  255 for Figure 4 (j) and (k), but due to the intensity inhomogeneity and
(c) and σ ¼ 12; ν ¼ 0:003  255  255 for Figure 4(d). noise, it can’t obtain the exact object boundaries in Fig-
Figure 5 show experiments on multiple objects and in- ure 6(i) and (l). Figure 6(m)-(p) shows the segmentation
side holes segmentation. Figure 5(a)-(d) is: a potato results of the RSF model; it obtain the accurate results
image (157 × 157) with inhomogeneous intensities, a cell only for the first and the last image (Figure 6(m) and
image (195 × 183) with one cell crossing the image (p)). In contrast, our model, starting with a nonzero con-
boundary, a wrench image (200 × 200) with interior holes stant function, has successfully extracted the ships from
in each object, and a synthetic image (118 × 134) with the complex backgrounds, as shown in Figure 6(q)-(t).
seven different intensity values, respectively. Figure 5(e)- For noisy images, we increase the value of v to improve
(h) give the contours detected by Canny algorithm; we the model’s performance: ν ¼ 0:007  255  255 for
see that it extracts the satisfactory object contours for Figure 6(c) and ν ¼ 0:02  255  255 for Figure 6(d).
Wang and He EURASIP Journal on Image and Video Processing 2012, 2012:16 Page 13 of 13
http://jivp.eurasipjournals.com/content/2012/1/16

Conclusion 18. S Osher, JA Sethian, Fronts propagating with curvature-dependent speed:


In this article, we propose a novel image segmentation algorithms based on Hamilton-Jacobi formulations. J. Comput. Phys. 79,
12–49 (1988)
algorithm by PS approximation. The proposed model, 19. D Mumford, J. Shah, Optimal approximation by piecewise smooth functions
which pursues the basic ideas behind four well-known and associated variational problems. Commun. Pure Appl. Math. 42(5),
region-based models, introduces different energy func- 577–685 (1989)
20. X Wang, L He, WG Wee, Deformable contour method: a constrained
tional and PS functions to find the optimal PS approxi- optimization approach. Int. J. Comput. Vis. 59(1), 87–108 (2004)
mation of the original image. The initial function can be 21. LA Vese, TF Chan, A multiphase level set framework for image segmentation
chosen as a constant function, which completely elimi- using the Mumford and Shah model. Int. J. Comput. Vis. 50(3), 271–293 (2002)
22. A Tsai, A Yezzi, AS Willsky, Curve evolution implementation of the
nates the need of initial contours. The proposed model Mumford–Shah functional for image segmentation, denoising, interpolation,
is very appropriate for a wider range of images, including and magnification. IEEE Trans. Image Process. 10(8), 1169–1186 (2001)
images with intensity inhomogeneity and infrared images 23. S Lankton, A Tannenbaum, Localizing region-based active contours. IEEE
Trans. Image Process. 17(11), 2029–2039 (2008)
with low contrast and complex background. 24. T Brox, D Cremers, On the statistical interpretation of the piecewise smooth
Mumford–Shah functional, in Proceedings of the Scale Space Methods and
Competing interests Variational Methods (SSVM ’07), vol. 4485 of Lecture Notes in Computer Science
The authors declare that they have no competing interests. (Ischia, Italy, 2007), pp. 203–213
25. J Piovano, M Rousson, T Papadopoulo, Efficient segmentation of piecewise
Acknowledgements smooth images, in Proceedings of the Scale Space Methods and Variational
This work is supported by the National Natural Science Foundation of China Methods (SSVM ’07) (Lecture Notes in Computer Science, Ischia, Italy, 2007),
under Grant No. 61202349 and No. 11201506. pp. 709–720
26. C Li, C Kao, J Gore, Z Ding, Implicit active contours driven by local binary
Author details fitting energy, in Proceedings of IEEE conference on Computer Vision and
1
College of Mathematics, Chongqing Normal University, Chongqing 401331, Pattern Recognition (CVPR) (, Washington, USA, 2007), pp. 1–7
China. 2College of Mathematics and Statistics, Chongqing University, 27. S Gao, TD Bui, Image segmentation and selective smoothing by using
Chongqing 401331, China. Mumford–Shah model. IEEE Trans. Image Process. 14(10), 1537–1549 (2005)
28. C Li, C Xu, C Gui, MD Fox, Distance regularized level set evolution and its
Received: 24 October 2011 Accepted: 3 September 2012 application to image segmentation. IEEE Trans. Image Process. 19(12),
Published: 24 September 2012 3243–3254 (2010)
29. G Aubert, P Kornprobst, Mathematical Problems in Image Processing: Partial
References Differential Equations and the Calculus of Variations, 2nd edn. (Springer, New
1. L He, Z Peng, B Everding, X Wang, CY Han, KL Weiss, WG Wee, A York, 2002)
comparative study of deformable contour methods on medical image
segmentation. Image Vision Comput. 26(2), 141–163 (2008)
doi:10.1186/1687-5281-2012-16
2. G Papari, N Petkov, Edge and line oriented contour detection: state of the
Cite this article as: Wang and He: Image segmentation algorithm by
art. Image Vision Comput. 29, 79–103 (2011) piecewise smooth approximation. EURASIP Journal on Image and Video
3. NR Pal, SK Pal, A review on image segmentation techniques. Pattern Processing 2012 2012:16.
Recogn. 26(9), 1277–1294 (1993)
4. S Wang, JM Siskind, Image segmentation with ratio cut. IEEE Trans. Pattern
Anal. Mach. Intell. 25(6), 675–690 (2003)
5. SK Nath, K Palaniappan, Fast graph partitioning active contours for image
segmentation using histograms. EURASIP J. Image Vide. 2009, 9 (2009)
6. S Chabrier, C Rosenberger, B Emile, H Laurent, Optimization-based image
segmentation by genetic algorithms. EURASIP J. Image Vide. 2008, 1–10
(2008)
7. J Canny, A computational approach to edge detection. IEEE Trans. Pattern
Analysis and Machine Intelligence 8, 679–714 (1986)
8. R Kimmel, AM Bruckstein, On regularized Laplacian zero crossings and other
optimal edge integrators. Int. J. Comput. Vis. 53(3), 225–243 (2003)
9. L He, S Zheng, L Wang, Integrating local distribution information with level
set for boundary extraction. J. Vis. Commun. Image R. 21, 343–354 (2010)
10. V Caselles, F Catte, T Coll, F Dibos, A geometric model for active contours in
image processing. Numer. Math. 66, 1–31 (1993)
11. V Caselles, R Kimmel, G Sapiro, Geodesic active contours. Int. J. Comput. Vis.
22(1), 61–79 (1997)
12. TF Chan, LA Vese, Active contours without edges. IEEE Trans. Image Process.
10(2), 266–277 (2001) Submit your manuscript to a
13. C Li, C Xu, C Gui, MD Fox, in Proceedings of IEEE conference on Computer
Vision and Pattern Recognition (CVPR), ed. by, 1st edn. (San Diego, CA, USA, journal and benefit from:
2005), pp. 430–436
14. C Li, C Kao, JC Gore, Z Ding, Minimization of region-scalable fitting energy 7 Convenient online submission
for image segmentation. IEEE Trans. Image Process. 17(10), 1940–1949 7 Rigorous peer review
(2008) 7 Immediate publication on acceptance
15. L Wang, C Li, Q Sun, D Xia, C Kao, Active contours driven by local and 7 Open access: articles freely available online
global intensity fitting energy with application to brain MR image
7 High visibility within the field
segmentation. Comput. Med. Imaging Graph. 33(7), 520–531 (2009)
16. K. Zhang, H. Song, L. Zhang, Active contours driven by local image fitting 7 Retaining the copyright to your article
energy. Pattern Recognit. 43, 1199–1206 (2010)
17. Y Wang, C He, Adaptive level set evolution starting with a constant
Submit your next manuscript at 7 springeropen.com
function. Appl. Math. Model. 36, 3217–3228 (2012)

You might also like