\documentclass[11pt]{article}
\usepackage{fullpage,epsfig,amsmath,amssymb,theorem,ifthen,showkeys,enumerate}


\usepackage{graphicx}
 \usepackage{psfrag}
 \usepackage{subfigure}
\usepackage{epsf}
\usepackage{color}



%,showkeys}
%tabls,ifthen}
%\def\commentsIncluded{true}
\def\commentsIncluded{false}
\newcommand{\extracom}[1]{\ifthenelse{\equal{\commentsIncluded}{true}}{#1}{}}
\newcommand{\gfigbox}[2]{\epsfxsize=#1 \epsfbox{#2}}
%Lettres
\def\Om{\Omega}
\def\tOm{\tilde\Omega}
\def\Q{\mathbb{Q}}
\def\R{\mathbb{R}}
\def\real{\R}
\def\N{\mathbb{N}}
\def\K{\mathbb{K}}
\def\Z{\mathbb{Z}}
\def\Rn{{{\R}^{\mathrm N}}}
\def\Sone{{\mathbb S}^1}
\def\spt{\operatorname{spt}}
\def\evg{\operatorname{span}}
\def\tA{{\tilde A}}
\def\bs{{\setminus}}
\def\imu{{\mu^{-1}}}
\def\Dp{{\cal D}_p}
\def\ind{{\mathrm{ind}}}
\def\mod{{\mathrm{mod}\;}}
\def\Int{\operatorname{Int}}
%Espaces fonctionnels
\def\BV{{\mathrm{BV}}}
\def\lp#1{{\mathrm L}^{#1}}
\def\cont#1{{\mathrm C}^{#1}}
\def\ccont#1{{\mathrm C}_{\mathrm c}^{#1}}
\def\zcont#1{{\mathrm C}_0^{#1}}
\def\wpq#1#2{{\mathrm W}^{#1,#2}}
%Perimetre fini
\def\boundm{\partial^{\scriptscriptstyle\mathrm M}}
\def\bounds{\partial^{*}}
%Mesures
\def\hone{{\cal H}^1}
\def\hausn{{\cal H}^N}
\def\haushn{{\cal H}^{N-1}}
\def\hausp#1{{\cal H}^{#1}}
\def\hzero{\hausp{0}}
\newcommand{\res}{\mathop{\hbox{\vrule height 7pt width .5pt depth 0pt
\vrule height .5pt width 6pt depth 0pt}}\nolimits}
\def\hdensity{\theta^{N-1}}
%Metriques
\def\dH{d_{\cal H}}
%Varifolds
\def\vari{{\displaystyle\bf\mathop{v}_{{}^=}}}
\def\first{\delta}
%Operateurs
\def\gu{{\nabla u}}
\def\Div{\operatorname{div}}
%Convergence
%\def\wstar{{\displaystyle\mathop{\rightharpoonup}^{{\mathrm w}\mbox{-}*}}}
\def\wstar{\rightharpoonup}
\def\glim{\operatorname{\Gamma-}\lim}
\def\fl{\mathop{\longrightarrow}}
%Divers
\def\ssty{\scriptscriptstyle}
\def\ds{\displaystyle}
\def\interior{\operatorname{int}}
\def\comp#1{{#1}^{\mathrm c}}
\def\diam{\operatorname{diam}}
%Particuliers au fichier
\def\cP{{\cal P}}
\def\cT{{\cal T}}
\def\cR{{\cal R}}
\def\cTl{{\cal T}_{\lambda}}
\def\Sp{{{\cal S}_p}}
\def\Dp{{{\cal D}_p}}
\def\OcF{\overline{{\cal F}_p}}
\def\OF{\overline{F_p}}
%Environnements
\newcommand{\qed}{\thinspace\null\nobreak\hfill\hbox{\vbox{\kern-.2pt\hrule
height.2pt depth.2pt\kern-.2pt\kern-.2pt \hbox to2.5mm{\kern-.2pt\vrule
width.4pt \kern-.2pt\raise2.5mm\vbox to.2pt{}\lower0pt\vtop to.2pt{}\hfil
\kern-.2pt \vrule width.4pt\kern-.2pt}\kern-.2pt\kern-.2pt\hrule
height.2pt depth.2pt \kern-.2pt}}\par\medbreak}
\newtheorem{corollary}{Corollary}
\newtheorem{theorem}{Theorem}
\newtheorem{definition}{Definition}
\newtheorem{lemma}{Lemma}
{\theorembodyfont{\rmfamily}
\newtheorem{remark}{Remark}
\newtheorem{example}{Example}}
\newtheorem{proposition}{Proposition}
%\newenvironment{remark}{\noindent{\bf Remark }}{\medskip\par}
\newenvironment{proof}{{\sc{Proof}:}}{\qed}
% Pour que les lignes soient bien separees dans un tableau, utiliser le
% package tabls et la ligne suivante
%\setlength\arraylinesep{3pt}
\title{On a variational theory of image amodal completion}
\author{\renewcommand{\thefootnote}{(\arabic{footnote})}{\bf Simon Masnou}\footnotemark[1]\\\renewcommand{\thefootnote}{(\arabic{footnote})}{\bf Jean-Michel Morel}\footnotemark[2]}
\begin{document}
\maketitle
\renewcommand{\thefootnote}{(\arabic{footnote})}
\footnotetext[1]{Lab. J.-L. Lions, Univ. Pierre et Marie Curie,
B.C. 187, 75252 Paris Cedex 05, France, masnou@ann.jussieu.fr}
\footnotetext[2]{CMLA, ENS Cachan, 61 Av. du Pr{�}sident Wilson,
94235 Cachan, France, Jean-Michel.Morel@cmla.ens-cachan.fr}
\renewcommand{\thefootnote}{\arabic{footnote}}

\section{Introduction}
Digital images can be represented as grey level functions $u(x,y)$
defined on a simple open subset of $\real^2$ (usually a
rectangle), which we call ``image domain''.  Of course, digital
images are given as a discrete set of samples, but there are
standard interpolation methods to get back to a smooth image, e.g.
a trigonometric polynomial by Shannon interpolation (also called
zero-padding \cite{EdenYaroslavski}). There is no substantial
difference between digital images and what we know of retinal
images as rough data: in both cases, images are band-limited by an
optical device and then sampled on a grid.  So most questions in
visual perception theory are easily translated into ``computer
vision"  problems. This opens the way to a mathematical
formalization and numerical experiments.


In this paper, we shall deal with the counterpart in image
processing of the ``amodal completion'' phenomenon that arises in
human vision. This phenomenon has been widely studied by the
phenomenologist Gaetano Kanizsa \cite{Kanizsa}, who tried to give
a consistent answer to one of the major enigmas of visual
perception. Its understanding starts with the straightforward
observation that the objects that we see in all day life are
partially occulting   each other, so that we only see parts of
them. Georges Matheron \cite{Matheron} actually proved that, under
a simple and realistic stochastic model of object occultation, the
so called ``dead leaves model'', we only see half of the objects
in sight. To be more explicit, in any all day life image or
photograph, whenever we distinguish some object, we only see, on
the average, half of it. Mathematically precise versions of this
statement can be found in the aforementioned book and in
\cite{GousseauPhD, Gousseau}. So we only see (significant) pieces
of all shapes we perceive, but these pieces change constantly
according to our position with respect to all objects present in
the scene. Our perception, however, does not even notice this
problem: we perceive objects as though they were complete. The
mechanism of this visual illusion was formalized  by Kanizsa who
formulated two geometric laws, under the names of ``amodal
completion'' and ``good continuation''.

The {\em amodal completion} principle applies when a perceived
curve stops on  another perceived curve, entailing the perception
of a ``T-junction''. The stopped curve is the leg of the T and the
other curve is represented by the horizontal bar of the T.  In
such a situation, our perception tends to interpret the
interrupted curve as the boundary of some object undergoing an
occlusion. The leg of the T is then mentally extrapolated and,
whenever possible, connected to another leg in front. This fact is
illustrated in figure \ref{fig-completion-amodale} and is called
``amodal completion''. The connection of two T-legs in front obeys
the ``good continuation'' principle, according to which the
reconstructed amodal curve must be similar to the pieces of curve
it interpolates (same direction, curvature, etc.)




%--- fig-completion-amodale ---
\begin{figure}[htbp]
\begin{center}\includegraphics[width=12cm]{segmentPX13.eps}
\end{center}\caption{ T-junctions entail an amodal completion and a completely
different interpretation of the image. }
\label{fig-completion-amodale}
\end{figure}


\end{document}

In  figure~\ref{fig-completion-amodale} we see first four black
butterfly-like shapes. By superposing to them four rectangles, the
butterflies get amodally completed into disks. By adding instead
to the butterflies a central white cross, the butterflies
contribute to the perception of an amodal black big square. In all
cases, the reconstructed amodal boundaries obey the {\it good
continuation principle}, namely they are as homogeneous as
possible to the visible parts (circles in one case, straight
segments in the other case).


%--- fig-completion-amodale ---
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=3cm]{diskandsquare.ps}
\end{center}
\caption{ A square above a disk seen by  amodal completion:
Kanizsa showed that the T-junctions were crucial for the
perception of a full circle where only an arc of circle is
actually present in the image.
 } \label{diskandsquare.fig}
\end{figure}
The work of Kanizsa and his collaborators was directed at proving
that this completion mechanism can be fully formalized as an
automatic geometric mechanism, which we may well call amodal
completion algorithm. An amodal completion  algorithm proceeds as
follows: given a homogeneous grey level or color region $\Omega$
bounded by a smooth Jordan curve, it detects ``$T$-junctions",
namely points of $\partial \Omega$ at which other contours stop,
thus forming a typical $T$-shaped singularity.  The leg of the $T$
is understood as the boundary of some object in back, while the
upper bar of the $T$ is understood as the occulting contour. For
instance, in the case of Figure \ref{diskandsquare.fig}, the
boundary of the disk stops on the boundary of the square, thus
forming two $T$-junctions.  The amodal completion phenomenon
happens whenever two $T$-junctions turn out to face each other: in
that case, both legs of both junctions tend to be perceptually
connected by a ``good", smooth curve. How to decide the shape of
this interpolating curve ? Several models have been proposed (see
an exhaustive review in~\cite{Fantoni}); most suggest more or less
explicitly that the interpolating curve must offer a compromise
between the good continuation of the visible edges and the length
minimality.  In other words, the curve must be as smooth and as
short as possible. A generic enough model proposed in
\cite{Mumford,NitzbergMumford} is

\begin{equation}\label{definitionenergiedecourbe}
E_p(\gamma)=\ds\int_0^{{\cal
L}(\gamma)}(\lambda+|\gamma''|^p(s))\,ds\end{equation}
 where $\gamma(s)$ is the
completion curve, parameterized by length, i.e. $|\gamma'(s)|=1$.
Then $\gamma''(s)$ is the curvature of the curve and ${\cal
L}(\gamma)$ is its length. The parameters of the method are
$\lambda$ and $p\geq 1$. There is no particular reason to choose
one or the other value for these parameters because they are
highly context-dependent, i.e. depend on the position of
T-junctions, the edge orientation, the convexity of the shape,
etc., see~\cite{Fantoni,Petitot}. For the sake of simplicity, we
shall assume that they are given once for all.

The first adaptation of amodal completion's principles to image
processing can be found in~\cite{NitzbergMumford}: in order to
reconstruct partially occluded objects, the authors propose to
interpolate their boundaries {\it below} the occlusions using
curves that minimize the Euler elastica energy
$\int(\lambda+\kappa^2)ds$, where $\kappa$ is the curvature.

In~\cite{MasnouMorel,MasnouIEEE}, this idea was adapted to the
so-called {\it disocclusion} problem, namely the problem of
recovering missing areas in an image. The proposed method does not
involve a direct reconstruction of the image but passes through
the interpolation of the topographic map, i.e. the collection of
all level lines or isophotes. This is done by computing an optimal
set of interpolating curves with respect to a global energy taking
into account each individual energy $\int(\lambda+|\kappa|^p)ds$
(see below for a more detailed description). As we shall see
later, this amounts -- at least for smooth images -- to find a
function that coincides with the image ouside the occlusion domain
$\Omega$ and minimizes the criterion
\begin{equation}\label{equafct}
\int_{\Omega}|\nabla u|(1+|\Div\frac{\nabla u}{|\nabla u|}|^p)dx.
\end{equation}

%From there, the image is recovered by a simple application of the well-known formula
%$$u(x)=\sup\{t\in\R:\,x\in\{u\geq t\}\},$$
%where the sets $\{\u\geq t\}$, $t\in\R$ are defined as those whose boundary is precisely the interpolating curves.

The problem of recovering missing areas in an image is addressed
in a completely different way in~\cite{bertalmio}. The proposed
method is inspired by the technics employed by professional
restorators for the restoration of old paintings. It involves a
progressive diffusion of the information from the boundary of the
domain towards the interior by means of a partial differential
equation that aims at transporting image smoothness along the
isophotes.

In~\cite{ChanShen}, the authors propose a denoising/interpolation
model based on the joint minimisation of a quadratic fidelity term
outside the occludion domain and a total variation criterion
within a domain slighly bigger than the occlusion. The method
proposed in~\cite{ShenEsedoglu} is derived from the celebrated
Mumford-Shah model segmentation.  Finally, the authors
of~\cite{Esedoglu} propose a numerical study of the fourth order
nonlinear Euler-Lagrange equation associated with~(\ref{equafact})

A more sophisticated model is derived in~\cite{Ballester}, where
the authors propose a joint interpolation of image intensity and
level lines directions using a criterion that can be seen as a
clever relaxation of~(\ref{equafct}). The resulting model offer
many advantages both from a theoretical and a pratical viewpoint.

All these approaches are essentially dedicated to the
reconstruction of the geometric information and usually perform
badly for the interpolation of texture. Very recently, a new class
of methods have appeared that perform very well in many
situations. All these methods rely on a very simple ``copy-paste''
procedure that was introduced for the first time
in~\cite{Efros-Leung} in the context of texture synthesis. The
first adaptations to image interpolation can be found
in~\cite{Bornard,criminisi}. They perform remarkably well,
excepted when the information to recover require some large scale
interpretation, which indicates that these methods could be
advantageously combined with an approach like for instance
in~\cite{MasnouMorel}.

In this paper, we shall derive the mathematical properties of the
model proposed in~\cite{MasnouMorel}. The case $p=1$ has already
been treated in~\cite{MasnouMorel,MasnouIEEE,MasnouThese} whereas
some partial existence results for the case $p>1$ can be found
in~\cite{MasnouMorel,MasnouThese}. Since our approach deals with
the problem of interpolating within an image domain using
Kanizsa's amodal completion principles, we shall speak of image
{\it amodal completion}.

Let us proceed to some mathematical notation.
 The occlusion shall be represented as an open, bounded and
simply connected subset $\Omega\subset\R^2$ with smooth boundary.
For the sake of simplicity, we shall assume that the original
image $u_0$ is known on $\R^2\setminus\Om$ but we could as well
suppose that it is known only on $\tOm\setminus\Om$, where
$\tOm\supset\!\supset \Om$ is open, bounded and has Lipschitz
boundary. In addition, we assume that $u_0$ is the trace on
$\R^2\setminus\Om$ of a function $U_0\in\cont{2}(\R^2)$ such that
${\cal F}_p(U_0)<+\infty$ where the functional ${\cal F}_p$ is
defined as
$${\cal F}_p(u)=\left\{\begin{array}{ll}
\ds\int_{\Om}|\nabla u|(1+|\Div(\frac{\nabla u}{|\nabla u|})|^p)dx&\mbox{if $u\in \cont{2}(\R^2)$}\\
+\infty &\mbox{if
$u\in\lp{1}(\R^2)\setminus\cont{2}(\R^2)$},\end{array}\right.$$
with the convention that the integrand is zero wherever $|\nabla
u|=0$. We recall that by a well-known property of the curvature
$\kappa$ of level sets and by a call to the change of variables
formula, we have for any $u\in\cont{2}(\R^2)$
$$\int_{\Om}|\nabla u|(1+|\Div(\frac{\nabla u}{|\nabla
  u|})|^p)dx=\int_{-\infty}^{+\infty}\int_{\Omega\cap\partial\{u\geq\lambda\}}(1+|\kappa|^p)d\hone\,d\lambda$$
when both terms are finite.  This leads us to define a broader
version  of ${\cal F}_p$ as \begin{equation}
\label{definitiondeGp}
F_p(u)=\int_{-\infty}^{+\infty}\int_{\Omega\cap\partial\{u\geq\lambda\}}(1+|\kappa|^p)d\hone\,d\lambda,
\end{equation}
this definition making of course sense only when, for almost every
level $\lambda$, the restriction to $\Omega$ of the level lines
are a countable set of smooth enough curves.

 Our regularity assumption means that the original image is the trace of a smooth amodal completion with finite energy, thus
that almost all level lines of $U_0$ have a ``good continuation''
behavior (their $E_p$ energy is finite).
% A clever way to
%implement the minimization process of a functional analogous to ${\cal F}_p$ when $p>1$ has been
%developed in \cite{Ballester}. Several papers
%\cite{Chanetsaclique} considered variants or extensions of ${\cal F}_p$,
%in particular the case $p=0$ where the amodal completion energy
%boils down to the total variation.

 Following the model proposed in \cite{MasnouMorel,MasnouIEEE},
we  can reinterpret Kanizsa's amodal completion in a functional
framework, where {\it all missing level lines of the image $U_0$
have to be interpolated inside $\Omega$ according to the good
continuation principle}.  To this aim, let us consider the measure
$\mu:=|\nabla   U_0|\hone\res\partial\Omega$.  We shall call
"`T-junction"' every point $x\in\partial\Omega$ where $\nabla u_0$
does not vanish and is not parallel to the boundary, which means
that there is a level line passing by $x$ and not tangential at
$x$ to $\partial\Omega$. Let us parameterize the trace of this
line on $\R^2\setminus\Omega$ near $x$ as $\gamma^1_x(s)$, $s\in
[-\varepsilon, 0]$, with $\gamma(0)=x$. This is a first
$T$-junction leg. This leg has to be matched to another one of the
same level and arriving elsewhere at some $y\in\partial U_0$. Let
us denote as $\gamma^1_y(s)$, $s\in [1, 1+\varepsilon]$, with
$\gamma^1_y(1)=y$ this second one and assume that both T-junctions
are compatible, i.e. $\operatorname{det}(\nabla
U_0(x),(\gamma^1_x)'(0))$ and $\operatorname{det}(\nabla
U_0(y),(\gamma^1_y)'(0))$ have the same sign. This compatibility
condition is necessary to ensure that we will not reconstruct a
"`twisted"' level line that could not be considered as the level
line of a function. Our problem is to connect $\gamma^1$ with
$\gamma^2$ by a smooth curve which we shall denote by $\gamma_x$:
$[0,1]\to \Omega$, with the condition that the concatenated curve
$\tilde \gamma : s\in [-\varepsilon,\; 1+\varepsilon] \to
\gamma_x(s)$ coinciding with $\gamma^1$ for $-\varepsilon\leq
t\leq 0$ and with $\gamma^2$ for $1\leq t\leq 1+\varepsilon$ is in
$W^{2,p}$. (See Figure \ref{connection}).

%--- fig-completion-amodale ---
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=6cm]{connection.eps}
\end{center}\caption{ Two T-junctions and a possible amodal completion } \label{connection}
\end{figure}

 We finally {\it  define an amodal completion as a set of interpolating
curves $\gamma_x$ defined for all $x$ of $\partial \Omega$ which
are $T$-junctions.} Each $\gamma_x$ joins a junction $x$ to a
junction $y$ (so that $U_0(x)=U_0(y)$ and, up to a
reparameterization, $\gamma_x=\gamma_y$). The interpolating curves
must fill some requirements making them fit to become level lines,
namely
\begin{itemize}
\item $\nabla U_0(x)$ and $\nabla U_0(y)$ have the same
orientation along the curve $\gamma_x$ (see figure
\ref{connection}) ;

\item if $\gamma_x$ arrives at $y$, the curves $\gamma_x$ and
$\gamma_y$ coincide up to reparameterization ;

\item two curves $\gamma_x$ and $\gamma_y$ can meet only
tangentially and never cross each other and this applies also when
$x=y$.
\end{itemize}
We call ${\cal D}_p$ the set of all  amodal completions of $U_0$
inside $\gamma$.  With each curve $\gamma_x$ of an amodal
completion is associated a grey level $U_0(x)$ and the non
intersection constraint makes the curves $\gamma_x$ fit to be
level lines of a function $u_\gamma$ that we shall call the {\it
amodal completion of $U_0$ inside $\Omega$}. There is  a standard
way to construct such a function $u_\gamma$ inside $\Omega$ from
$\gamma$, so that all level lines of $u$ are contained in a
countable or finite union of curves $\gamma_x$. The fact that
there is not necessarily identity between level curves of the
reconstructed $u_\gamma$ and the $\gamma_x$ is illustrated in
figure \ref{desocclusionsinguliere}. In this figure, we see that
two level lines of the same level coincide on some interval. Since
the piece of curve where they coincide shows no contrast, the
reconstructed function $u_\gamma$ loses this part of the level
curve. This possibility was pointed out in \cite{bellettini}. We
shall call this singularity creating possibility the {\it curve
gluing phenomenon}.

\begin{figure}[htbp]
\begin{center}
\includegraphics[width=12cm]{pathos.eps}
\end{center}\caption{ }
\label{desocclusionsinguliere}
\end{figure}

 The energy of the amodal completion  is   defined as the sum of all
energies of all interpolated level lines, namely,

$$E_p(\gamma)= \frac 12 \int_{\partial\Omega} E_p(\gamma_x)d\mu(x),$$
where $E_p(\gamma_x)$ has been defined above in
(\ref{definitionenergiedecourbe}). The factor $\frac 12$ recalls
that  we count the energy twice, since $E(\gamma_x)=E(\gamma_y)$
when $x$ and $y$ are two matching $T$-junctions. A numerical
theory and experiments for minimizing $E_p$ when $p=1$ was
developed in \cite{Masnouthese}. In that case, an absolute minimum
was  theoretically and computationally attained.  So there are two
kinds  of numerical theories dealing with the same problem, namely
the ones which minimize either ${\cal F}_p(u)$ or $F_p(u)$ and the
ones which minimize $E_p(\gamma)$. Now, the {\it gluing
phenomenon} explains why we may expect that sometimes

 \begin{equation}\label{petitprobleme} E_p(\gamma)\neq
F_p(u_\gamma).\end{equation} We shall prove, however, that with
any amodal completion $\gamma$ we can associate a function
$u_{\gamma,\varepsilon}$ so that $u_{\gamma,\varepsilon}=U_0$
outside $\Om$,
$\|u_\gamma-u_{\gamma,\varepsilon}\|_{\lp{1}(\Om)}\leq\varepsilon$
and $|E_p(\gamma)-F_p(u_{\gamma,\varepsilon})|\leq \varepsilon$
(see Lemma~\ref{lemapprox})

All the same, (\ref{petitprobleme}) suggests that we cannot just
solve the amodal completion problem by looking for $u$ minimizing
$F_p(u)$ with the constraint $u=U_0 $ on $\R^2\setminus\Omega.$
Indeed, there is not necessarily a solution to either problems
\begin{equation}\label{minimisationdeFp}
\min_{u=U_0 \hbox{ on } \R^2\setminus\Omega} F_p(u).\end{equation}
or
\begin{equation}\label{minimisationdecFp}
\min_{u=U_0 \hbox{ on } \R^2\setminus\Omega} {\cal
F}_p(u).\end{equation}

 We shall instead prove that there is a
solution to

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

$$\min_{\gamma\in {\cal D}_p} E_p(\gamma) \eqno{(P_1)}$$

The fact that (\ref{minimisationdeFp}) and
(\ref{minimisationdecFp}) are ill-posed led the authors of
\cite{AM03} to adopt a slightly different strategy. First, in
order to incorporate an explicit reference to the good
continuation requirement, they define the energy on a domain
slightly bigger than $\Om$. More precisely, given an open and
smooth subset $\tOm$ such that $\tOm\supset\!\supset\Om$, the
authors consider the energy ${\cal F}_p^{\mathrm e}$ defined by
$${\cal F}_p^{\mathrm e}(u)=\left\{\begin{array}{ll}
\ds\int_{\tOm}|\nabla u|(1+|\Div(\frac{\nabla u}{|\nabla u|})|^p)dx&\mbox{if $u\in \cont{2}(\R^2)$}\\
+\infty &\mbox{if
$u\in\lp{1}(\R^2)\setminus\cont{2}(\R^2)$}\end{array}\right.$$
with the convention that the integrand is zero wherever $|\nabla
u|=0$. The minimization process is not performed directly on
${\cal F}_p^{\mathrm e}$, still because of
(\ref{minimisationdecFp}), but rather on the lower semicontinuous
envelope $\overline{\cal F}_p^{\mathrm e}$ of ${\cal F}_p^{\mathrm
e}$ defined by
$$\overline{{\cal F}_p^{\mathrm e}}(u):=\inf\{\liminf_{h\to\infty}{\cal F}_p^{\mathrm e}(u_h):\;u_h\to u\mbox{ in
}\lp{1}(\R^2)\}.$$ Then it is proved in~\cite{AM03} that the
problem
$$\min_{u\equiv U_0 \hbox{ on } \R^2\setminus\Omega}
\overline{{\cal F}_p^{\mathrm e}}(u)$$ is well-posed.

We should work with a different definition of the relaxed
functional associated with ${\cal F}_p$ in order to reintroduce
the good continuation requirement that does not appear in ${\cal
F}_p$. Given a function $u\in\lp{1}(\R^2)$ that coincides with
$U_0$ outside $\Omega$, we define
$$\OcF(u):=\inf\{\liminf_{h\to\infty}{\cal F}_p(u_h):\;u_h\to u\mbox{ in
}\lp{1}(\R^2),\; u_h\equiv U_0\mbox{ on }\R^2\setminus\Omega\}$$
Of course, this relaxed functional is still the largest lower
semicontinuous functional less than ${\cal F}_p$, {\it  when
restricted to the class of functions that coincide with $U_0$
outside $\Omega$}. Under the crucial assumptions that $U_0$ is
smooth and ${\cal F}_p(U_0)<\infty$, all results of~\cite{AM03}
remain true when particularized to the class of functions that
coincide with $U_0$ outside $\Omega$ and we get that
$$\min_{u\equiv U_0 \hbox{ on } \R^2\setminus\Omega}
\OcF(u)  \eqno{(P_2')}$$ is well posed.

For every $u\in\lp{1}(\R^2)$ such that $u=U_0$ on
$\R^2\setminus\Om$, we can also define the relaxed functional
associated with $F_p$ as
$$\OF(u)=\ds\inf\{\liminf_{h\to\infty}F_p(u_h):\, u_h\to u\mbox{ in }\lp{1}(\R^2),\,u_h=U_0\mbox{ on }\R^2\setminus\Om\}$$
It will be established in Theorem~\ref{mindeP3} that
$$\min_{u\equiv U_0 \hbox{ on } \R^2\setminus\Omega}
\OF(u)  \eqno{(P_2)}$$ is also well posed.

Our  main results in this paper are, first, that  problem $(P_1)$
is well posed (Theorem~\ref{thm:mingamma}) and, second, that
problems $(P_1)$ and $(P_2)$ (Theorem~\ref{thm:equivalence}) have
the same minimal energies. We also prove that there is a solution
$u$ of $(P_2)$ satisfying $u=u_\gamma$, where $\gamma$ is a
solution of $(P_1)$. Conversely, given any $u$ minimizing $(P_2)$,
there is an amodal completion minimizing $E_p$ whose curves
contain all level lines of $u$. The amodal completion problem
therefore yields a  very intuitive geometric interpretation
($E_p$) of a relaxed functional $(\OF)$

We were not able to determine whether $(P_2)$ and $(P_2')$ also
have the same minimizers. We actually do not know if it is true or
not that $F_p(u)=\OcF(u)$ for any $u\in\Sp$, a class of -- non
necessarily smooth -- functions in the domain of $F_p$ (see
Section 2). It is indeed unclear whether any $u\in\Sp$ can be
approximated by a sequence of {\it smooth} functions $(u_h)$ such
that $\lim_{h\to\infty}F_p(u_h)=\OF(u)$.

We end this section with the experience of
Figure~\ref{fig-experience} showing how the amodal completion
procedure can be applied to the problem of recovering missing data
in an image~\cite{MasnouMorel,MasnouIEEE}. This problem is
equivalent with the so-called {\it inpainting} problem that has
seen a growing attention in recent years (see, non exhaustively,
\cite{Ballester,bertalmio,Chanetsaclique,criminisi}).
\begin{figure}[!htbp]
\centering
\includegraphics[width=17cm]{experience.ps}
\label{fig-experience} \caption{Top: original image with missing
area shown in white. Bottom left: after amodal completion by
minimization of $E_1$. Bottom right: after amodal completion by
minimizing a relaxed formulation of $E_2$ involving Euler
spirals.}
\end{figure}


\subsection{Anterior work, novelties}

Whatever is being done here can be derived from two anterior works
in the particular case where $u$ is the characteristic function of
a set $E$. In that case, Bellettini, Dal Maso and Paolini
\cite{bellettini} studied the relaxation of
$F_p(u)=F_p(\chi_E)=\ds\int_{\partial E}(1+|\kappa|^p)d\hone$, where $\chi_E$ denotes the characteristic function of $E$.  They showed that the associated relaxed functional can be interpreted as the minimum of a kind of ``amodal
completion". To be more specific, all cusps of $\partial E$ have
to be connected to each other by adding to the boundary of $E$
smooth curves connecting pairs of cusps and giving them a ``good
continuation". (See figure \ref{desocclusionsinguliere}). The
relaxed functional of $F_p(\chi_E)$ is therefore a curve
functional of the kind of $E_p$. In \cite{bellettinimugnai},
Bellettini and Mugnai characterized all sets $E$ for which this
relaxed energy is finite. The representation of $\OF$ that we shall propose could be as well obtained from their results.


What we added to these arguments:

\begin{itemize}
\item the slight changes necessary to deal with the amodal
completion problem (which amounts to treat the kind of Dirichlet
condition given by T-junctions) ;

\item  as in the mentioned papers, we obtain a geometric
characterization of a relaxed version of a functional (translation
of the abstract $\OF(u)$ into the intuitive
$E_p(\gamma)$ ;

\item  now, these new functionals deal with all level sets
$E_\lambda$ together instead of just one. The extension is not
trivial as one can judge from section  \ref{MAED} ;

\item an  existence proof for  a minimizing amodal completion for
$E_p$.  This problem was left open for a long time, with the
exception of $p=1$ proved in \cite{MasnouIEEE}.

\end{itemize}


\subsection{Reader's guide}
We introduce some notations and the definition of T-junctions in Sections~\ref{Notations},~\ref{DTJ}. We precisely define in Section \ref{DDAM} amodal completions and the
amodal energy $E_p$ (Definition \ref{defidisocu0}). The main point
is to impose the non intersection constraint on the curves of the
amodal completion. This permits  to uniquely define from an amodal
completion $\gamma$ a function $u_\gamma$ so that, if
$E_p(\gamma)$ is finite and $\gamma$ has no contact, $F_p(u_\gamma)=E_p(\gamma)$ (Theorem
\ref{ctof}). In section~\ref{MAED}, Theorem \ref{thm:mingamma}, we
prove our first main result, namely the existence of a solution to
the amodal completion problem
$$
\min\,\{E_p(\gamma):\,\gamma\in{\cal D}_p\}.
\eqno{(P_1)}.
$$
The solution $\gamma$ to this problem yields an amodal completion
image $u_\gamma$ with bounded  variation. In order to identify the
bridges between the functional viewpoint and the amodal completion
viewpoint, we prove in Lemma~\ref{lemecart} that every amodal
completion can be approximated by a sequence of amodal completions
without contact, from which we construct a sequence of continuous
functions $(u_\epsilon)$ converging to $u_\gamma$ and whose energy
$F_p(u_\epsilon)$ is arbitrarily close to $E_p(\gamma)$
(Lemma~\ref{lemapprox}). Conversely, from any $u\in\cont{2}$ one
can define an amodal completion $\gamma$, obtained by a selection
of the level lines of $u$, such that $E_p(\gamma)\leq F_p(u)={\cal
F}_p(u)$ (Lemma~\ref{lem:utogamma}).



As we have  mentioned, $(P_1)$ is well posed while $(P_2)$ is not,
so that $(P_1)$ turns out to be  a correct formalization of the
amodal completion problem. Our main second result, in section
\ref{CDVA} is of course the equivalence of the problem $(P_1)$
with $(P_2)$. We prove this equivalence in Theorem
\ref{thm:equivalence} and show the close relationships between the
minimizers of $(P_1)$ and those of $(P_2)$. In particular, if
$\gamma$ minimizes $(P_1)$ then $u_\gamma$ minimizes $(P_2)$ and
$\OF(u_\gamma)=E_p(\gamma)$. Conversely, if $u$ is a minimizer of
$(P_2)$, then there exists an amodal completion $\gamma_u$ such
that $\gamma_u$ is a minimizer of $(P_1)$ and its associated
function $u_\gamma$ coincides with $u$ almost everywhere.


\section{Notations and definitions}\label{Notations}
The occlusion shall be represented as an open, bounded and simply
connected subset $\Omega\subset\R^2$ with $\cont{\infty}$
boundary. The original image is supposed to be  known only outside
$\Omega$. We assume that it is the trace on $\R^2\setminus \Om$ of
an analytic function $U_0$. The interpolation within $\Omega$
being trivial if $U_0$ is constant on $\partial\Omega$, we can
exclude this case. Then it is a straightforward consequence of
Sard Lemma and the coarea formula that there exists a non empty
subset $\Lambda\subset\R$ with $\hone(U_0(\R^2\setminus
\Om)\setminus\Lambda)=0$ such that, for all $\lambda\in\Lambda$,
\begin{enumerate}[($H_1$)]
\item $\{U_0=\lambda\}$ is an analytic curve of finite length;
\item $\hzero(\{U_{0}|_{\partial\Omega}=\lambda\})<\infty$;
\end{enumerate}
Observing that the function $\lambda\mapsto
|\{U_{0}|_{\partial\Om}\geq\lambda\}|$ is monotone and therefore
admits countably many discontinuities, $\Lambda$ can be chosen so
that for all $\lambda\in\Lambda$,
\begin{enumerate}[($H_3$)]
\item$\{U_{0}|_{\partial\Om}\geq\lambda\}=\ds\lim_{\mu\to\lambda}\{U_{0}|_{\partial\Om}\geq\mu\}$;
\end{enumerate}
where the convergence is meant as the convergence in measure.

%Because $U_0$ is analytic, it has locally  finitely many singular
%points. Thus, possibly up to an arbitrarily small deformation of
%$\partial\Omega$, we can assume that
%\noindent\begin{enumerate}[($H_4$)] \item $U_0$ has no singular point
%on $\partial\Omega$;
%\end{enumerate}
\begin{definition}
An pair $(U_0,\Lambda)$ verifying conditions $(H_1)-(H_3)$ is
called an admissible occlusion.
\end{definition}
%Finally, we suppose that there exists $p>1$ and an open, bounded and simply connected set $\tOm$ such that, possibly removing a negligible
%\begin{enumerate}[(vi)]
%\item $\tOm\supset\!\supset\Omega$;
%\item for all $\lambda\in\Lambda$, $\{U_0=\lambda\}\cap(\Bar{\tOm}\setminus\Om)$ is a finite union of $\cont{2}$ curves that connect either two points of $\partial\tOm$ or a point of
%$\partial\tOm$ with a point of $\partial\Om$;
%\item ${\cal F}_p(U_0)<\infty$;
%\end{enumerate}

%\begin{figure}[!htp]
%\begin{center}
%\input{./occlusionomega.pstex_t}
%\end{center}
%\caption{The original image is supposed to be known outside $\Omega$\label{fig:occlusionomega}}
%\end{figure}

We recall that, given a function $u$ of bounded variation, its level sets $\{u\geq\lambda\}$ are sets of finite perimeter for almost every $\lambda\in\R$ and we can define their reduced boundary as the set
$$\begin{array}{ll}
\bounds\{u\geq\lambda\}:=&\{x\in\R^2:\,\nu_{\{u\geq\lambda\}}(x):=\lim_{r\downarrow 0}\frac{D\chi_{\{u\geq\lambda\}}}{|D\chi_{\{u\geq\lambda\}}|}(B_r(x))\mbox{ exists}\\
&\qquad\mbox{ and satisfies
}|\nu_{\{u\geq\lambda\}}(x)|=1\},\end{array}$$ i.e. the set  of
all points where a  generalized inner normal to $\{u\geq\lambda\}$
exists.

The space $\Sp(\Omega)$ that we define below  is the set of all
functions $u$ of bounded variation that coincide with $U_0$
outside $\Om$ and such that, for almost every $\lambda$,
$\bounds\{u\geq\lambda\}\cap\Om$ essentially coincides with a
finite union of curves that all join two points of $\partial\Om$.
Clearly, $\Sp(\Omega)$ is the space of the functions that follow
Kanizsa's good continuation principle.
\begin{definition}\label{definitionSp}
We call $\Sp(\Om)$ the space of all
functions $u\in\BV(\R^2)$ such that $u=U_0$ on $\R^2\setminus\Om$
and  for almost every
$\lambda\in U_0(\partial\Omega)$, $\bounds\{u\geq \lambda\}\cap\overline{\Om}$ coincides, up to a $\hone$-negligible set, with a finite union of curves $\gamma^\lambda_i:[0,1]\to \overline{\Om}$, $i=0,\ldots,n_\lambda$
with the following properties:
\begin{itemize}
\item $\gamma^\lambda_i(0),\gamma^\lambda_i(1)\in \partial\Om$;
\item $\gamma^\lambda_i\in\wpq{2}{p}(0,1)$ and $|d\gamma^\lambda_i/dt|$ is constant almost everywhere on $[0,1]$;
\item there exists an extension $\gamma_i^{\lambda,\epsilon}\in\wpq{2}{p}(-\epsilon,1+\epsilon)$ of  $\gamma^\lambda_i$ such that $\gamma_i^{\lambda,\epsilon}([-\epsilon,0])$ and $\gamma_i^{\lambda,\epsilon}([1,1+\epsilon])$ are (possibly equal) subsets of $\{y:\,U_0(y)=U_0(x)\}\cap(\R^2\setminus\Omega)$ with positive length;
\item $\forall i,j$, $\gamma^\lambda_i$ and $\gamma^\lambda_j$ may intersect but only tangentially and without crossing each other.
\end{itemize}
\end{definition}

Then we define the functional $F_p$ acting on $\lp{1}(\Om)$ by
$$F_p(u)=\left\{
\begin{array}{lll}
\ds\int_{-\infty}^{+\infty}\int_{\Om\cap\bounds\{u\geq \lambda\}}(1+|\kappa|^p)d\hone\,d\lambda &\mbox{if $u\in \Sp(\Om)$}\\
+\infty &\mbox{if $u\in \lp{1}(\Om)\setminus\Sp(\Om)$}.\end{array}\right.$$
where, for almost every $\lambda\in U_0(\partial\Omega)$, we mean
$$\int_{\Om\cap\bounds\{u\geq \lambda\}}(1+|\kappa|^p)d\hone=\sum_i\int_{\gamma_i^\lambda}(1+|\kappa|^p)d\hone$$
In Figure~\ref{exampleSp} below, we show  an example of a
piecewise constant element of $\Sp$  such that $F_p(u)<\infty$ but
${\cal F}_p(u)=+\infty$.
%--- fig-completion-amodale ---
\begin{figure}[htbp]
\begin{center}
%\includegraphics[width=6cm]{exampleSp.eps}
\input{exampleSp.pstex_t}
\end{center}
\vspace{-\belowdisplayskip} \caption{ A piecewise constant
function $u\in\Sp(\Omega)$ such that $F_p(u)<\infty$ but ${\cal
F}_p(u)=+\infty$}\label{exampleSp}

\end{figure}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Defining T-junctions}\label{DTJ}
\begin{definition}[Occlusion boundary measure]
An admissible occlusion $\Omega$ is endowed with a boundary measure
$$\mu:=|\nabla U_0|\hone\res\partial\Om.$$
\end{definition}
\begin{definition}[T-junctions]
We call T-junction any element of the set
$${\cal T}:=\{x\in \partial\Om:\;\exists \lambda\in\Lambda, \,x\in\partial\{U_0\geq \lambda\},$$
and we shall denote by ${\cal T}_{\lambda}$ the set of all
T-junctions associated with the level $\lambda\in\R$, i.e.
$$\cT_\lambda:=\{x\in\cT:\,U_0(x)=\lambda\}.$$
\end{definition}
\begin{proposition}
$\mu$-almost every $x\in\partial\Omega$ is a T-junction, i.e. $\mu(\partial\Om\bs\cT)=0$.
\end{proposition}
\begin{proof}
By the coarea formula for Lipschitz functions,
$$|D
U_0|(\partial\Om\bs{\cal
  T})=\ds\int_{-\infty}^{+\infty}\hzero((\partial\Om\bs{\cal T})\cap\{U_0=t\})dt.
  $$
  Since, for almost
all $t$,
$$\hzero((\partial\Om\bs{\cal T})\cap\{U_0=t\})=0$$
 by
definition of ${\cal T}$, we conclude that $|D  U_0|(\partial\Om\bs{\cal
  T})=0$ and the proposition follows.
\end{proof}

\subsection{Defining amodal completions and their ``amodal energy''}\label{DDAM}
\begin{definition}[Amodal completion on $\Omega$ associated with $U_0$]\label{defidisocu0}
We call amodal completion of class $\wpq{2}{p}$ associated with
$U_0$ a map $\gamma$ from $\cT$ to $\wpq{2}{p}([0,1],\R^2)$ that associates with $x\in\cT$ a function $\gamma_x$ that describes a curve in $\overline{\Omega}$ with distinct endpoints on $\partial\Omega$. In addition:
\begin{itemize}
\item for $\mu$-almost every $x\in\cT$, there exists a
$\wpq{2}{p}$ parameterization of $\gamma_x$ (still denoted by
$\gamma_x$) on $[0,1]$ with positive and constant velocity. The
endpoints conditions rewrite $\gamma_x(0)$, $\gamma_x(1)\in\cT$
and $\gamma_x(0)\not=\gamma_x(1)$; \item if two curves $\gamma_x$
and $\gamma_y$ have a common endpoint then
$\gamma_x(s)=\gamma_y(s)$  for every $s\in[0,1]$, or
$\gamma_x(s)=\gamma_y(1-s)$ for every $s\in[0,1]$; \item each
curve may have tangential self-contacts but without crossing;
\item two curves may intersect tangentially but without crossing;
\item for $\mu$-almost every $x\in\cT$ there exists an extension
$\gamma_x^\varepsilon\in\wpq{2}{p}[-\varepsilon,1+\varepsilon]$ of
$\gamma_x$ such that $\gamma_x^\varepsilon([-\varepsilon,0])$ and
$\gamma_x^\varepsilon([1,1+\varepsilon])$ are (possibly
overlapping) subsets of
$\{y:\,U_0(y)=U_0(x)\}\cap(\R^2\setminus\Omega)$ with positive
length and the orientation of $\nabla U_0$ on these subsets can be
continuously extended to the whole curve $\gamma_x$ (see
Figure~\ref{connection}).
\end{itemize}
The set of all such amodal completions will be denoted by ${\cal
D}_p$.
\end{definition}
\begin{remark}
Since, for every $(x,\lambda)\in{\cal T}$, $|\gamma'_x(t)|$ is
assumed to be constant  almost everywhere on $[0,1]$, an
arc-length parameter of the curve is $s(t)=t{\cal L}(\gamma_x)$,
where   ${\cal L}(\gamma_x)$ denotes the curve total length. In
addition, the curve admits at every $t\in[0,1]$ a tangent vector
$\Vec{T}=\gamma'_x(s)=\frac{\gamma'_x(t)}{|\gamma'_x(t)|}$. The
curvature of $\gamma_x$ at almost every $t$ is given by
$$\kappa(t)=\frac{{\mathrm{det}}(\gamma'_x(t),\gamma''_x(t))}{|\gamma'_x(t)|^3}$$
and its absolute value can be written with respect to arc-length as
$$|\kappa(s)|=|\gamma''_x(s)|$$
where $\gamma''_x(s)$ denotes the second distributional derivative of
$\gamma_x$ with respect to $s$. From $s(t)=t{\cal L}(\gamma_x)$ we deduce that
$$\frac{d^2\gamma_x}{ds^2}=\frac 1 {[{\cal L}(\gamma_x)]^2}\frac{d^2\gamma_x}{dt^2},$$
thus
\begin{equation}
\label{eqts}
\ds\int_0^{{\cal
L}(\gamma_x)}(1+|\gamma''_x(s)|^p)ds=\ds\int_0^{{\cal
L}(\gamma_x)}(1+|\kappa|^p)ds=\int_0^1\left(|\frac{d\gamma_x}{dt}|+[{\cal
L}(\gamma_x)]^{1-2p}\left|\frac{d^2\gamma_x}{dt^2}\right|^p\right)dt
\end{equation}
Our assumption that $\gamma_x\in\wpq{2}{p}(0,1)$ is  therefore
equivalent to saying that $\gamma_x$, as a function of its
arc-length, belongs to $\wpq{2}{p}(0,{\cal L}(\gamma_x))$.
\end{remark}
\begin{definition}[Amodal completion without contact]
An amodal completion $\gamma\in\Dp$ is said to be without contact
if:
\begin{itemize}
\item for $\mu$-almost every $x\in\partial\Omega$, $\gamma_x$ is simple and $(\gamma_x)\cap\partial\Omega=\{\gamma_x(0),\gamma_x(1)\}$;
\item for $\mu$-almost every $x,y\in\partial\Omega$ such that $x\not=y$, $(\gamma_x)\cap(\gamma_y)=\emptyset$.
\end{itemize}
\end{definition}
\begin{definition}
We define the {\it amodal energy} of an amodal completion $\gamma$
as
$$E_p(\gamma)=\ds\frac 1
2\int_{\partial\Omega}E_p(\gamma_x)d\mu(x)$$
%+\int_{-\infty}^{+\infty}\int_{\partial\{U_0\geq\lambda\}\setminus(\overline{\Omega}\cup\,\bigcup_{x\in
%\pi({\cal T}_\lambda)}\gamma_x)}(1+|\kappa|^p)d\hone\,d\lambda $$
where
$$E_p(\gamma_x)=\ds\int_0^{{\cal L}(\gamma_x)}(1+|\gamma_x''|^p(s))\,ds$$
\end{definition}
%\begin{remark} NON ?? ($\gamma_\epsilon$ n'est pas une d�socclusion).
%By the regularity of the measure $\mu$, for every $\epsilon>0$ there exists a compact subset $\cT_\epsilon\subset\cT$ such that the amodal completion $(\gamma_\epsilon,\Omega,\pi(\cT_\epsilon))$ verifies
%$$|E_p(\gamma_\epsilon)-E_p(\gamma)|<\epsilon$$
%\end{remark}
%\begin{remark}
%The second energy term is actually {\it independent} of the amodal completion $\mu$ since it takes into account only those level lines components that
%do not meet $\partial\Omega$ or, in other words, that will not be interpolated.
%\end{remark}

\section{From amodal completions to functions, and back}
%%%%%%%%%%%%%%%%%%%NOUVELLE VERSION LE 27 Juillet 2005%%%%%%%%%%%%%%%%%%%%
\begin{theorem}[Function associated with an amodal completion]
Let $(U_0, \Lambda)$ be an admissible occlusion. Any amodal
completion $\gamma$ on $\Omega$ of class $\wpq{2}{p}$ satisfying
$E_p(\gamma)<\infty$ can be associated with a function
$u_\gamma\in\BV(\R^2)$ such that $u_\gamma\equiv U_0$ on
$\R^2\setminus \Omega$ and, for almost every $\lambda \in\R$,
$\bounds\{u_\gamma\geq\lambda\}\cap \overline
\Omega\subset\bigcup_{x\in\cT_\lambda}\gamma_x$ up to a
$\hone$-negligible set. If, in addition, $\gamma$ has no contact,
then $u_\gamma\in \Sp(\Omega)$ and $F_p(u_\gamma)=E_p(\gamma). $
\label{ctof}
\end{theorem}
%
\begin{proof} The proof is essentially based on a straightforward
filling up algorithm, permitting to define uniquely from the
amodal curves at level $\lambda$ a set $E_\lambda$ bounded by them
and $\partial \Omega$. This set will be the $\lambda$-upper level
set of $u_\lambda$ inside $\Omega$.  A consistency check must then
be performed, namely that $\mu>\lambda\Rightarrow E_\mu\subset
E_\lambda$.


\noindent{\bf Step 1: From amodal completion curves at level
$\lambda$ to a level set $E_\lambda$.}

$\partial \Omega$ is provided with an orientation so that we
can talk of arc intervals $[x,y]\subset \partial
\Omega$ without ambiguity.
   Let $\lambda\in\Lambda$  such that ${\cal
T}_\lambda$ be not empty. By definition of $\Lambda$, it  is also  finite. The upper level set of $U_0$ on $\partial \Omega$,
 $\{x\in\partial \Omega,\; U_0(x)\geq\lambda\}$ is a finite union of
 disjoint arcs of $\partial \Omega$. Let us call $[x_1,x_2]$ any
 of these arcs and set (see Figure~\ref{fig:construction})
 $$
x_3=\left\{\begin{array}{ll}
    \gamma_{x_2}(1) & \hbox{if  }  x_2=\gamma_{x_2}(0), \\
    \gamma_{x_2}(0) & \hbox{if  }  x_2=\gamma_{x_2}(1). \\
\end{array}%
\right.$$ Take for $x_4\in \mathcal T_\lambda$ the unique point
such that $[x_3,x_4]$ is a connected component  of the upper level
set $\{x\in\partial \Omega,\; U_0(x)\geq\lambda\}$. We can iterate
this construction and after a finite number of steps we get a
series of intervals $[x_{2i+1}, x_{2i+2}]$, $i=0,\dots j$ such
that $x_{2j+1}=x_1$. Since each T-junction is the tip of a single
amodal curve, no shorter cycle is possible in the mentioned
sequence. Besides, since the arcs $[x_{2i+1},x_{2i+2}]$ are
disjoint and the curves $\gamma_{x_{2i+2}}$  cannot cross, we can
concatenate them all into a rectifiable image of the circle into
the plane, with no crossing but possibly self-contacts. We call
$\Gamma_1$ this generalized Jordan curve. Using the usual index
with respect to a curve, we define the interior $\Omega_1$ of
$\Gamma_1$ as the set of points with index 1. Notice that, by
construction, $\Omega_1$ is contained in $\Omega$ and $\Omega_1$
is not empty due to our assumption $(H_3)$ at the beginning of
Section~\ref{Notations}. In addition, every point of $[x_1,x_2]$
is the limit of a sequence of points in $\Omega$ with index one.

This construction can be iterated until all T-junctions at level
$\lambda$ have been exhausted. The successive generalized Jordan
curves $\Gamma_1$, ..., $\Gamma_k$ thus obtained do not cross.
Thus, the sets $\Omega_1,\cdots,\Omega_k$ are disjoint.

We finally define
\begin{equation}\label{def-e-lambda}
E_\lambda=\bigcup_{h=1}^k\Omega_h
\end{equation}
and remark that, by construction,
\begin{equation}\label{bord-e-lambda}
\partial E_\lambda\subset
 \bigcup_{h=1}^k\Gamma_h\subset
 \partial\Omega\cup\bigcup_{x\in\cT_\lambda}\gamma_x,
\end{equation}
and
$$\hone(\{x\in\partial\Omega:\,U_0(x)\geq\lambda\}\setminus \partial E_\lambda)=0.$$
Besides, since each curve $\Gamma_h$ is a finite union of $\cont{1}$ curves that do not cross each other, if follows that
\begin{equation}
\bounds E_\lambda=\partial E_\lambda\quad\mbox{up to a $\hone$-negligible set.}\label{be=bt}
\end{equation}
\medskip
The same construction is performed for every $\lambda\in\Lambda$ (recall that $\hone(U_0(\partial\Omega)\setminus\Lambda)=0$). Then we let
$E_\lambda=\Omega$ for every $\lambda<\min_{x\in\partial\Om}U_0(x)$ and $E_\lambda=\emptyset$
for every $\lambda>\max_{x\in\partial\Om}U_0(x)$, in order to ensure that we have associated a set
$E_\lambda$ with almost every $\lambda\in\R$.

\medskip
Let us prove now that for any $\lambda,\mu\in\Lambda$,
$$\lambda\leq\mu\Rightarrow E_\lambda\supset E_\mu\mbox{ (up to a Lebesgue negligible set)}$$

Let $\Gamma_1^\mu=\partial\Omega_1^\mu$ be one of the generalized
Jordan curve defining $E_\mu$ and $[x_1^\mu,x_2^\mu]$ its first
interval.  By the inclusion of upper level sets property, this arc
is  contained in $\{x\in\partial\Omega:\,U_0(x)\geq\lambda\}$ and therefore in some
maximal interval of this set which we denote by $[x_1,x_2]$.
Consider $\Gamma_1^\lambda$, the unique generalized Jordan curve
in the preceding construction containing $[x_1,x_2]$.  The curves
$\Gamma_1^\lambda$ and $\Gamma_1^\mu$ do not cross. Indeed, their
intersections with $\partial \Omega$ are nested and their other
parts are amodal completion curves which do not cross each other.
Thus, their associated sets $\Omega_1^\lambda$ and $\Omega_1^\mu$
are either disjoint, or $\Omega_1^\mu\subset \Omega_1^\lambda$.  Now, the first
possibility is ruled out because $[x_1^\mu,x_2^\mu]\subset [x_1,x_2]$ and every point of $[x_1^\mu,x_2^\mu]$ (resp. $[x_1,x_2]$) is the limit of a sequence of points in $\Omega$ with index $1$ with respect to $\Gamma_1^\mu$ (resp. $\Gamma_1^\lambda$). Therefore, we have proved that $\Omega_1^\mu\subset \Omega_1^\lambda$ and, by extension, that
$$\forall \lambda,\mu\in\Lambda,\quad \lambda\leq\mu\Rightarrow E_\lambda\supset E_\mu.$$
The same result is obviously true whenever $\lambda$ or $\mu$ are
either less than $\inf_{x\in\partial\Omega}U_0(x)$ or larger than
$\sup_{x\in\partial\Omega}U_0(x)$  and we can conclude that
$$\mbox{for a.e. }\lambda,\mu\in\R,\quad \lambda\leq\mu\Rightarrow E_\lambda\supset E_\mu$$


\begin{figure}[!htb]
\begin{center}
\parbox[t]{8cm}{
\gfigbox{8cm}{construction.eps}}
\end{center}\caption{Construction of the function associated with an amodal completion}
\label{fig:construction}
\end{figure}

\medskip
\noindent{\bf Step 2: From level sets to a function}

We now have a nested family of measurable sets
$(E_\lambda)\subset \Omega$ defined for almost every $\lambda\in\R$, actually for all $\lambda\in\Lambda\cup(\R\setminus U_0(\partial\Omega))$. Let us
see how they can generate an essentially unique function
$u_\gamma$ defined on $\Omega$. Under the notations of
Lemma~\ref{lemconvset} below, let $D$ be the set of discontinuity
points of $(E_\lambda)$. Let $D'\subset\Lambda\cup(\R\setminus U_0(\partial\Omega))$ be countable and dense
and define for every $x\in\Omega$
$$
u_\gamma^\Omega(x):=\sup\{\lambda\in D':\ x\in E_\lambda\}.
$$
We now prove that $\{u_\gamma^\Omega\geq\lambda\}=E_\lambda$ (up
to a Lebesgue-negligible set) for any $\lambda\notin D$, $\lambda\in\Lambda\cup(\R\setminus U_0(\partial\Omega))$. By definition of
$u_\gamma^\Omega$,
$$
E_\eta\subset\{u_\gamma^\Omega\geq\lambda\}\subset E_\nu
$$
for any $\eta,\,\nu\in D'$, $\eta>\lambda>\nu$. Choose sequences
$\eta_h\downarrow \lambda$ and $\gamma_h\uparrow\lambda$ in $D'$.
Then, by Lemma~\ref{lemconvset},
\begin{equation}
E_\lambda=\{u_\gamma^\Omega\geq\lambda\}\quad\mbox{(up to a Lebesgue negligible set)}.\label{sontegaux}
\end{equation}
In particular, $\{u_\gamma^\Omega\geq\lambda\}$ is measurable for
any $\lambda\notin D$, $\lambda\in\Lambda\cup(\R\setminus U_0(\partial\Omega))$. By approximation, the same property extends
to any real number $\lambda$ and $u_\gamma^\Omega$ is measurable.

The uniqueness of $u_\gamma^\Omega$ follows by a similar argument:
if two functions $u_1,\,u_2$ are such that $\{u_1\geq\lambda\}=\{u_2\geq\lambda\}$ (up to a Lebesgue negligible
set) for a dense set of $\lambda$'s, then $u_1=u_2$ almost
everywhere in $\Om$.

\medskip
\noindent{\bf Step 3: Properties of the new function}

First remark that it follows from (\ref{bord-e-lambda}) and the finiteness of $\cT_\lambda$ that for every $\lambda\in\Lambda$, $\hone(\partial E_\lambda)\leq\hone(\partial\Omega)+\frac 1 2(\sum_{x\in{\cal T}_\lambda}\hone(\gamma_x))<\infty$. Thus $E_\lambda$ has finite perimeter and, by $(\ref{be=bt})$ and $(\ref{sontegaux})$, also $\{u_\gamma^\Omega\geq\lambda\}$ has finite perimeter and its essential boundary satisfies
\begin{equation}
\bounds\{u_\gamma^\Omega\geq\lambda\}=\partial E_\lambda\subseteq \partial\Omega\cup\bigcup_{x\in\cT_\lambda}\gamma_x\quad\mbox{up to a $\hone$-negligible set}.\ref{llinclus}
\end{equation}
In particular, $\hone(\bounds\{u_\gamma^\Omega\geq\lambda\})=\hone(\partial E_\lambda)$. Since $E_\lambda=\emptyset$ for all
$\lambda\leq\inf_{x\in\partial\Omega}U_0(x)$ and
$E_\lambda=\Omega$ for all
$\lambda\geq\sup_{x\in\partial\Omega}U_0(x)$ and because
$\hone(U_0(\partial\Om)\setminus\Lambda)=0$
we can conclude that $\{u_\gamma^\Omega\geq\lambda\}$ has finite
perimeter in $\Omega$ for almost every $\lambda\in\R$.
Then,
$$\ds\int_{-\infty}^{+\infty}\hone(\bounds\{u_\gamma^\Omega\geq\lambda\}\cap\Omega)d\lambda\leq \frac 1  2\int_{-\infty}^{+\infty}(\sum_{x\in{\cal
T}_\lambda}\hone(\gamma_x))d\lambda\leq \frac 1
2\int_{\partial\Omega} E_p(\gamma_x)d\mu(x)$$ It follows from
Lemma~\ref{behavm} that $u_\gamma^\Omega\in\BV(\Omega)$. In
addition, since $U_0\in\BV(\R^2\setminus \Omega)$ and
$\partial\Omega$ is smooth, the usual results on properties of the
trace operator in $\BV$ (see for instance Corollary~3.89
in~\cite{Ambrosio}) imply that the function $u_\gamma$ defined by
$$u_\gamma(x)=\left\{\begin{array}{ll}
u_\gamma^\Omega(x)&\mbox{on $\Omega$}\\
U_0(x)&\mbox{on $\R^2\setminus \Omega$}\end{array}\right.$$ is in
$\BV(\R^2)$.
In addition, it is a direct consequence of~\label{llinclus} that for almost every $\lambda\in\R$,
$$\bounds\{u_\gamma\geq\lambda\}\cap\Omega\subset \bigcup_{x\in\cT_\lambda}\gamma_x$$
\medskip
\noindent{\bf Step 4 : Case where the original amodal completion
has no contact}

\medskip
\noindent In this situation, it is a direct consequence of our
construction in Step 1 that~(\ref{bord-e-lambda}) rewrites
$$\partial E_\lambda\cap\Omega=\bigcup_{x\in\cT_\lambda}\gamma_x\cap\Omega,$$
thus, for almost every $\lambda\in\R$,
$$\bounds\{u_\gamma\geq\lambda\}\cap\Omega=\bigcup_{x\in\cT_\lambda}\gamma_x\cap\Omega,$$
up to a $\hone$-negligible set. It follows that $u_\gamma\in\Sp(\Omega)$ and, as a direct
consequence of the definition of the energies,
$$F_p(u_\gamma)=E_p(\gamma)$$

\end{proof}
\begin{lemma}
\label{lemconvset} For any monotone family of sets $(X_\lambda)_{\lambda\in\R}\subset\R^2$,
there exists a finite or countable set $D$ such that
$$
\lim_{\mu\to\lambda}X_\mu=X_\lambda\qquad\forall\lambda\in\R\setminus
D,
$$
where convergence means convergence in measure. We shall call $D$
the set of discontinuity points of $(X_\lambda)_{\lambda\in\R}$.
\end{lemma}
\begin{proof}
It is enough to notice that the map $\lambda\mapsto |X_\lambda|$
is monotone, thus has at most countably many discontinuity points,
and to choose $D$ as the set of these discontinuity points.
\end{proof}
\begin{lemma}
\label{behavm}
Let $u:\Om\to[-\infty,+\infty]$ be a Borel function
such that $u\not\equiv+\infty$ and $u\not\equiv -\infty$ up to
a Lebesgue negligible set. If $\Om$ is bounded, connected and with
Lipschitz boundary then $\lambda\mapsto
\hone(\bounds\{u\geq\lambda\}\cap\Omega)$ is in $\lp{1}(\R)$ if
and only if $u\in\BV(\Omega)$.
\end{lemma}
\begin{proof}
See~\cite[Lemma 1]{JEMS}
\end{proof}
%\begin{proposition}
%\label{bvtrace}
%Let $\Omega\in\R^2$ be an open set with bounded Lipchitz boundary,
%$u\in\BV(\Omega)$ and $v\in\BV(\R^2\setminus(\Bar\Omega))$. Then, the function
%$$w(x)=\left\{\begin{array}{ll}u(x)&\mbox{if }x\in\Omega\\
%v(x)&\mbox{if }x\in\R^2\setminus(\overline\Omega)\end{array}\right.
%$$
% belongs to $\BV(R^2)$.
%\end{proposition}
%\begin{proof}
%See Corollary 3.89 in~\cite{JEMS}
%\end{proof}

\begin{lemma}\label{lemmasptod}
Let $u\in\Sp(\Omega)$. There exists an amodal completion
$\gamma_u$ naturally associated with $u$ such that, in view of Theorem~\ref{ctof}, $u=u_{\gamma_u}$ almost everywhere in $\R^2$ and
$$E_p(\gamma_u)=F_p(u).$$
\end{lemma}
\begin{proof}
Recall from the definition of $\Sp(\Omega)$ that for almost every
$\lambda\in U_0(\partial\Omega)$,
$\bounds\{u\geq \lambda\}\cap\overline \Omega$ is a finite union of simple
curves $\gamma_i^\lambda$, $i=0,\cdots,n_\lambda$ with good properties. For every
$x\in\cT$ such that $\bounds\{u\geq U_0(x)\}\cap\overline \Omega$ satisfy this decomposition, let us define $\gamma_{u,x}$ as the unique curve $\gamma_i^\lambda$ that passes
through $x$. Clearly, $\{\gamma_{u,x},x\in\cT\}$ satisfies all the properties of an amodal completion. In addition, the map $\gamma_u:x\in\cT\mapsto \gamma_{u,x}$ maps $\cT$ into $\wpq{2}{p}([0,1],\R^2)$. It follows from the definition of $\Sp$ that
$\gamma_u$ is an amodal completion on $\Omega$. Observe now that, up to a $\hone$-negligible set, $\bounds(\{u\geq \lambda\}\cap\overline \Omega)=\cup_{i=1}^{n_\lambda}\gamma_i^\lambda\bigcup(\{u\geq\lambda\}\cap \partial\Omega)$. Let $(\Gamma_j^\lambda)_{j=1}^{k_\lambda}$ denote the associated family of closed curves as given by Step~1 in the proof of Theorem~\ref{ctof} and let $E_\lambda$ the associated set. Then $\partial E_\lambda=\bounds(\{u\geq \lambda\}\cap\overline \Omega)$ up to a $\hone$-negligible set and it follows from the Gauss-Green formula that $E_\lambda=\{u\geq\lambda\}\cap\Omega$ up to a Lebesgue-negligible set. Since we already know that $E_\lambda=\{u_{\gamma_u}\geq\lambda\}\cap\Omega$  up to a Lebesgue-negligible set, the uniqueness of the representation implies that $u=u_{\gamma_u}$ almost everywhere in $\R^2$. The claim about the energy is a direct consequence of the definitions of $\Sp(\Omega)$ and $F_p$.
\end{proof}

\section{Minimizing the amodal energy of an amodal completion}\label{MAED}
We recall our assumption that the data to interpolate within
$\Omega$ is the trace of an analytic function $U_0$ such that
$F_p(U_0)<+\infty$. We assume that $(U_0, \Lambda)$ is an
admissible occlusion.   Thus, the set of T-junctions $\cT$ is not
empty and we can define a canonical amodal completion associated
with $U_0$ in the following way:  For every $x\in\cT$ we let
$\gamma_x$ denote the connected component of
$\{U_0=\lambda\}\cap\overline\Omega$ containing $x$ and we remark
that, by $(H_1)$, $\gamma_x$ is an analytic curve. It is then
easily seen that the map $\gamma_0:\,x\in\cT\mapsto \gamma_x$ is
an amodal completion and, by the change of variables formula,
$E_p(\gamma_0)=F_p(U_0)<\infty$. Then the following result can be
established.
\begin{theorem}\label{thm:mingamma}
The problem
$$
\min\{E_p(\gamma):\,\gamma\in{\cal D}_p\}
\eqno{(P_1)}
$$
has at least one solution $\gamma\in {\cal D}_p$ that can be associated with a function $u_\gamma\in\BV(\R^2)$.
\end{theorem}
\begin{proof}
The canonical amodal completion associated with $U_0$ has
obviously finite energy. Thus we may consider a minimizing
sequence of amodal completions $(\gamma^\ell)_{\ell\in\N}$ and
assume without loss of generality that
$$\sup_{\ell\in\N}E_p(\gamma^\ell)=C<\infty,$$
 so that the functions
$$f_\ell(x)=E_p(\gamma^\ell_x)$$
 are uniformly bounded in $\lp{1}(\partial\Omega,\mu)$.

\medskip
\noindent {\bf Step 1. Convergence of the energies $\mathbf{f_\ell(x)=E_p(\gamma^\ell_x)}$}

\medskip

Since $U_0$ is assumed to be nonconstant on $\partial \Omega$, we can without
loss of generality renormalize the measure $\mu$ so that
$\mu(\partial\Omega)=1$. Since $\mu$ has no atoms, any point on
$\partial\Omega$ can be associated with a unique value in $[0,1[$.
More precisely, given an origin $x_0$ on $\partial\Omega\cap\cT$, we associate
with any $x\in\cT$ the unique $n\in[0,1[$ such that
$n=\mu([x_0,x])$ and denote $f_\ell(n):=f_\ell(x)$. Conversely, almost every $n\in[0,1[$ is associated with a unique $x\in\cT$
such that $n=\mu([x_0,x])$ and we shall write $x=\mu^{-1}(n)$ for
simplicity.

 Let us now consider for $k,N\in \N$ the dyadic intervals on $[0,1[$:
$$I_{N,k}=[k2^{-N},(k+1)2^{-N}[,$$
and define the functions
$$f_\ell^N:\;m\in[0,1]\mapsto 2^N\ds\int_{I_{N,k}}f_\ell(n)dn=2^N\ds\int_{\imu(I_{N,k})}f_\ell(x)d\mu(x)$$
where $I_{N,k}$ is the unique dyadic interval containing $m$. Remark that the
functions $f_\ell^N$ are constant on each interval $I_{N,k}$ and, for every
$m\in[0,1[$, $|f_\ell^N(m)|\leq2^N\ds\int_0^1 f_\ell(n)dn\leq 2^NC$. Using a diagonal
extraction argument, we can find a subsequence of $(f_\ell)$, still
denoted by $(f_\ell)$, such that
$$\forall (N,k),\quad f_\ell^N(m)\to f^N(m)\quad\mbox{for every $m\in I_{N,k}$}$$
For every $N\in\N$, the limit function $f^N$ is positive and piecewise constant on the
$I_{N,k}$'s. Moreover, remark that
$I_{N,k}=[k2^{-N},(2k+1)2^{-N-1}[\cup[(2k+1)2^{-N-1},(k+1)2^{-N}[$ and
$$\begin{array}{ll}
\forall m\in[k2^{-N},(2k+1)2^{-N-1}[& \ds f_\ell^{N+1}(m)=2^{N+1}\int_{I_{N+1,2k}}f_\ell(n)dn\\
\forall m\in[(2k+1)2^{-N-1},(k+1)2^{-N}[&\ds f_\ell^{N+1}(m)=2^{N+1}\int_{I_{N+1,2k+1}}f_\ell(n)dn\end{array}$$
thus
$$\ds\int_{I_{N,k}}f_\ell^{N+1}(n)dn=\int_{I_{N,k}}f_\ell(n)dn$$
and finally, for every $m\in I_{N,k}$,
$$f_\ell^N(m)=2^N\ds\int_{I_{N,k}}f_\ell^{N+1}(n)dn$$
By the Dominated Convergence Theorem, it follows that
$$f^N(m)=2^N\ds\int_{I_{N,k}}f^{N+1}(n)dn,$$
which proves that $(f^N)_{N\in\N}$ is a martingale. In addition,
remark that
$$\ds\int_0^1 f_\ell^N(n)dn=\sum_k\ds\int_{I_{N,k}}f_\ell(n)dn=\int_0^1 f_\ell(n)dn\leq C,$$
so that, by Fatou's Lemma
$$\ds\int_0^1 f^N(n)dn\leq C<\infty.$$
Since, in addition, $f^N\geq 0$, it follows that $(f^N)_{N\in\N}$ is a bounded positive martingale. By Doob's
convergence theorem, there exists  $f\in\lp{1}([0,1])$ such that
$$f^N\to f\qquad\mbox{almost everywhere}$$
%and, $\forall N\in\N$, $\ds\int_Mf^N(m)dm=\ds\int_Mf(m)dm$

\medskip
\noindent{\bf  Step 2. Definition of a limit amodal completion}

\medskip
\noindent Let $N,k\in\N$ and recall from above that the sequence $(f_\ell^N)_{\ell\in\N}$ satisfies
$$\sup_{n\in
  I_{N,k}}\sup_{\ell\in\N}f_\ell^N(n)<\infty.$$

\begin{lemma}\label{lemmoy}
Let $I:=I_{N,k}$ and $A_\ell:=\{x\in
\imu(I)\cap\cT:\,f_\ell(x)<2^N\ds\int_If_\ell(n)dn+\frac 1 N\}$. Then there exists some $\epsilon>0$ such that
$\mu(A_\ell)\geq\epsilon$ for every $\ell\in\N$.
\end{lemma}
\begin{proof}
By definition and since $\mu(\partial\Omega\bs\cT)=0$, $\imu(I)\bs A_\ell$ essentially coincides with $\{x\in \imu(I)\cap\cT:\,f_\ell(x)\geq
2^N\ds\int_{I}f_\ell(n)dn+\frac 1 N\}$, hence
$$\ds\int_{\imu(I)\bs A_\ell}f_\ell(x)d\mu(x)\geq \mu(\imu(I)\bs A_\ell)\left(2^N\ds\int_{I}f_\ell(n)dn+\frac 1 N\right)$$
Assume that for all $\epsilon>0$ there exists $\ell\in\N$ such that
$\mu(A_\ell)<\epsilon$. Then,
$$\ds\int_If_\ell(n)dn\geq (2^{-N}-\epsilon)\left(2^N\ds\int_{I}f_\ell(n)dn+\frac 1 N\right),$$
and therefore
$$2^N\ds\int_If_\ell(n)dn\geq\frac 1 N(\frac 1{\epsilon 2^N}-1),$$
which gives a contradiction for $\epsilon$ small enough since $\sup_{\ell\in\N}f_\ell^N<+\infty$ on $I$.
\end{proof}
\begin{lemma}
Under the notations above, there exists a T-junction $x\in\cT\cap I$ such that, possibly passing to a subsequence of $(A_\ell)_{\ell\in\N}$,
$$x\in A_\ell,\quad \forall \ell\in\N$$
\end{lemma}
\begin{proof}
$\{\bigcup_{k\geq n}A_k\}_{n\in\N}$ is a decreasing family of sets such that, by Lemma~\ref{lemmoy}, $\mu(\bigcup_{k\geq n}A_k)\geq \epsilon$, $\forall n\in\N$, and therefore
$$\mu(\bigcap_{n\in\N}\bigcup_{k\geq n}A_k)\geq \epsilon,$$
from which the lemma follows.
\end{proof}

\bigskip
We are now in position to finish the proof of Theorem~\ref{thm:mingamma}. Denoting by $x$ the T-junction given by the previous lemma and
choosing the appropriate subsequence, we have
$$E_p(\gamma^\ell_x)\equiv f_\ell(x)\leq2^N\ds\int_{I_{N,k}}f_\ell(n)dn+\frac 1 N\equiv
f_\ell^N(x)+\frac 1 N<\infty.$$ By the weak compactness of
the unit ball in $\wpq{2}{p}$ there exists a further subsequence,
and a limit arc $\gamma^{N,k}_x\in\wpq{2}{p}$ such that
\begin{itemize}
\item $\gamma^\ell_x\rightharpoonup \gamma^{N,k}_x$ weakly in $\wpq{2}{p}([0,1],\R^2)$ (thus strongly
in $\cont{1}$).
\item $E_p(\gamma^{N,k}_x)\leq\ds\liminf_{\ell\to\infty}f_\ell(x)$, using~\eqref{eqts}, the lower semicontinuity of the $\wpq{2}{p}$ norm and the
fact that ${\cal L}(\gamma^{N,k}_x)=\ds\lim_{\ell\to\infty}{\cal L}(\gamma^\ell_x)$
\end{itemize}

Since $\hzero(\partial\{  U_0\geq\lambda\})$ is finite, the limit arc $\gamma^{N,k}_x$ passes through another T-junction $y\in\cT_{U_0(x)}$. Thus $\gamma^{N,k}_x$ can be extended outside $\Omega$ using arcs of $\{y\in\R^2\setminus\Om:\,U_0(y)=U_0(x)\}$. Let us prove that the extended curve, defined for example on $[-\epsilon, 1+\epsilon]$, is globally of class $\wpq{2}{p}$. We already know that it is $\wpq{2}{p}$ on each interval $[-\epsilon,0]$, $[0,1]$ and $[1,1+\epsilon]$. In addition, each arc $\gamma^\ell_x$ extends outside $\Omega$ into a globally $\cont{1}$ arc. Since $U_0$ is analytic outside $\Omega$ and since the convergence of $(\gamma^\ell_x)$ holds also in the strong topology of $\cont{1}$, we infer that $\gamma^{N,k}_x$ is in $\cont{1}([0,1],\R^2)$ and admits a globally $\cont{1}$ extension. By the usual properties of Sobolev functions, it follows that $\gamma^{N,k}_x$ is of class $\wpq{2}{p}$ in $(-\epsilon, 1+\epsilon)$.

\bigskip
Since the $I_{N,k}$'s are countably many, we can again use a diagonal
extraction to get a subsequence, still denoted as $f_\ell$, and for each $(N,k)$ a limit
arc of class $\wpq{2}{p}([0,1])$, denoted as $\gamma^{N,k}$, such that
$$E_p(\gamma^{N,k})\leq
2^N\ds\int_{I_{N,k}}f^N(n)dn+\frac 1 N\quad(=2^N\lim_{\ell\to\infty}\int_{I_{N,k}}f_\ell(n)dn+\frac
1 N)$$
Moreover, the limit curves $(\gamma^{N,k})_{N,k}$ do not cross by construction and can be extended outside $\Omega$ into globally $\wpq{2}{p}$ curves.


\bigskip
Let us now see how a limit curve can be defined for any T-junction. Given $x\in\cT$, there exists for every $N\in\N$ some $k_N$
such that $\mu([x_0,x])\in I_{N,k_N}$. Considering the family of arcs $(\gamma^{N,k})_{N,k}$ defined above, we have by definition
$$E_p(\gamma^{N,k_N})\leq 2^N\int_{I_{N,k_N}}f^N(n)dn+\frac 1 N=f^N(x)+\frac 1 N$$
which converges - for $\mu$-almost every $x$ - to $f(x)$. Using
the weak compactness of $\wpq{2}{p}$, there exists a subsequence, still denoted by $(\gamma^{N,k_N})_{N\in\N}$, that
weakly converges in $\wpq{2}{p}$, thus uniformly in ${\mathrm C}^1$, to a limit arc $\gamma_x$. By the lower semicontinuity of the $\wpq{2}{p}$
norm and the fact that ${\cal L}(\gamma_x)=\ds\lim_{N\to\infty}{\cal L}(\gamma^{N,k_N})$, it follows that
$$E_p(\gamma_x)\leq \liminf_{N\to\infty}E_p(\gamma^{N,k_N})\leq
\liminf_{N\to\infty}(f^{N}(x)+\frac 1 {N})=f(x).$$

This procedure can be applied for $\mu$-almost every T-junction
and thus we can define a limit amodal completion $\gamma$. In
particular, two different arcs $\gamma_{x_1}$ and $\gamma_{x_2}$
cannot cross (but may intersect tangentially) since they are
uniform limits of arcs $(\gamma^{N,k})_{N,k}$ that do not cross by
construction.


There are two technical points that must be checked in this
construction process~:


\medskip
1) Given $x\in\cT_\lambda$ and its
  associated limit curve $\gamma_x\in\wpq{2}{p}(0,1)$, we have
  $\gamma_x(1)\in\cT_\lambda$. Thus $\gamma_x$ can be extended outside $\Omega$ using arcs of
  $\{y\in\R^2\setminus\Omega:\,U_0(y)=U_0(x)\}$ into a curve $\gamma_x^\epsilon$ defined on
$[-\epsilon,1+\epsilon]$. Following the same argument as above, we prove that $\gamma_x^\epsilon$ is of class $\wpq{2}{p}$ on  $(-\epsilon,1+\epsilon)$;

\medskip
2) We must control whether the curve $\gamma_x$ passing through
another T-junction $y\in\cT_{U_0(x)}$ coincides with $\gamma_y$.
The answer is positive because there are finitely many T-junctions
per level and because the convergence of the curves is meant in
the strong topology of $\cont{1}$.

\bigskip
Finally, we have built a limit amodal completion $\gamma$ defined
for $\mu$-almost every $x\in\cT$ and such that each curve $\gamma_x$ is of class $\wpq{2}{p}$ and can be extended outside $\Omega$ into a globally $\wpq{2}{p}$ curve whose restriction to $\R^2\setminus\Omega$ coincides with arcs of $\{y\in\R^2\setminus \Omega:\,U_0(y)=U_0(x)\}$. Moreover,
$$E_p(\gamma(x))\leq f(x),\qquad \mu-\mbox{a.e. }x\in\cT$$
It follows from Fatou's Lemma that
$$\begin{array}{lll}
\ds E_p(\gamma)&=&\ds\int_{\partial\Omega}E_p(\gamma(x))d\mu(x)\leq\ds\int_{\partial\Omega}f(x)d\mu(x)=\int_0^1f(n)dn\\
&\leq& \ds\liminf_{N\to\infty}
\int_0^1f^N(n)dn\leq\ds\liminf_{N\to\infty}
\liminf_{\ell\to\infty}\int_0^1f^N_\ell(n)dn=
\ds\liminf_{\ell\to\infty}\int_0^1f_\ell(n)dn\end{array}
$$
Thus,
$$E_p(\gamma)\leq\liminf_{\ell\to\infty}E_p(\gamma^\ell)=\inf_{\tilde \gamma\in{\cal D}_p}E_p(\tilde \gamma)$$
and we have proved that the limit amodal completion is optimal.
\end{proof}
\begin{remark}\label{remconv}
The previous theorem involves a definition of convergence in the class of amodal completions, namely, $(\gamma_h)_{h\in\N}\to\gamma$ if
\begin{enumerate}
\item for each dyadic interval $[k_N2^{-N},(k_N+1)2^{-N})$, there exists an appropriate point $x_{k_N,N}\in [k_N2^{-N},(k_N+1)2^{-N})$ such that $\gamma_h(x_{k_N,N})$ converges weakly in $\wpq{2}{p}$ to $\gamma(x_{k_N,N})$;
\item for $\mu$-almost every $x\in\partial\Omega$, $\gamma_x$ is the weak limit in $\wpq{2}{p}$ of a subsequence $(\gamma(x_{k_M,M}))_{M\in\N}$ where $x_{k_M,M}\to x$ as $M\to\infty$.
\end{enumerate}
\end{remark}
\begin{corollary}\label{compacite-completion-amodale}
Let $(\gamma_h)_{h\in\N}$ be a sequence of amodal completions with
uniformly bounded energies, i.e.
$$\sup_{h\in\N}E_p(\gamma_h)<\infty.$$
Then, possibly extracting a subsequence, there exists a limit amodal completion $\gamma$ such that $(\gamma_h)_{h\in\N}$ converges to $\gamma$ in the sense of Remark~\ref{remconv} above.
\end{corollary}

\medskip
It is easily seen that the function $u_\gamma$ associated with an
amodal completion $\gamma$, as defined by Theorem~\ref{ctof}, may
have level lines that are not curves of $\gamma$ (see
figure~\ref{desocclusionsinguliere}). Consequently, the
relationship between $\OF(u_\gamma)$ and $E_p(\gamma)$
is not clear. The purpose of Lemma~\ref{lemapprox} is to
provide a continuous function $u_\epsilon\in\Sp$ whose level lines
are very similar to the curves of $\gamma$ and such that
$F_p(u_\epsilon)$ be arbitrarily close to $E_p(\gamma)$. We start
with a lemma providing a way to separate the curves of an amodal
completion.
\begin{lemma}
\label{lemecart} Let $\gamma$ be an amodal
completion with finite energy  $E_p(\gamma)$.  Then  for every
$\eta>0$ there is another amodal completion $\gamma^\eta$ without contact such
that $|E_p(\gamma^\eta)-E_p(\gamma)|\leq \eta$ and for $\mu$-almost every $x\in\partial\Omega$,
$$\sup_{s\in[0,1]}|\gamma^\eta_x(s)-\gamma_x(s)|\leq \eta.$$
\end{lemma}

\begin{proof}  The proof is tedious, but not deep.
We consider a dense set $x_n$ of T-junctions in $\cT$
such that the curves $\gamma_n=\gamma_{x_n}$ have all finite
energy $E_p(\gamma_n)<\infty$. The idea of the proof is to move
all curves of the amodal completion smoothly and slightly in such
a way that they all fall apart from $\gamma_n$. In other terms, we
shall dilate slightly all curves $\gamma_n$.   After its dilation,
$\gamma_n$ will  have an open security region around it into which
no other curve $\gamma_x$ enters. Given two curves $\gamma_x$ and
$\gamma_y$ with $x\neq y$, we can find a curve $\gamma_n$ which
separates them in wide sense. After the dilation,  $\gamma_x$ and
$\gamma_y$ will not touch anymore. In that way, any two distinct
curves $\gamma_x$ and $\gamma_y$ will be separated by an open
domain and have therefore a positive distance to each other.  This
argument needs some detail. Indeed, notice that a curve $\gamma_n$
may meet the boundary and that it may meet itself. Thus, we must
be careful to move the curve away from the boundary and to move it
apart from itself at points where it is tangent to itself.    The
dilations of $\gamma_n$ will be done by  smooth diffeomorphisms
close enough to identity, which will increase very little the
energy of the curves.

\medskip\noindent {\bf Step 1. Dividing all curves $\gamma_n$ into graphs}\newline
We start by covering the domain $(0,L_n)$ of $\gamma_n$ with a
finite set of open intervals $(s_i,t_{i})$ such that
\begin{enumerate}
   \item $s_i<s_{i+1}<t_i<t_{i+1}$, $s_0=0,$ $t_N=L_n$,
   \item $\gamma_n$ restricted to $[s_i,t_i]$ is a graph
   \item the restriction of $\gamma_n$ to $[s_i,t_i]$ meets
   $\partial \Omega$ at most on one side.
\end{enumerate}
We index by $i\in \N$ all the pieces of curves of all $\gamma_n$.

\medskip\noindent {\bf Step 2. Defining a  diffeomorphism dilating locally $\gamma_n$.}\newline
We can translate the second and third conditions in the following
way. On the interval $[s_i,t_i]$, the curve $\gamma_n$ is
represented as a graph $\Gamma_i=\{(x,f_i(x))\}$, $x\in[0,x_i]$ in
local euclidian coordinates $(x,y)$.  The third condition implies that if $\Gamma_i$ touches $\partial\Omega$ at several points, then it is only from above or only from below. Assume that it is from above, the other case being similar (the case where $\Gamma_i$ does not touch $\partial\Omega$ can be treated using indifferently one or the other way). There exists a $\cont{\infty}$ function
$y=\psi_i(x)$ such that $\psi_i(x)>f_i(x)$ on $(0,x_i)$, $\psi_i(0)=f_i(0)$,
$\psi_i(x_i)=f_i(x_i)$ and the open domain $\mathcal D_i=\{(x,y),
\;0<x< x_i, \;f_i(x)< y< \psi_i(x)\}$ is contained in $\Omega$ (see Figure~\ref{fig:diffeo}).
\begin{figure}[!htbp]
\begin{center}\includegraphics[width=11cm]{diffeo.eps}
\end{center}\caption{The operator $F_i^\epsilon$ differs from the identity in $D_i$. It is designed to move the curves $\gamma_m$ and $\gamma_p$ apart from $\gamma_n$ and to move $\gamma_n$ itself apart from $\partial\Omega$.}
\label{fig:diffeo}
\end{figure}



We
consider the diffeomorphism of $\real^2$ defined by
$$F_i^\epsilon(x,y)=\left\{
\begin{array}{ll}
(x,y+\epsilon M_i e^{-\frac 1{(\psi_i(x)-y)^+}}\cdot e^{-\frac 1{x^+}
-\frac 1{(x_i-x)^+}} ) &\mbox{if  } 0\leq x\leq x_i,\;f_i(x)\leq
y\leq \psi_i(x),\\
(x,y)&\mbox{otherwise}\end{array}\right.$$
with
$$M_i\leq \inf_{0\leq x\leq x_i}\frac 1{1+\psi_i'^2(x)+|\psi_i''(x)|}.$$
Then we see that $F_i^\varepsilon$ is $C^\infty$ and there exists a constant $C>0$ independent of $i$ and independent of the curve $\gamma_n$ such that~:

\begin{itemize}
\item $DF_i = Id + \varepsilon G_i$, where $G_i$ is $C^\infty$ and uniformly bounded on $[0,x_i]$ by $C$;

\item $D^2F_i^\varepsilon = \varepsilon H_i$, where $H_i$ is $C^\infty$ and uniformly bounded on $[0,x_i]$ by $C$;
\end{itemize}
This follows immediately from the chain rule and the fact that
$s\to e^{-\frac 1{s^+}}$ is a $C^\infty$ function with all
derivatives bounded on $\real$.


\medskip\noindent {\bf Step 3. Using the diffeomorphism to move
all curves apart from $\gamma_n$}\newline We  define the following
operation, indexed by $i\in \N$. For every curve $\gamma_x$ of the
amodal completion, we consider all maximal intervals $(s,t)$ of
$\gamma_x$ contained in the domain $\overline{\mathcal D_i}$ and
replace $\gamma_x$ on $(s,t)$ by the new curve
$F_i^\varepsilon\circ\gamma_x$. We also replace $\gamma_n$ on
$(s_i,t_i)$ by $F_i^{\frac \varepsilon 2}\circ\gamma_n$. Now, the
curve $\gamma_n$  may meet itself and we have to fix  a rule for
moving the parts of $\gamma_n$ which coincide with the restriction
of $\gamma_n$ to $(s_i,t_i)$. Let $(s,t)$ be a maximal interval of
$\gamma_n$ contained in $\overline{\mathcal D_i}$. If
$\gamma_n((s,t))$ meets $\mathcal D_i$, we consider that this part
of $\gamma_n$ is ``above" the restriction to $(s_i,t_i)$ and we
move this part of the curve as we moved the other $\gamma_x$ (see Figure~\ref{fig:autocroise1}). If
instead $\gamma_n([s,t])$ coincides with $\gamma_n([s_i,t_i])$, we
consider the maximal intervals $[\sigma_i, \tau_i]$ and $[\sigma,
\tau]$ on which both curves coincide. Assume for instance that
$\gamma_n(\sigma_i)=\gamma_n(\tau)$ (these pieces of curves can also
have same orientation, i.e.
$\gamma_n(\sigma_i)=\gamma_n(\sigma)$). Consider a definition of the
unit normal $n(s)$ to $\gamma_n$ such that on $(s,t)$, $n(s)$ has
an acute angle with the coordinate axis $(0,y)$. The curve
$\gamma_n$ is a graph around $\sigma_i$ in euclidian coordinates
such that $n(\sigma_i)$ gives the $(0,y)$ axis (see Figure~\ref{fig:autocroise2}).  If in these
coordinates, the graph of $\gamma_n$ around $\sigma_i$ is above the
graph of $\gamma_n$ around $\tau$, we do not move the restriction
of $\gamma_n$ to $(s,t)$. If instead it is below, we move the
restriction of $\gamma_n$ to $(s,t)$ as the other curves
$\gamma_x$. An analogous procedure applies when $\gamma_n(\sigma_i)=\gamma_n(\sigma)$.

This specification had to be made in order to avoid
creating a self-crossing of $\gamma_n$.

\begin{figure}[!htbp]
\begin{center}\includegraphics[width=11cm]{autocroise1.eps}
\end{center}\caption{$\gamma_n$ has autocontact on a maximal proper subset of $\gamma_n([s_i,t_i])$.}
\label{fig:autocroise1}
\begin{center}\includegraphics[width=11cm]{autocroise2.eps}
\end{center}\caption{There exists an autocontact set that strictly contains $\gamma_n([s_i,t_i])$.}
\label{fig:autocroise2}
\end{figure}




\medskip\noindent {\bf Step 4.  Checking that the moving apart does not increase
much the energy of the amodal completion}
\newline By construction, there exists $C>0$ such that $\|DF_i^\varepsilon-Id\|\leq C\varepsilon$ and
$\|D^2F_i^\varepsilon\|\leq C\varepsilon$.  It is easily checked
that the energy of a curve $\gamma$ deformed by $F_i^\varepsilon$
satisfies $$(1-D\varepsilon)E_p(\gamma_x)\leq
E_p(F_i^\varepsilon(\gamma_x))\leq (1+D\varepsilon)E_p(\gamma_x)$$
for some constant $D>C$ independent of $\gamma_x$. Thus, taking $\eta$ such that $D\varepsilon=\eta 2^{-i}$ and setting $F_i=F_i^\varepsilon$, we
can ensure that the energy of the whole amodal completion, denoted
by $F_i(\gamma)$, satisfies
\begin{equation}\label{energienebougepastrop}
|E_p(F_i(\gamma))-E_p(\gamma)|\leq \eta 2^{-i}.
\end{equation}
This also entails that for any pair of points $z_1$  and $z_2$
belonging to some curves $\gamma_{x_1}$ and $\gamma_{x_2}$,
\begin{equation}\label{neserapprochepastrop}(1+\eta 2^{-i})|z_1-z_2|\geq |F_i(z_1)-F_i(z_2)|\geq (1-\eta
2^{-i})|z_1-z_2|.\end{equation} One moving apart operation
therefore defines a new amodal completion with energy as close as
we wish to the original and curves as close as we wish to the
originals. The moving apart operation has then to be performed
recursively at step $i$ on the amodal completions resulting from
the $i-1$ former operations. To formalize this,
 we set $T_i=F_{i-1}\circ
F_{i}\circ \dots \circ F_2\circ F_1$ and $T(z)=\lim_{i\to
\infty}T_i(z)$.  So at the $i$-th step, all operations described
in steps 1 to 5 are applied to the curves $T_{i-1}(\gamma_x)$
($T_0=Id$).
 From \eqref{neserapprochepastrop} follows that $T$
is a bilipschitz map for $\eta <\frac 12,$ so that open sets are
mapped onto open sets.



\medskip\noindent{\bf Step 5.  The last remark shows that the
 moving apart operation isolates
$\gamma_n$ from all other curves and eliminates its self-contacts
on $(s_i,t_i)$.}\newline Indeed, the fact that we  move $\gamma_n$
only halfway at step $i$ implies that  $T_i(\gamma_n((s_i,t_i)))$
is contained in the open set $O_i=\mathcal D_i\setminus F_i(D_i)$,
which contains no piece of no other curve of the amodal
completion. Now, by the same argument as for $T_i$, $\tilde
T_i=\lim_{k\to \infty} F_k\circ\dots F_{i+1}$ also is a
bilipschitz map.  So the final position of $\gamma_n(s_i,t_i))$ is
the open domain $\tilde T_i(O_i)$. This being true for all $i$, we
deduce that every curve $T(\gamma_n)$ is contained (except its endpoints) in an open set ${\cal D}_n$ which does not contain any other curve
$T(\gamma_x)$.


\medskip\noindent{\bf Step 6.  Iteration of the moving apart operation.}\newline
This iteration is defined for each curve $\gamma_x$ by
$T_i(\gamma_x)= F_{i}\circ F_{i-1}\circ \dots \circ F_2\circ
F_1(\gamma_x).$  By \eqref{neserapprochepastrop}, the sequence of
curves $T_i(\gamma_x)$ converges uniformly to a curve
$T(\gamma_x)$ and by
\eqref{energienebougepastrop} and Fatou's lemma,
$|E_p(T(\gamma))-E_p(\gamma)|\leq \eta.$

\medskip\noindent{\bf Step 7. Conclusion.}\newline   Given two
curves $\gamma_x$ and $\gamma_y$ of the amodal completion, there
exists a curve $\gamma_n$ which separates $\gamma_x$ and
$\gamma_y$, namely $\gamma_x$ and $\gamma_y$ do not belong to the
same connected component of $\Omega\setminus \gamma_n$. Thus
$T(\gamma_x)$ and $T(\gamma_y)$ are contained in two different
connected components of $\Omega\setminus {\mathcal D_n}$ and
therefore stand at a positive distance from each other.

Let us now deal with   curves $\gamma_x$ which have at least one
self-meeting. Call loops of $\gamma_x$ the open connected
components of $\Omega\setminus \gamma_x$ whose boundary is fully contained in $\gamma_x$.  If at least one loop of $\gamma_x$ does
not contain any piece of any other curve $\gamma_n$ -- which means that the previous procedure will let the loop unchanged -- this is
equivalent to say that it does not contain  any piece of any other
curve $\gamma_x$. Since loops have positive measure, we deduce
that only a countable set of $curves$ $\gamma_x$ can have such
empty loops. So we are allowed to add them up from the start to
the curves $\gamma_n$.  Thus, we may assume that all curves
$\gamma_x$ having a loop are such that the loop contains some
piece of $\gamma_n$.  This implies that the self-meeting points of
$\gamma_x$ also are self-meeting points for some $\gamma_n$ and we
conclude that the moving apart operation have moved them apart
too.
\end{proof}
%
%
%
\begin{lemma}\label{lemapprox}
Let $\gamma\in\Dp$ be an amodal completion with finite energy and
$u_\gamma$ the associated function in $\BV$. For every $\epsilon>0$
there exists a continuous function $u_\epsilon\in \Sp$ such that
$|E_p(\gamma)-F_p(u_\epsilon)|\leq \epsilon$. In addition, $u_\epsilon$
tends to $u_\gamma$ in $\lp{1}$ as $\epsilon$ tends to
zero.
\end{lemma}
\begin{proof}
In view of Lemma~\ref{lemecart}, for every $\epsilon>0$ there exists an amodal completion without contact $\gamma_\epsilon$ such that $|E_p(\gamma_\epsilon)-E_p(\gamma)|<\epsilon$. By Theorem~\ref{ctof}, $\gamma_\epsilon$ can be associated with a function $u_\epsilon\in\Sp$ and $|E_p(\gamma)-F_p(u_\epsilon)|\leq \epsilon$. In addition, $u_\epsilon$ is continuous because its level lines are disjoint by construction. From the construction procedure of Theorem~\ref{ctof} and the fact that the curves of $\gamma_\epsilon$ converge uniformly to the curves of $\gamma$, we also deduce that $u_\epsilon$ tends to $u$ almost everywhere on $\Omega$. Remark now that, by construction, for every $\epsilon>0$ and for almost every $x\in\Omega$, $|u_\epsilon(x)|\leq \max_{y\in\partial\Omega}|U_0(y)|$. We infer by the Dominated Convergence Theorem that $u_\epsilon$
tends to $u_\gamma$ in $\lp{1}$ as $\epsilon$ tends to
zero.
\end{proof}


%\begin{lemma}\label{urecouvertpargamma}
%Let $\gamma\in\Dp$ be an amodal completion with finite energy and $u_\gamma$ the associated function, as given by Theorem~\ref{ctof}. Then, for almost every $t\in\R$,
%$$\Omega\cap\bounds\{u_\gamma\geq t\}\subset\bigcup_{x\in\cT_t}\gamma_x\qquad \mbox{up to $\hone$-negligible sets}$$
%\end{lemma}
%\begin{proof}
%For every $\epsilon>0$, we denote $\gamma^\epsilon$ the approximating amodal completion given by Lemma~\ref{lemecart} and we call $u_\epsilon$ the associated function provided by Theorem~\ref{ctof}. Since the curves of  $\gamma^\epsilon$ tend uniformly to the curves of $\gamma$, it follows from the construction procedure of Theorem~\ref{ctof} that $u_\epsilon$ tends to $u$ almost everywhere on $\Omega$ and, for almost every $t\in\R$, $\{u_\epsilon\geq t\}$ tends to $\{u\geq t\}$ in $\lp{1}$. Remark now that, by construction, $\Omega\cap \partial\{u_\epsilon\geq t\}$ tend uniformly to $\bigcup_{x\in\cT_t}\gamma_x$. Let us prove that  $M:=\bigcup_{x\in\cT_t}\gamma_x$ contains $\Omega\cap\bounds\{u_\gamma\geq t\}$. Take $y\in \Omega\cap\bounds\{u_\gamma\geq t\}$ and choose $r>0$ such that $\hone(\partial B_r(y)\cap M)=0$, which is true for all except at most countably many $y$ because $M$ have finite length. Since $\{u_\epsilon\geq t\}$ tends to $\{u\geq t\}$ in $\lp{1}$, we infer from the lower semicontinuity of perimeter that
%$$\hone(B_r(y)\cap\Omega\cap\bounds\{u\geq t\})\leq \liminf_{\epsilon\to 0} \hone(B_r(y)\cap\Omega\cap\partial\{u_\epsilon\geq t\})=\hone(B_r(x)\cap M),$$
%the last equality being due to our assumption that $\hone(\partial B_r(y)\cap M)=0$. It follows that $\hone$-almost every $y\in \Omega\cap\bounds\{u_\gamma\geq t\}$ has unit density with respect to $M$ thus, for almost every $t\in\R$,
%$$\Omega\cap\bounds\{u_\gamma\geq t\}\subset\bigcup_{x\in\cT_t}\gamma_x\qquad\mbox{up to $\hone$-negligible sets}$$
%and the proposition ensues.
%\end{proof}

\begin{lemma}\label{lem:utogamma}
Let $u\in\cont{2}$ such that ${\cal F}_p(u)<\infty$ and $u$
coincide with $U_0$ outside $\Omega$. Then there exists an amodal
completion $\gamma$ whose trace is contained in the topographic
map of $u$, i.e. for almost every $\lambda\in\Lambda$,
$\bigcup_{x\in\cT_\lambda}(\gamma_x)\subset
\{u=\lambda\}\cap\overline\Omega$. Consequently,
$$E_p(\gamma)\leq {\cal F}_p(u)$$
\end{lemma}

\begin{proof}
This amodal completion will be constructed as a selection of level
lines of $u$ inside $\Omega$.
   By Sard Lemma we can find a set $\tilde\Lambda\subset\Lambda$ of full measure such that $\{u=\lambda\}\cap\Omega$ is a union of $\cont{2}$ curves. Of course we also have $\mu(\{x\in
\partial \Omega,\; u(x)\not\in \tilde\Lambda\}))=0$. For every $T$-junction $x\in\cT$ such that $u(x)\in\tilde\Lambda$, the level line $L_x$ of $u$ passing by $x$ is by definition of $\tilde \Lambda$ a $C^2$ Jordan curve and intersects $\partial \Omega$ at some other $T$-junction $y\in\cT_{u(x)}$. We take
$\gamma_x$ to be a $C^2$ parameterization on $[0,1]$ of the arc of
$L_x$ between $x$ and $y$. The map $\gamma:x\in \cT\cap u^{-1}(\tilde\Lambda)\mapsto \gamma_x$ is clearly an amodal completion whose trace is contained in the topographic map of $u$. The
inequality $E_p(\gamma) \leq {\cal F}_p(u)$ is then an obvious
consequence of the coarea formula, as $E_p(\gamma)$
is obtained from ${\cal F}_p$ by a restriction to the levels of $\tilde \Lambda$
and a selection of pieces of level lines at these levels.
\end{proof}

\section{Comparison with the direct variational approach}\label{CDVA}
This section is devoted to the  proof that the problems $(P_1)$ and
$(P_2)$ are equivalent. We do not know whether they also are
equivalent with $(P_2')$; this would actually be true if one could prove that for $u\in\Sp$,
$F_p(u)=\OcF(u)$. However two points remain unclear:
\begin{itemize}
\item we do not know whether any function $u\in\Sp$
can be approximated by a sequence of smooth functions $(u_h)$ such
that $F_p(u_h)$ tends to $F_p(u)$ (this sounds reasonable);
\item we do not know whether any
$u\in\Sp$ can be approximated by a sequence of smooth functions
$(u_h)$ such that $\OcF(u)=\lim_{h\to\infty}{\cal F}_p(u_h)$ and each
$u_h$ can be associated with a function $\tilde u_h\in\Sp$ such that
$F_p(\tilde u_h)\leq {\cal F}_p(u_h)$ and $(\tilde u_h)$ tends to $u$ in
$\lp{1}$.
\end{itemize}

\medskip
We start with the proof that $(P_2)$ is well posed.

\begin{theorem}\label{mindeP3}
The problem
$$
\min\{\OF(u):\, u=U_0\mbox{ on }
\R^2\setminus\Omega\} \eqno{(P_2)}
$$
has at least one solution $u\in\BV(\R^2)$ that coincides with
$U_0$ outside $\Omega$. In addition, for almost every $\lambda\in
u(\R^2)$, there exists a finite family
$\Gamma^\lambda=\{\gamma_i^\lambda\}_{i\in I_\lambda}$ of regular
curves of class $\wpq{2}{p}$ such that $\bounds\{u>
\lambda\}\subset\bigcup_{i\in I_\lambda}(\gamma_i^\lambda)$ and
any two curves of $\Gamma^\lambda$ may intersect but only
tangentially and without crossing each other.
\end{theorem}
\begin{proof}
Let $(u_h)_{h\in\N}$ be a minimizing sequence. It follows from the
definition of $\OF$ that $(u_h)$ has uniformly bounded variation.
Since every $u_h$ coincides with $U_0$ outside $\Omega$,  we
deduce from Lemma~\ref{behavm} that $(u_h)$ is also uniformly
bounded in $\lp{1}$. Thus there exists a subsequence, still
denoted by $(u_h)_{h\in\N}$, and a limit function in $\BV$ such
that $u_h$ converges to $u$ in $\lp{1}$. It follows from the lower
semicontinuity of relaxed functionals \cite{dalmaso} that
$$\OF(u)\leq\liminf_{h\to\infty}\OF(u_h)=\inf\{\OF(u):\,
u=U_0\mbox{ on } \R^2\setminus\Omega\}.$$ Thus $u$ is a solution
of $(P_2)$. In addition, by the usual extension theorems in $\BV$, $u\in\BV(\R^2)$.

By the properties of relaxed functionals, there exists a sequence
$(v_h)_{h\in\N}$ of functions in $\Sp$ such that
$\OF(u)=\lim_{h\to\infty}F_p(v_h)$. By definition, for every
$h\in\N$ and for almost every $t\in U_0(\partial\Omega)$, $\bounds\{v_h\geq t\}\cap\Omega$ essentially coincides with a finite union of curves of class $\wpq{2}{p}$. In addition,
$$F_p(v_h)=\int_{-\infty}^{+\infty}\int_{\Omega\cap\bounds\{v_h\geq t\}}(1+|\kappa|^p)d\hone.$$
By Fatou's lemma we get that
$$\int_{-\infty}^{+\infty}\liminf_{h\to\infty}\int_{\Omega\cap\bounds\{v_h\geq t\}}(1+|\kappa|^p)d\hone\leq\liminf_{h\to\infty}\int_{-\infty}^{+\infty}\int_{\Omega\cap\bounds \{v_h\geq t\}}(1+|\kappa|^p)d\hone<+\infty.$$
Thus for  almost every $t\in\R$, there exists a subsequence
(depending on $t$), still denoted as $(v_h)$, such that
$\sup_{h\in\N}\int_{\Omega\cap\bounds\{v_h\geq
t\}}(1+|\kappa|^p)d\hone<\infty$. Since $v_h\to u$ in $L^1$, the Cavalieri's principle implies that $\{v_h\geq t\}$ converges for almost every $t$ to $\{u\geq t\}$ in $\lp{1}$. The final claim of the Theorem is then a simple application of Theorem 7.1 in~\cite{bellettini} (see
also Corollary~1 in~\cite{AM03}).
\end{proof}

\begin{remark}
An interesting consequence of the next result is that it provides
an explicit integral formulation for $\OF(u)$ when $u$ is a minimizer of $(P_2)$. Such a formulation
could also be obtained, under a slightly different form, by
combining the direct method developed in~\cite{AM03} with Theorem
8.6 in~\cite{bellettinimugnai}. Indeed, by passing to a
subsequence for which there is convergence in $\lp{1}$ of the
characteristic functions of almost every level set, it can be
easily proved that almost every limit set $E_t$ has finitely many
singularity points. Then Theorem 8.6 in~\cite{bellettinimugnai}
provides an explicit formula for the relaxed energy of $E_t$, from
which an expression of $\OcF$ is easily deduced.
\end{remark}
%
%
\begin{theorem}\label{thm:equivalence}
Problems $(P_1)$ and $(P_2)$ are equivalent, i.e.
$$\min\{E_p(\gamma):\,\gamma\in{\cal D}_p\}=\min\{\OF(u):\, u=U_0\mbox{ on }\R^2\setminus\Omega\}$$
In addition, if $\gamma\in\Dp$ is a minimizer of $(P_1)$ then
$u_\gamma$ is a minimizer of $(P_2)$ and $\OF(u_\gamma)=E_p(\gamma)$. Conversely, if $u$ is a
minimizer of  $(P_2)$ then there exists an amodal completion
$\gamma_u$ such that $\gamma_u$ is a minimizer of $(P_1)$ and its associated function $u_\gamma$ coincides with $u$ almost everywhere. In addition, $\OF(u)=E_p(\gamma_u)$.
\end{theorem}
%
%
\begin{proof}
Let $u$ be a minimizer of $(P_2)$ and consider a sequence
$(u_h)_{h\in\N}$ of functions in $\Sp$ such that $u_h$ tends to
$u$ in $\lp{1}$ and $F_p(u_h)$ converges to $\OF(u)$. According to
Lemma~\ref{lemmasptod}, we can associate with each $u_h$ an amodal
completion $\gamma_h$ such that $F_p(u_h)=E_p(\gamma_h)$. Since
$\sup_{h\in\N}E_p(\gamma_h)<\infty$,  there exists by
Corollary~\ref{compacite-completion-amodale} a limit amodal
completion $\gamma$ such that $(\gamma_h)$ converges to $\gamma$
(in the sense of Corollary~\ref{compacite-completion-amodale}) and
$E_p(\gamma)\leq\liminf_{h\to\infty}E_p(\gamma)=\OF(u)$. If
follows that
$$\min\{E_p(\gamma):\,\gamma\in{\cal D}_p\}\leq\min\{\OF(u):\,
 u=U_0\mbox{ on }\R^2\setminus\Omega\}.$$

\medskip
Conversely, let $\gamma$ be a minimizer of $(P_1)$. By
Lemma~\ref{lemapprox}, for each $\epsilon>0$ there exists a
continuous $u_\epsilon\in\Sp$ such that
$|E_p(\gamma)-F_p(u_\epsilon)|\leq\epsilon$ and, in addition,
$u_\epsilon$ tends to $u_\gamma$ in $\lp{1}$ where $u_\gamma$ is
associated with $\gamma$ through Theorem~\ref{ctof}. If follows from the lower semicontinuity of $\OF$ that $\OF(u_\gamma)\leq E_p(\gamma)$
which proves that
$$\min\{E_p(\gamma):\,\gamma\in{\cal D}_p\}\geq\min\{\OF(u):\, u=U_0\mbox{ on }\R^2\setminus\Omega\}$$
thus
$$\min\{E_p(\gamma):\,\gamma\in{\cal D}_p\}=\min\{\OF(u):\, u=U_0\mbox{ on }\R^2\setminus\Omega\}.$$
In particular,  $\OF(u_\gamma)=\min\{\OF(u):\, u=U_0\mbox{ on
}\R^2\setminus\Omega\}=E_p(\gamma)$ and therefore $u_\gamma$ is a
minimizer of $(P_2)$.

\medskip
Take now again a minimizer $u$ of $(P_2)$.  Like above we may find
a sequence $(u_h)$ of functions in $\Sp$ and their associated
amodal completions $(\gamma_h)$ such that $u_h\to u$ in $\lp{1}$,
$\OF(u)=\lim_{h\to\infty}F_p(u_h)$ and $(\gamma_h)$ converges (in
the sense of Corollary~\ref{compacite-completion-amodale}) to a
limit amodal completion $\gamma$ such that
$E_p(\gamma)\leq\liminf_{h\to\infty}E_p(\gamma_h)$. Let $u_\gamma$
denote the function associated with $\gamma$ according to
Theorem~\ref{ctof}. It follows from the construction procedure of
Theorem~\ref{ctof} and the fact that all functions coincide with
$U_0$ on $\partial\Omega$ that for almost every $t\in\R$,
$\{u_h\geq t\}$ tends to $\{u_\gamma\geq t\}$ in $\lp{1}$.
Besides, since $(u_h)$ tends to $u$ in $\lp{1}$, by Cavalieri's
principle and possibly taking a subsequence, we also know that for
almost every $t\in\R$, $\{u_h\geq t\}$ tends to $\{u\geq t\}$ in
$\lp{1}$. By the argument of Step 2 in the proof of
Theorem~\ref{ctof},  $u$ and $u_\gamma$ coincide almost everywhere
on $\R^2$, and the theorem ensues. Remark in particular that, according to Theorem~\ref{ctof}, for almost every $t\in\Lambda$,
$$\bounds\{u\geq t\}\cap\overline \Omega=\bounds\{u\geq t\}\cap\overline \Omega\subset \bigcup_{x\in\cT_t}\gamma_u(x)\quad\mbox{up to $\hone$-negligible sets.}$$
and
$$\OF(u)=\OF(u_\gamma)=E_p(\gamma_u).$$
\end{proof}
%
%


\bibliography{parametric}   %>>>> bibliography data
\bibliographystyle{plain}
\end{document}

CHUTES:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Denoting as $n_{\partial\Omega}$ the unit outer normal on
$\partial\Omega$, we assume furthermore, possibly again up to a
deformation, that
\begin{enumerate}[(v)]
\item $\hone(\{x\in\partial\Omega:\,\nabla U_0(x)\cdot
n_{\partial\Omega}(x)\}=0)=0$;
\end{enumerate}
which means that the level lines of $U_0$ are supposed to arrive
``transversally'' on $\partial\Omega$.
\begin{definition}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{proof}
By definition of $\cT$, $|\tilde U_0'|$ does not vanish on
$\pi(\cT)$. Since $U_0$ is smooth, there are at most countably
many connected components of $\{x:\,|\nabla U_0|=0\}$. In
particular, there are at most countably many isolated singular
points, i.e. local extrema or saddle points. Recall now from the
proof of Lemma~?? that the occlusion $\Omega'$ to be removed is  a
lower level set $\{x:\,\delta_r(x)\leq\epsilon\}$ of the
distance-like function $\delta_r$ associated to the original
occlusion $\Omega$. By application of Fubini Theorem, we can
select $\Omega'$ in  Lemma~?? with the additional constraint that
no {\it isolated} singular point of $U_0$ belongs to
$\partial\Omega'$, which implies that the curves of $\gamma$
extend properly outside $\Omega'$. Thus we can find $\eta>0$ such
that $\Omega'':=\{x:\,\delta_r(x)\leq\epsilon+\eta\}$ is open and
simply connected, $\partial\Omega''$ is $\cont{\infty}$ and for
each $\lambda\in K$,
$\{U_0=\lambda\}\cap\overline{\Omega''\setminus\Omega'}$ is a
finite family of simple curves of class $\wpq{2}{p}$ whose
endpoints are on $\partial\Omega''$ and $\partial\Omega'$
respectively, and each curve intersects $\partial\Omega''$ {\it
only at one point}. Possibly removing a negligible set of levels,
it follows that the extended collection of curves coincides with
an amodal completion $\tilde\gamma$ defined on $\partial\Omega''$.
By definition of the energy it is easily seen that
$$E_p(\tilde\gamma)= E_p(\gamma)$$

In the following, we denote $\tilde\cT$ the set of T-junctions
associated with $\tilde\gamma$.  We will now slightly pertubate
$\tilde \gamma$ in order to get a family of curves that can be
associated with a continuous function in $\Omega''$ (it is clearly
already the case in $\Omega''\setminus\Omega'$). Intuitively, it
suffices to move the curves apart in order to remove
discontinuities. For this, first fix an origin $O\not\in\tilde\cT$
and an orientation on $\partial\Omega''$ -- it follows by a simple
application of property $(iii)$ in Lemma~?? that
$\tilde\cT\not=\partial\Omega''$ -- and we associate to each curve
$\tilde \gamma_x$ a positive real $s_x$ defined as the minimum of
the two geodesic distances on $\partial\Omega''$ between $O$ and
$\tilde \gamma_x(t_0)$, $\tilde \gamma_x(t_1)$ respectively (see
the notations in Definition~\ref{defidisocu0}). For all
$x\in\tilde\cT$, let $C_x$ denote the connected component of
$\overline{\Omega''}\setminus (\tilde \gamma_x)$ with smallest
measure (if both components have the same measure, we choose
arbitrarily one of them). We now consider the vector field $\Psi$
defined on $\bigcup_{x\in\tilde\cT}(\tilde \gamma_x)$ in the
following way: for every $x\in \tilde\cT$ and for every $y\in
(\tilde \gamma_x)$, $\Psi(y)$ is the unit vector normal to
$\gamma_x$ at $y$ and pointing towards $C_x$ (see
figure~\ref{fig:vector}) multiplied by $\ds\frac 1 {|C_x|}�
d(y,\{x:\,\delta_r(x)>\epsilon+\frac \eta 2\})$. Obviously, $\Psi$
needs not be continuous on $\tilde\cT$.
\begin{figure}[!htb]
\begin{center}
\parbox[t]{7cm}{
\gfigbox{7cm}{vector.eps}}
\end{center}\caption{Definition of the vector field whose associated flow moves the curves apart}
\label{fig:vector}
\end{figure}






 However there are at most
two points of discontinuity, corresponding to the endpoints $a$
and $b$ of some curve $\Gamma$ where $\Psi$ changes of direction.
$\Gamma$ either coincides with some curve $\tilde \gamma_x$ of the
amodal completion or is a limit curve of a sequence
$\tilde\gamma_{x_n}$ that strongly converges in $\cont{1}$. In the
following, we shall proceed independently with both subdomains
$\Omega''_1$ and $\Omega''_2$ of $\Omega''$ delimited by $\Gamma$.

We now embed the amodal completion $\tilde\gamma$ in $\R^3$ in the
following way~: for each $x\in\tilde\cT$, $(\tilde\gamma_x)$ is
mapped onto $(\tilde \gamma_x)�\{s_x\}$. The vector field $\Psi$
is also embedded in $\R^3$ by simply adding $0$ as third
component. For simplicity we keep denoting by $\Psi$ the resulting
vector field. Since for all $x,y\in\tilde\cT$,
$$\inf\{\|\alpha-\beta\|:\,\alpha\in(\tilde \gamma_x)�\{s_x\},\,\beta\in (\tilde\gamma_y)�\{s_y\}\}\geq |s_x-s_y|$$
it follows that $\Psi$ is continuous on ${\cal D}_1=\bigcup_{x\in
  \tilde\cT\cap\partial\Omega''_1}(\tilde\gamma_x)�\{s_x\}$ and ${\cal D}_2=\bigcup_{x\in
  \tilde\cT\cap\partial\Omega''_2}(\tilde\gamma_x)�\{s_x\}$ and can be
continuously extended to $\overline{\cal D}_1$ and $\overline{\cal
D}_2$ respectively. By Theorem~1 page 13 in~\cite{Evans}, $\Psi$
admits a continuous extension $\overline{\Psi}_1$ on $\Omega''_1$
and a continuous extension $\overline{\Psi}_2$ on $\Omega''_2$
that both vanish outside of
$\{x\in\R^2:\,\delta_r(x)\leq\epsilon+\frac \eta 2\}�\R$ and . For
each $\epsilon'>0$ we can find $\cont{\infty}$ vector fields
$\Psi^{\epsilon'}_1$ on $\Omega''_1$ and $\Psi^{\epsilon'}_2$ on
$\Omega''_2$ such that, for all $x\in{\cal
D}_1\cap\overline{\Omega}$,  respectively $x\in{\cal
D}_2\cap\overline{\Omega}$,
$|\Psi^{\epsilon'}_1(x)-\overline{\Psi}(x)|<\epsilon'$,
respectively
$|\Psi^{\epsilon'}_2(x)-\overline{\Psi}(x)|<\epsilon'$.  In
particular, $|\Psi^{\epsilon'}_i|>C(\epsilon')$ on ${\cal
D}_i\cap\overline{\Omega'}$,  $i=1,2$ with $C(\epsilon')$ some
positive constant that  converges to
$d(\Omega',\{x:\,\delta_r(x)>\epsilon+\frac \eta 2\})$ as
$\epsilon'$ tends to $0$.

We are now in position to move the initial curves apart by a
simple application of the differential equation in $\Omega''_i$:
$\dot x=\Psi^{\epsilon'}_i(x)$.  By the usual theory, this
equation yields a smooth one-to-one exponential map
$t\mapsto\exp(t\Psi^{\epsilon'}_i)$ for all $t>0$. Thus, for each
$x\in\tilde\cT_i:=\tilde\cT\cap\partial\Omega''_i$, $(\tilde
\gamma_x)�\{s_x\}$ is mapped onto a simple curve in $\R^3$, which
is a graph for $t$ small enough. Thus, ${\cal D}_i$ being
relatively compact, we can find $t_0$ such that for all $t<t_0$
and for all $x\in\tilde\cT_i$, $\exp(t\Psi^{\epsilon'}_i)[(\tilde
\gamma_x)�\{s_x\}]$ is a simple curve in $\R^3$ and also a graph.
By Lemma 9.7 and Theorem 9.8 in~\cite{Appell} we get that for all
$t<t_0$ and for all $x\in\tilde\cT_i$,
$\exp(t\Psi^{\epsilon'}_i)[(\tilde \gamma_x)�\{s_x\}]$ projects
onto a planar curve of class $\wpq{2}{p}(0,1)$ whose norm depends
continuously only on $t$, the $\cont{2}$ norm of
$\exp(t\Psi^{\epsilon'}_i)$ and $\|\tilde
\gamma_x\|_{\wpq{2}{p}}$. By the fact that for all $t<t_0$,
$\exp(t\Psi^{\epsilon'}_i)$ is a diffeomorphism on ${\cal
  D}_i\cap\overline{\Omega'}$, it follows that for all $x\in\tilde\cT_i$ and for all
$t<t_0$, denoting $\tilde{\tilde \gamma}_x$ the projection into
$\R^2$ of $\exp(t\Psi^{\epsilon'}_i)[(\tilde \gamma_x)�\{s_x\}]$,
$\ds\int_0^{{\cal L}(\tilde{\tilde
\gamma}_x)}(1+|\kappa|^p)d\hone$ depends continuously on
$\ds\int_0^{\cal{L}(\tilde \gamma_x)}(1+|\kappa|^p)d\hone$ and the
$\cont{2}$ norm of $\exp(t\Psi^{\epsilon'}_i)$ on ${\cal
D}_i\cap\overline{\Omega'}$ only. By definition of
$\Psi^{\epsilon'}_i$, the curves $\tilde{\tilde \gamma}_x$ do not
mutually intersect, at least for $t$ small enough and they
coincide with the original curves $\tilde\gamma_x$ on
$\Omega''\cap\{x\in\R^2:\,\delta_r(x)\geq \epsilon+\frac \eta 2\}$

Let $\alpha>0$. By integration on $\tilde\cT$, we conclude that we
can find some $t<t_0$ such that the modified amodal completion,
denoted as $\Hat\gamma$, verifies
$$|E_p(\Hat\gamma)-E_p(\gamma)|\leq\alpha$$

 Applying the construction process of Theorem~\ref{ctof}, $\Hat\gamma$
 can be associated with a continuous function $u_\alpha$ that belongs to the class $\Sp$ and satisfies $F_p(u_\alpha)=E_p(\Hat\gamma)$. The last
part ot the proposition is a straightforward consequence of our
construction  and of the Dominated Convergence Theorem.
\end{proof}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{lemma}\label{lemecart}
Let $(\gamma,\Omega,{\cal B})$ be an amodal completion such that
${\cal B}$ is compact and there exists $c>0$ for which
$|(T_x\partial\Omega,\gamma'_x(0))|\geq c$ for all $x\in{\cal B}$.
There exists a smooth vector field $V$ whose associated flow moves
the curves $\gamma_x$ apart from $\partial\Omega$, except at their
endpoints, and separates all curves $\gamma_x$, $\gamma_y$ having
a contact point.
\end{lemma}
\begin{proof}
Let $d_{\cal B}$ denote the (continuous) distance function to
${\cal B}$. Remark that, due to our assumption
$|(T_x\partial\Omega,\gamma'_x(0))|\geq c, \forall x\in{\cal B}$
and the non-crossing property of the amodal completion curves,
only $\gamma_x(0)$ and $\gamma_x(1)$ belong to ${\cal B}$. Thus,
if $\gamma_x$ intersect $\partial\Omega$ at another point $z$ then
necessarily $d_{\cal B}(z)>0$. Define on $\partial \Omega$ the
vector field $V_1(x)=d_{\cal B}(x)n(x)$ where $n(x)$ is the inner
normal to $\partial\Omega$ at $x$. According to Theorem~1 page 13
in~\cite{Evans}, we can extend continuously $V_1$ in $\Omega$.
Then we denote by $V_1^\varepsilon$ a $\cont{\infty}$ vector field
such that $|V_1-V_1^\varepsilon|<\varepsilon$ everywhere in
$\overline\Omega$. Let $\exp(tV_1^\varepsilon)$, $t>0$, be the
associated exponential map. By Lemma 9.7 and Theorem 9.8
in~\cite{Appell} we get that for all $t$ and for all $x\in{\cal
B}$, $\exp(tV_1^\varepsilon)(\gamma_x)$ is a curve of class
$\wpq{2}{p}(0,1)$ whose norm depends continuously only on $t$, the
$\cont{2}$ norm of $\exp(tV_1^\varepsilon)$ and
$\|\gamma_x\|_{\wpq{2}{p}}$. In addition, for all $t>0$,
$\exp(tV_1^\varepsilon)(\gamma_x)$ intersects $\partial\Omega$
only at $\gamma_x(0)$ and $\gamma_x(1)$.

Let $t>0$ and $\gamma^t_x=\exp(tV_1^\varepsilon)(\gamma_x)$. The
following procedure will separate curves that have an intersection
point.

\end{proof}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
