Lecture6 Levelsets3 PDF
Lecture6 Levelsets3 PDF
Some slides borrowed from Nikos Paragios, Christophe Restife, Chuck Dyer,
Guillermo Sapiro
Level Sets
C ( p) : R R 2
Implicit
C {( x, y ) | ( x, y ) 0}
Level Sets
C ( p) : R R 2
Implicit
C {( x, y ) | ( x, y ) 0}
Represent curves as all
points in the plane that
satisfy a certain equation
Level Sets
C ( p) : R R 2
Implicit
C {( x, y ) | ( x, y ) 0}
0 Only those points that
0 satisfy a certain equation
are curve points (zero dist)
Level Sets
C ( p) : R R 2
Implicit
C {( x, y ) | ( x, y ) 0}
0 Zero level set!
0
Level Sets
C ( p) : R R 2
1
0 1
0
0
To evolve this curve: we need to be able to
characterize tangents, normal and curvature with the
“implicit” representation. Else, its useless
Level Sets
0
0
To evolve this curve: we need to be able to
characterize tangents, normal and curvature with the
“implicit” representation. Else, its useless
s ( x, y ) x xs y ys , xs ys
T
Normals
Show : N
| |
But , T 0
Normals
Show : N
| |
, T 0
, T 0 (perpendic ular stays with change in magnitude)
| |
Show : div div (a b) a x by
| |
Remember: Curvature is second derivative due to arc.
Problem: We don’t have the explicit parameterization anymore; we
only have ϕ.
Let us go along the zero level set…where 0
d d d
ss ( x , y ) ( x x s y y s ) , T , T , N
ds ds ds
d
So , ,T , N 0
ds
Curvature
Show : div div (a b) a x by
| |
d
, N ,T
ds
d
, ,T
| | ds
, [ xx x s xy y s , xy x s yy y s ], T
| |
• Instead of specifying where the particles are or how many there are, the
curve/interface is given implicitly by
( x, y ) 0
Level Sets
• Instead of specifying where the particles are or how many there are, the
curve/interface is given implicitly by
( x, y ) 0
We can also do
( x, y ) 1, ( x, y ) 2,..., ( x, y ) 42
These are level sets of p and are in fact
solutions to
( x, y ) c (a constant)
Level Sets
C=2
C=1
C=0
( x, y ) x y2 2
( x, y ) x y
2 2
( x, y ) x y c
2 2
( x, y ) x y2 2
( x, y ) x y c
2 2
( x, y ) x y2 2
( x, y ) x y c
2 2
( x, y ) x y2 2
( x, y ) x y c
2 2
Advantages?
Level Sets
The third dimension (t) set to c cuts the function in two different places: two
circles
If t increases, the circles come closer, they merge, ϕ still remains a nice and
smooth function
Level Sets
The third dimension (t) set to c cuts the function in two different places: two
circles
If t increases, the circles come closer, they merge, ϕ still remains a nice
and smooth function
Level Sets
The third dimension (t) set to c cuts the function in two different places: two
circles
If t increases, the circles come closer, they merge, still remains a nice and
smooth function
will be the unknown we will solve for. This will be function of x, y, and t
Differences relative to particles
dC
V N
Recall: for curve evolution we had
dt
d
Here we will get (shortly) V | |
dt
Formalization
dC
V N
Recall: for curve evolution we had
dt
d
Here we will get (shortly) V | |
dt
C {( x, y ) | ( x, y ) 0}
We take derivative of ϕ according to t
x xt y yt t 0
t x xt y yt
t , Ct
Formalization
dC
V N
Recall: for curve evolution we had
t , Ct dt
t ,V N
t V , N But N
| |
t V ,
| |
t V | |
Formalization: Level set equation
F | ( ) | 0
t
Level Sets equation (look up Hamilton Jacobi)
Formalization: Setting up F
Small curvature
High curvature
Level Sets: distance function
Note that is defined for all points, not just the ones on the boundary (unlike
snakes)
Signed distance function has the property that
Speed as a function of curvature given as
Level Sets: distance function
Usual choice for : signed distance to the front (0)
- d(x,y, ) if (x,y) inside the front
(x,y,0) = 0 “ on “
d(x,y, ) “ outside “
7 6 5 4 4 4 3 2 1 1 1 2 3 4 5
5
6 5 4 3 3 3 2 1 0 0 0 1 2 3 4
5 4 3 2 2 2 1 0 -1 -1 -1 0 1 2 3
4 3 2 1 1 1 0 -1 -2 -2 -2 -1 0 1 2
3 2 1 0 0 0 -1 -2 -3 -3 -2 -1 0 1 2
2 1 0 -1 -1 -1 -2 -3 -3 -2 -1 0 1 2 3 0
2 1 0 -1 -2 -2 -3 -3 -2 -1 0 1 2 3 4
2 1 0 -1 -2 -2 -2 -2 -1 0 1 2 3 4 5
3 2 1 0 -1 -1 -1 -1 -1 0 1 2 3 4 5
4 3 2 1 0 0 0 0 -1 -1 0 1 2 3 4 -2
5 4 3 2 1 1 1 1 0 0 1 2 3 4 5
6 5 4 3 2 2 2 2 1 1 2 3 4 5 6
(x,y,t) (t)
Level Sets: distance function
7 6 5 4 4 4 3 2 1 1 1 2 3 4 5
6 5 4 3 3 3 2 1 0 0 0 1 2 3 4
5 4 3 2 2 2 1 0 -1 -1 -1 0 1 2 3
• no movement, only change of values
4 3 2 1 1 1 0 -1 -2 -2 -2 -1 0 1 2
3 2 1 0 0 0 -1 -2 -3 -3 -2 -1 0 1 2 • the front may change its topology
2 1 0 -1 -1 -1 -2 -3 -3 -2 -1 0 1 2 3
2 1 0 -1 -2 -2 -3 -3 -2 -1 0 1 2 3 4 • the front location may be
2 1 0 -1 -2 -2 -2 -2 -1 0 1 2 3 4 5 between samples
3 2 1 0 -1 -1 -1 -1 -1 0 1 2 3 4 5
4 3 2 1 0 0 0 0 -1 -1 0 1 2 3 4
5 4 3 2 1 1 1 1 0 0 1 2 3 4 5
6 5 4 3 2 2 2 2 1 1 2 3 4 5 6
7 6 5 4 4 4 3 2 1 1 1 2 3 4 5
(x,y,t) 6 5 4 3 3 3 2 0 -1 0 0 1 2 3 4
5 4 3 2 2 2 1 -1 -2 -1 -1 0 1 2 3
4 3 2 1 1 1 0 -1 -2 -2 -2 -1 0 1 2
3 2 1 0 0 0 -1 -2 -3 -3 -2 -1 0 1 2
2 1 0 -1 -1 -1 -2 -3 -3 -2 -1 0 1 2 3
2 1 0 -1 -2 -2 -3 -3 -2 -1 0 1 2 3 4
2 1 1 0 -2 -2 -2 -2 0 0 1 2 3 4 5
ˆ
k I FA FG ( ) 0
t
Level Sets equation setup
• Equation 17 p162:
ˆ
k I FA FG ( ) 0
t
(x,y,t+1) - (x,y,t)
Level Sets equation setup
ˆ
k I FA FG ( ) 0
t
(x,y,t+1) - (x,y,t)
extension of the
speed function kI
(image influence)
Level Sets equation setup
ˆ
k I FA FG ( ) 0
t
(x,y,t+1) - (x,y,t)
extension of the
speed function kI
(image influence)
constant “force”
(balloon pressure)
Level Sets equation setup
ˆ
k I FA FG ( ) 0
t
(x,y,t+1) - (x,y,t)
smoothing “force”
depending on the
extension of the local curvature
speed function kI (contour influence)
(image influence)
constant “force”
(balloon pressure)
Level Sets equation setup
ˆ
k I FA FG ( ) 0
t
(x,y,t+1) - (x,y,t)
smoothing “force”
depending on the
extension of the local curvature
speed function kI (contour influence)
(image influence)
constant “force”
(balloon pressure)
div
Level Sets equation setup
ˆ
k I FA FG ( ) 0
t
spatial
(x,y,t+1) - (x,y,t) derivative
smoothing “force”
of
depending on the
extension of the local curvature
speed function kI (contour influence)
(image influence)
constant “force”
(balloon pressure)
div
Level Sets equation setup
product of influences
ˆ
k I FA FG ( ) 0
t
spatial
(x,y,t+1) - (x,y,t) derivative
smoothing “force”
of
depending on the
extension of the local curvature
speed function kI (contour influence)
(image influence)
constant “force”
(balloon pressure)
div
Level Sets equation setup
product of influences
ˆ
k I FA FG ( ) 0
t
spatial
(x,y,t+1) - (x,y,t) derivative
smoothing “force”
of
depending on the
extension of the local curvature
speed function kI (contour influence)
(image influence)
constant “force”
1 div
kI (balloon pressure)
1 Gσ I x,y
- Gσ I x,y
kI e
Narrow-band extension
• Weaknesses o algorithm 1
– update of all (x,y,t): inefficient, only care about the front
– speed extension: computationally expensive
• Improvement:
– narrow band: only update a few level sets around
2 1 1 1 2
2 1 0 0 0 1 2
2 2 2 1 0 -1 -1 -1 0 1 2
2 1 1 1 0 -1 -2 -2 -2 -1 0 1 2
2 1 0 0 0 -1 -2 -2 -1 0 1 2
2 1 0 -1 -1 -1 -2 -2 -1 0 1 2
2 1 0 -1 -2 -2 -2 -1 0 1 2
2 1 0 -1 -2 -2 -2 -2 -1 0 1 2
2 1 0 -1 -1 -1 -1 -1 0 1 2
2 1 0 0 0 0 -1 -1 0 1 2
2 1 1 1 1 0 0 1 2
2 2 2 2 1 1 2
Fast Marching Method
(i) (ii)
(iii) (iv)
Examples
Examples