75
LevelSet Methods & Dynamic Implicit Surfaces

Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Level-­‐Set  Methods  &  Dynamic  Implicit  Surfaces  

Page 2: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Overview  

•  Implicit  Surfaces  •  Level  Set  Methods  

Page 3: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Overview  

•  Implicit  Surfaces  •  Level  Set  Methods  

Page 4: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Overview  

•  Implicit  Surfaces  –  Implicit  func=ons  

•  Points  •  Curves  •  Surfaces  •  Geometry  toolbox  •  Calculus  toolbox  

–  Signed  distance  func=ons  •  Distance  func=ons  •  Signed  distance  func=ons  •  Geometry  and  calculus  tool  box  

Page 5: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Introduc=on  

•  Tracking  boundaries  is  an  important  problem  in  many  areas  of  computer  science  –  Image  Processing  – Machine  Vision  – Biometrics  – Human  Computer  Interac=on  – Entertainment    

Page 6: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Introduc=on  

•  The  Problem  – How   is   it   possible   to   efficiently   and   accurately  represent  the  boundary?  

– How  do  you  track  the  boundary  ahead  in  =me?    

Page 7: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Explicit  Representa=on  

•  Marker/String  Methods  •  A  standard  approach  to  modeling  a  moving  boundary  (front/contour/interface)   is  to  discre=ze  it   into  a  set  of   marker   par=cles   whose   posi=ons   are   known   at  any  =me.  

•  To   reconstruct   the   front   the   par=cles   are   linked   by  line  segments  in  2D  and  triangles  in  3D.  

Page 8: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Explicit  Representa=on  

•  Marker/String  Method  – The  idea  is  to  advance  the  par=cles  in  the  direc=on  of  the  arrows,  recalculate  the  arrows,  advance  the  par=cles,  and  repeat  

– More  par=cles  should  mean  greater  accuracy  

Page 9: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Explicit  Representa=on  

•  Marker/String  Method  Issues  – The  markers  may  poten=ally  cross  over  one  another  and  require  untangling  

– The  boundary  may  split  or  merge  

Page 10: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Explicit  Representa=on  

•  Marker/String  Method  Issues  – The  front  may  expand  or  contract  requiring  the  addi=on  or  removal  of  markers  

Page 11: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Implicit  Vs.  Explicit  

•  Tracking   the   interface   through   points  (markers)   on   its   surface   is   a   Lagrangian  formula=on.  

•  Capturing   an   interface   through   the   evolu=on  of   the   implicit   surface   is   a   Eulerian  formula=on.    

Page 12: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Implicit  Vs.  Explicit  

•  Implicit   representa=ons   overcome   the  previous   problems   at   the   cost   of   memory  efficiency,  some  new  limita=ons.  

•  In  the  case  of  the  water  simula=on  Foster  and  Fedkiw   found   a   hybrid   approach   combining  Eulerian  and  Lagranian  formula=ons  works  the  best.  

Page 13: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

!!!

Implicit  Func=ons  •  Points  

–  Explicitly  divide  a  1-­‐d  region  Ω  into  two  sub-­‐regions  with  an  interface  at  x  =  -­‐1  and  x  =  1    

-­‐2   -­‐1   0   1   2  

Outside  Ω+   Outside  Ω+  Inside  Ω-­‐  

Ω∂Interface  ( )( ) ( ){ }1,1

,11,1,1

−=Ω∂

∞−∞−=Ω

−=Ω+

Explicit  Representa=on  

Page 14: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Implicit  Func=ons  •  Points  

–  Implicitly  divide  a  1-­‐d  region  Ω  into  two  sub-­‐regions  with  an  interface  at  x  =  -­‐1  and  x  =  1    

-­‐2   -­‐1   0   1   2  

Outside  Ω+   Outside  Ω+  Inside  Ω-­‐  

Ω∂Interface  

( )( )( )( ) 0:

0:0:12

=Ω∂

−=

+

xxxxx

ϕ

ϕ

ϕ

ϕImplicit  Representa=on  

Page 15: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Implicit  Func=ons  •  Points  

– An   implicit   representa=on   provides   a   simple,  numerical   method   to   determine   the   interior,  exterior  and  interface  of  a  region  Ω.  

–  In  the  previous  case  the  interior  is  always  nega=ve  and  the  exterior  is  always  posi=ve.  

– The   set  of  points  where  φ(x)   =  0   is   known  as   the  zero   level   set   or   zero   isocontour   and  will   always  give  the  interface  of  the  region.  

Page 16: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Implicit  Func=ons  

•  Curves  –  In  2  spa=al  dimensions  a  closed  curve  separates  Ω  into  two  sub-­‐

regions.      

Outside  Ω+  

φ  >  0  

Inside  Ω-­‐  

φ  <  0  

Ω∂Interface  ( ) 0122 =−+= yxx!ϕ

Page 17: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Inside  Ω-­‐  

φ  <  0  

Implicit  Func=ons  

•  Surfaces  –  In  3+  spa=al  dimensions  higher  dimensional  surfaces  are  used  to  

represent  the  zero  level  set  of  φ.  

Outside  Ω+  

φ  >  0  

Ω∂Interface  ( ) 01222 =−++= zyxx!ϕ

Page 18: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Discrete  Representa=ons  of  Implicit  Func=ons  

•  Complicated  2D  curves  and  3D  surfaces  do  not  always  have  analy=cal  descrip=ons.  

•  The  implicit  func=on  φ  need  to  be  stored  with  a   discre=za=on,   i .e.   in   the   impl ic it  representa=on,  we  will  know  the  values  of  the  implicit   func=on  φ  at  only  a  finite  number  of  data   points   and   need   to   use   interpola=on   to  find  the  values  of  φ  else  where.  

Page 19: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Discrete  Representa=ons  of  Implicit  Func=ons  

•  The   loca=on  of   the   interface,   the  φ(x)   =   0   zero   iso-­‐contour   need   to   be   interpolated   from   the   known  values  of  φ  at  the  data  points.  

•  This   can   be   done   using   contour   plo`ng   algorithms  such  as  Marching  Cubes  algorithm.    

•  The  set  of  data  points  where  the  implicit  func=on  φ  is  defined  is  called  a  grid.  

•  Uniform  Cartesian  grids  are  mostly  used.  •  Other   grids   include   unstructured,   adap=ve,  curvilinear,  etc.  

Page 20: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Iso-­‐contour  extrac=on  

   φ(x,y)=0      φ(x,y)>0      φ(x,y)<0  

Page 21: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Iso-­‐contour  extrac=on  

   φ(x,y)=0      φ(x,y)>0      φ(x,y)<0  

Page 22: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Iso-­‐contour  extrac=on  

   φ(x,y)=0      φ(x,y)>0      φ(x,y)<0  

Page 23: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Iso-­‐contour  extrac=on  

   φ(x,y)=0      φ(x,y)>0      φ(x,y)<0  

Page 24: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Marching  Squares  

   φ(x,y)=0      φ(x,y)>0      φ(x,y)<0  

Four  unique  cases  (a7er  considering  symmetry)  

Page 25: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Marching  Squares  

Principle  of  Occam’s  razor:     If   there   are   mul@ple   possible   explana@ons   of   a  phenomenon   that   are   consistent   with   the   data,  choose  the  simplest  one.  

Page 26: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Marching  Squares  

Linear  interpola=on    f(x,y)=0    f(x,y)>0    f(x,y)<0   fi,  j+1  >  0  

fi,  j  <  0  

fi+1,  j+1  >  0  

fi+1,  j  >  0  

Page 27: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Marching  Squares  

fi,  j  =  a  <  0   fi+1,  j  =  b  >  0  fi+Δx,  j=0  

Page 28: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Marching  Squares  

fi,  j  =  a  <  0   fi+1,  j  =  b  >  0  fi+Δx,  j=0  

Δx  /  h  =  (-­‐a)  /  (b-­‐a)  

Δx  =  ah  /  (a-­‐b)  

Page 29: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Marching  Squares  

Page 30: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Marching  Squares  

Page 31: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Marching  Squares-­‐ambiguity  

More  informa@on  are  needed  to  resolve  ambiguity  

Page 32: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Iso-­‐contour  extrac=on  

   φ(x,y)=0      φ(x,y)>0      φ(x,y)<0  

Page 33: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Marching  Cubes  Algorithm  

Lorensen  &  Cline:  Marching  Cubes:  A  high  resolu@on  3D  surface  construc@on  algorithm.  In    SIGGRAPH  1987.    

Page 34: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Implicit  Func=ons:  Discrete  Representa=ons  

•  Points  – Another  way  to  represent  φ(x)  is  to  discre=ze  Ω  into  grid  cells  and  put  the  value  of  φ(x)  in  each  cell.  

… 8 3 0 -1 0 3 8 …

0   1   2   3  -­‐1  -­‐2  -­‐3  

( ) 12 −= xxϕ

Page 35: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Implicit  Func=ons  •  Points  

– Or  define  φ(x)  as  a  height.        

0   1   2   3  -­‐1  -­‐2  -­‐3  

( ) 12 −= xxϕ

0  

Page 36: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Implicit  Surface  &  Isosurface  •  When  c   is  0,  we  say  that     f     implicitly  defines  a   locus,  called  an  

implicit  surface,                                                                .  

•  The   implicit   surface   is   some=mes   called   the   zero   set   (or   zero  surface)  of    f.  

•  The   isosurface   (also   called   a   level   set   or   level   surface)  is                                                              ,                                                              ,      where  c  is  the  iso-­‐value  of  the  surface.   }0)(|{ 3 =∈ pp fR

})(|{ 3 cfR =∈ pp

Page 37: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Boolean  Opera=ons  of  Implicit  Func=ons  

•  φ(x)  =  min  (φ1(x),  φ2(x))  is  the  union  of  the  interior  regions  of  φ1(x)  and  φ2(x).    

•  φ(x)  =  max  (φ1(x),  φ2(x))  is  the  intersec=on  of  the  interior  regions  of  φ1(x)  and  φ2(x).    

•  φ(x)  =  -­‐φ1(x)  is  the  complement  of  φ1(x)  .    

•  φ(x)  =  max  (φ1(x),  -­‐φ2(x))  represents  the  subtrac=on  of  the  interior  regions  of  φ1(x)  by  the  interior  regions  of  φ2(x).    

Page 38: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Construc=ve  Solid  Geometry  

Page 39: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Geometry  Toolbox  

•  The  gradient  of  the  implicit  func=on  •  The  normal  of  the  implicit  func=on  •  Mean  curvature  of  the  implicit  func=on  •  Numerical  approxima=ons  

Page 40: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Gradient/Normal  

Page 41: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Gradient/Normal  

Page 42: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Curvature  

Page 43: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Curvature  

Page 44: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Calculus  Toolbox  

•  Characteris=c  func=on  •  Heaviside  func=on  •  Delta  func=on  •  Volume  integral  •  Surface  integral  •  Numerical  approxima=on  

Page 45: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Signed  Distance  Func=ons  

•  Signed  distance  func=ons  are  a  subset  of  implicit  func=on  defined  to  be  posi=ve  on  the  exterior,  nega=ve  on  the  interior  with    

•  A  distance  func@on  is  defined  as:      

( ) ( )Ω∂∈

−=

I

I

xwherexxxd

!

!!! min

|1)(| =∇ x!φ

Page 46: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Signed  Distance  Func=ons  

•  A  signed  distance  func@on  adds  the  appropriate  signing  of  the  interior  vs.  exterior.  

⎪⎩

⎪⎨

Ω∈−

Ω∂∈=

Ω∈

=−

+

xxdxxd

xxdx

!!

!!!!

!

)(0)(

)()(φ

|1)(| =∇ x!φ

Page 47: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Signed  Distance  Func=ons  

•  1D  Example:  –  Implicit  func=on  – Signed  distance  func=on    

•  2D  Example:  –  Implicit  func=on  – Signed  distance  func=on    

•  3D  Example:  –  Implicit  func=on  – Signed  distance  func=on    

( ) 12 −= xxϕ( ) 1|| −= xxϕ

( ) 1, 22 −+= yxyxϕ( ) 1, 22 −+= yxyxϕ

( ) 1,, 222 −++= zyxzyxϕ

( ) 1,, 222 −++= zyxzyxϕ

Page 48: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Boolean  Opera=ons  of  Signed  Distance  Func=ons  

•  φ(x)  =  min  (φ1(x),  φ2(x))  is  the  union  of  the  interior  regions  of  φ1(x)  and  φ2(x).    

•  φ(x)  =  max  (φ1(x),  φ2(x))  is  the  intersec=on  of  the  interior  regions  of  φ1(x)  and  φ2(x).    

•  φ(x)  =  -­‐φ1(x)  is  the  complement  of  φ1(x)  .    

•  φ(x)  =  max  (φ1(x),  -­‐φ2(x))  represents  the  subtrac=on  of  the  interior  regions  of  φ1(x)  by  the  interior  regions  of  φ2(x).    

Page 49: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Geometry  and  Calculus  Toolboxes  of  the  Signed  Distance  Func=ons  

Since    •  The  Delta  func=on  is:    •  The  Surface  integral  is:  

|1)(| =∇ x!φ

))(()( xx !!φδδ =

)())(()( xdxxf !!!φδ∫Ω

Page 50: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Geometry  and  Calculus  Toolboxes  of  the  Signed  Distance  Func=ons  

Since    •  The  normal  of  the  signed  distance  func=on  is:  

 

•  Mean  curvature  of  the  the  signed  distance  func=on  is:  

 Where                  is  the  Laplacian  of    

|1)(| =∇ x!φ

φ∇=N!

φΔ=k

zzyyxx φφφφ ++=ΔφΔ φ

Page 51: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Signed  Distance  Func=ons  

•  In  two  spa=al  dimensions  the  signed  distance  func=on  for  a  circle  with  a  radius  r  and  a  center  (x0,  y0)  is  given  as:  

( ) ( ) ( ) ryyxxx −−+−= 20

20

Page 52: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Overview  

•  Implicit  Surfaces  •  Level  Set  Methods  

Page 53: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Overview  

•  Level  set  methods  – Mo=on  in  an  externally  generated  velocity  field  

•  Convec=on  •  Upwind  differencing  •  Hamilton-­‐Jacobi  ENO/WENO,  TVD  Runge-­‐Kula  

– Mo=on  involves  mean  curvature  •  Equa=ons  of  mo=on  •  Numerical  discre=za=on  •  Convec=on-­‐diffusion  equa=ons  

Page 54: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Overview  

– Hamilton-­‐Jacobi  Equa=on  •  Connec=on  with  Conserva=on  Laws  •  Numerical  discre=za=on  

– Mo=on  in  the  Normal  Direc=on  •  The  Basic  Equa=on  •  Numerical  discre=za=on  •  Adding  a  Curvature-­‐Dependent  Term  •  Adding  an  External  Velocity  Field  

Page 55: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Overview  

•  Level  set  methods  – Mo=on  in  an  externally  generated  velocity  field  

•  Convec=on  •  Upwind  differencing  •  Hamilton-­‐Jacobi  ENO/WENO,  TVD  Runge-­‐Kula  

– Mo=on  involves  mean  curvature  •  Equa=ons  of  mo=on  •  Numerical  discre=za=on  •  Convec=on-­‐diffusion  equa=ons  

Page 56: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

3.  Mo=on  in  an  Externally  Generated  Velocity  Field  

1.  Convec=on  •  Assume  the  velocity  of  each  point  on  the  implicit  surface  is  given  as                ,    

•  i.e.                    is  known  for  every  point        with  •  Given  this  velocity  field      

)(xV !!

)(xV !!

0)( =x!φx!

)(xV !!

Page 57: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Mo=on  in  an  Externally  Generated  Velocity  Field  

•  Level  set  methods  add  dynamics  to  implicit  surfaces  

•  Stanley  Osher  and  James  Sethian  implemented  the  first  approach  to  numerically  solving  a  =me-­‐dependent  equa=on  for  a  moving  implicit  surface  

Page 58: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Mo=on  in  an  Externally  Generated  Velocity  Field  

•  In  the  Eulerian  approach  the  implicit  func=on  φ  is  used  to  both  represent  the  interface  and  evolve  the  interface.  

•  Given  an  external  velocity  field  the  level  set  equa=on  is  given  as  

0=∇⋅+ ϕϕ Vt

!

Temporal  par=al  deriva=ve   Advec=on  term  

Page 59: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Mo=on  in  an  Externally  Generated  Velocity  Field  

•  Using  the  forward  difference  approach  for  the  par=al  deriva=ve  with  respect  to  =me    

01

=∇⋅+Δ

−+nn

nn

Vt

ϕϕφ !

Page 60: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Mo=on  in  an  Externally  Generated  Velocity  Field  

•  At  this  point  it  looks  like  the  next  step  would  be  to  take  the  gradient  of  φ  by  using  central  differences.  

•  But  first  we  should  expand  the  equa=on  and  look  at  it  one  dimension  at  a  =me    

01

=+++Δ

−+nz

nny

nnx

nnn

wvut

ϕϕϕϕφ

Page 61: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Mo=on  in  an  Externally  Generated  Velocity  Field  

•  If  we  look  at  the  u  component  of  the  vector  field  we  might  see  something  like  to  the  right  for  direc=on.  

•  If  ui,j  is  poin=ng  to  the  right  we  need  to  look  to  the  cell  to  the  right  of  φi,j  the  same  applies  to  values  to  the  lem.  

● ● ● ● ●

● ● ● ● ●

● ● ● ● ●

● ● ● ● ●

● ● ● ● ●

xxii

Δ

−=

∂ + ϕϕϕ 1

xxii

Δ

−=

∂ −1ϕϕϕ

Forward  Difference  

Backward  Difference  

Page 62: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Mo=on  in  an  Externally  Generated  Velocity  Field  

•  For  a  1-­‐d  case  the  level  set  equa=on  would  be  of  the  form  

01

=+Δ

−+nx

ni

nn

ut

ϕϕφ

Page 63: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Mo=on  in  an  Externally  Generated  Velocity  Field  

•  The  update  equa=on  would  be    

•  where    

nx

nnn tu φϕφ Δ+=+1

⎪⎪⎩

⎪⎪⎨

=−

+

0

0

1

1

iii

ii

x

ux

ux

i

ϕϕ

ϕϕ

φ

Page 64: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Overview  

•  Level  set  methods  – Mo=on  in  an  externally  generated  velocity  field  

•  Convec=on  •  Upwind  differencing  •  Hamilton-­‐Jacobi  ENO/WENO,  TVD  Runge-­‐Kula  

– Mo=on  involves  mean  curvature  •  Equa=ons  of  mo=on  •  Numerical  discre=za=on  •  Convec=on-­‐diffusion  equa=ons  

Page 65: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

4.  Mo=on  involves  mean  curvature  

•  Equa=ons  of  mo=on  •  Numerical  discre=za=on  •  Convec=on-­‐diffusion  equa=ons  

Page 66: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•
Page 67: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•
Page 68: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Overview  

– Hamilton-­‐Jacobi  Equa=on  •  Connec=on  with  Conserva=on  Laws  •  Numerical  discre=za=on  

– Mo=on  in  the  Normal  Direc=on  •  The  Basic  Equa=on  •  Numerical  discre=za=on  •  Adding  a  Curvature-­‐Dependent  Term  •  Adding  an  External  Velocity  Field  

Page 69: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Hamilton-­‐Jacobi  Equa=on  

•  Connec=on  with  Conserva=on  Laws  •  Numerical  discre=za=on  

Page 70: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Overview  

– Hamilton-­‐Jacobi  Equa=on  •  Connec=on  with  Conserva=on  Laws  •  Numerical  discre=za=on  

– Mo=on  in  the  Normal  Direc=on  •  The  Basic  Equa=on  •  Numerical  discre=za=on  •  Adding  a  Curvature-­‐Dependent  Term  •  Adding  an  External  Velocity  Field  

Page 71: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

Mo=on  in  the  Normal  Direc=on  

•  The  Basic  Equa=on  •  Numerical  discre=za=on  •  Adding  a  Curvature-­‐Dependent  Term  •  Adding  an  External  Velocity  Field  

Page 72: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•
Page 73: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•
Page 74: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•
Page 75: Level%SetMethods(&(Dynamic( ImplicitSurfaces(faculty.missouri.edu/.../lecture-notes/3-level-set.pdf · • S. Osher(and(R.(Fedkiw,(Level(SetMethods(and(Dynamic(• J.A.(Sethian,(Level(SetMethods(and(FastMarching(•

References  •  S.  Osher  and  R.  Fedkiw,  Level  Set  Methods  and  Dynamic  

Implicit  Surfaces,  Springer,  2003.  •  J.A.  Sethian,  Level  Set  Methods  and  Fast  Marching  

Methods,  Cambridge,  1996.  •  Geometric  Level  Set  Methods  in  Imaging,  Vision,  and  

Graphics,  Stanley  Osher,  Nikos  Paragios,  Springer,  2003.  •  Geometric  Par=al  Differen=al  Equa=ons  and  Image  

Analysis,  Guillermo  Sapiro,  Cambridge  University  Press,  2001.  

•  J.  A.  Sethian,  “Level  Set  Methods:  An  Act  of  Violence”,  American  Scien=st,  May-­‐June,  1997.  

•  N.  Foster  and  R.  Fedkiw,  "Prac=cal  Anima=on  of  Liquids",  SIGGRAPH  2001,  pp.15-­‐22,  2001.