%gmChap10.tex.

\graphicspath{{./figures/}}

\begin{slide}
\section[Asymptotic Behavior of Contrast-Invariant Operators in
${\mathbb R^2}$]{Asymptotic Behavior of Contrast-Invariant
Isotropic Operators, Dimension Two}

We are going to study the monotone contrast invariant operators
under the inf-sup form   defined by
\begin{equation}
Tu(\fxx)=\inf_{B\in\mathcal B} \sup_{\fxy\in\fxx+ B}u(\fxy),
\end{equation}
where $\mathcal B$ is a given  set of structuring elements.



\end{slide}
\begin{slide}


We assume that the set of structuring elements $\mathcal B$ is
bounded and isotropic. Define the scaled operators $T_h$ by
\[
T_hu(\fxx)=\inf_{B\in\mathcal B} \sup_{\fxy\in\fxx+ hB}u(\fxy).
\]
We will prove that in the limit, as $h$ tends to zero, the action
of $T_h$ on smooth functions is not as varied as one might expect
given the possible sets of structuring elements.   As an example,
we will show that if $T_h$ is a scaled median operator, then
\[
T_hu(\fxx)-u(\fxx)=h^2C|Du(\fxx)|{\rm curv}(u)(\fxx)+o(h^2),
\]
where the constant $C$ depends only on the function $k$ used  to
define the median operator. Thus, the operator $|Du|{\rm curv}(u)$
plays the same role for a class of contrast-invariant operators as
the Laplacian $\Delta u$ does for linear operators.


\end{slide}
\begin{slide}


\section{Asymptotic behavior theorem in $\mathbb R^2$}

Let $T$ be a monotone contrast invariant (and therefore an inf-sup
operator)) generated by a set of structuring elements $\mathcal B$
that is bounded and isotropic, and define the function $H(s)$,
$s\in\RR$, by
\begin{equation}\label{eq113}
H(s)=T[x+s y^2](0),
\end{equation}
where $T[x+s y^2]$ denotes ``$Tu$ with $u(x,y)=x+s y^2$.'' We also
note the following relations for $0<h\leq1$:
\begin{equation}\label{eq115}
T_h[x+s y^2](0)=hT[x+hs y^2](0)=hH(hs),
\end{equation}
\begin{equation}\label{eq116}
T_h[x](0)=hT[x](0)=hH(0)
\end{equation}


\end{slide}
\begin{slide}


\begin{theorem}Let $\mathcal B$ be a set of structuring elements that is invariant under the group of linear isometries of $\RR^2$ and assume that $\mathcal B$ is bounded by $M$. Define the operator $T$ by $Tu(\fxx)=\inf_{B\in\mathcal B} \sup_{\fxy\in\fxx+ B}u(\fxy)$, and define the scaled operators $T_h$, $0<h\leq1$, by $T_hu(\fxx)=\inf_{B\in\mathcal B} \sup_{\fxy\in\fxx+ hB}u(\fxy)$. Then, for any $C^2$ function $u:\RR^2\to\RR$,
\[
T_hu(\fxx)-u(\fxx)=hT[\rm{x} ](0)|Du(\fxx)|+O(h^2).
\]
 \end{theorem}


\end{slide}
\begin{slide}


\begin{proof}
The invariance of $\mathcal B$ under the action of  linear
isometries implies   that all of the $T_h$ are invariant under
rotations. Now suppose that $p=|Du(\fxx)|>0$. Then by a suitable
rotation, we may assume that $Du(\fxx)=(|Du(\fxx)|,0)$, and  the
first-order expansion of $u$ in a neighborhood of $\fxx$ can be
written as
\begin{equation}\label{eq117}
u(\fxx+\fxy)=u(\fxx)+px+O(\fxx,|\fxy|^2),
\end{equation}
where $\fxy=(x,y) \in D(0,M)$. Hence,
\begin{equation}\label{eq117a}
u(\fxx+h\fxy)-u(\fxx)\leq phx +Ch^2|\fxy|^2\quad\text{and}\quad phx\leq u(\fxx+h\fxy)-u(\fxx)+Ch^2|\fxy|^2
\end{equation}
for all $\fxy\in D(0,M)$.



\end{slide}
\begin{slide}


\subsection{The asymptotic behavior of $T_{h}$ when $ T[ x ]( 0 ) = 0$}

If $T[x](0)=0$,  then Theorem 10.1 is true but not very
interesting. On the other hand, operators for which $T[x](0)=0$
are interesting. If we consider $Tu(\fxx)$ to be a kind of average
of the values of $u$ in a neighborhood of $\fxx$, then assuming
that $T[x](0)=0$ makes sense and leads to interesting results.
This means, however, that we must consider the next term in the
expansion of $T_hu$; to do so we need to assume that $u$ is $C^3$.


\end{slide}
\begin{slide}


\begin{theorem}Let $\mathcal B$ be a set of  structuring elements that is isometric and
 bounded, and let $M$ denote the bound. Define the operator
 $T$ by $Tu(\fxx)=\inf_{B\in\mathcal B} \sup_{\fxy\in\fxx+ B}u(\fxy)$,
  and define the scaled operator $T_h$, $0<h\leq1$, by
   $T_hu(\fxx)=\inf_{B\in\mathcal B} \sup_{\fxy\in\fxx+ hB}u(\fxy)$.
   Also assume that $T[x](0)=0$.
   Then for any $C^3$ function $u:\RR^2\to\RR$ $:$
  \[
T_hu(\fxx)-u(\fxx)=h|Du(\fxx)|H\Big(\frac1{2}h\;{\rm
curv}(u)(\fxx)\Big)+O(h^3)
\]
 \end{theorem}

\end{slide}
\begin{slide}


\begin{figure}[!t]
\setkeys{Gin}{width=6cm} \centerline{
\includegraphics{fig10.03.1.eps}
}
\caption{\label{f113}When $s$ is small, the parabola $P(s)$ with equation $x+ sy^2 = m$ divides $D(0,1)$ into two components. The median value $m(s)$ of $x+ sy^2$ on $D(0,1)$ simply is the value $m$ for which these
two components have equal area.}
\end{figure}

\end{slide}
\section{Median filters and curvature motion in $\mathbb R^2$}

Everything is now  in place to investigate the asymptotic behavior
of the scaled median filter $\fcnM_{k_h}$,  which is represented
by
\[
\fcnM_{k_h}u(\fxx)=\inf_{B\in h\mathcal B}\sup_{\fxy\in\fxx+B}u(\fxy),
\]
where  $h\mathcal B=\{B\mid |B|_{k_h}=1/2, B\subset D(0,h)\}$.


\end{slide}
\begin{slide}




\begin{lemma}
\[
\fcnM_k[x+s y^2](0)=\frac{s }{3}+O(|s|^3).
\]
\end{lemma}


\end{slide}

\begin{slide}



\begin{theorem}If $u:\RR^2\to\RR$ is $C^2$, then we have the following expansions:
\begin{enumerate}%[$(i)$]\setlength\itemsep{2pt}
\item On every compact set $K\subset\{\fxx\mid Du(\fxx)\not=0\}$,
\[
\fcnM_{k_h}u(\fxx)=u(\fxx)+\frac1{6}|Du(\fxx)|{\rm curv}(u)(\fxx)h^2+O(\fxx,h^3),
\]
where $|O(\fxx,h^3)|\leq C_Kh^3$ for some constant $C_K$ that depends only on $u$ and $K$.
\item On every compact set $K$ in $\RR^2$,
\[
|\fcnM_{k_h}u(\fxx)-u(\fxx)|\leq \frac{1}{2}\|D^2u(\fxx)\|h^2+C_Kh^3
\]
where the constant $C_K$ depends only on $u$ and $K$.
\end{enumerate}
\end{theorem}


\end{slide}

\begin{slide}


Our second example is called the Catt\'e--Dibos scheme.
\begin{theorem}Let $\mathcal B$ be the set of all line segments of length 2 centered at the origin of $\RR^2$. Define the operators $SI_h$ and $IS_h$ by
\[
SI_hu(\fxx)=\sup_{B\in h\mathcal B}\inf_{\fxy\in\fxx+B}u(\fxy)\quad\quad\text{and}\quad\quad IS_hu(\fxx)=\inf_{B\in h\mathcal B}\sup_{\fxy\in\fxx+B}u(\fxy).
\]
If $u:\RR^2\to\RR$ is $C^2$ and $|Du(\fxx)|\not=0$, then
\[
\frac1{2}(IS_h+SI_h)u(\fxx)=u(\fxx)+h^2\frac{1}{4}{\rm curv}(u)(\fxx)|Du(\fxx)|+O(h^3).
\]
\end{theorem}

\end{slide}
\begin{slide}



\begin{figure}[!t]
\setkeys{Gin}{width=8cm}
\centerline{
\includegraphics{fig10.01.1.eps}
}
\caption[Erosion and motion of level lines]{\label{f111}The result of smoothing with an erosion is independent of the curvature of the level lines. Left: image of a simple shape. Right: difference of this image and  its eroded image. Note that the width of the difference is constant.}
\end{figure}

\end{slide}


\begin{figure}[!t]
\setkeys{Gin}{width=8cm}
\centerline{
\includegraphics{fig10.02.1.eps}
}
\caption[Median filter and the curvature of level lines]{\label{f112}Median filter and the curvature of level lines. Smoothing with a median filter is related to the curvature of the level lines. Left: image of a simple
shape. Right: difference of this image with itself after it has been smoothed by one iteration of the median filter. We see, in black, the points which have changed. The width of the difference is proportional to the
curvature, as indicated by Theorem 10.4.}
\end{figure}

\begin{figure}[!ht]
\setkeys{Gin}{width=12cm}
\centerline{
\includegraphics{fig10.04.1.eps}
}
\caption[Fixed point property of the digital median filter]{\label{f114}
Fixed point property of the median filter, showing its grid-dependence.
Left: original image. Right: result of 46 iterations of the median filter with a radius of 2. The resulting image turns out to be a fixed point of this median filter. This is not in agreement with Theorem 10.4, which shows that median filters move images by their curvature: The image on the right clearly has nonzero curvatures!  However, the discrete median filter that we have applied here operating on a discrete image is grid-dependent and blind to small curvatures.}
\end{figure}

\begin{figure}[!ht]
\setkeys{Gin}{width=10cm}
\centerline{
\includegraphics{fig10.05.1.eps}
}
\caption[Median filter and iterated median filter II]{\label{f115}
Comparing an iterated median filter and a median filter. Top-left: original image. Top-middle: 16 iterations of the median filter with a radius 2, Top-right: one iteration of the same median filter with a radius 8.
Below each image are the level-lines for grey levels equal to multiples of 16. This shows that iterating a small size median filter provides more accuracy and less shape mixing than applying a large size median filter. Compare this with the Koenderink--Van Doorn shape smoothing and the Bence--Merriman--Osher iterated filter in Chapter 2, in particular Figures 2.9, 2.10, and 2.12.}
\end{figure}

\begin{figure}[!t]
\setkeys{Gin}{width=10cm}
\centerline{
\includegraphics{fig10.06.1.eps}
}
\caption[Consistency of the median filter and of the Catt\'{e}--Dibos scheme ]{\label{f116}Consistency of the median filter and of the Catt\'{e}--Dibos. Top row: the sea bird image and its level lines for all levels equal to multiples of 12. Second row: a median filter on a disk with radius 2 has been iterated twice. Third row: an inf-sup and then a sup-inf filter based on segments have been applied. On the right: the corresponding level lines of the results, which, according to the theoretical results (Theorems 10.4 and 10.5), must have moved at a speed proportional to their curvature. The results are very close. This yields a cross validation of two very different numerical schemes that implement curvature-motion based smoothing.}
\end{figure}
