myat.myat¶
-
myat.
myat
(f, ep, nu=1, de=1, la=1, tol=0.0001, itmax=100, iplot=False, Dx=None, Dy=None, Lh=None)[source]¶ Solve the Ambrosio–Tortorelli approximation of the Mumford–Shah functional
Parameters: f : NumPy 2darray
Raw (noisy) input image to be segmented. Note that f has to be square!
ep : float
Positive edge-“thickness” parameter in the approximation functional. For ep -> 0 the Ambrosio–Tortorelli approximation Gamma-converges to the Mumford–Shah functional (see Notes below).
nu : float
Positive parameter determining the influence of the Ambrosio–Tortorelli terms in the functional.
de : float
Positive parameter influencing the smoothness regularization term for u in the functional.
la : float
Positive parameter weighing the data fidelity term in the functional.
tol : float
Error tolerance for the stopping criterion satisfying 0 < tol << 1.
itmax : int
Integer, the maximal number of iterations.
iplot : bool
Switch to turn interactive plotting on (iplot=True) or off (iplot=False)
Dx : NumPy/SciPy matrix
Disrecte derivative operator in direction x (foward differences are recommended). Note that if f is N-by-N then Dx has to be N**2-by-N**2!
Dy : NumPy/SciPy matrix
Discrete derivative operator in direction y (forward differences are recommended). Note that if f is N-by-N then Dy has to be N**2-by-N**2!
Lh : NumPy/SciPy matrix
Discrete Laplace operator (central differences are recommended). Note that if f is N-by-N then Dy has to be N**2-by-N**2!
Returns: u : NumPy 2darray
The smoothed version of f.
v : NumPy 2darray
The fuzzy edge map of f.
Notes
The Ambrosio–Tortorelli functional [R7] is given by
\[J_{\varepsilon}[u,v] = \int_{\Omega}\frac{\nu\varepsilon}{2}|\nabla v|^2 + \frac{\nu}{2\varepsilon}(1-v)^2 + \frac{\delta}{2} v^2|\nabla u|^2 + \frac{\lambda}{2} (u-f)^2 dx\]The associated Euler–Lagrange equations are
\[\begin{split}\begin{align} -\delta \mathrm{div}(v^2 \nabla u) + \lambda u &= \lambda f \\ \frac{\partial u}{\partial n} &= 0 \end{align}\end{split}\]and
\[\begin{split}\begin{align} -\nu\varepsilon\Delta v + \frac{\nu}{\varepsilon}v + \delta v|\nabla u|^2 &= \frac{\nu}{\varepsilon} \\ \frac{\partial u}{\partial n} &= 0 \end{align}\end{split}\]The alternate optimization algorithm is initialized using
\[\begin{split}\begin{align} u_0 &= f \\ v_0 &= 1/(1 + \delta \frac{\varepsilon}{\nu} |\nabla f|^2) \end{align}\end{split}\]It can be shown that \(J_{\epsilon}\) Gamma-converges to the Mumford–Shah functional for \(\varepsilon \rightarrow 0\) (see, e.g., [R8]).
References
[R7] (1, 2) L. Ambrosio and V.M. Tortorelli. Approximation of functionals depending on jumps by elliptic functionals via Gamma-convergence. Communications on Pure and Applied Mathematics, 43:999-1036, 1990. [R8] (1, 2) G. Aubert and P. Kornprobst: “Mathematical Problems in Image Processing: Partial Differential Equations and the Calculus of Variations”, Springer 2006.