Quiz: the level set equation
Before this unit: Curves as level sets (previous unit); Day 30: Snakes and active shape models; Day 13: Morphology.
See also: Day 51: Marching cubes.
Short questions to test your understanding. Try each on paper first, then open the answer. Convention: \phi < 0 inside, F > 0 moves the curve outward, \phi_t + F|\nabla\phi| = 0.
Q1. At a pixel, |\nabla\phi| = 2 and F = 1. By how much does \phi change in a time step \Delta t = 0.1? Does it go up or down?
\phi^{n+1} = \phi^n - \Delta t\,F\,|\nabla\phi|.
Down by 0.1 \cdot 1 \cdot 2 = 0.2. A steep \phi must change more to move its zero crossing by the same distance F\Delta t = 0.1.
Q2. Why does a velocity along the curve not appear in the level set equation?
What happens to the curve if every point slides along it?
Sliding points along the curve leaves the curve (the set of points) unchanged; only the motion across it changes the shape. In the derivation it shows up as \nabla\phi\cdot\mathbf v = 0 for a tangential \mathbf v.
Q3. A front grows (F > 0). At a pixel, the left neighbour has a smaller \phi and the right neighbour a larger one. Which difference does the upwind scheme use in x?
From which side does a growing front arrive?
The backward difference \phi_i - \phi_{i-1}: a growing front comes from the inside, the side of smaller \phi, here the left.
Q4. Why does a shrinking interval never disappear when |\nabla\phi| is computed with central differences?
Compute the central difference at the bottom of |x| - 1.
At the minimum the two neighbours are equal, so the central difference is 0: \phi there never changes and stays negative. The upwind scheme for a shrinking front uses both one-sided slopes at the minimum (the front arrives from both sides) and raises the value.
Q5. F = 2 pixels per unit time on a 2D grid with \Delta x = 1. What is the largest stable time step? And in 1D?
At most one pixel per step; a diagonal front counts in both directions.
2D: \Delta t \le 1/(\sqrt2 \cdot 2) = 0.35. 1D: \Delta t \le 1/2 = 0.5.
Q6. A circle of radius 20 moves under curvature flow with \varepsilon = 1. When does it vanish? What is its radius halfway through that time?
r(t)^2 = r_0^2 - 2t.
It vanishes at t = 400/2 = 200. At t = 100: r = \sqrt{400 - 200} = 14.1. It shrinks slowly at first and fast at the end, because small circles have large curvature.
Q7. A dumbbell (two disks joined by a thin bar) moves with constant speed F = -1, and separately under pure curvature flow. In which case does it split in two?
What is the sign of \kappa on the sides of the bar, near the disks?
With constant inward speed: the bar disappears after a time equal to half its thickness, and the shape splits. Under curvature flow it does not split: the concave corners where bar meets disk have \kappa < 0 and move outward, the neck widens, and the curve becomes convex and shrinks to a point as one piece (Grayson’s theorem).
Q8. Why reinitialise \phi, if the zero contour is all we want?
What do the derivatives of \phi look like after many steps?
After many steps \phi becomes very steep in some places and flat in others. Finite differences of a very steep or very flat \phi are inaccurate (curvature especially), the time-step rule assumes |\nabla\phi| \approx 1, and a flat \phi near the front can let noise flip signs. Resetting \phi to the signed distance of its own zero contour fixes the values without moving the curve.
Q9. (math) For curvature flow with \varepsilon = 1, show that the area inside any simple closed curve decreases at the rate 2\pi.
A' = -\oint F\,ds, and the total turning of a simple closed curve.
Each piece ds of the curve moves outward by F\,dt, sweeping area F\,ds\,dt, so A' = \oint F\,ds = -\oint\kappa\,ds. The tangent of a simple closed curve turns once around: \oint\kappa\,ds = 2\pi. Hence A' = -2\pi, whatever the shape.