Algorithm Search⌘K

Definitionadvanced

Mumford-Shah functional

Also called Mumford-Shah model.

An energy over a piecewise smooth image and a set of edges that weighs fit to the data, smoothness off the edges and the total edge length.

The Mumford-Shah functional is an energy for image segmentation and smoothing at the same time. Its arguments are an image uu and a set KK of curves, the edges. It adds three terms: how far uu is from the given image, how much uu varies away from the edges, and the total length of the edges. A minimizer is an image that is smooth inside regions and can jump across the edges, together with those edges. Mumford and Shah (1989) proposed it and studied its mathematics. It is the model behind many region-based segmentation methods, from active contours without edges to discrete energies on a Markov random field.

Definition

Let Ω⊂R2\Omega \subset \mathbb{R}^2 be a bounded open set, the image domain, and let g:Ω→Rg : \Omega \to \mathbb{R} be the given image. For a closed set K⊂ΩK \subset \Omega and a function uu that is smooth on Ω∖K\Omega \setminus K,

E(u,K)=∫Ω(u−g)2 dx  +  μ∫Ω∖K∣∇u∣2 dx  +  ν ∣K∣,E(u, K) = \int_{\Omega} (u - g)^2 \, dx \; + \; \mu \int_{\Omega \setminus K} \lvert \nabla u \rvert^2 \, dx \; + \; \nu\, \lvert K \rvert,

where ∣K∣\lvert K \rvert is the length of KK (its one-dimensional Hausdorff measure) and μ,ν>0\mu, \nu > 0 are weights. The Mumford-Shah problem is to minimize EE over all pairs (u,K)(u, K). The regions of the segmentation are the connected components of Ω∖K\Omega \setminus K. Papers place the weights on different terms; the form here is that of Eq. (4) of Arbelaez et al. (2011).

These facts follow from the definition or are theorems of the cited papers:

  • Each term needs the others. Without the length term, more edges cost nothing, and KK can cut Ω\Omega into small regions where the gradient term is near 0. Without the gradient term, u=gu = g with K=∅K = \emptyset costs nothing. Without the data term, a constant uu costs nothing.
  • The smooth part (theorem). For a fixed KK, EE is a strictly convex quadratic function of uu. Its minimizer satisfies the Euler-Lagrange equation u−g=μΔuu - g = \mu \Delta u in Ω∖K\Omega \setminus K, with ∂u/∂n=0\partial u / \partial n = 0 on both sides of KK and on the border of Ω\Omega. So uu is a smoothed gg, and no smoothing crosses an edge.
  • The piecewise constant limit (theorem). If μ→∞\mu \to \infty, uu must be constant on each region RiR_i, and the best constant is the mean cic_i of gg on RiR_i. The energy becomes ∑i∫Ri(g−ci)2 dx+ν∣K∣\sum_i \int_{R_i} (g - c_i)^2 \, dx + \nu \lvert K \rvert, the minimal partition problem. The proof: for a region RR, ∫R(g−c)2 dx\int_R (g - c)^2 \, dx is a quadratic in cc with derivative 2∫R(c−g) dx2 \int_R (c - g) \, dx, which is zero at the mean.
  • Existence (theorem). De Giorgi, Carriero and Leaci (1989) proved that a minimizer exists. Their proof works with a weak form in which KK is the set of jumps of uu, and shows that this set is closed up to a set of zero length.
  • Shape of the edges (conjecture). Mumford and Shah conjectured that the edges of a minimizer are a finite union of smooth arcs, which meet only in triple junctions at equal angles of 120 degrees or end at the border or in crack tips. This is the Mumford-Shah conjecture, not a theorem in general.
  • No convexity. EE is not convex in the pair (u,K)(u, K), and minimization methods find local minima. In a discrete form on a pixel grid, the piecewise constant case with a fixed set of values is a Potts model, which is NP-hard to minimize for three or more values.

The functional is the definition of a good segmentation, not an algorithm. Methods to minimize it include the elliptic approximation of Ambrosio and Tortorelli (1990), where a function vv near 0 at edges and near 1 elsewhere replaces KK; the level set method of Chan and Vese (2001) for two regions; greedy region merging that lowers the piecewise constant energy; and graph cuts on the discrete Potts form.

Examples and non-examples

  • A step in one dimension. Take the discrete form on six pixels with g=(0,0,0,1,1,1)g = (0, 0, 0, 1, 1, 1), μ=1\mu = 1, sums in place of integrals, differences ui+1−uiu_{i+1} - u_i in place of the gradient, and ν\nu per cut between neighbors. With no cut, the best uu solves a linear system and is (1/18,2/18,5/18,13/18,16/18,17/18)(1/18, 2/18, 5/18, 13/18, 16/18, 17/18), with energy 4/94/9. With one cut at the step, u=gu = g and the energy is ν\nu. Any set of cuts without the cut at the step costs at least 1/3+ν1/3 + \nu if it is not empty: with all other pairs cut, only the pair at the step is smoothed, and the best uu there is (1/3,2/3)(1/3, 2/3) with cost 1/9+1/9+1/9=1/31/9 + 1/9 + 1/9 = 1/3. So the minimizer has the edge at the step if ν<4/9\nu < 4/9 and no edge if ν>4/9\nu > 4/9. A larger ν\nu removes weak edges.
  • The edge cost does not depend on the contrast. In the example, a step of height hh gives the no-cut energy 4h2/94h^2/9, and the cut still costs ν\nu. So an edge appears when h2>9ν/4h^2 > 9\nu/4. In total variation denoising, a jump of height hh costs λh\lambda h times its length, so strong edges cost more there. This is the main difference between the two energies.
  • Two regions of constant gray. If gg is aa inside a disc of radius rr and bb outside, then u=gu = g with KK the circle has energy 2πrν2 \pi r \nu. With no edge, the constant uu equal to the mean of gg has the energy ∣Ω∣σ2\lvert \Omega \rvert \sigma^2, where σ2\sigma^2 is the variance of gg over Ω\Omega, and the best smooth uu costs less. So if 2πrν>∣Ω∣σ22 \pi r \nu > \lvert \Omega \rvert \sigma^2, the circle is not the best edge set. For a small disc or a large ν\nu the disc is lost.
  • Not a Gaussian blur. Smoothing with a Gaussian filter blurs across all edges. The smooth part of a Mumford-Shah minimizer is smoothed only inside each region.
  • Not a boundary detector. An edge detector such as Canny marks pixels with a high gradient and does not ask the edges to close regions or to be short. The edge set of the Mumford-Shah functional comes from a global energy.

The Euler-Lagrange equation of the functional for a fixed edge set is a screened Poisson equation, solved region by region. Total variation denoising is the convex energy that replaces the edge set and the gradient term by ∫∣∇u∣\int \lvert \nabla u \rvert. The Potts model on a Markov random field is the discrete piecewise constant case, where the edge length is the number of neighbor pairs with different labels. The Chan-Vese model is the two-region piecewise constant case, minimized with a level set method. Arbelaez et al. (2011) review it among the region-based approaches to segmentation, in the same paper that defines the ultrametric contour map. The normalized cut is another global criterion for a partition, based on a graph of pixel affinities instead of a fit to the image.

References

  1. David Mumford and Jayant Shah, Optimal approximations by piecewise smooth functions and associated variational problems, Communications on Pure and Applied Mathematics 42(5), 1989, 577-685, the definition of the functional, its piecewise constant limit, the first variation and the conjecture on the shape of the edge set
  2. Ennio De Giorgi, Michele Carriero and Antonio Leaci, Existence theorem for a minimum problem with free discontinuity set, Archive for Rational Mechanics and Analysis 108, 1989, 195-218, the existence of minimizers in the weak formulation and the closedness of the edge set
  3. Luigi Ambrosio and Vincenzo Maria Tortorelli, Approximation of functionals depending on jumps by elliptic functionals via Gamma-convergence, Communications on Pure and Applied Mathematics 43(8), 1990, 999-1036, the elliptic approximation with an edge indicator function and its Gamma-convergence to the Mumford-Shah functional
  4. Tony F. Chan and Luminita A. Vese, Active contours without edges, IEEE Transactions on Image Processing 10(2), 2001, 266-277, the two-phase piecewise constant case written with a level set function
  5. Yuri Boykov, Olga Veksler and Ramin Zabih, Fast approximate energy minimization via graph cuts, IEEE Transactions on Pattern Analysis and Machine Intelligence 23(11), 2001, 1222-1239, Section 7 and the Appendix (NP-hardness of the Potts energy)
  6. Pablo Arbelaez, Michael Maire, Charless Fowlkes and Jitendra Malik, Contour detection and hierarchical image segmentation, IEEE TPAMI 33(5), 898-916, 2011, Eq. (4), the Mumford-Shah functional in the review of region-based segmentation

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/FMWRYZ/text.yaml