segmentation by bolonsafro

VIEWS: 127 PAGES: 2

• pg 1
```									LEVEL SET RESEARCH - IMAGE SEGMENTATION                                                                                                                                 1

Level Set Framework for Image Segmentation
Benjamin Ong, Simon Fraser University

I. Introduction                                                                III. Level Set Formulation

T    O detect objects in an image, active contour models
evolve an initial curve subject to constraints speciﬁed
in the image. In [1] T.F. Chan and L.A. Vese proposed an
In the level set method [2], C is represented by the zero
level set of a Lipschitz function φ : RN → R such that

active contour model using an energy minimization tech-                                                          C = {x ∈ RN : φ(x) = 0 }
nique. Their model works on noisy/blurred images, and                                                     inside C = {x ∈ RN : φ(x) > 0 }
does not rely on gradient values to ﬁnd the boundary.                                                    outside C = {x ∈ RN : φ(x) < 0 }
II. Model                                                 Using the standard deﬁnition for the Heaviside function H
and the dirac measure δ
sample image file without noise
1 if z ≥ 0
H(z) =
0 if z < 0
100
ui0                                                                      d
200                                                              ui0                            δ(z) =  H(z) (in the sense of distributions)
dz
300
We have the following results:
400
length
uo                                               =           | H(φ)|dx =               δ(φ)| φ|dx            (3)
500                                                   0
of C          Ω                         Ω
y

600                                                                                        Area inside C =              H(φ)dx , thus                             (4)
700
ui0                                                                                   Ω

|u0 − c1 |2 dx =        |u0 − c1 |2 H(φ)dx              (5)
800                                                                                            inside C                       Ω

900                                                                                                        |u0 − c2 |2 dx =        |u0 − c1 |2 {1 − H(φ)}dx (6)
outside C                       Ω
1000
0          200           400            600           800       1000         Therefore,
x
p

Assume that image u0 is formed by two regions of approx-                                      F (φ, c1 , c2 ) = µ           δ(φ)| φ|dx              +ν       H(φ)dx + (7)
Ω                                Ω
imately constant intensities ui and uo , and the object to
0       0
be detected is represented by the region with value ui . If
0
λ1        |u0 − c1 |2 H(φ)dx + λ2             |u0 − c1 |2 {1 − H(φ)}dx
Ω                                   Ω
the boundary is given by C0 , then u0 ≈ ui inside C0 and
0
u0 ≈ uo outside C0 . The following ﬁtting energy
0
Minimizing the energy functional with respect to c1 and c2
gives
F1 (C) + F2 (C) =                                  |u0 − c1 |2 dx          (1)                                u0 H(φ)dx
inside C
c1 (φ) = Ω                            (8)
Ω
H(φ)dx
+                             |u0 − c2 |2 dx                                                   u0 {1 − H(φ)}dx
Ω
outside C                                                        c2 (φ) =                                             (9)
Ω
{1 − H(φ)}dx
(where C is any variable curve, c1 and c2 are constants
depending on C) is minimized when C = C0 . i.e.                                             which correspond to the average value of u0 inside C and
outside C respectively. (note, the curve must have a non-
inf {F1 (C) + F2 (C)} ≈ 0 ≈ F1 (C0 ) + F2 (C0 )                                  empty interior and exterior).
C

Adding some regularizing terms like the length of C and                                                   IV. Euler-Lagrange Equations
the area inside C, the energy function F (C, c1 , c2 ) is given                             To compute the associated Euler-Lagrange equations for φ,
by                                                                                          we need regularized versions of H and δ such that δ = H
F (C, c1 , c2 ) = µ (length of C)p + ν (area inside C)                            (2)   In particular, we use

+λ1                   |u0 − c1 |2 dx + λ2                           |u0 − c2 |2 dx                                           1   2         z
H (z) =           arctan
1+                                 (10)
inside C                                 outside C                                                                2   π
c1 and c2 are constant unknowns, µ ≥ 0, ν ≥ 0, λ1 , λ2 >                                                                         1
δ (z) = H (z) =
0p > 0 are ﬁxed constants.                                                                                                       π    2 + z2
LEVEL SET RESEARCH - IMAGE SEGMENTATION                                                                                                          2

The associated regularized functional F of F will be                                                     VII. Results
p                                 Starting with an initial contours centered at (0.5, 0.5)
F (φ, c1 , c2 ) = µ           δ (φ)| φ|dx           +ν            H (φ)dx (11)    with radii 0.1, 0.3 and 0.4, the algorithm converged
Ω                                   Ω                   correctly to the the test image. It was impressive to
+λ1        |u0 − c1 |2 H (φ)dx + λ2             |u0 − c1 |2 {1 − H (φ)}dx         watch the contour deal with topological changes, the
Ω                                     Ω                                     sharp edges and the convex shape.
Keeping c1 and c2 ﬁxed we compute
1
lim   [F (φ + tψ, c1 , c2 ) − F (φ, c1 , c2 )]                (12)
t→0 t

(where ψ is a test function) to obtain the Euler Lagrange
equations for φ.
p−1
φ
δ (φ) µ p             δ (φ)| φ|                 ·                      (13)
Ω                                     | φ|

−ν − λ1 (u0 − c1 )2 + λ2 (u0 − c2 )2 = 0 on Ω

p−1
δ (φ) ∂φ
p         δ (φ)| φ|dx                     = 0 on ∂Ω                  (14)
Ω                          | φ| ∂n
V. Femlab Implementation
1. Intialize φ0
2. Calculate c1 (φ0 ), c2 (φ0 ) and L =                 Ω
δ (φ)| φ| dx
3. Solve PDE
∂φ                                          φ
= δ (φ) µ p(L)p−1              ·                    −ν            (15)
∂t                                        | φ|

−λ1 (u0 − c1 )2 + λ2 (u0 − c2 )2 = 0 on Ω

∂φ                                                                                              References
= 0 on ∂Ω                                                     (16)
∂n                                                                      [1] T.F. Chan and L.A. Vese, Active Contours without edges, IEEE
transactions on Image Processing, 2001, 10(2): 266-277.
VI. Comments                                        [2] S. Osher and J.A. Sethian Fronts Propagating with
Curvature-Dependent Speed Journal of Computational Physics,
• Ideally, one would loop steps 2 and 3. (i.e., after every                           1988 79, pp12-49.
time step, recalculate c1 ,c2 and L) however this was not
attempted because the code worked perfectly well.
Presumably, one would obtain better convergence if c1 ,c2
and L was recalculated on a frequent basis.
• We treated L =       δ (φ)| φ| explicitly because it does
Ω
not pose the stiﬀnes contraints created by the curvature
φ
term, κ = · | φ|
• It is probably a good idea to do a reinitialization after a
few steps. (For this test case, it didn’t make a diﬀerence.)
• The following parameters were used for the code,
ν = 0, µ = 0.1, λ1 = 1, λ2 = 1, p = 2

```
To top