{\Large Chapter 1 :  The Heat Equation}

\section{Linear smoothing and the Laplacian}

Consider a function $u_0$, which we interpret to be an image,
defined on a domain $\Omega$ of $\mathbb R^2$, and assume that
$u_0\in C^2(\Omega)$. If we wish to smooth $u_0$, then the
simplest way to do so without favoring a particular direction is
to replace $u_0(\fxx)$ with the unweighted average of the values
of $u_0$ in a disk $D(\fxx, h)$ of radius $h$ centered at $\fxx$.
This means that we replace $u_0(\fxx)$ with
\begin{equation}\label{Mh}
M_hu_0(\fxx)=\frac1{\pi h^2}\int_{D(\fxx, h)}u_0(\fxy)\,\rmd\fxy=\frac1{\pi h^2}\int_{D(0, h)}u_0(\fxx+\fxy)\,\rmd\fxy.
\end{equation}
\begin{slide}
Although the operator $M_h$ is quite simple, it exhibits important
characteristics of a general linear isotropic smoothing operator.
For example, it is localizable: As $h$ becomes small, $M_h$
becomes more localized, that is, $M_hu_0(\fxx)$ depends only on
the values of $u_0(\fxx)$ in a small neighborhood of $\fxx$.
\end{slide}
\begin{figure}[!t]
\setkeys{Gin}{width=10cm}
\centerline{
\includegraphics{fig01.01.1.eps}
}
\caption[Local averaging algorithm]{\label{smoothing} Local averaging algorithm.  Left to right: original image; result of replacing the grey level at each pixel by  the average of the grey levels over the neighboring pixels. The shape of the neighborhood is shown by the black spot displayed in the upper right-hand corner.}
\end{figure}
\begin{slide}
\end{slide}
Our objective is to show the relation between the action of $M_h$
and the action of the Laplacian, or the heat equation. We begin by
expanding $u_0$ around the point $\fxx$ using Taylor's formula:
\begin{equation}\label{taylor}
u_0(\fxx+\fxy)=u_0(\fxx)+Du_0(\fxx)\cdot\fxy+\frac1{2}D^2u_0(\fxx)(\fxy,\fxy)+o(|\fxy|^2).
\end{equation}
Now apply $M_h$ to both sides of this expansion one has

\[
\frac1{\pi h^2}\int_{D(0, h)}u_0(\fxx+\fxy)\,\rmd\fxy=M_hu_0(\fxx).
\]
The first term on the right-hand side is
\[
\frac1{\pi h^2}\int_{D(0, h)}u_0(\fxx)\,\rmd\fxy=u_0(\fxx).
\]
The second (linear) term on the right-hand side vanishes because
\begin{equation}\label{1moment}
\int_{D(0, h)}x\,\rmd\fxy=\int_{D(0, h)}y\,\rmd{\fxy}=0.
\end{equation}
Similarly, the cross term in the third (quadratic) term on the right-hand side vanishes:
\begin{equation}\label{12moment}
\int_{D(0, h)}xy\,\rmd\fxy=0.
\end{equation}
This leaves the problem of computing the other quadratic terms, but since
\begin{equation}\label{11moment}
\int_{D(0, h)}x^2\,\rmd\fxy=\int_{D(0, h)}y^2\,\rmd\fxy,
\end{equation}
we have
\[
\int_{D(0, h)}x^2\,\rmd{\fxy}=\frac1{2}\int_{D(0, h)}(x^2+y^2)\,\rmd{\fxy}=\frac1{2}\int_0^h\int_0^{2\pi r^3}\,\rmd r\,\rmd\theta=\frac{\pi h^4}4.
\]



Putting this all together, we have
\begin{equation}\label{Mhx}
M_hu_0(\fxx)=u_0(\fxx)+\frac{h^2}8\Delta u_0(\fxx)+h^2\varepsilon(\fxx,h).
\end{equation}
\begin{slide}

 Let $u(t,x)$ be the solution of the heat equation with initial
 condition $u_0$. We shall prove :
\begin{equation}
\lim_{n\to+\infty\atop nh^2\to t}M_h^nu_0(\fxx)=u(t,\fxx).
\end{equation}
This says that the asymptotic limits
of $M_h^n$ operate on $u_0$ exactly as the heat equation
  does; it thus establishes a relation between smoothing with $M_h$
  and smoothing with the Gaussian.


\begin{proposition}[The Gaussian and the heat equation] For all
$t>0$, the function $\fxx\mapsto G_t(\fxx)=(1/{(4\pi
t)^{N/2}}){\rm e}^{-|\fxx|^2 /4t}$ belongs to $\mathcal S$ and
satisfies the heat equation
\[
\frac{\partial G_t}{\partial t}-\Delta G_t=0.
\]
\end{proposition}
  \end{slide}
\begin{figure}[!t]
\setkeys{Gin}{width=10cm}
\centerline{
\includegraphics{fig01.02.1.eps}
}
\caption[The Gaussian]{\label{gaussian}The Gaussian in two dimensions.}
\end{figure}
\begin{slide}
{\Large  Standard extension of an image }
 Assume that the real-valued image $u$ is originally defined on
the hypercube $[0,1]^N$. We first extend $u$ to the hypercube
$C=[-1,1]^N$ by symmetry across the coordinate hyperplanes: For
each point $\fxx=(x_1,x_2,\ldots,x_N)$ in $C$, define $u(\fxx)$ by
\[
u(\fxx)=u(|x_1|,|x_2|,\ldots,|x_N|).
\]
This extension satisfies the following relation: For each
$\fxx=(x_1,x_2,\ldots,x_N)$ in $C$,
\begin{equation}\label{sym}
u(x_1,x_2,\ldots,x_N)=u(\varepsilon_1 x_1,\varepsilon_1 x_2,\ldots,\varepsilon_N x_N),
\end{equation}
where $(\varepsilon_1,\varepsilon_2,\ldots,\varepsilon_N)$ is any
vector in $\{-1,1\}^N$. Next, we extend $u$ periodically to all of
$\mathbb R^N$. Since the period must be two in each of the
variables $x_i$,
\begin{equation}\label{period}
u(x_1,x_2,\ldots,x_N)=u(x_1+2n_1,x_2+2n_2,\ldots,x_N+2n_N),
\end{equation}
for all $(x_1,x_2,\ldots,x_N)\in\mathbb R^N$ and all
$(n_1,n_2,\ldots,n_N)\in\mathbb Z^N$.
\end{slide}

The purpose of these successive extensions of $u$ to all of
$\mathbb R^N$ is to facilitate the definition of certain
operations on $u$, such as convolution with smoothing kernels,
and, at the same time, to preserve the continuity of $u$ if $u$ is
continuous on $[0,1]^N$. This method of extending a function is
widely used in image processing; in particular, it is used in most
compression and transmission standards. It is easy to check that
the extension of $u$ is continuous on $\RR^N$ if the original $u$
is continuous on $[0,1]^N$.

\begin{figure}[!t]
\setkeys{Gin}{width=10cm}
\centerline{
\includegraphics{fig01.03.1.eps}
}
\caption[Image extension]{\label{extension}Image extension by symmetry, followed by periodization.}
\end{figure}



\begin{slide}
{\bf Theorem}[Existence and uniqueness of solutions of the heat
equation]\label{existenceuniquenessheat} Assume that $u_0\in
L^1_C$. Then we have the following two results:

\begin{enumerate}%[$(i)$]\setlength\itemsep{2pt}
\item For all $t>0$ and $\fxx\in\RR^N$, $u(t,\cdot)=G_t*u_0$ satisfies the heat equation with initial value $u_0$ in the sense that
\begin{equation}\label{heatsol}
\frac{\partial u}{\partial t}=\Delta u\quad\text{and}\quad\int_C|u(t,\fxx)-u_0(\fxx)|\,\rmd\fxx\to0\;\text{ as }\;t\to0.
\end{equation}
Furthermore, for each $t>0$, $u(t,\cdot)\in C^{\infty}(\RR^N)\cap L^{\infty}_C$, and for any $t_0>0$ it is uniformly bounded for $t\in[t_0,+\infty)$, specifically,
\begin{equation}\label{unibound}
\sup_{\fxx\in\RR^N, t\geq t_0}|u(t,\fxx)|\leq C(t_0)\|u_0\|_{L^1(C)}.
\end{equation}
\item Conversely, given $u_0\in L^1_C$, $G_t*u_0$ is the unique solution $u$ of \eqref{heatsol} that belongs to $L^{\infty}_C$ for each $t>0$, that is uniformly bounded on $[t_0,+\infty)$ for each $t_0>0$, and that is $C^2$ on $(0,+\infty)\times\RR^N$.
\end{enumerate}\unskip
\end{slide}
\begin{figure}[!t]
\setkeys{Gin}{width=8cm} \centerline{
\includegraphics{fig01.05.1.eps}}
\caption[Level lines and the heat
equation]{\label{heatlevellines}Level lines and the heat equation.
Top, left to right: original 410$\times$270 grey level image;
level lines of original image for levels at multiples of 12.
Bottom, left to right: original image smoothed by the heat
equation (convolution with the Gaussian). The standard deviation
of the Gaussian is 4, which means that its spatial range is
comparable to a disk of radius 4.  The image gets blurred by the
convolution, which averages grey level values and removes all
sharp edges.  This can be appreciated on the right, where we have
displayed all level lines for levels at multiples of 12. Note how
some level lines on the boundaries of the image have split into
parallel level lines that have drifted away from each other. The
image has become smooth, but it is losing its structure.}
\end{figure}
