%gmChap03.tex

\graphicspath{{./figures/}}


\def\interior{Interior}
\comment{How do we get this nice notation, a circle above the
letter to indicate the interior ?}
\chapter[Contrast-Invariance and  Level Sets]
{Contrast-Invariant Classes of Functions and Their Level Sets
\label{Chap3}}

This chapter is about one  of the major technological
contributions of mathematical morphology, namely the
representation of images by their upper level sets. As we shall
see in this chapter, this leads to a handy contrast invariant
representation of images.


\begin{definition}
Let $u\in\mathcal F$. The level set of $u$ at level $0\leq
\lambda\leq 1$ is denoted by $\levelset_{\lambda}u$ and defined by
\[
\levelset_{\lambda}u=\{\fxx\mid u(\fxx)\geq\lambda\}.
\]
\end{definition}

Strictly speaking, we have called level sets what should more
properly be called upper level sets. Several level sets of  a
digital image are shown in Figure \ref{figure3.1} and all of the
level sets of a synthetic image are illustrated in Figure
\ref{figure3.2}. The reconstruction of an image from its level
sets is illustrated in Figure \ref{figure3.3}. Two important
properties of the level sets of a function follow directly from
the definition. The first is that the level sets provide a
complete description of the function. Indeed, we can reconstruct
$u$ from its level sets $\levelset_{\lambda}u$ by the formula
\[
u(\fxx)=\sup\{\lambda\mid\fxx\in\levelset_{\lambda}u\}.
\]
This formula is called {\it superposition principle}  as $u$ is
being reconstructed by ``superposing" its level sets.


\begin{exercise}
Prove the superposition  principle. \finex
\end{exercise}

The second important property is that level sets of a function are
globally invariant  under   contrast changes. We say that two
functions $u$ and $v$ have the same level sets globally if for
every $\lambda $ there is  $\mu $ such that
$\levelset_{\mu}v=\levelset_{\lambda}u$, and conversely. Now
suppose that a contrast change $g:\RR\to\RR$ is continuous and
increasing. Then it is not difficult to show that $v=g(u)$ and $u$
have the same level sets globally.

\begin{exercise}
Check this last statement for any function $u$ and any continuous
increasing contrast change $g$. \finex
\end{exercise}
  Conversely, we shall prove that if the level sets of a function $v\in \mathcal F$
are   level sets of $u$, then there is a continuous contrast
change $g$ such that $v=g(u)$.  This justifies the attention we
will dedicate to level sets, as they turn out to contain all of
the contrast invariant information about $u$.



\section{From an image to its level sets and back}

\begin{figure}[!t]
\setkeys{Gin}{width=3.5cm}

\includegraphics{fig03.01.1.eps}
\includegraphics{fig03.01.2.eps}
\includegraphics{fig03.01.3.eps}\\


\includegraphics{fig03.01.4bis.eps}
\includegraphics{fig03.01.5.eps}
\includegraphics{fig03.01.6.eps}\\


\includegraphics{fig03.01.7.eps}
\includegraphics{fig03.01.8.eps}
\includegraphics{fig03.01.9.eps}
 \caption[Level sets of a digital image]{\label{figure3.1} Level
sets of a digital  image. Left to right, top to bottom: We first
show an image with range of gray levels from 0 to 255. Then we
show eight level sets in decreasing order from $\lambda=225$ to
$\lambda=50$, where the grayscale step is 25. Notice how essential
features of the shapes are contained in the boundaries of level
sets, the level lines. Each level set (which appears as white) is
contained in the next one, as guaranteed by Proposition
\ref{prop32}.}
\end{figure}

In the next proposition, for a sake of generality, we consider
bounded measurable functions on $\SN$, not just functions in
$\mathcal F$.

\newpage
\begin{proposition}\label{prop32}
Let $X_{\lambda}$ denote the level sets $\levelset_{\lambda}u$ of
a bounded measurable function  $u : \SN\to  \RR$. Then the sets
$X_\lambda$
 satisfy the following two structural
properties:
\begin{enumerate}[$(i)$]\setlength\itemsep{2pt}

\item If $\lambda>\mu$, then $X_{\lambda}\subset X_{\mu}$. In
addition, there are two real numbers $\lambda_{max}\geq
 \lambda_{min}$ so  that $X_{\lambda}=\SN$
 for $\lambda<\lambda_{min}$, $X_\lambda=\emptyset$ for
$\lambda>\lambda_{max}$.

\item $X_{\lambda}=\bigcap_{\mu<\lambda}X_{\mu}$ for every
$\lambda \in \RR$.
\end{enumerate}
Conversely, if $(X_{\lambda})_{\lambda\in\RR}$ is a family of sets of $\mathcal M$ that satisfies $(i)$ and $(ii)$,
then the level sets of the function $u$ defined by superposition principle,
\begin{equation}\label{eq31}
u(\fxx)=\sup\{\lambda\mid \fxx\in X_{\lambda} \}
\end{equation}
satisfy   $\levelset_{\lambda}u=X_{\lambda}$ for all
$\lambda\in\RR$ and $\lambda_{min}\leq u\leq \lambda_{max}$.
\end{proposition}

\begin{proof}
The  first part of Relation $(i)$ follows directly from the
definition of upper level sets.   The second part of $(i)$ works
with $\lambda_{min}=\inf u$ and  $\lambda_{max}=\sup u$. The
relation $(ii)$ follows from the equivalence
$u(\fxx)\geq\lambda\Leftrightarrow u(\fxx)\geq\mu$ for every
$\mu<\lambda$.

Conversely, take a family of subsets
$(X_{\lambda})_{\lambda\in\RR}$ satisfying $(i)$ and $(ii)$ and
define $u$ by the superposition principle.  Let us show that
$X_\lambda=\levelset_\lambda u$. Take first
  $\fxx\in X_{\lambda}$. Then it follows from the definition
of $u$ that $u(\fxx)\geq\lambda$, and hence $\fxx\in\levelset_{\lambda}u$. Thus,
$X_{\lambda}\subset\levelset_{\lambda}u$. Conversely, let $\fxx\in\levelset_{\lambda}u$. Then $u(\fxx)=\sup\{\nu\mid
\fxx\in X_{\nu}\}\geq\lambda$. Consider any $\mu<\lambda$. Then there exists a $\mu'$ such that $\mu<\mu'\leq
\sup\{\nu\mid \fxx\in X_{\nu}\}$ and $\fxx\in X_{\mu'}$. It follows from $(i)$ that $\fxx\in X_{\mu}$. Since $\mu$ was
any number less that $\lambda$, we conclude by using $(ii)$ that $\fxx\in\bigcap_{\mu<\lambda}X_{\mu}= X_\lambda$. It
is easily checked that $\lambda_{min}\leq u\leq \lambda_{max}$.
   \end{proof}

   \begin{exercise}
Check the last statement of the preceding proof, that $\lambda_{min}\leq u\leq \lambda_{max}.$ \finex
   \end{exercise}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%ATTENTION : NADA !
\nada{ An easy adaptation of the preceding  proof yields a
specialization of Proposition \ref{prop32}  when $u$ belongs to
$\mathcal  F$.

\begin{corollary} \label{Prop32continouscase}
Let $X_{\lambda}$ denote the level sets $\levelset_{\lambda}u$ of
a function $u\in \cal F$.  Then the sets $X_{\lambda}$ are compact
in $\SN$ and satisfy the following two structural properties:
\begin{enumerate}[$(i)$]\setlength\itemsep{2pt}

\item If $\lambda>\mu$, then $X_{\lambda}\subset X^\circ_{\mu}$.
In addition, there are two real numbers $\lambda_{max}\geq
 \lambda_{min}$ so  that $X_{\lambda}=\SN$
 for $\lambda<\lambda_{min}$, $X_\lambda=\emptyset$ for
$\lambda>\lambda_{max}$.

\item $X_{\lambda}=\bigcap_{\mu<\lambda}X_{\mu}$ for every
$\lambda \in \RR$.
\end{enumerate}
Conversely, if $(X_{\lambda})_{\lambda\in\RR}$ is a family of sets
of $\mathcal L$ that satisfies $(i)$ and $(ii)$, then the level
sets of the function $u$ defined by the superposition principle
\eqref{eq31} satisfy   $\levelset_{\lambda}u=X_{\lambda}$ for all
$\lambda\in\RR$ and $u$ belongs to $\mathcal F$.
\end{corollary}



\begin{proof} We just treat the points which are different from
the proof of Proposition \ref{prop32}.  The  first part of
Relation $(i)$ follows directly from the definition of upper level
sets and the continuity of $u$. Indeed, $\fxx\in \partial X_\mu$
implies $u(\fxx)=\mu\neq\lambda$ if $\lambda>\mu$. Thus
$X_\lambda\subset X\mu\Rightarrow X_\lambda\subset X_\mu^\circ.$
    Let us
prove that $u$ is continuous by showing that the upper and lower
level sets of $u$ are closed. Since $\levelset_\lambda
u=X_\lambda$, the first property is true. As for the  second one,
we notice that it is equivalent to show that  $\{\fxx, \;
u(\fxx)>\mu\}$ is open. Now, in conveniently abbreviated notation
and  using $(i)$,
$$\{u>\mu\}=\bigcup_{\lambda> \mu}
X_\lambda=\bigcup_{\lambda>\mu}X^\circ_{\frac{\lambda+\mu}2}.$$
Indeed by $(i)$, $X_\lambda \subset X^\circ_{\frac{\lambda
+\mu}2}$ as $\lambda>\frac{\lambda+\mu}2.$
\end{proof}
}
%%%%%%%%%%% FIN DE NADA %%%%%%%%%%%%%%%%%%%%%
\begin{figure}[!t]
\setkeys{Gin}{width=2.5cm} \centerline{
\framebox{\includegraphics{fig03.02.1.eps}}
\framebox{\includegraphics{fig03.02.2.eps}}
\framebox{\includegraphics{fig03.02.3.eps}}
\framebox{\includegraphics{fig03.02.4.eps}} } \vspace{1.5pt}
\centerline{\hspace{2.84cm}
\framebox{\includegraphics{fig03.02.5.eps}}
\framebox{\includegraphics{fig03.02.6.eps}}
\framebox{\includegraphics{fig03.02.7.eps}} } \caption[Level sets
of a simple synthetic image]{\label{figure3.2} A simple synthetic
image and all of its level sets  (in white) with  decreasing
levels, from left to right and from top to bottom.}
\end{figure}






\begin{figure}[!t]
\setkeys{Gin}{width=10cm}
\centerline{
\includegraphics{fig03.03.1.eps}
} \caption[Reconstruction of an image from its level
sets]{\label{figure3.3}   Reconstruction of an image from its
level sets: an illustration of  Proposition 3.2.  We use four
different subsets of the image's level sets to give four
reconstructions. Top, left: all level sets;  top, right: all level
sets whose gray level is a multiple of 8; bottom, left: multiples
of 16;   bottom, right: multiples of 32. Notice the relative
stability of the image shape content under these drastic
quantizations of the gray levels. }
\end{figure}



\section{Contrast changes and level sets}
 Practical aspects of contrast changes are illustrated in
Figures \ref{figure3.4}, \ref{figure3.5}, \ref{figure3.6}, and
\ref{figure3.7}, which illustrate how insensitive our perception
of images is to contrast changes, even when they are flat on some
interval. When this happens, some information on the image   is
even lost, as several grey levels melt together.

\begin{definition}
Any nondecreasing continuous surjection $g:\;\RR\to \RR$  will be called a contrast change.
\end{definition}

\begin{exercise} Remark that  $g(s)\to \pm \infty$ as $s\to \pm \infty$. Check that if $u\in \mathcal F$ and $g$ is a
contrast change, then $g(u)\in \mathcal F$.\finex
\end{exercise}
In case $g$ is  increasing, $g$ has  an inverse contrast change
$g^{-1}$. In case $g$ is flat on some interval, we shall be happy
with a pseudo-inverse for $g$.

\begin{definition}
The pseudo-inverse of any contrast change $g:\RR\to\RR$ is defined
by
\[
g^{(-1)}(\lambda)=\inf \{r\in\RR\;\mid g(r)\geq\lambda\}.
\]
\end{definition}
\begin{exercise} Check that $g^{-1}$ is finite on $\RR$ and tends to $\pm\infty$
as $s\to \pm \infty$.  Give an example of $g$ such that $g^{-1}$ is not continuous.\finex
\end{exercise}



\begin{exercise}
Compute and draw $g^{(-1)}$ for the function
  $g(s)=\max(0,s)$.  Notice that such a function is ruled out
  by our conditions at infinity for contrast changes.\finex
 \end{exercise}

\begin{lemma}\label{lemma3.11}
Let  $g:\RR\to\RR$ be a contrast change. Then for every $\lambda\in\RR$, $g(g^{(-1)})(\lambda)=\lambda$ and
\begin{equation}\label{eq36}
  g(s)\geq\lambda\text{ if and only if } s\geq g^{(-1)}(\lambda).
\end{equation}

\end{lemma}

\begin{figure}[!t]
\setkeys{Gin}{width=10cm}
\centerline{
\includegraphics{fig03.04.1.eps}
} \caption[Histogram of an image]{\label{figure3.4}The histogram of the image Bird.  For each $i \in \{0, 1,\ldots,
255\}$, we display (above, right) the function $h(i) = \text{Card}\,\{\fxx\mid u(\fxx)=i\}$. The function below  is the
cumulative histogram, namely the primitive of $h$ defined by $H_u(i) = \text{Card}\,\{\fxx\mid u(\fxx) \leq i \}$. The
shape of $h$ provides an indication about the overall contrast of the image and about the contrast change imposed by
the sensors.  See Chap. \ref{chapMidway} for manipulations of the cumulative histogram.}
\end{figure}

\begin{proof} The first relation follows immediately from the
continuity of $g$.   If $g(s)\geq \lambda$, then $s\geq
g^{(-1)}(\lambda)$ by  the definition of $g^{(-1)}(\lambda)$.
Conversely, if $s\geq g^{(-1)}(\lambda)$, then $g(s)\geq
g(g^{(-1)}(\lambda))=\lambda$ and thus $g(s)\geq \lambda$.
 \end{proof}


\begin{theorem}\label{theorem3.12}
Let $u\in \mathcal F$ and $g$ be a contrast change. Then any level
set of $g(u)$ is a level set of $u$. More  precisely,  for
$\lambda\in\RR$,
\begin{equation}
\levelset_{\lambda}g(u)
= \levelset_{g^{(-1)}(\lambda)}u.\\[-1ex]
\end{equation}
\end{theorem}


\begin{proof}
The proof is read directly from Lemma \ref{lemma3.11} by taking $s=u$.
\end{proof}



\begin{figure}[!t]
\setkeys{Gin}{width=8.5cm}
\centerline{
\includegraphics{fig03.05.1.eps}
} \caption[Contrast changes and an equivalence class of
images]{\label{figure3.5}Contrast changes and an equivalence class
of images. The three images have exactly the same level sets and
level lines, but their level sets are mapped onto three different
gray-level scales. The graphs on the right are the graphs of the
contrast changes $u\mapsto g(u)$ that have been applied to the
initial gray levels. The first one is concave; it enhances the
darker parts of the image. The second one is the identity; it
leaves the image unaltered. The third one is convex; it enhances
the brighter parts of the image. Software allows one to manipulate
the contrast of an image to obtain the best visualization. From
the image analysis viewpoint, image data should be considered as
an equivalence class under all possible contrast changes.}
\end{figure}

The next result is a converse statement to Theorem
\ref{theorem3.12}.
\begin{figure}[!t]
\setkeys{Gin}{width=10cm}
\centerline{
\includegraphics{fig03.06.1.eps}
} \caption[Histogram and contrast change II]{\label{figure3.6} The two images (left) have the same set of level sets.
The contrast change that maps the upper image onto the lower image is displayed on the right. It corresponds to one of
the possible $g$ functions whose existence is stated in Corollary 3.14. The function $g$ may be locally constant on
intervals where the histogram of the upper image is zero (see top, middle graph). Indeed, on such intervals, the level
sets are invariant. }
\end{figure}

\newpage
\begin{theorem} \label{existscontrastchange}
Let  $u$ and $v\in \mathcal F$ such that every level set of $v$ is
a level set of $u$. Then $v=g(u)$ for some  contrast change $g$.
\end{theorem}

\begin{proof} One can actually give an explicit formula for $g$,
namely, for every $\mu \in u(\SN)$,
 \begin{equation}\label{ex}
g(\mu)=\sup\{\lambda\in
v(\SN)\mid\levelset_{\mu}u\subset\levelset_{\lambda}v\}.
\end{equation}
For $\mu\notin u(\SN)$, we can easily extend $g$ into an nondecreasing function such that $g(\pm \infty)=\pm \infty)$.
(Take (e.g.) $g$ piecewise affine).
 Note that $\nu>\mu$ implies that
$g(\nu)\geq g(\mu)$.
 \medskip
Let us  first show that $\inf v\leq g(\mu)\leq \sup v.$ Set $$\Lambda:=\{\lambda\mid \levelset_\mu u\subset
\levelset_\lambda v\}.$$ $\Lambda$ is  not empty because $\levelset_{\inf v}=S_N$ and therefore $\inf v\in \Lambda$.
Thus $g(\mu)=\sup \Lambda\geq \inf v.$ On  the other hand $\levelset_{\sup v+\varepsilon}v=\emptyset $ for every
$\varepsilon>0.$ Since $\mu\in u(S_N),$ $\levelset_\mu  u\neq \emptyset$ and therefore $g(\mu)=\sup\Lambda\leq \sup v.$

\medskip
\noindent{\bf Step 1: Proof that} $\bm{v(\fxx)\geq g(u(\fxx))}$. By Proposition \ref{prop32}$(i)$ $\Lambda$ has the
form $(-\infty, \sup \Lambda)$ or $(-\infty, \sup \Lambda].$ But by Proposition \ref{prop32}$(ii)$,
$\levelset_{\sup\Lambda}v=\bigcap_{\lambda<\sup\Lambda}\levelset_{\lambda}v$, and this implies by the definition of
$\Lambda$ that $g(\mu)=\sup\Lambda\in\Lambda$. Thus,
\begin{equation}\label{eq313}
\levelset_{\mu}u\subset\levelset_{g(\mu)}v.
\end{equation}
Given $\fxx\in\SN$, let $\mu=u(\fxx)$ in \eqref{eq313}. Then,
\[
\levelset_{u(\fxx)}u\subset\levelset_{g(u(\fxx))}v.
\]
Since $\fxx\in\levelset_{u(\fxx)}u$, we conclude that
 $\fxx\in\levelset_{g(u(\fxx))}v=\{\fxy\mid v(\fxy)\geq g(u(\fxx))\}$.
\medskip

\noindent{\bf Step 2: Proof that} $\bm{v(\fxx)\leq g(u(\fxx))}$.
Given $\fxx\in\SN$, we translate the assumption   with
$\lambda=v(\fxx)$ as follows: There exists a $\mu(\fxx)\in\RR$
such that
%\vspace{-8pt}
\begin{equation}\label{eq314}
\levelset_{v(\fxx)}v=\{\fxy\mid u(\fxy)\geq
\mu(\fxx)\}=\levelset_{\mu(\fxx)}u.
 \end{equation}
  Since
$\fxx\in\levelset_{v(\fxx)}v$,  we know that
$\fxx\in\levelset_{\mu(\fxx)}u$. Thus, $u(\fxx)\geq\mu(\fxx)$, and
$
\levelset_{u(\fxx)}u\subset\levelset_{\mu(\fxx)}u=\levelset_{v(\fxx)}v.
$ This last relation implies by the definition of $g$ that
$v(\fxx)\leq g(u(\fxx))$.

\medskip
{\bf Step 3: Proof that $g$ is continuous}. Recall that the image of a connected set  by a continuous function is
connected. Thus $u(\SN)$ is an interval of $\RR$ and so is $v(\SN)$. Since $g(u)=v$, $g(u(\SN))=v(\SN)$ is an interval.
Now, a nondecreasing function is continuous on an interval if and only if its range is connected.  Thus $g$ is
continuous on $u(\SN)$ and so is its extension to  $\RR$.
\end{proof}


\begin{exercise} Prove the  last statement in the theorem, namely that ``a nondecreasing function is continuous on an interval if and only if its range is
connected". \finex
\end{exercise}


\begin{exercise}
By reading carefully the steps 1 and 2 of the proof of Theorem \ref{existscontrastchange}, check that this theorem
applies with $u$ and $v$ just bounded and measurable on $S_N$. Then one has still has $v=g(u)$ with $g$ defined in the
same way. Of course $g$ is still nondecreasing but not necessarily continuous. Find a simple example of functions $u$
and $v$ such that $g$ is not continuous. \finex
\end{exercise}



\begin{figure}[!t]
\setkeys{Gin}{width=12cm} \centerline{
\includegraphics{fig03.07.1.eps}
} \caption[Histogram  contrast change I]{\label{figure3.7}The original image (top, left) has a strictly positive
histogram (all gray levels between 0 and 255 are represented). Therefore, if any contrast change $g$ that is not
strictly increasing is applied, then some data will be lost. Every level set of the transformed image $g(u)$ is a level
set of the original image; however, the original image has more level sets than the transformed image. }
\end{figure}



\section{Exercises}

\begin{exercise} This exercise gives a way to compute the  function $g$ such that $v=g(u)$ defined in the proof of
Theorem \ref{existscontrastchange} in terms of the repartition functions of $u$ and $v$.  Let $G$ be a Gauss function
defined on $\RR^N$ such that $\int_{\RR^N}G(\fxx)d\fxx=1$. For every measurable subset of $\RR^N$,  set $|A|_G:=\int_A
G(\fxx)d\fxx.$ Let $u$ be a bounded continuous function on $\RR^N$. We can associate with $u$ its {\it repartition
function} $h_u(\lambda):=|\levelset_\lambda u|_G$. Show that $h_u: \lambda\in[\inf u, \sup u]\to h_u(\lambda)$ is
strictly decreasing. Show that it can have jumps but is left-continuous, that is $h_u(\lambda)=\lim_{\mu\uparrow
\lambda}h_u(\mu)$. Define for every non increasing function $h$ a pseudo inverse  by
$h^{((-1))}(\mu):=\sup\{\lambda\mid h(\lambda)\geq\mu\}.$ Show that $h^{((-1))}$ is non increasing and that
$h^{((-1))}\circ h(\mu)\geq\mu,$ and that if $h$ is left-continuous, $h\circ h^{((-1))}(\mu)\geq \mu$. Using \eqref{ex}
prove that $g=h_v^{((-1))}\circ h_u.$
\newline {\it Hint: } prove that $g(\mu)=\sup\{\lambda\mid |\levelset_\mu u|_G\leq |\levelset_\lambda v|_G\}$. \finex
\end{exercise}


\begin{exercise}
Let $u$ be a real-valued function. If $(\mu_n)_{n\in\NN}$ is an
increasing sequence that tends to $\lambda$, prove that
\begin{equation}\label{eq33}
\levelset_{\lambda}u=\bigcap_{n\in\NN} \levelset_{\mu_n}u
\end{equation}
\begin{equation}\label{eq34}
\{\fxx\mid
u(\fxx)>\lambda\}=\bigcup_{\mu>\lambda}\levelset_{\mu}u.
\end{equation}
\finex
\end{exercise}

\section{Comments and references}

\paragraph*{Contrast invariance and  level sets.}  It was Wertheimer who  noticed that
 the actual local values of the gray levels in an image could not be relevant information
 for the human visual system \cite{Wertheimer:1923:ULG}. Contrast invariance is one of the
 fundamental model assumptions in mathematical morphology. The two basic books on this
  subject are Matheron \cite{Matheron:1975:RSI} and Serra
   \cite{Serra:1982:IAM,Serra:1988:IAM}. See also the fundamental
    paper by Serra \cite{Serra:1986:IMM}. Ballester et al. defined
     an ``image intersection'' whose principle is to keep all pieces
      of bilevel sets common to two images \cite{Ballester:1998:FCI}.
      (A bilevel set is of the form $\{\fxx\mid \lambda\leq u(\fxx)\leq\mu\}$.)
       Monasse and Guichard developed a \textit{fast level set transform}
       (FLST) to associate with every image the inclusion tree of connected components
        of level sets \cite{MnsseGchrd3}. They show that the inclusion trees of connected
        upper and lower level sets can be fused into a single inclusion tree; among
        other applications, this tree can be used  for image registration.
        See Monasse \cite{MonassePhD}.

\paragraph*{Contrast changes.}
The ability to vary the contrast (to apply a contrast change) of a
digital image is a very useful tool for improving image
visualization. Professional image processing software has this
capability, and it is also found in popular software for
manipulating digital images. For more about contrast changes that
preserve level sets, see \cite{Caselles:SPL}. Many reference on
contrast-invariant operators are given at the end of Chapter
\ref{Chap6}.


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