\graphicspath{{./figures/}}


\chapter[``Nonflat'' morphology]{Monotone image operators: ``nonflat'' morphology  \label{chapter14}}

\section{General form of monotone operator.}

\begin{th1}
Let $T$ be a monotone function operator defined of $\cal F$, invariant by translation and commuting with the addition of constant. There exists a family $\setF$ of functions of $\cal F$ such that
$$Tu(\fxx) = \sup_{f \in \cal F} \inf_{\fxy \in \real} u(\fxy) - f(\fxx - \fxy)$$
\end{th1}

\paragraph{Proof}
 We choose $\setF = \{ f \in {\cal F}, Tf(0) \geq 0 \}$
Then,
$$Tu(\fxx) \geq \lambda \Leftrightarrow \forall \epsilon>0, \; Tu(\fxx) \geq \lambda - \epsilon$$
$$ \Leftrightarrow \forall \epsilon>0, \; \tau_{-\fxx}(T(u - \lambda + \epsilon))(0) \geq 0$$
$$ \Leftrightarrow \forall \epsilon>0, \; T( \tau_{-\fxx}(u - \lambda + \epsilon))(0) \geq 0$$
$$ \Leftrightarrow \forall \epsilon>0, \; \tau_{-\fxx}(u - \lambda + \epsilon) \in \setF$$
$$ \Leftrightarrow \forall \epsilon>0, \exists v \in \setF, \; \inf_{\fxy} u(\fxy)-\lambda+\epsilon -v (\fxy-\fxx) \geq 0$$
($\Rightarrow$ is true by simply choosing $v=u-\lambda+\epsilon$. The converse implication is true due to the monotony of the operator $T$ and definition of $\setF$ which imply that if $u \geq v$ and $v \in \setF$ then $u \in \setF$.)
$$ \Leftrightarrow \forall \epsilon>0, \; \sup_{v \in \setF} \inf_{\fxy} u(\fxy)-\lambda+\epsilon -v (\fxy-\fxx) \geq 0$$
$$ \Leftrightarrow \sup_{v \in \setF} \inf_{\fxy} u(\fxy) -v (\fxy-\fxx) \geq \lambda$$
\endproof

\section{Asymptotic behavior of monotone operators}

The aim of this section is to study the asymptotic behavior of a monotone operator. More precisely we assume to have a base of functions $\setF$ and an operator $T$ defined by
$$T(u)(\fxx) = \inf_{f \in \setF} \sup_{\fxy \in \real^N} u(\fxy + \fxx) - f(\fxy).$$
We want first to define a local version of it $T_h$ and then to estimate
$T_h(u) -u$ when $h$ tends to 0.

\subsection{The rescaling issue}
As we have seen until now, the scale is related to the space by the following consideration:
assume that $u$ and $v$ are two functions such that $v(\fxx) = u(2\fxx)$. ($u$ corresponds somehow to a zoom of $v$). If we want to smooth the two images similarly we have to change the scale of the filter.
For contrast invariant filter, this is quite straightforward, the scale is directly and uniquely linked to the size of the structuring elements.
 E.g. if the filter is the median filter on a disk. The size of the disk (the scale) has to be chosen two times bigger for $u$ than for $v$.
For such filters, the down-scaling corresponds to a spatial shrinkage of the structuring elements.


For linear filter, (think the mean value to be simpler) the scaling was also straightforward. Indeed, the mean value on $u$ has to performed on a neighborhood two times larger than for $v$.
But in that case, this does not only mean a spatial shrinkage ! Indeed the kernel of the mean value on a disk of radius $h$ centered in $0$ is given by
$$\begin{array}{rll} g_h(\fxx) & = \frac{1}{\pi h^2} & \hbox{ for } |\fxx|\leq h \\
& = 0 & \hbox{otherwise} \end{array}$$
That is that the structuring element is scaled also in amplitude. Here the amplitude-scaling factor $h^{-2}$ is so that $\int_{\real} g_h = 1$ which was a assumption made for a linear smoothing.

As for the linear filter, at this point we can guess that an amplitude-scaling factor might be  needed  for a general monotone filter. So that the structuring elements, that is the functions of $\setF$ will be scaled as $f(\fxx) \rightarrow h^\beta f(\fxx)$, where $\beta$ is a real number which will be discussed later. (To be noted that is all that follow $h^\beta$ could be replace by a function of $\beta$).

We therefore define the scaled operator $T_h$ associated to $T$ by
\fb& T_h(u)(\fxx) = \inf_{f \in \setF} \sup_{\fxy \in \real^N} u(\fxx+\fxy) - h^\beta f(\fxy/h). \label{nonflatTh} \fe&


\subsection{Legendre Fenchel transform}
\begin{Defi}
Let $f$ be a function from $\real^N$ into $\bar{\real}$, we denote the Legendre conjugate of $f$ by $f^*: \real^N \rightarrow \bar{\real}$ defined by
$$ f^*(p)= \sup_{\fxx \in \real} ( p.\fxx - f(\fxx) )$$
\end{Defi}

Let us note that if $f$ is convex then the legendre transform is finite for every $p$.

\subsection{Asymptotic theorem, first order case}





\begin{lem} \label{lemmanonflatfirstorder}

Let $f$ be a function satisfying the following conditions: \newline
\fb& \exists C >0 \hbox{ and } \alpha > \max(\beta,1) \hbox{ such that }
\liminf_{|\fxx| \to \infty} \frac{f(\fxx)}{|\fxx|^\alpha} \geq C  \hbox{ and }  f(0) \leq 0 \label{conditionf} \fe&
Then, for any $C^1$ and bounded function $u$, if $\beta<2$:
$$
\sup_{\fxy \in \real^N}( u(\fxx+\fxy) - h^\beta f(\fxy/h)) - u(\fxx)  =
h^\beta f^*(h^{1-\beta} Du(\fxx)) +  O(h^{2(1-\frac{\beta-1 }{\alpha-1})})
$$

\noindent A interesting particular case is when $\beta=1$:
 $$\sup_{\fxy \in \real^N}( u(\fxx+\fxy) - h f( \fxy/h)) - u(\fxx)  =
h f^*(Du(\fxx)) +  O(h^2)
$$

\end{lem}


\paragraph{Proof} Without loss of generality we can choose $\fxx=0$ and $u(\fxx)=0$ so that
we are looking for an estimate of
$$ \sup_{\fxz \in \real^N} (u(\fxz) - h^\beta f(\fxz/h)) $$
when $h$ tends to $0$. Setting $\fxy= \fxz/h$, we have,
$$ \sup_{\fxz \in \real^N} (u(\fxz) - h^\beta f(\fxz/h))  =
\sup_{\fxy \in \real^N} (u(h \fxy) - h^\beta f(\fxy))$$
Let us first prove that we can discard from the preceding sup the $\fxy$
that goes too fast toward $\infty$ as $h$ tends to $0$.
We consider the subset $S_h$ of $\real^N$ of the $\fxy$ such that
$$ u(h \fxy) - h^\beta f(\fxy) \geq u(0) - h^\beta f(0)  \geq 0.$$
We obviously have
$$ \sup_{\fxy \in \real^N} (u(h \fxy) - h^\beta f(\fxy)) = \sup_{\fxy \in S_h} (u(h \fxy) - h^\beta f(\fxy)).$$
Since $u$ is bounded, we have $\forall \fxy \in S_h$,
$ f(\fxy) \leq C_1 h^{-\beta}$ for some constant $C_1$ depending only on $||u||_\infty$.
Assume that there exists $\fxy_h \in S_h$ tending to $\infty$ as $h$ tends to zero.
For $h$ small enough, condition (\ref{conditionf}) gives $f(\fxy_h) \geq C |\fxy_h|^\alpha$,
which combined with the preceding inequality yields
$ |\fxy_h| \leq C_2 h^{-\beta/\alpha}.$
Such a bound holds if $\fxy_h \in S_h$ is bounded, so that we have
$$\forall y \in S_h,  |\fxy| \leq C_2 h^{-\beta/\alpha}$$

As consequence, $\forall y \in S_h$ we have $|h \fxy| = o(1)$ and we can do an
expansion of $u$ around $0$, so that  $$\sup_{\fxy \in \real^N} (u(h \fxy) - h^\beta f(\fxy))= \sup_{\fxy \in S_h} (h Du(0).\fxy - h^\beta f(\fxy) + O(h^2|\fxy|^2))$$
We can now find finer bound for the set $S_h$ repeating the same argument.
$\forall \fxy \in S_h$ we have,
$$ h p.\fxy -h^\beta f(\fxy) + O(h^2\fxy^2) \geq 0 $$
which yields
$$ |p| \geq h^{\beta-1} f(\fxy)/|\fxy| + O(h|\fxy|) $$
Assume that $\fxy_h \in S_h$, satisfying the preceding inequation, tends to $\infty$ when $h$ tends to 0, then by (\ref{conditionf}),
we obtain $|\fxy_h|= O(h^{-\frac{\beta-1 }{\alpha-1}})$. Once again, if $\fxy_h$ is bounded this estimate holds. So we have
$$\sup_{\fxy \in \real^N} (u(h \fxy) - h^\beta f(\fxy)) =  h^\beta ( \sup_{\fxy \in S_h} ( h^{1-\beta} p.\fxy - f(\fxy)   + O(h^{2(1-\frac{\beta-1 }{\alpha-1})-\beta}) ) )$$ $$ =  h^\beta ( \sup_{\fxy \in \real^N} ( h^{1-\beta} p.\fxy - f(\fxy) )  + O(h^{2(1-\frac{\beta-1 }{\alpha-1})}) ) = h^\beta ( f^*(h^{1-\beta}p)) +  O(h^{2(1-\frac{\beta-1 }{\alpha-1})}) $$
It is easily checked that
$O(h^{2(1-\frac{\beta-1 }{\alpha-1})}) = o(h^\beta)$ for all $\beta<2$.
\endproof



\begin{th1} \label{firstordernonflattheorem} Let $\setF$ be a family of functions, all satisfying the condition (\ref{conditionf})
with a constant $C$ non dependant on the choice of a function within the family.
Let $T_h$ be the rescaled operator associated with the family $\setF$ and with a rescaling
parameter $\beta$ equal to 1.
Then for all $C^1$ and bounded function $u$ we have:
$$\frac{(T_h(u) -u)(\fxx)}{h} = H_1(Du(\fxx)) +  o(1)$$
where
$$H_1(p) = \inf_{f\in \setF} f^*(p)$$
\end{th1}

\subsection{Second order case - some heuristics.}

Theorem \ref{firstordernonflattheorem} gives the first order possible
 behavior of a non-flat monotone operator. Question occurs on what happens
if this first order term is 0, that is if $H_1(p)=0$ for all $p$. In that case, it is
necessary to push the expansion to the second order:

We have with $p=Du(0)$ and $A=D^2u(0)/2$,
$$\sup_{\fxy \in \real^N} u(h \fxy) - h^\beta f(\fxy) =   \sup_{\fxy \in \real^N} h p.\fxy + h^2 A \fxy.\fxy - h^\beta f(\fxy) + O(|h\fxy|^3)$$
Since this last expression is increasing with respect to $A$ it is then expected that the left side of the equality converges when $h$ tends to 0, to some function $F(A,p)$ where $F$ is non decreasing with respect to A.
As consequence, among second order operator only elliptic operator can be obtained as the asymptotical limit of a general monotone operator.



\section[Image enhancement]{Application to image enhancement: Kramer's operators and the Rudin-Osher shock filter}

In \cite{Kramer:1975:INL}, Kramer defines a filter for sharpening blurred images. The filter replaces the gray
level value at a point by either the minimum or the maximum of the gray level values in a neighborhood.
This choice depending on which is the closiest to the current value.

In \cite{Rudin-Osher}, Rudin and Osher proposes to shapen blurred images by applying the following equation:
$$ \frac{\partial u}{\partial t} = \sgn(\Delta u) |Du| $$

As, we will see in the following section, this two filters are asymptotically the same in 1D, but differs in 2D.
The first one yields to the Canny differential operator for edge detection (sign of
$D^u(Du,Du)$), while the second explicitely uses the sign of the laplacian.

\subsection{The Kramer operator.}



This filter can be seen as a conditional erosion or dilation and an easy link can be made with the
``shock filters'' \cite{?}. A finer version of it, is proposed in \cite{Schavemaker:1999:ISM} and proceed as follow:
Let $q(\fxx)= \fxx^2/2$, and $\setF^+ = \{ q \}$. Set $T_h^+$  the rescaled, (with $\beta=1$), non-flat operator associated with the structuring elements set $\setF^+$ and $T_h^-$ its dual operator. We have
$$(T_h^+ u)(\fxx) = \sup_{\fxy \in \real^N} u(\fxy) - h q((\fxx-\fxy)/h) = \sup_{\fxy \in \real^N} u(\fxy) - \frac{(\fxx-\fxy)^2}{2h}$$
$$(T_h^- u)(\fxx) = \inf_{\fxy \in \real^N} u(\fxy) - h q((\fxx-\fxy)/h) = \inf_{\fxy \in \real^N} u(\fxy) + \frac{(\fxx-\fxy)^2}{2h}$$
The Shock filter $T_h$ is then defined by
\fb& (T_h u)(\fxx) = \left\{
\begin{array}{ll}
 (T_h^+ u)(\fxx) & \hbox{ if } (T_h^+ u)(\fxx) -u(\fxx) < u(\fxx) - (T_h^- u)(\fxx) \\ \\
 (T_h^- u)(\fxx) & \hbox{ if } (T_h^+ u)(\fxx) -u(\fxx) > u(\fxx) - (T_h^- u)(\fxx) \\ \\
 u(\fxx) & \hbox{ otherwise }
\end{array} \right. \label{krameroperator}
\fe&

The figure \ref{PPKRAMER} illustrates the action of such an operator. In order to understand
mathematically the action of $T_h$, let us examine its asymptotical behaviour. The following exercise
proposes to apply Theorem \ref{firstordernonflattheorem} to get the asymptotic of $T_h^+$ and $T_h^-$. It will however not permit
to conclude for $T_h$, this is done in the next proposition.

\begin{Exercice} \label{exercicekramer}
1. Check that $\forall u$ and $\forall \fxx$:
$$ T_h^-u(\fxx) \leq u(\fxx) \leq T_h^+u(\fxx)$$
2. Using Lemma \ref{lemmanonflatfirstorder} Show that $q^*(p) = q(p)$ and that $\forall \fxx$ where $u$ is $C^2$:
$$ (T_h^+ u) (\fxx) - u(\fxx) = h |Du(\fxx)|^2/2 + O(h^2) \hbox{ and } $$
$$ (T_h^- u) (\fxx) - u(\fxx) = - h |Du(\fxx)|^2/2 + O(h^2) $$
So that
$$ \lim_{h \rightarrow 0} \frac{(T_h u)(\fxx) - u(\fxx)}{h} = \pm |Du(\fxx)|^2/2 $$

At this step, we remark that the differences $(T_h^+ u) (\fxx) - u(\fxx)$ and $u(\fxx) - (T_h^- u)$
are equal at the first order, and therefore the choice will be made based on second order estimates on $u$.
\end{Exercice}

\begin{figure}[!ht]
\begin{center}
\begin{tabular}{cc}
\epsfxsize=7cm \epsfbox{victor2.ps} & \epsfxsize=7cm
\epsfbox{blur.ps} \\
 \epsfxsize=7cm
\epsfbox{kram2.ps} &
 \epsfxsize=7cm
\epsfbox{Osh2.ps} \\

\end{tabular}
\begin{tabular}{ccc}
\epsfxsize=4.5cm \epsfbox{Cvic.ps} & \epsfxsize=4.5cm \epsfbox{Ckram2.ps} & \epsfxsize=4.5cm \epsfbox{COsh2.ps}
\end{tabular}
\end{center}
\label{PPOSHKRAMER} \caption[Shock Filter implemented by using non flat morphogical filters.]{Shock Filter implemented
by using  non flat morphogical filters. Top, left :original image, right: blurred image using Heat Equation,
Middle-left: two iterations of the kramer filter, Middle-right: two iterations of the Rudin-Osher filter. The scale
parameter is chosen such that the parabola
 passes the range of the image at a distance of 6 pixels.
Down: zoom version of a detail, left: original image, middle: kramer filter, right: Rudin-Osher filter. We see a
tendancy of this last to smooth shapes toward circles. }
%%  kramer in out 0.5 2
\end{figure}


\begin{pro}
Let $T_h$ be the ``Kramer'' operator (given by \ref{krameroperator}), one has for any function $u \in C^3$,
$$
 \lim_{h \rightarrow 0} \frac{(T_h u) - u}{h} = \frac{1}{2} sgn(D^2 u(Du, Du))\; |Du(\fxx)|^2
$$
\end{pro}

\paragraph{Proof}
According to Exercise \ref{exercicekramer}, one has to push the asymptotic of $T_h^+$ and $T_h^-$ to the second order.
We have
$$ T^+_h(u)(\fxx) = \sup_{\fxy \in \real^N} u(\fxy) - \frac{(\fxx-\fxy)^2}{2h} \qquad \hbox{and } T^-_h(u)(\fxx) = \inf_{\fxy \in \real^N} u(\fxy) + \frac{(\fxx-\fxy)^2}{2h}$$
Since $T^+_h$ and $T^-_h$ are translation invariant, we can limit our study at $\fxx=0$. Moreover, since $u$ is bounded, we can limit the sup to the $\fxy \in B(0,h)$.
If $u$ is $C^3$ at point $0$, we can set $u(\fxy) = u(0) + \fxp.\fxy + A(\fxy, \fxy) + o(\fxy)^2$
So that,
$$ T^+_h(u)(0) -u(0) = \sup_{\fxy \in B(0,h)} u(\fxy) - \frac{|\fxy|^2}{2h} -u(0) =  \sup_{\fxy \in B(0,h)}
(\fxp.\fxy + A(\fxy, \fxy) - \frac{|\fxy|^2}{2h} +o(h)^2$$
Set $Q_h(\fxy) = 2h \fxp.\fxy + (2h A-Id)(\fxy, \fxy)$, so that we have $$T_h = \sup_{\fxy \in B(0,h)} (Q_h(\fxy)/(2h)) + o(h)^2$$
For $h$ small enough $B_h= Id - 2h A$ is positive and inversible. Therefore, the sup of $Q_h$ over the $\fxy$ exists, and is achieved for $\fxy_h$ such that
$$ 2h \fxp + 2 B \fxy_h = 0 \Rightarrow \fxy_h = - h B^{-1}(\fxp)$$
Thus,
$$
 T^+_h(u)(0) -u(0) = \frac{h}{2} (Id - 2h A)^{-1}(\fxp, \fxp) + o(h^2)
= \frac{h}{2} (Id + 2h A) (\fxp, \fxp) + o(h^2)
$$
We conclude that
\fb&
 T^+_h(u)(0) -u(0) = \frac{h}{2} |\fxp|^2 + h^2 A(\fxp, \fxp) +o(h^2)
\fe&
Similarly,
\fb&
 T^-_h(u)(0) -u(0) = \frac{h}{2} |\fxp|^2 - h^2 A(\fxp, \fxp) +o(h^2)
\fe&
From these two last equalities we deduce that
\fb&
( (T_h^+ u)(\fxx) -u(\fxx)) - (u(\fxx) - (T_h^- u)(\fxx)) = h^2 (D^2u(\fxx))(Du(\fxx), Du(\fxx)) +o(h^2)
\fe&
We therefore have
$$
T_h(u)(\fxx) -u(\fxx) = |Du(\fxx)|^2 \; sgn(\; D^2u(\fxx)\; (Du(\fxx), Du(\fxx))\;) +o(h)
$$
\endproof

Let us remark that if $u$ is a 1D function, then $sgn(D^u(Du,Du))$ coincides with the sign of the laplacian. That is that the Kramer operator corresponds, in 1D, asymptoticaly the Rudin Osher shock filter.


\subsection{The Rudin Osher Shock Filter.}

Let us simply define a scheme that yields asymptoticaly the Rudin Osher shock filter equation.

Let $B_h$ be a disk of radius $h$ centered at 0. Let $Mean$ be the mean value on the disk $B_h$.
 We define the operator $T_h$ by:
$$\begin{array}{cccc}
T_h u(\fxx) & = & min_{\fxy \in B_h} u(\fxx+\fxy) & \hbox{ if } Mean(u)(\fxx)
> u(\fxx) \\
& = &  max_{\fxy \in B_h} u(\fxx+\fxy) & \hbox{ if } Mean(u)(\fxx) < u(\fxx) \\
& = & u(\fxx) &\hbox{ otherwise}
\end{array}
$$

\begin{Exercice}
Prove that
$$\lim_{h \rightarrow 0} T_h u -u = \sgn(\Delta u) |Du|$$
\end{Exercice}


\section[Approximation of parabolic PDEs]{Can we approximate a parabolic PDE by the iterations of a monotone image operator ?}

\subsection{Approximation of first order equation.}

Let us address the converse of theorem \ref{firstordernonflattheorem}: being given the function $G$ is it possible
to construct a scaled familly of structuring elements such that the associated scale space $T_h$ satisfies
$$T_h u - u = h G(Du)  + O(h^2) ?$$


As we shall see, the main difficulty stands in the localization of the structuring elements when the scale tends to 0. In all the following, we work
with the scaling parameter $\beta$ equal to 1.

\begin{th1} \label{nonflatrec1} Let $G$ be a convex function, such that $G^*$ satisfies condition \ref{conditionf}, then choosing
$\setF_h= \{ h G^*(\fxx/h) \}$ one has for the operator $T_h$ associated to $\setF_h$ and for any function $u \in C^3$,
$ (T_h u - u)(\fxx) = h G(Du(\fxx))  + O(h^2)$
\end{th1}
\paragraph{Proof}
This is a imediat consequence of Lemma \ref{lemmanonflatfirstorder} and of the fact that if a function $G$ is convex then $G^{**} = G$. An example of such function $G$ is $G(\fxx) = |\fxx|^2$.  \endproof

When $G$ is non convex, then exhibiting a function $M$ such that $M^*=G$ is non straighforward. It is better to consider $G$ as
the infimum of a familly of convex functions $\{g_q\}_q$.


\begin{th1} \label{nonflatrec2}  Let $G$ be a function being the infimum of a familly of convex functions $\{g_q\}_q$, such that for all $q$, $g_q^*$ satisfies the condition \ref{conditionf}, then choosing
$\setF_h= \{ h g_q^*(\fxx/h) \}$ one has for the operator $T_h$ associated to $\setF_h$ and for any function $u \in C^3$,
$ (T_h u - u)(\fxx) = h G(Du(\fxx))  + O(h^2)$
\end{th1}
Note also that for negative function $G$, the same result work by switching the sup and the inf in the definition of the operator $T_h$.

\paragraph{Proof} The proof of Theorem \ref{nonflatrec2} is a straighforward consequence of Theorem \ref{firstordernonflattheorem}. \endproof

\noindent Examples of functions $G$ that fit the hypothesis of the theorem \ref{nonflatrec2} are the positive and Lipschitz functions. Indeed, if $G$ is K-Lipschitz then setting for $q \in \real^N$,
$$ g_q(\fxx) =  G(q) + K|\fxx-q| $$
We obviously have $G(\fxx) = inf_{q \in \real^N} g_q(\fxx)$. And,
$$g_q^*(p) = \left\{ \begin{array}{ll} pq - G(q) & if |p|\leq K \\
+\infty & otherwise \end{array} \right.$$
So that $g_q^*(p)$ satisfies the condition \ref{conditionf}.

\begin{remark}
However, the hypotheses of Theorem \ref{nonflatrec2} do not permit to construct any function $G$. The main issue is in fact the condition \ref{conditionf}, which localizes the filter
when $h>0$ tends to 0, in the theorem \ref{firstordernonflattheorem}.

Fr\'ed\'eric Cao proposes in \cite{Cao:1998:PDE} a way to avoid such an issue for any positive l.s.c function $G$. His idea is to define
a two scales family of structuring elements.
He first set
$$g_q(p) = \left\{ \begin{array}{ll} G(q) & if p=q \\
+\infty & otherwise \end{array} \right.$$
It is then obvious that $G(p)=\inf_{q\in \real^N} g_q(p)$. He then set
$f_q(\fxx) = (g_q^*)(\fxx) = -G(q) + q\fxx$ and $\setF_h = \{ f_{q,h}, q \in \real^N \}$ where, for a $\alpha \in ]1/2, 1[$,
$$f_{q,h}(\fxx) = \left\{ \begin{array}{ll} - hG(q) + q\fxx & \hbox{ if } \fxx \in B(0,h^\alpha)
\\ +\infty & \hbox{ elsewhere } \end{array} \right.
$$

The familly $\setF_h$ is not a rescaling of the familly $\setF_1$. There is indeed, two scales: the explicit one $h$, and an implicit one, $h^\alpha$ since the functions
of $\setF_h$ are truncated outside a ball of radius $h^\alpha$. This truncature localizes the corresponding operator
$T_h$ and makes the result of theorem \ref{firstordernonflattheorem} true, even if the functions of $\setF_h$ do not satisfy the condition
\ref{conditionf}.
\end{remark}

\subsection{Approximation of some second order equation.}

Let us start with a simple remark. Set $f_q(\fxx) = q \fxx$, $ \forall \fxx$ in $B(0,h)$ and
$f_q(\fxx) = +\infty$ otherwise. By an imediat consequence of the Taylor expansion we have
$$ q = Du(0) \Leftrightarrow \sup_{\fxx \in \real^N} u(\fxx) - f_q(\fxx) = O(h^2)$$
$$ q \neq Du(0)  \Leftrightarrow \sup_{\fxx \in \real^N} u(\fxx) - f_q(\fxx) > C(q,u) h $$
This indicates that a way to get second order operator is to choose the familly of functions $\setF$ so that $\forall f\in \setF$ and $\forall q \in \real^N$ one has
$f+q\fxx \in \setF$.



\paragraph{The Heat Equation as the asymptotic of a non-flat morphological operator.}

\begin{lem}
Let $A$ be in $SM(\real^N)$ (set of the $N\times N$ symmetric matrices). Then,
\fb& Tr(A) = N \inf_{Q \in SM(\real^N), Tr(Q)=0} \sup_{\fxx, |\fxx| = 1 } (A - Q)(\fxx,\fxx)\fe&
\end{lem}

\paragraph{Proof}
We know that, since $A$ and $Q$ are symmetric,
$ \sup_{\fxx, |\fxx| = 1 } (A - Q)(\fxx,\fxx)$ is the largest eigenvalue of $A-Q$.
As consequence $\forall Q \in SM(\real^N)$, N$\sup_{\fxx, |\fxx| = 1 } (A - Q)(\fxx,\fxx) \geq Tr(A-Q) =  Tr(A)$.
Thus
$$ N \inf_{Q \in SM(\real^2), Tr(Q)=0} \sup_{\fxx, |\fxx| = 1 } (A - Q)(\fxx,\fxx) \geq Tr(A).$$
Choosing $Q$ diagonalizable in the same base that diagonalizes $A$, and denoting by $\lambda_1 \leq  ... \leq \lambda_N$ (resp. $q_1$, ..., $q_N$) the eigenvalues of $A$, (resp. of $Q$), we have
$$\sup_{\fxx, |\fxx| = 1 } (A - Q)(\fxx,\fxx) = \hbox{max}\{\lambda_1+q_1, ..., \lambda_N+q_N\}$$
So that
$$\inf_{Q \in SM(\real^2), Tr(Q)=0} \sup_{\fxx, |\fxx| = 1 } (A - Q)(\fxx,\fxx)$$ $$ \leq \inf_{\{q_1, ..., q_N\}, q_1+...+q_N=0 } \hbox{max}\{\lambda_1+q_1, ..., \lambda_N+q_N\}
= (\lambda_1+...+\lambda_N)/N$$
\endproof

\begin{lem}
We set for $p \in \real^N$, $Q \in SM(\real^N)$, and $h>0$,
$$\begin{array}{lll} f_{p,Q,h}(\fxx) & =  p\fxx +  Q(\fxx,\fxx) &\hbox{ if } \fxx \in B(0,h) \\& = -\infty &\hbox{ otherwise } \end{array}$$
We then set $\setF_h=  \{ f_{p,Q,h} ; \hbox{with } Q \in SM(\real^N) ; Tr(Q) = 0 \hbox{ and } p \in \real^N \}$ which is to say that $\setF_h$ is made of the truncature around zero of all quadratic forms whose trace is zero.
With $T_h(u)(\fxx) = \inf_{f \in \setF_h} \sup_{\fxy \in \real^N} u(\fxx+\fxy) - f(\fxy)$, one has for any $u \in C^3$,
$$ T_h(u)(\fxx) - u(\fxx) = \frac{1}{2N} h^2 \Delta u(\fxx) +o(h^2)$$
\end{lem}

\paragraph{Proof}
We make the proof at point $\fxx=0$, we set $A=\frac{1}{2}D^2u(0)$. We have
$$T_h(u)(0) - u(0) = \inf_{p \in \real^N, Q \in SM(\real^N); Tr(Q) = 0} \sup_{\fxy \in B(0,h)}
u(\fxy) -u(0) - p\fxy - Q(\fxy,\fxy)$$
$$ = \inf_{p, Q} \sup_{\fxy \in B(0,1)} u(h\fxy) -u(0) -hp\fxy -h^2Q(\fxy,\fxy)$$
$$ = \inf_{p, Q}  \sup_{\fxy \in B(0,1)}  h (Du(0)-p)\fxy - h^2(A -Q)(\fxy,\fxy) +o(h^2)$$
$$ = h^2 \inf_{Q \in SM(\real^N); Tr(Q) =0}  \sup_{\fxy \in B(0,1)} (A-Q)(\fxy,\fxy) = \frac{1}{N} h^2 Tr(A)$$
\endproof

\ifodd\count0
    \clearpage
    \leavevmode
    \thispagestyle{empty}
    \clearpage
\else\relax \fi
