SlideShare a Scribd company logo
Active Contours




                        www.numerical-tours.com

Gabriel Peyré
CEREMADE, Université Paris-Dauphine
Overview


 • Parametric Edge-based Active
   Contours


 • Implicit   Edge-based Active Contours


 • Region-based Active Contours
                                           2
Parametric Active Contours
Local minimum:                   argmin E( ) = L( ) + ⇥R( )
                                                  Data   Regularization
Boundary conditions:                             fidelity
                                                                 x0
 – Open curve:     (0) = x0   and   (1) = x1 .
 – Closed curve:    (0) = (1).

                                                            x1




                                                                      3
Parametric Active Contours
Local minimum:                          argmin E( ) = L( ) + ⇥R( )
                                                               Data   Regularization
Boundary conditions:                                          fidelity
                                                                                  x0
 – Open curve:         (0) = x0    and     (1) = x1 .
 – Closed curve:         (0) = (1).

Snakes energy: (depends on parameterization)                                 x1
              1                                         1
 L( ) =           W ( (t))|| (t)||dt,     R( ) =            || (t)|| + µ||    (t)||dt
          0                                        0




        Image f                   Weight W (x)                 Curve                    3
Geodesic Active Contours
 Geodesic active contours: (intrinsic)          Replace W by W + ,
                            1
      E( ) = L( ) =             W ( (t))|| (t)||dt
                        0
     (local) minimum of the weighted length L.
     local geodesic (not minimal path).




              Weight W (x)                    Curve                  4
Curve Evolution
Family of curves { s (t)}s>0 minimizing E( s ).
                                                  s

Do not confound:
     t: abscise along the curve.
                                                      s+ds
     s: artificial “time” of evolution.




                                                        5
Curve Evolution
Family of curves { s (t)}s>0 minimizing E( s ).
                                                  s

Do not confound:
     t: abscise along the curve.
                                                      s+ds
     s: artificial “time” of evolution.

Local minimum of:        min E( )
                         d
Minimization flow:             s   =   E( s )
                         ds




                                                        5
Curve Evolution
Family of curves { s (t)}s>0 minimizing E( s ).
                                                     s

Do not confound:
     t: abscise along the curve.
                                                                    s+ds
     s: artificial “time” of evolution.

Local minimum of:        min E( )
                       d
Minimization flow:          s =     E( s )
                       ds
Warning: the set of curves is not a vector space.
                                        1
Inner product at :       µ, ⇥⇥ =            µ(t), ⇥(t)⇥|| (t)||dt
                                    0
      Riemannian manifold of infinite dimension.

                                                                      5
Curve Evolution
Family of curves { s (t)}s>0 minimizing E( s ).
                                                      s

Do not confound:
     t: abscise along the curve.
                                                                        s+ds
     s: artificial “time” of evolution.

Local minimum of:        min E( )
                       d
Minimization flow:          s =     E( s )
                       ds
Warning: the set of curves is not a vector space.
                                        1
Inner product at :       µ, ⇥⇥ =            µ(t), ⇥(t)⇥|| (t)||dt
                                    0
      Riemannian manifold of infinite dimension.
Numerical implementation:         (k+1)
                                            =   (k)
                                                      ⇥k E(   (k)
                                                                    )
                                                                          5
Intrinsic Curve Evolutions
E( ) only depends on { (t)  t              [0, 1]}.

Intrinsic energy E: evolution along the normal
                                                       s
    d
       ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t)            ns
    ds
                      speed              normal


                         s (t)
Normal:      ns (t) =
                        || s (t)||

                                           1
Curvature:    ⇥s (t) = ns (t), s (t)⇥
                                      || s (t)||2


                                                                6
Mean Curvature Motion
                                            1
No data-fidelity:         E( ) =                 || (t)||dt
                                        0
                                                  d
         Curve-shortening flow.                         s   =         E( s )
                                                  ds
                                  1
                                         (t)
 E( + ⇥) = E( ) +                              , ⇥ (t)⇥dt + O(||⇥||)
                              0       || (t)||
                          1 d              (t)
 ⌅E( ) : t ⇤⇥
                       || (t)|| dt      || (t)||             0



Mean-curvature motion:
                                                                 s

    d
           s (t)   = ⇥s (t)ns (t)
    ds
  Speed:           (x, n, ⇥) = ⇥
                                                                              7
Discretization
Discretization:     = { (i)}N 1
                            i=0       R2 , with (N ) = (0).

         ⇥µ, ⇥⇤ =    i ⇥µ(i),   ⇥(i)⇤|| (i)   (i + 1)||




                                                              k




                                                                  8
Discretization
Discretization:     = { (i)}N 1
                            i=0          R2 , with (N ) = (0).

         ⇥µ, ⇥⇤ =    i ⇥µ(i),   ⇥(i)⇤|| (i)      (i + 1)||

Discrete energy: E( ) =         i   || (i)    (i + 1)||


                                                                 k




                                                                     8
Discretization
Discretization:     = { (i)}N 1
                            i=0          R2 , with (N ) = (0).

         ⇥µ, ⇥⇤ =    i ⇥µ(i),   ⇥(i)⇤|| (i)      (i + 1)||

Discrete energy: E( ) =         i   || (i)    (i + 1)||

Gradient descent flow:       k+1      =   k    ⇥k E( k )
                                                                      k




                                                             E( k )


                                                                          8
Discretization
Discretization:      = { (i)}N 1
                             i=0            R2 , with (N ) = (0).

         ⇥µ, ⇥⇤ =     i ⇥µ(i),   ⇥(i)⇤|| (i)       (i + 1)||

Discrete energy: E( ) =          i   || (i)     (i + 1)||

Gradient descent flow:        k+1      =     k   ⇥k E( k )
                                                                        k
                                 1
Discrete gradient:    ⇥E( ) =        ⇥           N    ⇥( )
                              ||⇥ ||

        (⇥ )(i) = (i + 1)            (i)
                                                               E( k )
        (⇥ )(i) = (i 1)               (i)
                     (i)
        (N )(i) =
                  || (i)||
                                                                            8
Geodesic Active Contours Motion
Weighted length:
                                1
        E( ) = L( ) =               W ( (t))|| (t)||dt
                            0

 Evolution:
  d
     ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t)                           0
  ds
    (x, n, ⇥) = W (x)⇥              W (x), n


     attraction toward areas
    where W is small.
                                                                  s
     finite di erences discretization.
                                                         Weight W (x)
Open vs. Closed Curves
                                              0
                                    s




                                              x0
                            s

                                        0


                       x1
        Weight W (x)            Image f (x)
Global Minimum with Fast Marching
Geodesic distance map:

   Ux0 (x1 ) =       min           L( )
                 (0)=x0 , (1)=x1


Global minimum: Ux0 (x1 ) = L(            )      Image f           Metric W (x)




                                              Distance Ux0 (x) Geodesic curve (t)
Global Minimum with Fast Marching
Geodesic distance map:

   Ux0 (x1 ) =       min           L( )
                 (0)=x0 , (1)=x1


Global minimum: Ux0 (x1 ) = L(            )      Image f           Metric W (x)



Fast O(N log(N )) algorithm:

– Compute Ux0 with Fast Marching.
– Solve EDO:                                  Distance Ux0 (x) Geodesic curve (t)
    d
        (t) =       Ux0 ( (t))
     dt
       (0) = x1
Overview


 • Parametric Edge-based Active Contours
 • ImplicitEdge-based Active
   Contours


 • Region-based Active Contor
                                           12
Level Sets
Level-set curve representation:
                                                                      s (x)   0
    { s (t)  t   [0, 1]} = x   R  ⇥s (x) = 0 .
                                  2




Example: circle of radius r           s (x)   = ||x   x0 ||   s
Example: square of radius r           s (x)   = ||x   x0 ||       s
                                                                      s (x)   0
Level Sets
Level-set curve representation:
                                                                                  s (x)    0
    { s (t)  t   [0, 1]} = x    R  ⇥s (x) = 0 .
                                   2




Example: circle of radius r            s (x)   = ||x      x0 ||   s
Example: square of radius r            s (x)   = ||x      x0 ||       s
                                                                                  s (x)    0

    Union of domains:      s   = min(     1
                                          s,    s)
                                                2


    Intersection of domains:      s   = max(         1
                                                     s,   s)
                                                          2



                                                                          s (x)    0




                                                                          s   = min(      1
                                                                                          s,   s)
                                                                                               2
Level Sets
Level-set curve representation:
                                                                                     s (x)    0
    { s (t)  t   [0, 1]} = x      R  ⇥s (x) = 0 .
                                    2




Example: circle of radius r             s (x)     = ||x      x0 ||   s
Example: square of radius r             s (x)     = ||x      x0 ||       s
                                                                                     s (x)    0

    Union of domains:      s   = min(        1
                                             s,    s)
                                                   2


    Intersection of domains:       s   = max(           1
                                                        s,   s)
                                                             2



                                                                             s (x)    0
Popular choice: (signed) distance to a curve
         ⇥s (x) = ± min || s (t)       x||
                      t

     infinite number of mappings              s          s.
                                                                             s   = min(      1
                                                                                             s,   s)
                                                                                                  2
Level Sets Evolution
Dictionary parameteric          implicit:
     Position:    x=   s (t)


                                 s (x)
     Normal: ns (t) =
                           ||    s (x)||

                                         ⇥s
     Curvature:    s (x)   = div                 (x)
                                      || ⇥s ||




                                                       14
Level Sets Evolution
Dictionary parameteric           implicit:
     Position:    x=    s (t)


                                  s (x)
     Normal: ns (t) =
                            ||    s (x)||

                                          ⇥s
     Curvature:     s (x)   = div                  (x)
                                       || ⇥s ||
Evolution PDE:
        d
           ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t)
        ds

        d                                            ⇥s (x)              ⇥s
           ⇥s (x) = || ⇥s (x)||           ⇥s (x),             , div              (x) .
        ds                                        || ⇥s (x)||         || ⇥s ||
         All level sets evolves together.
                                                                                    14
Proof
                    d
Evolution PDE:         ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t)   ( )
                    ds
Definition of level-sets:      t, ⇥s ( s (t)) = 0




                                                                   15
Proof
                    d
Evolution PDE:         ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t)   ( )
                    ds
Definition of level-sets:      t, ⇥s ( s (t)) = 0

Deriving with respect to t:
              ⇤ s       ⇤⇥s
      ⇥s (x),     (t) +     (x) = 0          for x =     s (t)    ( )
              ⇤s         ⇤s




                                                                   15
Proof
                    d
Evolution PDE:         ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t)    ( )
                    ds
Definition of level-sets:      t, ⇥s ( s (t)) = 0

Deriving with respect to t:
              ⇤ s       ⇤⇥s
      ⇥s (x),     (t) +     (x) = 0           for x =     s (t)    ( )
              ⇤s         ⇤s
                ⌅⇤s
( )+( ):            (x) =       (x, ns (t), ⇥s (t))   ⇤s (x), ns (t)
                 ⌅s




                                                                       15
Proof
                    d
Evolution PDE:         ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t)             ( )
                    ds
Definition of level-sets:      t, ⇥s ( s (t)) = 0

Deriving with respect to t:
              ⇤ s       ⇤⇥s
      ⇥s (x),     (t) +     (x) = 0              for x =         s (t)     ( )
              ⇤s         ⇤s
                 ⌅⇤s
( )+( ):             (x) =        (x, ns (t), ⇥s (t))      ⇤s (x), ns (t)
                  ⌅s
                                                                         s (x)
                                                              =
                                                                  ||     s (x)||
 For all x on the curve,
     d                                    ⇥s (x)              ⇥s
        ⇥s (x) = || ⇥s (x)||   ⇥s (x),             , div               (x) .
     ds                                || ⇥s (x)||         || ⇥s ||
                                                                               15
Implicit Geodesic Active Contours
 Evolution PDE:
      d                             s
          s = ||   s ||div W               .
      ds                       ||   s ||




Comparison with explicit active contours:
          : 2D instead of 1D equation.
        + : allows topology change.




                                               16
Implicit Geodesic Active Contours
 Evolution PDE:
      d                                    s
          s = ||      s ||div W                       .
      ds                           ||      s ||




Comparison with explicit active contours:
           : 2D instead of 1D equation.
        + : allows topology change.


 Re-initialization:       ⇥s (x) = ± min || s (t)              x||
                                                  t
    Eikonal equation:         ||        s ||   =1         with ⇥s ( s (t)) = 0


                                                                                 16
Multiple Fluids Dynamics
See Ron Fedkiw homepage.   http://physbam.stanford.edu/ fedkiw/
    Multiple gaz:




   Fluid/air interface:




                                                             17
Overview


 • Parametric Edge-based Active Contours
 • Implicit   Edge-based Active Contours


 • Region-based Active Contours

                                           18
Energy Depending on Region
Optimal segmentation [0, 1]2 =          c
                                            :
     min L1 ( ) + L2 (   c
                             ) + R( )              R( ) = |        |
                Data           Regularization
               fidelity
Chan-Vese binary model:         L1 ( ) =        |I(x)   c1 |2 dx
           More general models




                                                                       19
Energy Depending on Region
Optimal segmentation [0, 1]2 =           c
                                             :
     min L1 ( ) + L2 (    c
                              ) + R( )                 R( ) = |         |
                Data            Regularization
               fidelity
Chan-Vese binary model:          L1 ( ) =         |I(x)      c1 |2 dx
           More general models

Level set implementation:          = {x  (x) > 0}
                                         2        x                         H(x)
 Smoothed Heaviside:          H (x) =        atan
                                                  ⇥                            x
L1 ( ) ⇥ L( ) =          H ( (x))||I(x)          c1 ||2 dx

R( )     R( ) =          ||⇥(H )(x)||dx
                                                                              19
Descent Schemes
For a given c = (c1 , c2 )   R2 :
        min Ec ( ) =     H ( (x))||I(x)   c1 ||2 +
         ⇥

                  H ( ⇥(x))||I(x)    c2 ||2 + ||⇥(H ⇥)(x)||dx




                                                                20
Descent Schemes
For a given c = (c1 , c2 )      R2 :
        min Ec ( ) =         H ( (x))||I(x)         c1 ||2 +
         ⇥

                   H ( ⇥(x))||I(x)            c2 ||2 + ||⇥(H ⇥)(x)||dx
Descent with respect to        :
               ⇥(k+1) = ⇥(k)            k    Ec (⇥(k) )

     Ec ( ) = H ( (x))G(x)
                                                                 ⇥⇥
   G(x) = ||I(x)         2
                     c1 ||     ||I(x)           2
                                            c2 ||    div                (x)
                                                               ||⇥⇥||



                                                                              20
Descent Schemes
For a given c = (c1 , c2 )       R2 :
        min Ec ( ) =          H ( (x))||I(x)           c1 ||2 +
         ⇥

                    H ( ⇥(x))||I(x)            c2 ||2 + ||⇥(H ⇥)(x)||dx
Descent with respect to         :
                  ⇥(k+1) = ⇥(k)          k    Ec (⇥(k) )

     Ec ( ) = H ( (x))G(x)
                                                                    ⇥⇥
   G(x) = ||I(x)          2
                      c1 ||     ||I(x)           2
                                             c2 ||      div                (x)
                                                                  ||⇥⇥||

Limit        0:    ⇥Ec (⇥)          { =0} (x)||⇥⇥(x)||G(x)

    Numerically, use           Ec ( ) = ||           (x)||G(x)
                                                                                 20
Update of c
Joint minimization:   min Ec ( )
                      ,c1 ,c2




                                   21
Update of c
Joint minimization:        min Ec ( )
                           ,c1 ,c2



   Update of :        ⇥(k+1) = ⇥(k)     k   Ec(k) (⇥(k) )




                                                            21
Update of c
Joint minimization:              min Ec ( )
                                  ,c1 ,c2



   Update of :             ⇥(k+1) = ⇥(k)         k     Ec(k) (⇥(k) )


  Update of (c1 , c2 ):

            (k+1)     (k+1)
         (c1        , c2      ) = argmin Ec (        (k)
                                                           )
                                   c1 ,c2

         (k+1)
        c1     = c( (k) )                              I(x)H( (x))dx
                                            c( ) =
         (k+1)
        c2     = c( (k) )                                H( (x))dx

                                                                       21
Example of Evolution
  Use de-localized initialization.




                         (0)




                                     22
Conclusion
        Curve evolution
        Energy minimization


 Parametric vs. level set representation.


 Dictionary to translate
     – curve properties.
     – energy gradients.


 Edge based vs. region based energies.

                                            23

More Related Content

PDF
Low Complexity Regularization of Inverse Problems
PDF
Proximal Splitting and Optimal Transport
PDF
Low Complexity Regularization of Inverse Problems - Course #3 Proximal Splitt...
PDF
Signal Processing Course : Convex Optimization
PDF
Low Complexity Regularization of Inverse Problems - Course #1 Inverse Problems
PDF
Signal Processing Course : Inverse Problems Regularization
PDF
Model Selection with Piecewise Regular Gauges
PDF
Low Complexity Regularization of Inverse Problems - Course #2 Recovery Guaran...
Low Complexity Regularization of Inverse Problems
Proximal Splitting and Optimal Transport
Low Complexity Regularization of Inverse Problems - Course #3 Proximal Splitt...
Signal Processing Course : Convex Optimization
Low Complexity Regularization of Inverse Problems - Course #1 Inverse Problems
Signal Processing Course : Inverse Problems Regularization
Model Selection with Piecewise Regular Gauges
Low Complexity Regularization of Inverse Problems - Course #2 Recovery Guaran...

What's hot (20)

PDF
Learning Sparse Representation
PDF
Geodesic Method in Computer Vision and Graphics
PDF
Mesh Processing Course : Multiresolution
PDF
Classification with mixtures of curved Mahalanobis metrics
PDF
Mesh Processing Course : Mesh Parameterization
PDF
A series of maximum entropy upper bounds of the differential entropy
PDF
Signal Processing Course : Sparse Regularization of Inverse Problems
PDF
Andreas Eberle
PDF
Adaptive Signal and Image Processing
PDF
The dual geometry of Shannon information
PDF
Bregman divergences from comparative convexity
PDF
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
PDF
Lecture 2: linear SVM in the dual
PDF
Computational Information Geometry: A quick review (ICMS)
PDF
Image Processing 3
PDF
QMC: Operator Splitting Workshop, A New (More Intuitive?) Interpretation of I...
PDF
Mesh Processing Course : Geodesics
PDF
Open GL 04 linealgos
PDF
Lecture 1: linear SVM in the primal
PDF
Doubly Accelerated Stochastic Variance Reduced Gradient Methods for Regulariz...
Learning Sparse Representation
Geodesic Method in Computer Vision and Graphics
Mesh Processing Course : Multiresolution
Classification with mixtures of curved Mahalanobis metrics
Mesh Processing Course : Mesh Parameterization
A series of maximum entropy upper bounds of the differential entropy
Signal Processing Course : Sparse Regularization of Inverse Problems
Andreas Eberle
Adaptive Signal and Image Processing
The dual geometry of Shannon information
Bregman divergences from comparative convexity
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Lecture 2: linear SVM in the dual
Computational Information Geometry: A quick review (ICMS)
Image Processing 3
QMC: Operator Splitting Workshop, A New (More Intuitive?) Interpretation of I...
Mesh Processing Course : Geodesics
Open GL 04 linealgos
Lecture 1: linear SVM in the primal
Doubly Accelerated Stochastic Variance Reduced Gradient Methods for Regulariz...
Ad

Viewers also liked (6)

PPTX
Snakes in Images (Active contour tutorial)
PDF
Traitement d'image
PPT
Dip Image Segmentation
PPTX
Formation traitement d_images
PPTX
Une approche multi-agents pour la détection de contours
PPTX
Active contour segmentation
Snakes in Images (Active contour tutorial)
Traitement d'image
Dip Image Segmentation
Formation traitement d_images
Une approche multi-agents pour la détection de contours
Active contour segmentation
Ad

Similar to Mesh Processing Course : Active Contours (20)

PDF
Calculus of variations & solution manual russak
PDF
Differential Geometry for Machine Learning
PDF
On approximating the Riemannian 1-center
PPTX
Curves in space
PDF
Ps02 cmth03 unit 1
PDF
Redundancy in robot manipulators and multi robot systems
PPT
Calculus of variations
PDF
Calculus Early Transcendentals 7th Edition Stewart Solutions Manual
PDF
Lesson 8: Curves, Arc Length, Acceleration
PDF
Calculus Early Transcendentals 7th Edition Stewart Solutions Manual
PDF
ابلايد كامل .pdfgxhjdjdhdhdjdjjxhddjdndjjd
PDF
Lesson 7: Vector-valued functions
PDF
Nature-Inspired Metaheuristic Algorithms for Optimization and Computational I...
PDF
New Mathematical Tools for the Financial Sector
PDF
02 newton-raphson
PDF
PDF
CAD Topology and Geometry Basics
DOCX
Logics of the laplace transform
PDF
Optimum Engineering Design - Day 2b. Classical Optimization methods
Calculus of variations & solution manual russak
Differential Geometry for Machine Learning
On approximating the Riemannian 1-center
Curves in space
Ps02 cmth03 unit 1
Redundancy in robot manipulators and multi robot systems
Calculus of variations
Calculus Early Transcendentals 7th Edition Stewart Solutions Manual
Lesson 8: Curves, Arc Length, Acceleration
Calculus Early Transcendentals 7th Edition Stewart Solutions Manual
ابلايد كامل .pdfgxhjdjdhdhdjdjjxhddjdndjjd
Lesson 7: Vector-valued functions
Nature-Inspired Metaheuristic Algorithms for Optimization and Computational I...
New Mathematical Tools for the Financial Sector
02 newton-raphson
CAD Topology and Geometry Basics
Logics of the laplace transform
Optimum Engineering Design - Day 2b. Classical Optimization methods

More from Gabriel Peyré (15)

PDF
Mesh Processing Course : Introduction
PDF
Mesh Processing Course : Geodesic Sampling
PDF
Mesh Processing Course : Differential Calculus
PDF
Signal Processing Course : Theory for Sparse Recovery
PDF
Signal Processing Course : Presentation of the Course
PDF
Signal Processing Course : Orthogonal Bases
PDF
Signal Processing Course : Fourier
PDF
Signal Processing Course : Denoising
PDF
Signal Processing Course : Compressed Sensing
PDF
Signal Processing Course : Approximation
PDF
Signal Processing Course : Wavelets
PDF
Sparsity and Compressed Sensing
PDF
Optimal Transport in Imaging Sciences
PDF
An Introduction to Optimal Transport
PDF
A Review of Proximal Methods, with a New One
Mesh Processing Course : Introduction
Mesh Processing Course : Geodesic Sampling
Mesh Processing Course : Differential Calculus
Signal Processing Course : Theory for Sparse Recovery
Signal Processing Course : Presentation of the Course
Signal Processing Course : Orthogonal Bases
Signal Processing Course : Fourier
Signal Processing Course : Denoising
Signal Processing Course : Compressed Sensing
Signal Processing Course : Approximation
Signal Processing Course : Wavelets
Sparsity and Compressed Sensing
Optimal Transport in Imaging Sciences
An Introduction to Optimal Transport
A Review of Proximal Methods, with a New One

Mesh Processing Course : Active Contours

  • 1. Active Contours www.numerical-tours.com Gabriel Peyré CEREMADE, Université Paris-Dauphine
  • 2. Overview • Parametric Edge-based Active Contours • Implicit Edge-based Active Contours • Region-based Active Contours 2
  • 3. Parametric Active Contours Local minimum: argmin E( ) = L( ) + ⇥R( ) Data Regularization Boundary conditions: fidelity x0 – Open curve: (0) = x0 and (1) = x1 . – Closed curve: (0) = (1). x1 3
  • 4. Parametric Active Contours Local minimum: argmin E( ) = L( ) + ⇥R( ) Data Regularization Boundary conditions: fidelity x0 – Open curve: (0) = x0 and (1) = x1 . – Closed curve: (0) = (1). Snakes energy: (depends on parameterization) x1 1 1 L( ) = W ( (t))|| (t)||dt, R( ) = || (t)|| + µ|| (t)||dt 0 0 Image f Weight W (x) Curve 3
  • 5. Geodesic Active Contours Geodesic active contours: (intrinsic) Replace W by W + , 1 E( ) = L( ) = W ( (t))|| (t)||dt 0 (local) minimum of the weighted length L. local geodesic (not minimal path). Weight W (x) Curve 4
  • 6. Curve Evolution Family of curves { s (t)}s>0 minimizing E( s ). s Do not confound: t: abscise along the curve. s+ds s: artificial “time” of evolution. 5
  • 7. Curve Evolution Family of curves { s (t)}s>0 minimizing E( s ). s Do not confound: t: abscise along the curve. s+ds s: artificial “time” of evolution. Local minimum of: min E( ) d Minimization flow: s = E( s ) ds 5
  • 8. Curve Evolution Family of curves { s (t)}s>0 minimizing E( s ). s Do not confound: t: abscise along the curve. s+ds s: artificial “time” of evolution. Local minimum of: min E( ) d Minimization flow: s = E( s ) ds Warning: the set of curves is not a vector space. 1 Inner product at : µ, ⇥⇥ = µ(t), ⇥(t)⇥|| (t)||dt 0 Riemannian manifold of infinite dimension. 5
  • 9. Curve Evolution Family of curves { s (t)}s>0 minimizing E( s ). s Do not confound: t: abscise along the curve. s+ds s: artificial “time” of evolution. Local minimum of: min E( ) d Minimization flow: s = E( s ) ds Warning: the set of curves is not a vector space. 1 Inner product at : µ, ⇥⇥ = µ(t), ⇥(t)⇥|| (t)||dt 0 Riemannian manifold of infinite dimension. Numerical implementation: (k+1) = (k) ⇥k E( (k) ) 5
  • 10. Intrinsic Curve Evolutions E( ) only depends on { (t) t [0, 1]}. Intrinsic energy E: evolution along the normal s d ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t) ns ds speed normal s (t) Normal: ns (t) = || s (t)|| 1 Curvature: ⇥s (t) = ns (t), s (t)⇥ || s (t)||2 6
  • 11. Mean Curvature Motion 1 No data-fidelity: E( ) = || (t)||dt 0 d Curve-shortening flow. s = E( s ) ds 1 (t) E( + ⇥) = E( ) + , ⇥ (t)⇥dt + O(||⇥||) 0 || (t)|| 1 d (t) ⌅E( ) : t ⇤⇥ || (t)|| dt || (t)|| 0 Mean-curvature motion: s d s (t) = ⇥s (t)ns (t) ds Speed: (x, n, ⇥) = ⇥ 7
  • 12. Discretization Discretization: = { (i)}N 1 i=0 R2 , with (N ) = (0). ⇥µ, ⇥⇤ = i ⇥µ(i), ⇥(i)⇤|| (i) (i + 1)|| k 8
  • 13. Discretization Discretization: = { (i)}N 1 i=0 R2 , with (N ) = (0). ⇥µ, ⇥⇤ = i ⇥µ(i), ⇥(i)⇤|| (i) (i + 1)|| Discrete energy: E( ) = i || (i) (i + 1)|| k 8
  • 14. Discretization Discretization: = { (i)}N 1 i=0 R2 , with (N ) = (0). ⇥µ, ⇥⇤ = i ⇥µ(i), ⇥(i)⇤|| (i) (i + 1)|| Discrete energy: E( ) = i || (i) (i + 1)|| Gradient descent flow: k+1 = k ⇥k E( k ) k E( k ) 8
  • 15. Discretization Discretization: = { (i)}N 1 i=0 R2 , with (N ) = (0). ⇥µ, ⇥⇤ = i ⇥µ(i), ⇥(i)⇤|| (i) (i + 1)|| Discrete energy: E( ) = i || (i) (i + 1)|| Gradient descent flow: k+1 = k ⇥k E( k ) k 1 Discrete gradient: ⇥E( ) = ⇥ N ⇥( ) ||⇥ || (⇥ )(i) = (i + 1) (i) E( k ) (⇥ )(i) = (i 1) (i) (i) (N )(i) = || (i)|| 8
  • 16. Geodesic Active Contours Motion Weighted length: 1 E( ) = L( ) = W ( (t))|| (t)||dt 0 Evolution: d ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t) 0 ds (x, n, ⇥) = W (x)⇥ W (x), n attraction toward areas where W is small. s finite di erences discretization. Weight W (x)
  • 17. Open vs. Closed Curves 0 s x0 s 0 x1 Weight W (x) Image f (x)
  • 18. Global Minimum with Fast Marching Geodesic distance map: Ux0 (x1 ) = min L( ) (0)=x0 , (1)=x1 Global minimum: Ux0 (x1 ) = L( ) Image f Metric W (x) Distance Ux0 (x) Geodesic curve (t)
  • 19. Global Minimum with Fast Marching Geodesic distance map: Ux0 (x1 ) = min L( ) (0)=x0 , (1)=x1 Global minimum: Ux0 (x1 ) = L( ) Image f Metric W (x) Fast O(N log(N )) algorithm: – Compute Ux0 with Fast Marching. – Solve EDO: Distance Ux0 (x) Geodesic curve (t) d (t) = Ux0 ( (t)) dt (0) = x1
  • 20. Overview • Parametric Edge-based Active Contours • ImplicitEdge-based Active Contours • Region-based Active Contor 12
  • 21. Level Sets Level-set curve representation: s (x) 0 { s (t) t [0, 1]} = x R ⇥s (x) = 0 . 2 Example: circle of radius r s (x) = ||x x0 || s Example: square of radius r s (x) = ||x x0 || s s (x) 0
  • 22. Level Sets Level-set curve representation: s (x) 0 { s (t) t [0, 1]} = x R ⇥s (x) = 0 . 2 Example: circle of radius r s (x) = ||x x0 || s Example: square of radius r s (x) = ||x x0 || s s (x) 0 Union of domains: s = min( 1 s, s) 2 Intersection of domains: s = max( 1 s, s) 2 s (x) 0 s = min( 1 s, s) 2
  • 23. Level Sets Level-set curve representation: s (x) 0 { s (t) t [0, 1]} = x R ⇥s (x) = 0 . 2 Example: circle of radius r s (x) = ||x x0 || s Example: square of radius r s (x) = ||x x0 || s s (x) 0 Union of domains: s = min( 1 s, s) 2 Intersection of domains: s = max( 1 s, s) 2 s (x) 0 Popular choice: (signed) distance to a curve ⇥s (x) = ± min || s (t) x|| t infinite number of mappings s s. s = min( 1 s, s) 2
  • 24. Level Sets Evolution Dictionary parameteric implicit: Position: x= s (t) s (x) Normal: ns (t) = || s (x)|| ⇥s Curvature: s (x) = div (x) || ⇥s || 14
  • 25. Level Sets Evolution Dictionary parameteric implicit: Position: x= s (t) s (x) Normal: ns (t) = || s (x)|| ⇥s Curvature: s (x) = div (x) || ⇥s || Evolution PDE: d ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t) ds d ⇥s (x) ⇥s ⇥s (x) = || ⇥s (x)|| ⇥s (x), , div (x) . ds || ⇥s (x)|| || ⇥s || All level sets evolves together. 14
  • 26. Proof d Evolution PDE: ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t) ( ) ds Definition of level-sets: t, ⇥s ( s (t)) = 0 15
  • 27. Proof d Evolution PDE: ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t) ( ) ds Definition of level-sets: t, ⇥s ( s (t)) = 0 Deriving with respect to t: ⇤ s ⇤⇥s ⇥s (x), (t) + (x) = 0 for x = s (t) ( ) ⇤s ⇤s 15
  • 28. Proof d Evolution PDE: ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t) ( ) ds Definition of level-sets: t, ⇥s ( s (t)) = 0 Deriving with respect to t: ⇤ s ⇤⇥s ⇥s (x), (t) + (x) = 0 for x = s (t) ( ) ⇤s ⇤s ⌅⇤s ( )+( ): (x) = (x, ns (t), ⇥s (t)) ⇤s (x), ns (t) ⌅s 15
  • 29. Proof d Evolution PDE: ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t) ( ) ds Definition of level-sets: t, ⇥s ( s (t)) = 0 Deriving with respect to t: ⇤ s ⇤⇥s ⇥s (x), (t) + (x) = 0 for x = s (t) ( ) ⇤s ⇤s ⌅⇤s ( )+( ): (x) = (x, ns (t), ⇥s (t)) ⇤s (x), ns (t) ⌅s s (x) = || s (x)|| For all x on the curve, d ⇥s (x) ⇥s ⇥s (x) = || ⇥s (x)|| ⇥s (x), , div (x) . ds || ⇥s (x)|| || ⇥s || 15
  • 30. Implicit Geodesic Active Contours Evolution PDE: d s s = || s ||div W . ds || s || Comparison with explicit active contours: : 2D instead of 1D equation. + : allows topology change. 16
  • 31. Implicit Geodesic Active Contours Evolution PDE: d s s = || s ||div W . ds || s || Comparison with explicit active contours: : 2D instead of 1D equation. + : allows topology change. Re-initialization: ⇥s (x) = ± min || s (t) x|| t Eikonal equation: || s || =1 with ⇥s ( s (t)) = 0 16
  • 32. Multiple Fluids Dynamics See Ron Fedkiw homepage. http://physbam.stanford.edu/ fedkiw/ Multiple gaz: Fluid/air interface: 17
  • 33. Overview • Parametric Edge-based Active Contours • Implicit Edge-based Active Contours • Region-based Active Contours 18
  • 34. Energy Depending on Region Optimal segmentation [0, 1]2 = c : min L1 ( ) + L2 ( c ) + R( ) R( ) = | | Data Regularization fidelity Chan-Vese binary model: L1 ( ) = |I(x) c1 |2 dx More general models 19
  • 35. Energy Depending on Region Optimal segmentation [0, 1]2 = c : min L1 ( ) + L2 ( c ) + R( ) R( ) = | | Data Regularization fidelity Chan-Vese binary model: L1 ( ) = |I(x) c1 |2 dx More general models Level set implementation: = {x (x) > 0} 2 x H(x) Smoothed Heaviside: H (x) = atan ⇥ x L1 ( ) ⇥ L( ) = H ( (x))||I(x) c1 ||2 dx R( ) R( ) = ||⇥(H )(x)||dx 19
  • 36. Descent Schemes For a given c = (c1 , c2 ) R2 : min Ec ( ) = H ( (x))||I(x) c1 ||2 + ⇥ H ( ⇥(x))||I(x) c2 ||2 + ||⇥(H ⇥)(x)||dx 20
  • 37. Descent Schemes For a given c = (c1 , c2 ) R2 : min Ec ( ) = H ( (x))||I(x) c1 ||2 + ⇥ H ( ⇥(x))||I(x) c2 ||2 + ||⇥(H ⇥)(x)||dx Descent with respect to : ⇥(k+1) = ⇥(k) k Ec (⇥(k) ) Ec ( ) = H ( (x))G(x) ⇥⇥ G(x) = ||I(x) 2 c1 || ||I(x) 2 c2 || div (x) ||⇥⇥|| 20
  • 38. Descent Schemes For a given c = (c1 , c2 ) R2 : min Ec ( ) = H ( (x))||I(x) c1 ||2 + ⇥ H ( ⇥(x))||I(x) c2 ||2 + ||⇥(H ⇥)(x)||dx Descent with respect to : ⇥(k+1) = ⇥(k) k Ec (⇥(k) ) Ec ( ) = H ( (x))G(x) ⇥⇥ G(x) = ||I(x) 2 c1 || ||I(x) 2 c2 || div (x) ||⇥⇥|| Limit 0: ⇥Ec (⇥) { =0} (x)||⇥⇥(x)||G(x) Numerically, use Ec ( ) = || (x)||G(x) 20
  • 39. Update of c Joint minimization: min Ec ( ) ,c1 ,c2 21
  • 40. Update of c Joint minimization: min Ec ( ) ,c1 ,c2 Update of : ⇥(k+1) = ⇥(k) k Ec(k) (⇥(k) ) 21
  • 41. Update of c Joint minimization: min Ec ( ) ,c1 ,c2 Update of : ⇥(k+1) = ⇥(k) k Ec(k) (⇥(k) ) Update of (c1 , c2 ): (k+1) (k+1) (c1 , c2 ) = argmin Ec ( (k) ) c1 ,c2 (k+1) c1 = c( (k) ) I(x)H( (x))dx c( ) = (k+1) c2 = c( (k) ) H( (x))dx 21
  • 42. Example of Evolution Use de-localized initialization. (0) 22
  • 43. Conclusion Curve evolution Energy minimization Parametric vs. level set representation. Dictionary to translate – curve properties. – energy gradients. Edge based vs. region based energies. 23