Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mesh Processing Course: Active Contours

Gabriel Peyré
January 01, 2011

Mesh Processing Course: Active Contours

Gabriel Peyré

January 01, 2011
Tweet

More Decks by Gabriel Peyré

Other Decks in Research

Transcript

  1. Parametric Active Contours 3 – Closed curve: (0) = (1).

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

    – Open curve: (0) = x0 and (1) = x1 . Boundary conditions: R( ) = 1 0 || (t)|| + µ|| (t)||dt Snakes energy: (depends on parameterization) L( ) = 1 0 W( (t))|| (t)||dt, Local minimum: argmin E( ) = L( ) + ⇥R( ) Regularization Data fidelity x0 x1 Image f Weight W(x) Curve
  3. Geodesic Active Contours 4 Geodesic active contours: (intrinsic) Replace W

    by W + , E( ) = L( ) = 1 0 W( (t))|| (t)||dt (local) minimum of the weighted length L. local geodesic (not minimal path). Weight W(x) Curve
  4. Curve Evolution 5 s s+ds Family of curves { s

    (t)}s>0 minimizing E( s ). Do not confound: t: abscise along the curve. s: artificial “time” of evolution.
  5. Curve Evolution 5 s s+ds Family of curves { s

    (t)}s>0 minimizing E( s ). Do not confound: t: abscise along the curve. s: artificial “time” of evolution. Local minimum of: min E( ) Minimization flow: d ds s = E( s )
  6. Curve Evolution 5 s s+ds Family of curves { s

    (t)}s>0 minimizing E( s ). Do not confound: t: abscise along the curve. s: artificial “time” of evolution. Local minimum of: min E( ) Minimization flow: d ds s = E( s ) Warning: the set of curves is not a vector space. Inner product at : µ, ⇥⇥ = 1 0 µ(t), ⇥(t)⇥|| (t)||dt Riemannian manifold of infinite dimension.
  7. Curve Evolution 5 s s+ds Family of curves { s

    (t)}s>0 minimizing E( s ). Do not confound: t: abscise along the curve. s: artificial “time” of evolution. Local minimum of: min E( ) Minimization flow: d ds s = E( s ) Warning: the set of curves is not a vector space. Inner product at : µ, ⇥⇥ = 1 0 µ(t), ⇥(t)⇥|| (t)||dt Riemannian manifold of infinite dimension. Numerical implementation: (k+1) = (k) ⇥kE( (k))
  8. Intrinsic Curve Evolutions 6 Intrinsic energy E: evolution along the

    normal speed d ds ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t) normal ns (t) = s (t) || s (t)|| ⇥s (t) = ns (t), s (t)⇥ 1 || s (t)||2 Normal: Curvature: s ns E( ) only depends on { (t) \ t [0, 1]}.
  9. Mean Curvature Motion 7 (x, n, ⇥) = ⇥ Speed:

    No data-fidelity: E( ) = 1 0 || (t)||dt Curve-shortening flow. d ds s (t) = ⇥s (t)ns (t) 0 s E( + ⇥) = E( ) + 1 0 (t) || (t)|| , ⇥ (t)⇥dt + O(||⇥||) ⌅E( ) : t ⇤⇥ 1 || (t)|| d dt (t) || (t)|| d ds s = E( s ) Mean-curvature motion:
  10. Discretization 8 Discretization: = { (i)}N 1 i=0 R2, with

    (N) = (0). k ⇥µ, ⇥⇤ = i ⇥µ(i), ⇥(i)⇤|| (i) (i + 1)||
  11. Discretization 8 Discretization: = { (i)}N 1 i=0 R2, with

    (N) = (0). Discrete energy: k E( ) = i || (i) (i + 1)|| ⇥µ, ⇥⇤ = i ⇥µ(i), ⇥(i)⇤|| (i) (i + 1)||
  12. Discretization 8 Discretization: = { (i)}N 1 i=0 R2, with

    (N) = (0). Gradient descent flow: Discrete energy: k+1 = k ⇥k E( k ) E( k ) k E( ) = i || (i) (i + 1)|| ⇥µ, ⇥⇤ = i ⇥µ(i), ⇥(i)⇤|| (i) (i + 1)||
  13. Discretization 8 Discretization: = { (i)}N 1 i=0 R2, with

    (N) = (0). Gradient descent flow: Discrete energy: k+1 = k ⇥k E( k ) E( k ) k ⇥E( ) = 1 ||⇥ || ⇥ N ⇥( ) Discrete gradient: E( ) = i || (i) (i + 1)|| ⇥µ, ⇥⇤ = i ⇥µ(i), ⇥(i)⇤|| (i) (i + 1)|| (⇥ )(i) = (i + 1) (i) (⇥ )(i) = (i 1) (i) (N )(i) = (i) || (i)||
  14. Geodesic Active Contours Motion E( ) = L( ) =

    1 0 W( (t))|| (t)||dt (x, n, ⇥) = W(x)⇥ W(x), n d ds ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t) Weighted length: Evolution: 0 s Weight W(x) where W is small. finite di erences discretization. attraction toward areas
  15. Global Minimum with Fast Marching Image f Metric W(x) Distance

    Ux0 (x) Geodesic curve (t) Geodesic distance map: Global minimum: Ux0 (x1 ) = L( ) Ux0 (x1 ) = min (0)=x0, (1)=x1 L( )
  16. Global Minimum with Fast Marching Image f Metric W(x) Distance

    Ux0 (x) Geodesic curve (t) Geodesic distance map: Global minimum: Ux0 (x1 ) = L( ) Ux0 (x1 ) = min (0)=x0, (1)=x1 L( ) – Compute Ux0 with Fast Marching. – Solve EDO: d dt (t) = Ux0 ( (t)) (0) = x1 Fast O(N log(N)) algorithm:
  17. Level Sets { s (t) \ t [0, 1]} =

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

    x R2 \ ⇥s (x) = 0 . Level-set curve representation: s (x) = ||x x0 || s s (x) = ||x x0 || s s (x) 0 s (x) 0 Union of domains: s = min( 1 s , 2 s ) Intersection of domains: s = max( 1 s , 2 s ) Example: circle of radius r Example: square of radius r s = min( 1 s , 2 s ) s (x) 0
  19. Level Sets { s (t) \ t [0, 1]} =

    x R2 \ ⇥s (x) = 0 . Level-set curve representation: s (x) = ||x x0 || s s (x) = ||x x0 || s s (x) 0 s (x) 0 Union of domains: s = min( 1 s , 2 s ) Intersection of domains: s = max( 1 s , 2 s ) Popular choice: (signed) distance to a curve ⇥s (x) = ± min t || s (t) x|| Example: circle of radius r Example: square of radius r infinite number of mappings s s . s = min( 1 s , 2 s ) s (x) 0
  20. Level Sets Evolution 14 Dictionary parameteric implicit: ns (t) =

    s (x) || s (x)|| Normal: Position: x = s (t) s (x) = div ⇥s || ⇥s || (x) Curvature:
  21. Level Sets Evolution 14 Dictionary parameteric implicit: ns (t) =

    s (x) || s (x)|| Normal: Position: x = s (t) s (x) = div ⇥s || ⇥s || (x) Curvature: d ds ⇥s (x) = || ⇥s (x)|| ⇥s (x), ⇥s (x) || ⇥s (x)|| , div ⇥s || ⇥s || (x) . d ds ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t) Evolution PDE: All level sets evolves together.
  22. Proof 15 t, ⇥s ( s (t)) = 0 Definition

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

    (x), ⇤ s ⇤s (t) + ⇤⇥s ⇤s (x) = 0 for x = s (t) Deriving with respect to t: Definition of level-sets: d ds ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t) Evolution PDE: ( ) ( )
  24. Proof 15 t, ⇥s ( s (t)) = 0 ⇥s

    (x), ⇤ s ⇤s (t) + ⇤⇥s ⇤s (x) = 0 for x = s (t) Deriving with respect to t: Definition of level-sets: d ds ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t) Evolution PDE: ( ) ( ) ( ) + ( ) : ⌅⇤s ⌅s (x) = (x, ns (t), ⇥s (t)) ⇤s (x), ns (t)
  25. Proof 15 t, ⇥s ( s (t)) = 0 ⇥s

    (x), ⇤ s ⇤s (t) + ⇤⇥s ⇤s (x) = 0 for x = s (t) Deriving with respect to t: Definition of level-sets: d ds ⇥s (t) = (⇥s (t), ns (t), ⇤s (t)) ns (t) Evolution PDE: ( ) ( ) ( ) + ( ) : ⌅⇤s ⌅s (x) = (x, ns (t), ⇥s (t)) ⇤s (x), ns (t) d ds ⇥s (x) = || ⇥s (x)|| ⇥s (x), ⇥s (x) || ⇥s (x)|| , div ⇥s || ⇥s || (x) . For all x on the curve, = s (x) || s (x)||
  26. Implicit Geodesic Active Contours 16 d ds s = ||

    s ||div W s || s || . Evolution PDE: Comparison with explicit active contours: : 2D instead of 1D equation. + : allows topology change.
  27. Implicit Geodesic Active Contours 16 Re-initialization: ⇥s (x) = ±

    min t || s (t) x|| Eikonal equation: || s || = 1 with ⇥s ( s (t)) = 0 d ds s = || s ||div W s || s || . Evolution PDE: Comparison with explicit active contours: : 2D instead of 1D equation. + : allows topology change.
  28. Multiple Fluids Dynamics 17 See Ron Fedkiw homepage. Multiple gaz:

    Fluid/air interface: http://physbam.stanford.edu/ fedkiw/
  29. Energy Depending on Region 19 Regularization Data fidelity Optimal segmentation

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

    [0, 1]2 = c: min L1 ( ) + L2 ( c) + R( ) R( ) = | | Chan-Vese binary model: More general models Level set implementation: = {x \ (x) > 0} Smoothed Heaviside: H(x) x H (x) = 2 atan x ⇥ R( ) R( ) = ||⇥(H )(x)||dx L1 ( ) = |I(x) c1 |2dx L1 ( ) ⇥ L( ) = H ( (x))||I(x) c1 ||2dx
  31. Descent Schemes 20 For a given c = (c1, c2

    ) R2: min ⇥ Ec ( ) = H ( (x))||I(x) c1 ||2+ H ( ⇥(x))||I(x) c2 ||2 + ||⇥(H ⇥)(x)||dx
  32. Descent Schemes 20 Descent with respect to : For a

    given c = (c1, c2 ) R2: ⇥(k+1) = ⇥(k) k Ec (⇥(k)) G(x) = ||I(x) c1 ||2 ||I(x) c2 ||2 Ec ( ) = H ( (x))G(x) div ⇥⇥ ||⇥⇥|| (x) min ⇥ Ec ( ) = H ( (x))||I(x) c1 ||2+ H ( ⇥(x))||I(x) c2 ||2 + ||⇥(H ⇥)(x)||dx
  33. Descent Schemes 20 Descent with respect to : For a

    given c = (c1, c2 ) R2: ⇥(k+1) = ⇥(k) k Ec (⇥(k)) G(x) = ||I(x) c1 ||2 ||I(x) c2 ||2 Limit 0: Ec ( ) = H ( (x))G(x) div ⇥⇥ ||⇥⇥|| (x) ⇥Ec (⇥) { =0} (x)||⇥⇥(x)||G(x) Numerically, use Ec ( ) = || (x)||G(x) min ⇥ Ec ( ) = H ( (x))||I(x) c1 ||2+ H ( ⇥(x))||I(x) c2 ||2 + ||⇥(H ⇥)(x)||dx
  34. Update of c 21 Joint minimization: min ,c1,c2 Ec (

    ) Update of : ⇥(k+1) = ⇥(k) k Ec(k) (⇥(k))
  35. Update of c 21 Update of (c1, c2 ): c(

    ) = I(x)H( (x))dx H( (x))dx Joint minimization: c(k+1) 1 = c( (k)) c(k+1) 2 = c( (k)) min ,c1,c2 Ec ( ) Update of : ⇥(k+1) = ⇥(k) k Ec(k) (⇥(k)) (c(k+1) 1 , c(k+1) 2 ) = argmin c1,c2 Ec ( (k))
  36. Conclusion 23 Curve evolution Energy minimization Parametric vs. level set

    representation. Dictionary to translate – curve properties. – energy gradients. Edge based vs. region based energies.