Optimal transport, level-set: applications to image Ensimag 3A, Grenoble INP and Master MSIAM, IM2AG, UJF Emmanuel Maitre∗ December 1, 2014 "C’est en traitant une de ces applications que Monge a donné sa théorie de la courbure des surfaces ; on la trouve exposée pour la première fois dans le Mémoire sur les déblais et remblais publié dans les mémoires de l’académie des sciences de Paris, pour l’année 1781. Monge y fait voir que les routes suivies pour aller du déblai au remblai étant supposées rectilignes, elles sont les normales d’une surface unique ; il part de là pour décomposer le faisceau de ces normales en groupes de surfaces développables qui ont pour arêtes de rebroussement, les lignes, lieux des centres de courbure de la surface indiquée, et qui tracent autant de lignes de courbure sur cette surface, limite la plus avantageuse du déblai ou du remblai supposés indéfinis d’un côté seulement. " Charles Dupin, Essai historique sur les services et les travaux scientifiques de Gaspard Monge. Paris, Bachelier 1819, p. 230. Image et texte récupérés sur le site http://alta.mathematica.pagesperso-orange.fr ∗ [email protected], http://ljk.imag.fr/membres/Emmanuel.Maitre/ 1 1 Introduction An image can be considered as an application of a domain of R2 (or R3 in the case of three-dimensional images) with values in a subset of R (or R3 for color images). Many algorithms of edge detection, shape recognition, denoising, are based partial differential models. In a first part of this lecture we consider the Eulerian representation of region of interest in images. We begin by giving the main principles of the Eulerian description of interfaces and what we can derive from it as geometrical information. Then we develop few algorithms of active contours that were developed up to last years. We will explicit numerical tools involved in the implementation of these algorithms. The optimal transport is an old research topic since it was first studied in 1781 by Gaspard Monge, about transport optimization of building materials. It has applications in economy and has been set in a fluid mechanics formulation by Brenier, as a minimization problem on kinetics energy under as mass conservation equation. The use of this tool in image analysis was introduced by Benamou - Brenier then by Haker et al. Their work has helped to develop a method for interpolating between two images (or more) taking into account the motion of an image on the other. Jusqu’à très récemment les énergies utilisées ne faisaient intervenir que l’énergie cinétique, sans tenir compte de contraintes supplémentaires pouvant exister. This lecture aims at bringing together these two topics, namely the study of optimal transport for more general energies, in the context of image processing, by means of level-set formulations. 2 Segmentation methods using level-set in image analysis 2.1 Introduction To represent an interface defining two moving regions of interest, several representations are possible. In particular, we may consider a parametrization of the interface (for simplicity assume that this is a curve Γt ). We call it a Lagrangian setting: let γ : [0, M ] × [0, T ] → γ(r, t) a parametrization of Γt advected by the continuous medium velocity γ(r, t) = X(t; γ0 (r)) or equivalently the solution of differential system: ( ∂t γ(r, t) = u(γ(r, t), t), r ∈ [0, M ], t ∈]0, T ] (1) γ(r, 0) = γ0 (r), r ∈ [0, M ]. In practice, to capture a region, we will therefore consider a discretization of [0, M ] given by (ri )i=0...N and then move γ(ri , t) to enclose the target region. The fact that the spacing between the points may vary as a result of the curve deformation could cause over or under-sampling. Moreover, with this representation, handling topology changes of the contour can be cumbersome. 2.2 Level set framework We now change our representation of the interface to circumvent the pitfalls of the Lagrangian representation. We represent Γt , that we from now on consider as closed1 by introducing an auxiliary function φ : Ω × [0, T ] → R such that Γt = {x ∈ Ω, φ(x, t) = 0}. The bounded domain delimited by Γt , that we refer as the region interior, is Ω− φ(x, t) < t = {x ∈ Ω, + 0} and its exterior as Ωt = {x ∈ Ω, φ(x, t) > 0}. As φ(γ(r, t), t) = 0 on [0, M ] × [0, T ], and ∂t γ = u(γ, t), we get differentiating with respect to t ∂t φ(γ(r, t), t) + u(γ(r, t), t) · ∇φ(γ(r, t), t) = 0 1 It is possible to remove this assumption with the addition of another auxiliary function. 2 The Level Set method [66] corresponds to consider a initial function φ0 representing Γ0 and to look for a function φ which verifies the transport equation on the whole domain: ( ∂t φ + u · ∇φ = 0 on Ω×]0, T [ (2) φ = φ0 on Ω × {0}. Usually φ0 is chosen as a signed distance to interface: ( − dist(x, Γ0 ) if x belongs to the interior of Γ0 φ0 (x) = dist(x, Γ0 ) if x belongs to the exterior of Γ0 Remark 1 1. It is remarkable that a smooth function of time and space can be a very singular evolution curve: melting of curves, or splitting of a curve. Is that we have added a dimension to the problem, and in this new space, these situations are not unique! The price to pay is to work with this additional dimension: instead of a 1D discretization, we will consider a discretization of the whole space. Nevertheless, we will see that there are methods to restrict the calculations to an area near the contour (narrow-band) . 2. The level-set method gives a direct way of knowing if a point in space is inside or outside of the contour, by inspecting the sign of φ at this point. This is generally not trivial with the other representation. On the contrary, access the coordinates of points of the contour is not at all natural, and we’ll try to get around this need as possible. With the choice of sign of φ0 above fact, that we will now assume systematically, the outer normal to the area enclosed by Γt and its curvature are expressed at each of its points by n(x) = ∇φ |∇φ| κ(x) = div ∇φ |∇φ| The general proof can be found in the book [50], pages 354 to 357. We justify the formula of curvature in two dimensions. Consider a regular parametrization s → γ(s) of Γt such that, by following the curve along the direction of ∂s γ, we have (φ < 0) on our left. The curvature is expressed in terms of the parameterization as [∂s γ, ∂ss γ] κ= |∂s γ|3 ∇φ By differentiating the identity φ(γ(s)) = 0 we have ∂s γ · ∇φ = 0. Differentiating ∂s γ · |∇φ| = 0 we have ∇φ ∇φ ∂ss γ · + ∂s γ · D ∂s γ = 0 |∇φ| |∇φ| As ∂s γ ⊥ ∇φ |∇φ| ∇φ we have due to the chosen curve orientation, [∂s γ, |∇φ| ] < 0, therefore ∇φ [∂s γ, ∂ss γ] = |∂s γ|∂s γ · D ∂s γ |∇φ| In dimension two, if we denote as ∇×φ the curl of phi φ, obtained by a + π2 rotation to the vector ∇φ, the corresponding tangent vector is ∇×φ τ (x) = |∇φ| Therefore ∇φ ∇×φ ∇×φ κ= D |∇φ| |∇φ| |∇φ| The prof is achieved by the following lemma that the reader could prove (S1 is the unit circle). Lemma 1 Let u, v : Ω ⊂ R2 → S1 , of class C 1 , such that u · v = 0 on Ω. Then [Du]v · v = div u. 3 2.3 Set operations expressed with level set functions Let two bounded open sets Ω1 and Ω2 . If we already have two level set functions to capture those sets, say φ1 and φ2 , such that φi < 0 in Ωi , then min(φ1 , φ2 ) is a level set function for Ω1 ∪ Ω2 and max(φ1 , φ2 ) for Ω1 ∩ Ω2 . As φi is a level set function for Ωi , −φi plays the same role for Ωci . Therefore, max(−φ1 , φ2 ) is a level set function for Ω2 \ Ω1 . At last min(max(−φ1 , φ2 ), max(φ1 , −φ2 )) is a level set function for the symmetric difference Ω1 ∆Ω2 . 2.4 General principles of image segmentation and active contours Consider an image (grayscale to start), that is a function defined on the domain Ω, I : Ω → R. To identify areas in this image, a first idea is to look at the histogram of the gray levels of the latter, and segment the image into functions thresholds on the histogram. We will therefore consider as belonging to the same region of interest pixels having an intensity within a certain band. The problem with this type of segmentation is that it does not produce in general a connected region, and is very sensitive to noise. We therefore seek methods of segmentation sufficiently robust to noise and low contrast images. Among the existing segmentation methods, except the threshold described above, one can list the active contours, deformable models, growth models ... We are interested in this part in the active contour models, of which we present the general principles. It amounts to move a curve (or a surface for a 3D image) so that it fits the contours of the object that we want to identify in the image. In order to move Γt , in Lagrangian representation we usually seek to minimize a functional of the following kind: F (γ(t)) = α Z 0 M |∂r γ(r, t)|dr + β Z M 2 |∂rr γ(r, t)|2 dr 0 −λ Z 0 M |∇I(γ(r, t))|2 dr, (3) where α ≥ 0, β ≥ 0, λ > 0 are parameters. The first two measure the smoothness of the curve, the last will move the γ curve to areas of strong gradients of the image. To write the dynamics of movement, rather than writing a derivative with respect to the curve, using our velocity field we try to move the curve γ so as to minimize F as t increases. On has d F (γ(t)) = dFγ(t) (∂t γ(t)) = dFγ(t) (u(γ(t))) = ∇F (γ(t)) · u(γ(t)) dt We see that choosing u(γ) = −ρ∇F (γ(t)), where ρ > 0 is a descent parameter, will produce decreasing F . This is the "snakes" method introduced by Kass, Witkin, Terzopoulos in 1988. The general principle of these methods is to identify regions that are defined by areas of high variations the gradient of the image. Furthermore, if there are multiple objects to be captured, if the starting area encircles these objects, then the contour will always gather the union of these objects and therefore, as is, this method can not capture multiple objects. This is a serious caveat of the method. More generally we consider 1 a decreasing function g : [0, +∞) → R+ such that g(r) → 0 for r → ∞, for instance g(s) = 1+s 2 . We consider here the case β = 0 and therefore the energy boils to: F (γ(t)) = α Z 0 M |∂r γ(r, t)|dr + λ Z M g(|∇I(γ(r, t))|)dr, (4) 0 A remark raised after a few years in the development of the method is the dependence on parameterization of the curve. Noticed by Caselles, Kimmel and Sapiro in 1997, that is explained by the fact that if we define a new parameterization of the curve by a change of variable r = φ(s) with φ : [0, L] → [0, M ], φ0 > 0 we get: Z Z M 0 L |∂r γ(r, t)|dr = 4 0 |∂s γ(φ(s), t)|ds rs 271 (a) FIGURE 1: Snakes (Kass, (b) Witkin, and Terzopoulos 1988) es (Kass, Witkin, and Terzopoulos 1988) c 1988 Springer: (a) the “snake which does not depend on parametring, whereas ly controlling shape; (b) lip Z Mtracking. Z L g(|∇I(γ(φ(s), t))|)φ0 (s)ds g(|∇I(γ(r, t))|)dr = 0 0 is completely dependent on the (nb: if youittake square ingradithe first term of m attractsWhich the snake to dark ridges, theparametrization edge term attracts to astrong energy as in the articles cited, this term also depends on the setting). The trick used by Caselles, he term term attracts it to line to terminations. In practice, mostof systems onlyso that it is Kimmel and Sapiro is simply write an energy considering the metric the curve itself, invariant under change of parametrization: which can either be directly proportional to the image gradients, Z M Z L X g(|∇I(γ(r, t))|)|∂r γ(r, t)|dr = g(|∇I(γ(φ(s), t))|)|∂r γ(φ(s), t)|ds Eedge =0 krI(f (i))k2 , 0 (5.4) The general form of the i energy is now: Z M version of the image Laplacian,F (γ(t)) = g(|∇I(γ(r, t))|)|∂r γ(r, t)|dr, (5) 0 X 2 2 form by replacing g by α + λg. Let us compute since indeed, energy (4) may be expressed Eedge = |(G ⇤r I)(funder (i))|this . (5.5) the flow generated by such an energy. After some elementary calculations, we find: i Z M d F (γ(t)) = [g(∇I(γ))κn + (∇(g(∇I))(γ) · n)n] · u(γ)dr extract edges and then map to the edges as an alternative dt use a distance 0 (6) imes where npotentials. is the outward normal, which gives as evolution of γ : nally proposed applications, a variety of user-placed constraints can also be added, e.g., ∂t γ = −ρ[g(∇I(γ))κn + (∇(g(∇I))(γ) · n)n]. (7) forces towards anchor d(i), The application of apoints discretized version of this algorithm to follow lips motion, in the original article of 1988, is depicted on figure 1. Problems could occur on sharp edges, see figure 2. Algorithm is sensitive 2 to noise, and cannot detect more than one object, see figure 3. E = k kf (i) d(i)k , (5.6) spring i We now translate this expression to Eulerian coordinates. First is a curve is evolving with normal velocity V , that is: ∂t γthe = V snakes n (“volcano”) forces (Figure 5.2a). As evolve by minimiz- ve 1/r the transport ont thewhich level setaccounts function reads: hey oftenthen “wiggle” andquartions “slither”, for their popular name. ∂t φ + V n · ∇φ = 0 snakes being used to track a person’s lips. ar snakes have a tendency to shrink (Exercise 5 5.1), it is usually better to FIGURE 2: Snakes, case with sharp edges FIGURE 3: Snakes, case with two objects and noise 6 which as n is a unit vector field collinear to ∇φ, gives ∂t φ = −V |∇φ| Thus the equation on φ becomes (for ρ = 1) : ∇φ + ∇(g(∇I)) · ∇φ |∇φ| ∂t φ = g(∇I)|∇φ| div 2.5 2.5.1 Active contours and level set: one step beyond Computation of volume and surface integrals The implicit representation can be used to compute approximate surface and volume integrals. Lemma 2 Let φ : Rd → R be Lipschitz on Rd and g : Rd → R integrable. Assume there exists η0 > 0 such that ess inf |φ|<η0 |∇φ| > 0. Then for η ∈]0, η0 [, Z Z ηZ g(x)dx = g(x)|∇φ|−1 dσdν |φ(x)|<η −η φ(x)=ν Proof. In [41], proposition 3 page 118, it is shown under such assumptions that Z Z d g(x)dx = − g|∇φ|−1 dσ a.e. s ds φ>s φ=s The above result easily follows by setting s = −t and taking φ and −φ in this formula, and then summing up the two obtained identities after integrating them between 0 and η. A less rigorous but more intuitive proof amounts to write the volume element in a neighborhood ∇φ of a point x as dx = dσ × dh, where dh is along the normal |∇φ| to the level-set of φ through x, and by remarking that ∇φ ) = φ(x) ± dh|∇φ| + O(dh2 ) ν ± dν := φ(x ± dh |∇φ| from which we get dx = |∇φ|−1 dσdν. From now on we assume the following regularity for φ: Z n (Hφ ) ∀t ∈ [0, T ], ∀f ∈ Cc (R ), s → f (x)dx est C 1 au voisinage de s = 0 {|φ(x,t)|<s} Let M(Rd ) be the space of bounded measures on Rd , that is, of linear continuous forms on the space of bounded continuous functions. Then we have the following: Proposition 1 Let r → ζ(r) be a continuous cut-off function, that is with support in [−1, 1], and such that r → 1ε ζ( rε ) converges to δ0 in M(R). Then under assumption (Hφ ), when ε → 0, 1 φ ζ |∇φ| * δ{φ=0} in M(Rd ). ε ε Proof. For a continuous g(r), we have by assumption, Z 1 r lim ζ g(r)dr = g(0). ε→0 R ε ε Applying this, for f ∈ Cc (Rd ), to g(r) = Z f dσ. {φ=r} 7 We have lim Z ε→0 R so that lim 1 r ζ ε ε Z Z ε→0 R {φ=r} Z 1 ζ ε f dσdr = {φ=r} Z f dσ, {φ=0} Z φ f dσ. f dσdr = ε {φ=0} As 1ε ζ( φε ) is vanishing outside |φ| < ε, using Lemma 2, we get Z Z R {φ=r} 1 ζ ε Z εZ Z 1 1 φ φ φ f dσdr = f dσdr = f |∇φ|dx ζ ζ ε ε ε −ε {φ=r} ε |φ(x)|<ε ε Z φ 1 ζ f |∇φ|dx = ε Rd ε which means finally, for all f ∈ Cc (Rd ), Z Z 1 φ lim ζ |∇φ|f (x)dx = f (x)dσ. ε→0 Rd ε ε {φ=0} We therefore hereby justified that δ{φ=0} can be approximated by |∇φ| 1ε ζ φ ε for small ε. Remark 2 This approximation has however to be handled with care. Indeed it amounts to replace a purely geometrical object, namely the measure supported on a curve, δ{φ=0} (which depends only on this curve but not on the chosen φ to capture it), by a function that does on the scale depend of φ 2φ φ 1 1 (for instance {2φ = 0} or {φ = 0} are the same curve, whereas |2∇φ| ε ζ ε 6= |∇φ| ε ζ ε ). This is the origin of some numerical subtleties in the Level Set method. We will see how redistancing and renormalization give answer to this problem. 2.5.2 General level set formulation of a gradient based active contour method Thanks to the above approximation, an Eulerian expression of the (approximated) active contour energy (5) can be written as Z 1 φ Fε (φ) = g(|∇I|) ζ( )|∇φ|dx ε ε Ω Let us compute, independently of the dimension, the functional derivative of this energy. Using the transport equation verified by φ et l’équation (??) vérifiée par |∇φ|, Z d 1 0 φ 1 φ Fε (φ) = g(|∇I|) 2 ζ ( )∂t φ|∇φ| + ζ( )∂t |∇φ| dx dt ε ε ε ε Ω Z 1 0 φ 1 φ ∂t ∇φ · ∇φ = g(|∇I|) 2 ζ ( )(−u · ∇φ)|∇φ| + ζ( ) dx ε ε ε ε |∇φ| Ω Z 1 φ ∇φ 1 φ = ζ( ) ∂t φdx g(|∇I|) −u · ∇( ζ( ))|∇φ| − div g(|∇I|) ε ε |∇φ| ε ε Ω where we performed an integration by parts to get the last expression. Still using the transport equation, ∂t φ = −u · ∇φ so that Z d 1 φ 1 φ Fε (φ) = g(|∇I|) −u · ∇( ζ( ))|∇φ| + |∇φ|∇( ζ( )) · u dt ε ε ε ε Ω ∇φ 1 φ ∇φ 1 φ + g(|∇I|) div ζ( )∇φ · u + ∇[g(|∇I|)] · ζ( )∇φ · udx |∇φ| ε ε |∇φ| ε ε 8 FIGURE 4: Level-set formulation of Snakes (Caselles et al, 1997). Initial contour / Steady state contour. Finally, we got d Fε (φ) = dt Z Ω g(|∇I|) div ∇φ |∇φ| ∇φ ∇φ 1 φ + ∇[g(|∇I|)] · · u|∇φ| ζ( )dx |∇φ| |∇φ| ε ε which is the level translation of (6), up to the approximation of the surface measure given by |∇φ| 1ε ζ( φε )dx. Remark 3 In the case where curvature energy has to be taken into account, the level-set formalism can of course be used and is also dimension independent. Actually the curvature energy can take the form Z 1 φ Gε (φ) = G(κ(φ))|∇φ| ζ( )dx ε ε Ω where the more standard case corresponds to G(r) = 12 r2 . As above, the time derivative of this curvature energy corresponds to the power of curvature forces Hε (x, t), since we have Z d Gε (φ) = dGε (φ)(∂t φ) = dGε (φ)(−u · ∇φ) = − Hε (x, t) · udx. (8) dt Ω After a lengthy computation, we obtain: 1 φ ∇φ 1 0 + P ⊥ ∇[|∇φ|G (κ(φ))] ζ( )∇φ. Hε (x, t) = div −G(κ(φ)) |∇φ| |∇φ| ∇φ ε ε 2.5.3 Some tests The following tests were performed using the CREASEG Matlab software from Olivier Bernard, INSA Lyon. In figure 4, the level-set formulation shows its ability to perform better than the lagrangian formulation of snakes, for the cas elf the star. Indeed, the corners are far better captured, and the solution indeed reaches a steady state. However, for noisy images, the algorithm fails to reach a steady star, and while it seems to perform well at some point, as iterations increase, the curve will finish to disappear completely of partially (figure 5). 9 FIGURE 5: Level-set formulation of Snakes (Caselles et al, 1997). Best contour / Contour after too much iterations (no steady state). 2.6 2.6.1 Region-based methods Idea In the above methods, one drawback is that the image gradient is involved, which could be a problem for noisy images. Other methods are built on the principle of capturing regions instead of capturing contours delimiting them. The pioneering method of Chan & Vese (2001) is based on the minimization of the so-called Mumford-Shah functional: Z XZ MS 2 E (u, Γ) = |u − I| dx + µ|Γ| + ν |∇u|2 dx. i Ω\Γ Ωi A minimizer of such an energy is therefore regular outside Γ, and try fit the image on the regions Ωi , while minimizing the length of Γ. Starting from that energy, Chan & Vese proposed the following level-set formulation by looking for a minimizer in the class of piecewise constant functions, therefore canceling the last term: Z Z φ 1 φ φ 2 CV 2 E (φ, c1 , c2 ) = |c1 − I| H( ) + |c2 − I| (1 − H( ))dx + µ |∇φ| ζ( )dx ε ε ε ε Ω Ω First note that deriving with respect to ci immediately gives that at optimum, R R φ φ Ω I(x)H( ε )dx Ω I(x)(1 − H( ε ))dx c1 = , c = R R 2 φ φ Ω H( ε ) Ω 1 − H( ε ) and the gradient flow associated to this energy can be obtained by: 1 φ ∂t φ = µκ(φ) − (I − c1 )2 + (I − c2 )2 |∇φ| ζ( ) ε ε with c1 , c2 obtained as above. Typically we take a function 1ε ζ( φε ) > 0 to allow creation of new regions. 10 Some generalizations are the following: first we can seek unknown patterns instead of simple constants. This amounts to consider functions instead of constants. We define Z Z φ 1 φ φ 2 CV 2 |u1 (x) − I| H( ) + |u2 (x) − I| (1 − H( ))dx + µ |∇φ| ζ( )dx E (φ, u1 , u2 ) = ε ε ε ε Ω Ω Z Z φ φ |∇u2 |2 (1 − H( ))dx. +ν |∇u1 |2 H( )dx + ν ε ε Ω Ω which gives as Euler-Lagrange equations: u2 − I = ν∆u2 on φ > 0, u1 − I = ν∆u1 on φ < 0 with homogeneous Neumann boundary condition on φ = 0 for the ui . The the descent algorithm gives: 1 φ ∂t φ = µκ(φ) − ν − (I − u1 )2 + (I − u2 )2 − ν|∇u2 |2 + ν|∇u1 |2 |∇φ| ζ( ) ε ε Another extension is to capture more than two regions. Does this need to introduce as much level-set functions as regions ? Hopefully not, due to the four colors theorem. This states that each partition of R2 in regions can be colored with 4 colors, so that to contiguous regions are not painted with the same color. This can be implemented with two level-set functions using the combination of signs of those two functions. We therefore introduce Z φ1 φ2 φ1 φ2 E(φ1 , φ2 , u11 , u12 , u21 , u22 ) = |u11 (x) − I|2 H( )H( ) + |u12 (x) − I|2 (1 − H( ))H( ) ε ε ε ε Ω φ φ φ φ 1 1 2 2 + |u21 (x) − I|2 (1 − H( ))H( ) + |u22 (x) − I|2 (1 − H( ))(1 − H( ))dx ε ε ε ε Z φ1 φ2 φ1 φ2 φ2 φ1 +ν |∇u11 |2 H( )H( ) + |∇u12 |2 (1 − H( ))H( ) + |∇u21 |2 (1 − H( ))H( ) ε ε ε ε ε ε Ω Z φ 1 φ 1 φ2 φ 2 1 1 + |∇u22 |2 (1 − H( ))(1 − H( ))dx + µ |∇φ1 | ζ( ) + |∇φ2 | ζ( )dx ε ε ε ε ε ε Ω and we generalize the above descent algorithm. Exercise 1 Compute the gradient flow associated to that energy and write the active contour algorithm associated to it. 2.6.2 Tests The following tests were performed using the CREASEG Matlab software from Olivier Bernard, INSA Lyon. In figure 6, the Chan-Vese algorithm shows its ability to reach a steady state in the two-objects noisy test case. In the more complicated three objects noisy case, which is a difficult test case for contouring method, it perform also well. However, when it comes to contour regions where the image intensity is not constant, the Chan-Vese algorithm can be fooled (see figure 7 where two regions of are localized by assuming a mean value, giving as bad segmentation. To localize region with possibly varying intensity, the extension to patterns presented above is a better choice. This is even more visible on a nosier image which depicts a spiral. The original Chan-Vese algorithm find two regions which ignore the natural segmentation, while Li algorithm behaves quite well (figure 8). 2.7 2.7.1 Numerical aspects of level set methods Reinitialisation or renormalisation of φ ? Assume a continuous medium of co-dimension one, or the interface between two media is captured by the zero level set of a function φ that is we advected by a given velocity field. When the problem is 11 FIGURE 6: Region-based contouring of (Chan-Vese, 2001). The two-objects and three-objects cases. FIGURE 7: Region-based contouring of (Chan-Vese, 2001) / Extension to the pattern matching case (Li et al). 12 FIGURE 8: Region-based contouring of (Chan-Vese, 2001) / Extension to the pattern matching case (Li et al). simply to localize the interface between two media, only the zero level-set of φ for all time is involved, and the norm of its gradient, provided it does not vanish, does not matter. By contrast when φ is expected to measure the distance to interface in order to localize a force, we realize that there is no reason that φ remains a distance function for all time. Besides, it has even been demonstrated in the case of a co-dimension structure that |∇φ| represents locally the change in length (or area, depending on dimension) of the surface, so that it is a priori sure that |∇φ| = 6 1 for t > 0. However a distance is precisely such that the norm of its gradient is 1 wherever it is defined. Starting from this fact, several workarounds are possible. The first is to redistanciate φ at each time step. This can be done, for instance by solving the following Hamilton-Jacobi equation: ∂ψ + sgn(φ)(|∇ψ| − 1) = 0, ∂τ ψ(0) = φ, (9) to which one looks for a stationary state. In that equation, sgn(φ) is an approximation of the sign of φ. Practically speaking, due to the hyperbolic nature of the equation, characteristics are emanating from the zero level-set, so that, in order for φ to recover a unit gradient in a neighborhood of φ = 0. More precisely, the Hamilton-Jacobi equation can be rephrased as a transport equation: ∂ψ ∇ψ + sgn(φ) · ∇ψ = −sgn(φ). ∂τ |∇ψ| (10) Thus characteristics are emanating from φ = 0 and normal to this interface. One can show that this equation theoretically does not move the zero-level set of φ, that is {ψ = 0} = {φ = 0} for all τ . The disadvantage of this approach is first that this additional equation has to be solved, and second that this numerical computation may induce a small displacement of the interface [38]. It is also responsible for the volume loss wrongly attributed to the level set method by many authors. The ∇φ reason is that the equivalent velocity field sgn(φ0 ) |∇φ| is not divergence free, and this is even more true while the interface curvature is large. It will therefore locally change the volume and this is likely to have implications for the conservation of volume within {φ = 0}. A bunch of methods to overcome this problem have been implemented: add a volume constraint [84, 83], add particles of each side of the interface [38] or merely raise of lower the level-set function [80, 81] ! 13 Another method is to carry φ outside the interface so that we always have |∇φ| = 1. A method, initially introduced by Osher and his co-authors from an idea Evans Spruck and then taken over by Gomes and recently by Faugeras Delfour and Zolésio is to determine φ as the solution of ∂t φ(x, t) + (u · ∇φ)(x − φ∇φ(x), t)) = 0 which amounts to the transport equation on the interface, and the solution is always a distance function, if the original function is. Unfortunately this equation is non local and difficult to solve numerically. 2.7.2 WENO schemes for the transport equation Le coeur de la méthode présentée ici réside dans une équation de transport d’une fonction (vectorielle) niveau qui va enregistrer les déformations du milieu lors de son déplacement par un champ de vitesse calculé par ailleurs. Il est donc important de résoudre numériquement cette équation de manière précise. De nombreux schémas numériques existent pour l’équation de transport : le schéma amont est le plus classique, mais est assez diffusif. Le schéma de Lax-Wendroff est d’une part compliqué à écrire en dimension deux et d’autre part se comporte assez mal pour une solution irrégulière. La méthode des caractéristiques souffre du même défaut du fait de l’interpolation qui l’accompagne. Au milieu des années 80 des schémas non linéaires généralisant le schéma amont ont été introduits par Harten, Engquist, Osher et Chakravarthy. Ces schémas prennent en compte la régularité locale de la solution numérique pour déterminer sur quels points les différences finies doivent être calculées : il s’agit des schémas ENO (Essentially Non Oscillatory). Plus récemment, les schémas WENO (Weighted Essentially Non Oscillatory), qui consistent à prendre une combinaison optimale des stencils de discrétisation (un polycopié de Shu complet sur ces schémas se trouve à l’adresse http://citeseer.ist.psu.edu/shu97essentially.html). To understand their behavior, let us consider the semi-discretized transport equation φn+1 − φn + un φnx = 0. ∆t (11) On a node i of a discretization of the spatial domain, this gives: φn+1 − φni i + uni (φx )ni = 0. ∆t (12) The upwind scheme simply amounts to approximate the x derivative of φ at node i by a one-sided φi −φi−1 φi+1 −φi finite difference, taking into account the sign of ui . Let (φ− and (φ+ x )i = x )i = ∆x ∆x , we write (omitting n) ( (φ− x )i if ui > 0 (φx )i ≈ (13) (φ+ x )i if ui < 0 since the value taken for ui = 0 does not matter in (12). This scheme is stable under the CourantFriedreichs-Lewy (CFL) condition, but rather diffusive. ∆t < ∆x max |u| (14) The ENO / WENO schemes that we present use values {φi−3 , φi−2 , φi−1 , φi , φi+1 , φi+2 } to find an + approximation of (φ− x )i (resp. {φi−2 , φi−1 , φi , φi+1 , φi+2 , φi+3 } for (φx )i ). Let v1 = φi−2 − φi−3 φi−1 − φi−2 φi − φi−1 φi+1 − φi φi+2 − φi+1 , v2 = , v3 = , v4 = , v5 = ∆x ∆x ∆x ∆x ∆x After some expansions (cf Shu lecture notes) we can prove that the three quantities defined by φ1x = v1 7v2 11v3 − + , 3 6 6 φ2x = − v2 5v3 v4 + + , 6 6 3 14 φ3x = v3 5v4 v5 + − 3 6 6 are third order approximation of φ− x . A ENO scheme of order 3 would choose the best of those approximations using a criterium minimizing the third order finite differences of φ. In that way, we obtain a third order scheme. The WENO idea is to find an optimal convex combination of those three quantities, which reaches fifth order in regions where φ is regular. We therefore choose 1 2 3 (φ− x )i ≈ ω1 φx + ω2 φx + ω3 φx where 0 ≤ ωk ≤ 1 are weights such that ω1 + ω2 + ω3 = 1. In regions where φ is regular, the optimal choice turns out to be ω1 = 0.1, ω2 = 0.6 et ω3 = 0.3, but this choice could become very unsatisfactory when φ is less regular. In that case an ENO scheme would be better (i.e. one ωk equal to 1 and canceling the two others). Finally several improvement of this method lead to determine those weights using regularity indicators of the numerical solution itself. We set 13 (v1 − 2v2 + v3 )2 + 12 13 S2 = (v2 − 2v3 + v4 )2 + 12 13 S3 = (v3 − 2v4 + v5 )2 + 12 S1 = and then α1 = 0.1 , (S1 + ε)2 α2 = 1 (v1 − 4v2 + 3v3 )2 4 1 (v2 − v4 )2 4 1 (3v3 − 4v4 + v5 )2 4 0.6 , (S2 + ε)2 α3 = (15) (16) (17) 0.3 (S3 + ε)2 where ε > 0 is small (for instance ε = 10−6 max{vk2 } + 10−99 ), and the weights themselves are given by: αk ωk = , k = 1, 2, 3 α1 + α2 + α3 This choices (several versions exist, corresponding to improvement of this first choice, WENO-Z, WENO-M, etc) give nearly optimal order of accuracy in regions where φ is regular, and try to reproduce the behavior of an ENO scheme when φ is less regular. These schemes are nonlinear, since the coefficients depend on the solution itself. Therefore the numerical analysis is still an active research topic and recent results have been obtain in this direction. As an example we show on the following figures the simulation of the 1D transport equation for a distance-like initial condition, that is continuous but with possibly discontinuities on its derivative. We took in these examples 200 points on the space interval [0, 10], so that ∆x = 0.05, and a CFL of 0.2. The choice of this small CFL is justified by the fact that in coupled problem, one can often not choose a CFL close to one, and the diffusivity of the advection schemes is increasing when the CFL number is deceasing. We use an Euler time stepping scheme, except for the scheme RK3 / space centered (for which Euler would lead to instability). The WENO scheme is clearly the best, even better that high order schemes of Fromm and beam-warming, which are built for regular solution. We also remark that the (W)ENO scheme, as the upwind scheme upon which they are built, do no show oscillations before or after discontinuities like other schemes do. 15 Schema Amont Schema de Lax-Wendroff Approchee Exacte 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 0 2 4 6 8 Approchee Exacte 1 10 0 2 Schema RK3 en temps / Centre en espace 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 2 4 6 8 10 0 2 4 Schema de Fromm 1 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 4 6 8 10 6 8 Approchee Exacte 1 0.8 2 10 Schema ENO 2 Approchee Exacte 0 8 Approchee Exacte 1 0.8 0 6 Schema Beam-Warming Approchee Exacte 1 4 10 0 16 2 4 6 8 10 Schema WENO 5 Approchee Exacte 1 0.8 0.6 0.4 0.2 0 0 2 4 6 8 10 References [1] S. Agenent, S. Haker and A. Tannenbaum, Minimizing flows for the Monge-Kantorovich problem, SIAM J. Math. Analysis, 35:61–97 (2003) [2] V. Arnold, Equations différentielles ordinaires, 5ième éditions, Editions Mir-Librairie du Globe (1996) [3] J. T. Beale and J. Strain. Locally corrected semi-lagrangian methods for stokes flow with moving elastic interfaces. J. Comp. Phys., 227(8):3896–3920, 2008. [4] J.B. Bell, P. Colella, et H.M. Glaz, A second order projection method for the incompressible Navier-Stokes equations, J. Comp. Phys. 85 (1989) [5] J.-D. Benamou, Numerical resolution of an "unbalanced" mass transfer problem, ESAIM: Mathematical Modelling and Numerical Analysis Vol. 37, No 5, 851–868, (2003) [6] J.-D. Benamou and Y. Brenier, A computational fluid mechanics solution of the MongeKatorovich mass transfer problem, Numer. Math. 84:375–393 (2000) [7] J.-D. Benamou and Y. Brenier, Mixed L2 -Wasserstein optimal mapping between prescribed density functions, J. Opt. Theory and Applications, 111, (2):255–271 (2001) [8] T. Biben et C. Misbah, Tumbling of vesicles under shear flow within an advected field approach, Physical Review E 67, 031908 (2003) [9] D. Boffi, L. Gastaldi, and L. Heltai. Numerical stability of the finite element immersed boundary method. M3AS, 17:1479–1505, 2007. [10] D. Boffia, L. Gastaldi, and L. Heltai. Stability results and algorithmic strategies for the finite element approach to the immersed boundary method, preprint available on http://www.ing.unibs.it/˜gastaldi/paper.html. Proceeding of the Sixth European Conference on Numerical Mathematics and Advanced Applications, pages 557–566, 2005. [11] C. Bost. Méthodes Level-Set et pénalisation pour le calcul d’interactions fluide-structure. Thèse de l’Université de Grenoble, oct 2008. [12] M. Boulakia, Modélisation et analyse mathématique de problèmes d’interaction fluide-structure, Thèse de l’Université de Versailles, Novembre 2004, disponible sur http://www.ann.jussieu. fr/~boulakia/these.pdf. 17 [13] J. Brackbill, D. Kothe et C. Zemach, A continuum method for modelling surface tension, J. Comput. Phys. 100, 335–354 (1992) [14] Y. Brenier, Polar Factorization and Monotone Rearrangement of Vector-Valued Functions, Communications on Pure and Applied Mathematics, Vol. XLIV, 375–417 (1991) [15] Y. Brenier and W.-A. Yong. Derivation of particle, string, and membrane motions from the born–infeld electromagnetism. Journal of Mathematical Physics, 46(6):062305, 2005. [16] Y. Brenier. Optimal transport, convection, magnetic relaxation and generalized boussinesq equations. preprint HAL, http://hal.archives-ouvertes.fr/hal-00202710/fr/, 2008. [17] D. Bresch, T. Colin, E. Grenier, B. Ribba, and O. Saut. Computational modeling of solid tumor growth: the avascular stage. soumis, 2009. [18] D. Bresch, Th. Colin, E. Grenier, B. Ribba, O. Saut, O. Singh, and C. Verdier. Quelques méthodes de paramètre d’ordre avec applications à la modélisation de processus cancéreux. ESAIM: Proceedings, 18:163–180, 2007. [19] D. Brown, R. Cortez et L. Minion, Accurate Projection Methods for the Incompressible NavierStokes Equations, J. Comp. Phys., 168, 464–499 (2001) [20] Y.C. Chang, T.Y. Hou, B. Merriman, S. Osher, A Level Set Formulation of Eulerian Interface Capturing Methods for Incompressible Fluid Flows, J. Comp. Phys., 124, 449–464 (1996) [21] H. Cartan, Cours de calcul différentiel, Hermann (1977) [22] P.G. Ciarlet Elasticité tridimensionnelle, Masson (1985) [23] P. Clarysse, B. Delhay, M. Picq and J. Pousin, Optimal extended optical flow subject to a statistical constraint, Journal of Computational and Applied Mathematics, vol. 234 (4), 1291– 1302 (2010) [24] G.-H. Cottet, Multi-physics and particle methods, in Computational Fluid and Solid Mechanics 2003, K.J. Bathe (ed.), Elsevier (2003) [25] R. Cortez, C.S. Peskin, J.M. stockie et D. Varela, Parametric resonance in immersed elastic boundaries, SIAM Journal on Applied Mathematics, 65(2):494–520 (2004) [26] G.-H. Cottet et P. Koumoutsakos, Vortex methods: theory and practice, Cambridge University Press (2000) [27] G.-H. Cottet et E. Maitre, A level-set formulation of immersed boundary methods for fluidstructure interaction problems, C. R. Acad. Sci. Paris, Ser. I 338, 581–586 (2004). [28] G.-H. Cottet et E. Maitre, A level-set method for fluid-structure interactions with immersed surfaces, M3AS (2006). [29] G.-H. Cottet, E. Maitre and T. Milcent, Existence result for an eulerian formulation of a coupled fluid-structure problem, à paraître dans M2AN, 2008. [30] D. Coutand and S. Shkoller. Motion of an elastic solid inside an incompressible viscous fluid. Arch. Rational Mech. Anal., 176:25–102, 2005. [31] B. Dacorogna and J. Moser, On a partial differential equation involving the Jacobian determinant, Ann. Inst. H. Poincaré Anal. Non Linéaire, 7:1–26 (1990) 18 [32] E.J. Dean and R. Glowinski, Numerical methods for fully nonlinear elliptic equations of the Monge-Ampère type, Computer methods in applied mechanics and engineering, 195 (1316):1344–1386 (2006) [33] J.-P. Demailly, Analyse numérique et équations différentielles, PUF (1992) [34] M. Demazure, Catastrophes et bifurcations, Ellipses (1989) [35] R.J. DiPerna et P.-L. Lions, Ordinary differential equations, Sobolev spaces and transport theory, Invent. Math., 98, 511–547 (1989) [36] G. Duvaut, Mécanique des milieux continus, Dunod (1998) [37] B. Engquist, A.-K. Tornberg, and R. Tsai. Discretization of dirac delta functions in level set methods. Journal of Computational Physics, 207(1):28–51, 2005. [38] D. Enright, R. Fedkiw, J. Ferziger et I. Mitchell, A Hybrid Particle level-set Method for Improved Interface Capturing, J. Comput. Phys. 183, 83-116 (2002). [39] L.C. Evans, Partial Differential Equations and Monge-Kantorovich Mass Transfer, Notes de cours sur http://math.berkeley.edu/~evans/. [40] L.C. Evans and W. Gangbo, Differential equations methods for the Monge-Kantorovich mass transfer problem, Memoirs of the American Mathematical Society, 1999. [41] L.C. Evans et R. Gariepy, Measure theory and fine properties of functions, CRC Press (1992). [42] M. Fortin and R. Glowinski, Augmented Lagrangian Methods: Applications to the Solution of Boundary Value Problems, Studies in Mathematics and its Applications 15, North-Holland, Amsterdam, 1983. [43] W. Gangbo, An elementary proof of the polar factorization of vector-valued functions, Archive for Rational Mechanics and Analysis, Volume 128, Number 4, 381–399 (1994) [44] W. Gangbo and R.E. McCann, The geometry of optimal transportation, Acta Math., 177, 113-161 (1996). [45] J. Glaunès, A. Trouvé and L. Younes, Modeling planar shape variation via hamiltonian flows of curves, Statistics and Analysis of Shapes, H. Krim and A. Yezzi (Eds), Birkhauser, 335–361 (2006) [46] J. Glaunès, A. Qiu, M. I. Miller, and L. Younes, Large Deformation Diffeomorphic Metric Curve Mapping, International Journal of Computer vision, 80, 317–336 (2008) [47] B.E. Griffith and C.S. Peskin. On the order of accuracy of the immersed boundary method: Higher order convergence rates for sufficiently smooth problems. J. Comp. Phys., 208:75–105, 2005. [48] J.L. Guermond, P. Minev, et Jie Shen, An overview of projection methods for incompressible flows, http://www.math.purdue.edu/~shen/ma692b/papers/overview.pdf (2005) [49] C. Grandmont et Y. Maday, Existence for an unsteady fluid–structure interaction problem, M2AN, 34 (2000), no. 3, 609–636. [50] D. Gilbarg et N. Trudinger, Elliptic Partial Differential Equations of Second Order, SpringerVerlag (2001) 19 [51] E. Haber, T. Rehman and A. Tannenbaum, iAn efficient numerical method for the solution of the L2 optimal mass transfer problem, SIAM J. Sci. Comp. 32 (1), 197–211 (2010) [52] G. A. Holzapfel. Nonlinear solid mechanics : a continuum approach for engineering. Wiley, 2000. [53] J. Kim et P. Moin, Application of a fractional-step method to solve incompressible NavierStokes equations, J. Comput. Phys. 59 323–360 (1985) [54] C. Le Bris, T. Lelièvre and Y. Maday, Results and Questions on a Nonlinear Approximation Approach for Solving High-dimensional Partial Differential Equations, Constr. Approx. 30: 621–651 (2009) [55] L. Lee et R.J. Leveque, An immersed interface method for incompresible Navier-Stokes equations, SIAM J. Sci. Comp. 25, No. 3, 832–856 (2003) [56] P. Le Tallec et J. Mouro, Fluid structure interaction with large structural displacements, Compt. Meth. Appl. Mech. Engrg. 190, 3039–3067 (2001) [57] R. J. LeVeque et Z. Li, Immersed interface methods for Stokes flow with elastic boundaries or surface tension, SIAM J. Sci. Comput. 18, No. 3, 709–735 (1997). [58] E. Maitre, C. Misbah, P. Peyla, and A. Raoult. Comparison between advected-field and level-set methods in the study of vesicle dynamics. soumis, 2010. [59] J.E. Marsden et Th. Hughes, Mathematical foundations of elasticity, Dover (1994) [60] H. Le Dret et A. Raoult, The membrane shell model in nonlinear elasticity: A variational asymptotic derivation, J. Nonlinear Sci. 6, No.1, 59–84 (1996) [61] E.H. Lieb and M. Loss, Analysis, Graduate Studies in Mathematics, AMS (2001) [62] F.-H. Lin, C. Liu, and P. Zhang. On hydrodynamics of viscoelastic fluids. Communications on Pure and Applied Mathematics, 58(11):1427–1471, 2005. [63] P.-L. Lions, Mathematical Topics in Fluid Mechanics, Oxford (1996) [64] T. Milcent. Formulation eulerienne du couplage fluide structure, analyse mathématique et applications en biomécanique. Thèse de l’Université de Grenoble, mai 2009. [65] R.W. Ogden, Nonlinear elasticity, anisoptropy, material staility and residual stresses in soft tissue, Biomechanics of Soft Tissue in Cardiovascular Systems (edited by G.A. Holzapfel and R.W. Ogden), CISM Course and Lectures Series 441, Springer, Wien, 65–108 (2003) [66] S. Osher et R. P. Fedkiw, Level set methods and Dynamic Implicit Surfaces, Springer (2003). [67] N. Papadakis and E. Mémin, A variational technique for time consistent tracking of curves and motion, Journal of Mathematical Imaging and Vision, Volume 31, Issue 1, pages 81–103, (2008) [68] N. Papadakis and E. Mémin, Variational assimilation of fluid motion from image sequence, SIAM Journal on Imaging Sciences, Volume 1, Issue 4, pages 343–363 (2008) [69] C.S. Peskin, Numerical Analysis of Blood Flow in the Heart, J. Comp. Phys., 25 (1977) 220– 252. [70] C.S. Peskin, The immersed boundary method Acta Numerica, 11 (2002) 479–517. 20 [71] S. Peskin et B.F. Printz, Improved volume conservation in the computation of flows with immersed boundaries, J. Comput. Phys. 105 33–46 (1993) [72] J. Pousin, M. Picq and P. Clarysse, Optimal extended optical flow and statistical constraint, Proceedings of the International Conference on Computational and Mathematical Methods in Sciences and Engineering, J.V.Aguiar(Ed.), CMMSE 2009, vol. 3, 843–854 (2009) [73] E.G. Puckett, A.S. Almgren, J.B. Bell, D.L. Marcus, et W.J. Rider A high-order projection method for tracking fluid interfaces in variable density incompressible flows, J. Comp. Phys. 130 (1997) 269–282. [74] A. Raoult. Symmetry groups in nonlinear elasticity: An exercise in vintage mathematics. preprint HAL - CCSD, http://hal.archives-ouvertes.fr/hal-00275450/en/, 2008. [75] P.-A. Raviart, An analysis of particle methods, Numerical methods in fluid dynamics, Vol. 1127 des Lectures Notes in Mathematics Series, Springer-Verlag (1983) [76] P.-A. Raviart, Méthodes particulaires, Ecole d’été CEA-INRIA-EDF (1987) [77] R.T. Rockafellar, Convex Analysis, Princeton Landmarks in Mathematics and Physics, Princeton University Press (1996) [78] C.-W. Shu, Essentially non-oscillatory and weighted essentially non-oscillatory schemes for hyperbolic conservation laws, ICASE Report No. 97-65 http://techreports.larc.nasa.gov/icase/1997/icase-1997-65.pdf [79] P. Smereka. The numerical approximation of a delta function with application to level-set methods. J. Comp. Phys., 211:77–90, 2003. [80] A. Smolianski. Numerical Modeling of Two-Fluid Interfacial Flows. PhD Thesis, University of Jyväskylä, http://www.math.unizh.ch/user/antsmol/pdf/phd_thesis.pdf, 2001. [81] A. Smolianski. Finite-element/level-set/operator-splitting (FELSOS) approach for computing two-fluid unsteady flows with free moving interfaces. International Journal for Numerical Methods in Fluids, 48(3):231–269, 2005. [82] J. Stockie, Analysis of Stiffness in the immersed boundary method and implications for time-stepping schemes, J. Comp. Phys., 154 (1999) 41–64. Disponible en ligne sur http://www.math.sfu.ca/ stockie/papers/jcp98.pdf. [83] M. Sussman and E. Fatemi. An efficient, interface-preserving level set redistancing algorithm and its application to interfacial incompressible fluid flow. SIAM J. Sci. Comp., 20(4):1165– 1191, 1999. [84] M. Sussman, E. Fatemi, P. Smereka, , and S. Osher. An improved level set method for incompressible two-phase flows. Comp. Fluids, 27:663–680, 1998. [85] M. Sy, D. Bresch, F. Guillén-González, J. Lemoine, M.A. Rodríguez-Bellido, Local strong solution for the incompressible Korteweg model, C. R. Acad. Sci. Paris, Ser. I, 342, 169–174 (2006) [86] C. Tu et C.S. Peskin, Stability and instability in the computation of flows with moving immersed boundaries: A comparison of three methods, SIAM J. Sci. Statist. Comput., 13 (1992), pp. 1361–1376. 21 [87] C. Villani, Topics in optimal transportation, Graduate Studies in Mathematics, Vol. 50, AMS (2003) [88] L. Younes, Computable elastic distances between shapes, SIAM Journal of Applied Mathematics, Vol. 58, No. 2, 565–586 (1998) [89] S. Zhang, L. Younes, J. Zwecl, and J. T. Ratnanather, Diffeomorphic surface flows: a novel method of surface evolution, SIAM J. Applied Math, Vol. 68, No. 3, pp. 806–824 (2008) 22
© Copyright 2026 Paperzz