-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDocATu0v1.html
156 lines (154 loc) · 10.5 KB
/
DocATu0v1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!-- HTML header for doxygen 1.8.11-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<title>DGtalTools: imageProcessing/at-u0-v1</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="modern-doxygen-green.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">DGtalTools
 <span id="projectnumber">1.5.beta</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="PageDoc"><div class="header">
<div class="headertitle">
<div class="title">imageProcessing/at-u0-v1 </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Computes a piecewise smooth approximation of a grey-level or color image, by optimizing the Ambrosio-Tortorelli functional (with u a 0-form and v a 1-form).</p>
<dl class="section user"><dt>Author(s) of this documentation:\n Marion Foare, Jacques-Olivier Lachaud</dt><dd></dd></dl>
<p><b>Usage:</b> at-u0-v1 -i [input.pgm]</p>
<p>(for grey-level image restoration)</p>
<p><b>Usage:</b> at-u0-v1 -i [input.ppm]</p>
<p>(for color image restoration)</p>
<p>The Ambrosio-Tortorelli functional is a classical relaxation of the Mumford-Shah functional.</p>
<p>Given an input grayscale image, defined in an open bounded domain \( \Omega \), we represent its gray levels by a function \( g \in L^{\infty}(\Omega) \). In the Ambrosio-Tortorelli functional [1], one wants to find a function \( u \in SBV(\Omega) \) which is a smooth approximation of the input image \( g \). The Ambrosio-Tortorelli functional [1] is defined by </p><p class="formulaDsp">
\[ \displaystyle AT_{\varepsilon}(u,v) = \int_\Omega \alpha |u-g|^2 + v^2 |\nabla u|^2 + \lambda \varepsilon |\nabla v|^2 + \frac{\lambda}{4 \varepsilon} |1-v|^2 dx, \]
</p>
<p> for functions \( u,v \in W^{1,2}(\Omega)\) with \( 0 \leq v \leq 1 \).</p>
<p>In AT functional, function \( v \) is a smooth approximation of the set of discontinuities, and takes value close to 0 in this set, while being close to 1 outside discontinuities. A remarkable property of this functional is that it \( \Gamma \)-converges to (a relaxation of) MS functional as \( \varepsilon \) tends to 0 (see [1]). The intuition is that a large \( \varepsilon \) induces a solution with a fuzzy set of discontinuities, which is then progressively narrowed to the crisp 1-dimensional set of discontinuites as \( \varepsilon \) goes to 0.</p>
<p>We discretize AT with discrete calculus and define \( u \) and \( g \) on the vertices and \( v \) on the edges. We denote this formulation AT10. Gray levels are seen as point mass on the center of pixels, so that functions \( u \) and \( g \) are both 0-forms, while \( v \) is a dual 1-form in between \( u \). It follows:</p>
<p class="formulaDsp">
\[ \displaystyle AT10(u,v) = \Sigma_{i=1}^n \alpha \langle u_i - g_i , u_i - g_i \rangle_0 + \langle v , \mathbf{d_0} u_i \rangle_1 \langle v , \mathbf{d_0} u_i \rangle_1 \\ + \lambda \varepsilon \langle (\mathbf{d_1} + \bar{\mathbf{\star}} \bar{\mathbf{d_1}} \mathbf{\star}) v , (\mathbf{d_1} + \bar{\mathbf{\star}} \bar{\mathbf{d_1}} \mathbf{\star}) v \rangle_1 + \frac{\lambda}{4\varepsilon} \langle 1 - v , 1 - v \rangle_1. \]
</p>
<p>For more details, see <a class="el" href="moduleAT.html">Image restoration and inpainting with Ambrosio-Tortorelli functional</a></p>
<p><b>Allowed</b> <b>options</b> <b>are:</b> </p>
<div class="fragment"><div class="line">Positionals:</div>
<div class="line"> 1 TEXT:FILE REQUIRED the input image PPM filename.</div>
<div class="line"> </div>
<div class="line">Options:</div>
<div class="line"> -h,--help Print <span class="keyword">this</span> help message and exit</div>
<div class="line"> -i,--input TEXT:FILE REQUIRED the input image PPM filename.</div>
<div class="line"> -m,--inpainting-mask TEXT the input inpainting mask filename.</div>
<div class="line"> -o,--output TEXT=AT the output image basename.</div>
<div class="line"> -l,--lambda FLOAT the parameter lambda.</div>
<div class="line"> -1,--lambda-1 FLOAT=0.3125 the initial parameter lambda (l1).</div>
<div class="line"> -2,--lambda-2 FLOAT=0.0005 the <span class="keyword">final</span> parameter lambda (l2).</div>
<div class="line"> -q,--lambda-ratio FLOAT=1.41421 the division ratio <span class="keywordflow">for</span> lambda from l1 to l2.</div>
<div class="line"> -a,--alpha FLOAT=1 the parameter alpha.</div>
<div class="line"> -e,--epsilon the initial and <span class="keyword">final</span> parameter epsilon of AT functional at the same time.</div>
<div class="line"> --epsilon-1 FLOAT=2 the initial parameter epsilon.</div>
<div class="line"> --epsilon-2 FLOAT=0.25 the <span class="keyword">final</span> parameter epsilon.</div>
<div class="line"> --epsilon-r FLOAT=2 sets the ratio between two consecutive epsilon values of AT functional.</div>
<div class="line"> -n,--nbiter INT=10 the maximum number of iterations.</div>
<div class="line"> --image-snr TEXT the input image without deterioration <span class="keywordflow">if</span> you wish to compute the SNR.</div>
<div class="line"> -p,--pixel-size INT=1 the pixel size <span class="keywordflow">for</span> outputing images (useful when one wants to see the discontinuities v on top of u).</div>
<div class="line"> -c,--color-v TEXT=0xff0000 the color chosen <span class="keywordflow">for</span> displaying the singularities v (e.g. red is 0xff0000).</div>
<div class="line"> -v,--verbose INT=0 the verbose level (0: silent, 1: less silent, etc).</div>
</div><!-- fragment --><p><b>example:</b> </p>
<div class="fragment"><div class="line">./imageProcessing/at-u0-v1 -i ../imageProcessing/Images/degrade-b04.pgm --image-snr ../imageProcessing/Images/degrade.pgm -a 0.05 --epsilon-1 4 --epsilon-2 0.25 -l 0.005 -p 2 -c 0xff0000 -o degrade</div>
</div><!-- fragment --><center> <table class="doxtable">
<tr>
<td>Input image <em>g</em> </td><td>Reconstructed image <em>u</em> </td><td>Perfect image </td></tr>
<tr>
<td><div class="image">
<img src="degrade-b04.png" alt=""/>
<div class="caption">
Input image (noise = 0.4)</div></div>
</td><td><div class="image">
<img src="degrade-a0.05000-l0.0050000-u0.png" alt=""/>
<div class="caption">
AT01 alpha=0.05 lambda=0.005 </div></div>
</td><td><div class="image">
<img src="degrade.png" alt=""/>
<div class="caption">
Perfect image</div></div>
</td></tr>
<tr>
<td>SNR of <em>g</em> = 21.9183 </td><td>SNR of <em>u</em> = 34.4426 </td><td>Perfect image </td></tr>
</table>
</center><dl class="section note"><dt>Note</dt><dd>Other restoration examples, parameter analysis, and image inpainting examples may be found in <a class="el" href="moduleAT.html">Image restoration and inpainting with Ambrosio-Tortorelli functional</a>.</dd></dl>
<p>[2] Marion Foare, Jacques-Olivier Lachaud, and Hugues Talbot. "Image restoration
and segmentation using the Ambrosio-Tortorelli functional and discrete calculus." In Proceedings of the IAPR International Conference on Pattern Recognition (ICPR2016), Cancun, Mexico, 2016.</p>
<p>[3] Marion Foare, Jacques-Olivier Lachaud, and Hugues Talbot. "Numerical implementation of the Ambrosio-Tortorelli functional using discrete calculus and application to image restoration and inpainting." In Proceedings of 1st Workshop on Reproducible Research In Pattern Recognition (RRPR 2016), Springer LNCS. To appear.</p>
<p>[4] Matteo Focardi. "On the variational approximation of free-
discontinuity problems in the vectorial case." Mathematical Models and Methods in Applied Sciences 11.04 (2001): 663-684. </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- HTML footer for doxygen 1.8.11-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Companion project associated to <a href= "http://liris.cnrs.fr/dgtal/doc/nightly/"> DGtal </a>;
Generated on Mon Dec 23 2024 09:51:49 for DGtalTools by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.9.1
</small></address>
</body>
</html>