\section{Influence of the parameters on the performance of NL-Bayes
	\label{section:parameters} }

The results shown  hereunder are the result of the previously described algorithm
applied to noiseless images to which a simulated white noise has been added. Many
images have been tested, but for a sake of simplicity only one result for each
$\sigma$ will be shown. To evaluate quantitatively the denoising results, two
classics measurements will be used :
\begin{itemize}
	\item The \emph{Root Mean Square Error} (RMSE) between the reference image
(noiseless) $u_R$ and the denoised image $u_D$. The RMSE is computed by
	$$RMSE = \sqrt{\frac{\displaystyle{\sum_{x\in X}\left(u_R(x) -
u_D(x)\right)^2}}{|X|}};$$
	and the smaller the RMSE, the better the denoising.
	\item the \emph{Peak Signal to Noise Ratio} (PSNR) evaluated in decibels
(dB) by
	$$PSNR = 20\log_{10}\left(\frac{255}{RMSE}\right);$$
	and the larger the PSNR, the better the denoising.
\end{itemize}
The question is: how to select the right values for the various parameters in the
algorithm as described previously, and to evaluate their influence on the final
result?  The  parameters of the method are::
\begin{itemize}
	\vspace{-3mm}\item $\psize_{\hard}$, $\psize_{\wien}$: size of patches;
	\vspace{-3mm}\item $N_{\hard}$, $N_{\wien}$: maximum number of similar
patches kept;
	\vspace{-3mm}\item $\zsize_{\hard}$, $\zsize_{\wien}$: search window size;
	\vspace{-3mm}\item $\gamma$: used to determine if a patch belongs to an
homogeneous area;
	\vspace{-3mm}\item $\beta_{\hard}$, $\beta_{\wien}$: coefficient used
during the collaborative filtering;
	\vspace{-3mm}\item $\tau_0$: minimum threshold to determine similar patches
during the second step.
\end{itemize}
It would be impossible to try all combinations of all parameters. Thus, the
principle of the study is to assign to all parameters  an optimal or robust value,
while only one is varied. The parameters will therefore fixed in the following way:
\begin{itemize}
    \item $\psize_{\hard}$ and $\psize_{\wien}$ as in \ref{subsec:sizePatches};
	\vspace{-3mm}\item $N_{\hard}$ and $N_{\wien}$ as in
\ref{subsec:sizeSearch};
	\vspace{-3mm}\item the homogeneous area trick is always used on the first
step;
	\vspace{-3mm}\item $\zsize_{\hard} = 5 * \psize_{\hard}$;
	\vspace{-3mm}\item $\zsize_{\wien} = 5 * \psize_{\wien}$;
	\vspace{-3mm}\item $\gamma = 1.05$;
	\vspace{-3mm}\item $\beta_{\hard} = 1.0$;
	\vspace{-3mm}\item $\beta_{\wien} = \left\{
	\begin{array}{ll}
	1.2 & \text{ if } \sigma < 50\\
	1.0 & \text{ otherwise. }\\
	\end{array}\right.$;
	\vspace{-3mm}\item $\tau_0 = 4$.
\end{itemize}


\subsection{Influence of the size of the patches
$\psize_{\hard}$ and $\psize_{\wien}$ \label{subsec:sizePatches}} The  size of the
patches influences the result, but unlike BM3D, NL-Bayes gives its best results for
significantly smaller patch sizes. This fact may be the most surprising result of
this comparison.


\begin{changemargin}{-1.5cm}{0cm}
\begin{center}
	\begin{tabular}{c c}
	
		\begin{tabular}{||c||c|c||c|c||c|c||}
			\hline
			\multicolumn{7}{||c||}{$\sigma = 2$}\\
			\hline
			$\psize_{\wien}$ & \multicolumn{2}{c||}{3} & \multicolumn{2}{c||}{5} & \multicolumn{2}{c||}{7}\\
			\hline
			$\psize_{\hard}$ & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE}\\
			\hline
			\hline
			3 & {\bf 46.03} & {\bf 1.27} & 45.96 & 1.28 & 45.88 & 1.30\\
			\hline
			5 & {\bf 46.03} & {\bf 1.27} & 45.92 & 1.29 & 45.83 & 1.30\\
			\hline
			7 & 46.00 & 1.28 & 45.89 & 1.29 & 45.78 & 1.31\\
			\hline
		\end{tabular} &
		
		\begin{tabular}{||c||c|c||c|c||c|c||}
			\hline
			\multicolumn{7}{||c||}{$\sigma = 5$}\\
			\hline
			$\psize_{\wien}$ & \multicolumn{2}{c||}{3} & \multicolumn{2}{c||}{5} & \multicolumn{2}{c||}{7}\\
			\hline
			$\psize_{\hard}$ & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE}\\
			\hline
			\hline
			3 & {\bf 39.89} & {\bf 2.58} & 39.83 & 2.60 & 39.75 & 2.62\\
			\hline
			5 & {\bf 39.89} & {\bf 2.58} & 39.77 & 2.62 & 39.68 & 2.65\\
			\hline
			7 & 39.87 & 2.59 & 39.73 & 2.63 & 39.61 & 2.67\\		
			\hline
		\end{tabular} \\
		
		 & \\
		
		\begin{tabular}{||c||c|c||c|c||c|c||}
			\hline
			\multicolumn{7}{||c||}{$\sigma = 10$}\\
			\hline
			$\psize_{\wien}$ & \multicolumn{2}{c||}{3} & \multicolumn{2}{c||}{5} & \multicolumn{2}{c||}{7}\\
			\hline
			$\psize_{\hard}$ & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE}\\
			\hline
			\hline
			3 & 35.38 & 4.34 & 35.34 & 4.36 & 35.27 & 4.40\\
			\hline
			5 & {\bf 35.39} & {\bf 4.34} & 35.29 & 4.39 & 35.20 & 4.43\\
			\hline
			7 & 35.36 & 4.35 & 35.24 & 4.41 & 35.11 & 4.48\\
			\hline
		\end{tabular} &
		
		\begin{tabular}{||c||c|c||c|c||c|c||}
			\hline
			\multicolumn{7}{||c||}{$\sigma = 20$}\\
			\hline
			$\psize_{\wien}$ & \multicolumn{2}{c||}{3} & \multicolumn{2}{c||}{5} & \multicolumn{2}{c||}{7}\\
			\hline
			$\psize_{\hard}$ & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE}\\
			\hline
			\hline
			3 & 31.16 & 7.06 & {\bf 31.20} & {\bf 7.02} & 31.15 & 7.06\\
			\hline
			5 & {\bf 31.20} & {\bf 7.02} & 31.14 & 7.07 & 31.08 & 7.12\\
			\hline
			7 & 31.16 & 7.06 & 31.10 & 7.10 & 30.99 & 7.20\\
			\hline
		\end{tabular} \\

		 & \\

		\begin{tabular}{||c||c|c||c|c||c|c||}
			\hline
			\multicolumn{7}{||c||}{$\sigma = 30$}\\
			\hline
			$\psize_{\wien}$ & \multicolumn{2}{c||}{3} & \multicolumn{2}{c||}{5} & \multicolumn{2}{c||}{7}\\
			\hline
			$\psize_{\hard}$ & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE}\\
			\hline
			\hline
			3 & 28.81 & 9.25 & {\bf 28.92} & {\bf 9.13} & 28.90 & 9.15\\
			\hline
			5 & 28.90 & 9.15 & 28.89 & 9.16 & 28.85 & 9.21\\
			\hline
			7 & 28.85 & 9.21 & 28.85 & 9.21 & 28.76 & 9.30\\
			\hline
		\end{tabular} &
		
		\begin{tabular}{||c||c|c||c|c||c|c||}
			\hline
			\multicolumn{7}{||c||}{$\sigma = 40$}\\
			\hline
			$\psize_{\wien}$ & \multicolumn{2}{c||}{3} & \multicolumn{2}{c||}{5} & \multicolumn{2}{c||}{7}\\
			\hline
			$\psize_{\hard}$ & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE}\\
			\hline
			\hline
			3 & 27.18 & 11.16 & 27.33 & 10.97 & 27.34 & 10.95\\
			\hline
			5 & 27.33 & 10.97 & {\bf 27.36} & {\bf 10.93} & 27.34 & 10.95\\
			\hline
			7 & 27.31 & 10.99 & 27.35 & 10.94 & 27.28 & 11.03\\
			\hline
		\end{tabular} \\
		
		 & \\
		
		\begin{tabular}{||c||c|c||c|c||c|c||}
			\hline
			\multicolumn{7}{||c||}{$\sigma = 60$}\\
			\hline
			$\psize_{\wien}$ & \multicolumn{2}{c||}{3} & \multicolumn{2}{c||}{5} & \multicolumn{2}{c||}{7}\\
			\hline
			$\psize_{\hard}$ & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE}\\
			\hline
			\hline
			3 & 24.90 & 14.51 & 25.30 & 13.85 & 25.38 & 13.73\\
			\hline
			5 & 25.27 & 13.90 & 25.46 & 13.60 & {\bf 25.47} & {\bf 13.58}\\
			\hline
			7 & 25.26 & 13.92 & 25.45 & 13.62 & 25.44 & 13.63\\
			\hline
		\end{tabular} &
		
		\begin{tabular}{||c||c|c||c|c||c|c||}
			\hline
			\multicolumn{7}{||c||}{$\sigma = 80$}\\
			\hline
			$\psize_{\wien}$ & \multicolumn{2}{c||}{3} & \multicolumn{2}{c||}{5} & \multicolumn{2}{c||}{7}\\
			\hline
			$\psize_{\hard}$ & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE}\\
			\hline
			\hline
			3 & 23.15 & 17.74 & 23.74 & 16.58 & 23.94 & 16.20\\
			\hline
			5 & 23.78 & 16.50 & 24.02 & 16.05 & 24.08 & 15.94\\
			\hline
			7 & 23.83 & 16.41 & 24.09 & 15.92 & {\bf 24.10} & {\bf 15.91}\\
			\hline
		\end{tabular} \\
		
		 & \\
	
	\end{tabular}
	
	\begin{tabular}{||c||c|c||c|c||c|c||}
			\hline
			\multicolumn{7}{||c||}{$\sigma = 100$}\\
			\hline
			$\psize_{\wien}$ & \multicolumn{2}{c||}{3} & \multicolumn{2}{c||}{5} & \multicolumn{2}{c||}{7}\\
			\hline
			$\psize_{\hard}$ & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE}\\
			\hline
			\hline
			3 & 21.79 & 20.75 & 22.62 & 18.86 & 22.88 & 18.30\\
			\hline
			5 & 22.65 & 18.79 & 22.98 & 18.09 & 23.06 & 17.93\\
			\hline
			7 & 22.75 & 18.58 & 23.06 & 17.93 & {\bf 23.11} & {\bf 17.83}\\
			\hline
		\end{tabular}
		
		{\scriptsize In {\bf bold} the best result for a given $\sigma$.}
\end{center}
\end{changemargin}
Unsurprisingly, from the examination of the above set of tables follows that the
size of patches must increase with the noise value.  According to these results,
the following optimal values will be chosen for the size of patches:
\begin{center}
	\begin{tabular}{||c||c|c|c|c||}
		\hline
		$\sigma$ & $0\leq \sigma < 20$ & $20\leq \sigma < 50$ & $50\leq\sigma < 70$ & $70 \leq \sigma$\\
		\hline
		\hline
		$\psize_{\hard}$ & 3 & 5 & 7 & 7\\
		\hline
		$\psize_{\wien}$ & 3	& 3 & 5 & 7\\
		\hline
	\end{tabular}
\end{center}


\subsection{Influence of $\gamma$ \label{subsec:gamma}}
The parameter $\gamma$ is used to determine if a set of similar patches belongs to
a homogeneous area as defined in \eqref{eq_gamma}. This parameter needs to be
determined carefully, because if its value is too big, small details in the image
may be lost. If instead its value is too small, homogeneous area will not be
denoised enough and artifacts can become conspicuous in these regions. Thus,
although the PSNR gain is  moderate, the visual impact of this step is important.
 The comparison table follows.
\begin{center}
	\begin{tabular}{||c||c|c||c|c||c|c||c|c||}
		\hline
		 & \multicolumn{2}{c||}{$\gamma = 0.95$} & \multicolumn{2}{c||}{$\gamma = 1.0$} & \multicolumn{2}{c||}{$\gamma = 1.05$} & \multicolumn{2}{c||}{$\gamma = 1.1$}\\
		\hline
		$\sigma$ & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE}\\
		\hline
		\hline
		2 & {\bf 46.00} & {\bf 1.28} & 45.99 & 1.28 & {\bf 46.00} & {\bf 1.28} & {\bf 46.00} & {\bf 1.28}\\
		\hline
		5 & 39.88 & 2.58 & {\bf 39.89} & {\bf 2.58} & {\bf 39.89} & {\bf 2.58} & {\bf 39.89} & {\bf 2.58}\\
		\hline
		10 & {\bf 35.38} & {\bf 4.34} & {\bf 35.38} & {\bf 4.34} & {\bf 35.38} & {\bf 4.34} & 35.37 & 4.35\\
		\hline
		20 & 31.20 & 7.02 & 31.23 & 7.00 & {\bf 31.24} & {\bf 6.99} & 31.23 & 7.00\\
		\hline
		30 & 28.83 & 9.22 & 28.90 & 9.15 & 28.91 & 9.14 & {\bf 28.92} & {\bf 9.13}\\
		\hline
		40 & 27.25 & 11.07 & 27.35 & 10.94 & {\bf 27.38} & {\bf 10.90} & 27.37 & 10.91\\
		\hline
		60 & 25.33 & 13.80 & 25.44 & 13.68 & {\bf 25.45} & {\bf 13.61} & 25.40 & 13.69\\
		\hline
		80 & 24.12 & 15.86 & {\bf 24.20} & {\bf 15.72} & 24.16 & 15.79 & 24.04 & 16.01\\
		\hline
		100 & 23.15 & 17.75 & {\bf 23.23} & {\bf 17.58} & 23.19 & 17.65 & 22.99 & 18.08\\
		\hline
	\end{tabular}
	
	
{\scriptsize In {\bf bold} best result for a given $\sigma$.}
\end{center}


One can deduce from the above table that small variations on $\gamma$ lead to
significant variations for high noise. According to this study, $\gamma$ can be
fixed to $1.05$, whatever the value of noise.


\subsection{Influence of $\beta_{\hard}$}


This parameter is used in \eqref{eq_estimate1} and influences  the filtering during
the first step. The theoretical value is $\beta_{\hard} = 1.0$, but a study of its
influence needs to be done to learn its best empirical value.


\begin{center}
	\begin{tabular}{||c||c|c||c|c||c|c||c|c||c|c||}
		\hline		
		 & \multicolumn{2}{c||}{$\beta_{\hard} = 0.8$} & \multicolumn{2}{c||}{$\beta_{\hard} = 0.9$} & \multicolumn{2}{c||}{$\beta_{\hard} = 1.0$} & \multicolumn{2}{c||}{$\beta_{\hard} = 1.1$} & \multicolumn{2}{c||}{$\beta_{\hard} = 1.2$}\\
		\hline
		$\sigma$ & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE}\\
		\hline
		\hline
		2 & 45.92 & 1.29 & 45.98 & 1.28 & 46.01 & 1.28 & 46.02 & 1.27 & {\bf 46.03} & {\bf 1.27}\\
		\hline
		5 & 39.71 & 2.64 & 39.80 & 2.61 & 39.85 & 2.59 & {\bf 39.88} & {\bf 2.59} & 39.86 & 2.59\\
		\hline
		10 & 35.22 & 4.42 & 35.34 & 4.36 & 35.39 & 4.33 & {\bf 35.40} & {\bf 4.33} & 35.37 & 4.35\\
		\hline
		20 & 30.96 & 7.22 & 31.12 & 7.08 & {\bf 31.20} & {\bf 7.02} & 31.18 & 7.03 & 31.09 & 7.11\\
		\hline
		30 & 28.64 & 9.43 & 28.85 & 9.21 & {\bf 28.92} & {\bf 9.13} & 28.89 & 9.16 & 28.75 & 9.31\\
		\hline
		40 & 27.07 & 11.30 & 27.27 & 11.05 & {\bf 27.34} & {\bf 10.95} & 27.30 & 11.01 & 27.13 & 11.22\\
		\hline
		60 & 25.07 & 14.23 & 25.38 & 13.72 & {\bf 25.46} & {\bf 13.59} & 25.36 & 13.75 & 25.08 & 14.21\\
		\hline
		80 & 23.80 & 16.45 & 24.13 & 15.94 & {\bf 24.19} & {\bf 15.73} & 24.08 & 15.93 & 23.78 & 16.50\\
		\hline
		100 & 22.85 & 18.37 & 23.09 & 17.86 & {\bf 23.12} & {\bf 17.80} & 23.00 & 18.06 & 22.70 & 18.67\\
		\hline
	\end{tabular}
	
	
{\scriptsize In {\bf bold} best result for a given $\sigma$.}
\end{center}
The theoretical value is confirmed by this study. Thus $\beta_{\hard}$ is fixed to
$1.0$, whatever the value of the noise.


\subsection{Influence of $\beta_{\wien}$}


This parameter is used in \eqref{eq_estimate2}  influences  the filtering during
the first step. The theoretical value is $\beta_{\wien} = 1.0$, but a study of its
influence needs to be done to learn its best empirical value.
\begin{center}
	\begin{tabular}{||c||c|c||c|c||c|c||c|c||c|c||}
		\hline		
		 & \multicolumn{2}{c||}{$\beta_{\wien} = 0.8$} & \multicolumn{2}{c||}{$\beta_{\wien} = 0.9$} & \multicolumn{2}{c||}{$\beta_{\wien} = 1.0$} & \multicolumn{2}{c||}{$\beta_{\wien} = 1.1$} & \multicolumn{2}{c||}{$\beta_{\wien} = 1.2$}\\
		\hline
		$\sigma$ & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE}\\
		\hline
		\hline
		2 & 45.91 & 1.29 & 45.95 & 1.28 & 45.98 & 1.28 & 46.00 & 1.28 & {\bf 46.01} & {\bf 1.27}\\
		\hline
		5 & 39.75 & 2.62 & 39.79 & 2.61 & 39.82 & 2.60 & 39.84 & 2.60 & {\bf 39.86} & {\bf 2.59}\\
		\hline
		10 & 35.30 & 4.38 & 35.34 & 4.36 & 35.36 & 4.35 & 35.38 & 4.34 & {\bf 35.39} & {\bf 4.33}\\
		\hline
		20 & 31.13 & 7.08 & 31.17 & 7.05 & 31.19 & 7.03 & 31.19 & 7.03 & {\bf 31.20} & {\bf 7.02}\\
		\hline
		30 & 28.85 & 9.20 & 28.87 & 9.18 & 28.89 & 9.16 & {\bf 28.90} & {\bf 9.15} & 28.89 & 9.16\\
		\hline
		40 & 27.27 & 11.04 & 27.28 & 11.02 & {\bf 27.31} & {\bf 10.99} & 27.30 & 11.00 & 27.30 & 11.00\\
		\hline
		60 & 25.48 & 13.57 & {\bf 25.49} & {\bf 13.56} & 25.47 & 13.58 & 25.46 & 13.59 & 25.45 & 13.61\\
		\hline
		80 & 24.16 & 15.79 & {\bf 24.17} & {\bf 15.77} & 24.16 & 15.79 & 24.15 & 15.82 & 24.12 & 15.86\\
		\hline
		100 & {\bf 23.12} & {\bf 17.80} & 23.12 & 17.81 & 23.10 & 17.84 & 23.09 & 17.87 & 23.07 & 17.91\\
		\hline
	\end{tabular}
	
	
{\scriptsize In {\bf bold} best result for a given $\sigma$.}
\end{center}
Here again the theoretical value seems to work well, but a slight gain can be
obtained if $\beta_{\wien}$ is tabulated according to $\sigma$. The chosen value
for $\beta_{\wien}$ will be $1.2$ if $\sigma < 50$, $1.0$ otherwise.


\subsection{Influence of the size of the search window $\zsize_{\hard}$ and $\zsize_{\wien}$}


The size of the search window  influences the grouping part of the algorithm. Since
the total number of patches $\tilde Q$ contained in the neighbourhood which needs
to be sorted is proportional to the size of the search window, the computational
time of the algorithm increases with $\zsize_{\hard}$ and $\zsize_{\wien}$. We
would therefore like to minimize  these numbers. Nevertheless, if the size of the
search window is too small, the  ``similar'' patches will not be that similar to
the reference patch $\tilde P$. Thus it is necessary to find a good compromise
between a good PSNR and a relatively small size for the search window. Moreover,
the size of the search window is intuitively dependant on the size of patches
$\psize_{\hard}$ and $\psize_{\wien}$. This is why $\zsize_{\hard}$ and
$\zsize_{\wien}$ will be determined as a factor of $\psize_{\hard}$ and
$\psize_{\wien}$, i.e. $\zsize_{\hard} = \alpha \psize_{\hard}$ and $\zsize_{\wien}
= \alpha \psize_{\wien}$. For this comparison, the others parameters are fixed as
usual.

\begin{center}
	\begin{tabular}{||c||c|c||c|c||c|c||c|c||c|c||}
		\hline
		 & \multicolumn{2}{c||}{$\alpha = 3$} & \multicolumn{2}{c||}{$\alpha = 4$} & \multicolumn{2}{c||}{$\alpha = 5$} & \multicolumn{2}{c||}{$\alpha = 6$} & \multicolumn{2}{c||}{$\alpha = 7$}\\
		\hline
		$\sigma$ & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE}\\
		\hline
		\hline
		2 & 45.95 & 1.28 & 46.00 & 1.28 & 46.01 & 1.28 & {\bf 46.02} & {\bf 1.27} & 46.01 & 1.28\\
		\hline
		5 & 39.74 & 2.63 & 39.82 & 2.60 & 39.84 & 2.59 & {\bf 39.86} & {\bf 2.59} & {\bf 39.86} & {\bf 2.59}\\
		\hline
		10 & 35.19 & 4.43 & 35.33 & 4.37 & 35.36 & 4.35 & 35.40 & 4.33 & {\bf 35.41} & {\bf 5.32}\\
		\hline
		20 & 30.98 & 7.20 & 31.17 & 7.05 & 31.23 & 6.99 & 31.30 & 6.94 & {\bf 31.32} & {\bf 6.93}\\
		\hline
		30 & 28.63 & 9.44 & 28.85 & 9.20 & 28.92 & 9.13 & 28.99 & 9.06 & {\bf 29.02} & {\bf 9.02}\\
		\hline
		40 & 27.05 & 11.33 & 27.30 & 11.00 & 27.38 & 10.90 & 27.46 & 10.80 & {\bf 27.50} & {\bf 10.75}\\
		\hline
		60 & 25.13 & 14.12 & 25.34 & 13.79 & 25.42 & 13.66 & 25.52 & 13.51 & {\bf 25.55} & {\bf 13.46}\\
		\hline
		80 & 23.85 & 16.37 & 24.09 & 15.93 & 24.18 & 15.77 & 24.25 & 15.63 & {\bf 24.28} & {\bf 15.57}\\
		\hline
		100 & 22.85 & 18.35 & 23.04 & 17.97 & 23.13 & 17.79 & 23.19 & 17.67 & {\bf 23.23} & {\bf 17.57}\\
		\hline
	\end{tabular}
	
	
{\scriptsize In {\bf bold} best result for a given $\sigma$.}
\end{center}
It follows from the comparison table that increasing the size of the search window
improves the result by finding more similar patches. Accordingly the parameters are
 fixed to:
\begin{itemize}
	\vspace{-3mm}\item $\zsize_{\hard} = 7 \psize_{\hard}$;	
	\vspace{-3mm}\item $\zsize_{\wien} = 7 \psize_{\wien}$.
\end{itemize}


\subsection{Influence of the minimal number of closest neighbours, $N_{\hard}$ and $N_{\wien}$
	\label{subsec:sizeSearch} }


As we have to invert a matrix in \eqref{eq_estimate1} and \eqref{eq_estimate2}, a
minimal number of similar patches is needed.  Otherwise this matrix will not been
invertible. Thus, $N_{\hard}$ and $N_{\wien}$ have to be determined empirically.
Moreover, they depend on the noisy image. For this reason, only the final chosen
values are given here
$$
N_{\hard} = \left\{
	\begin{array}{ll}
	30 & \text{ if } \psize_{\hard} = 3\\
	60 & \text{ if } \psize_{\hard} = 5\\
	90 & \text{ if } \psize_{\hard} = 7\\
	\end{array}\right. ;
	\qquad \qquad
N_{\wien} =\left\{
	\begin{array}{ll}
	30 & \text{ if } \psize_{\wien} = 3\\
	60 & \text{ if } \psize_{\wien} = 5\\
	90 & \text{ if } \psize_{\wien} = 7\\
	\end{array}\right. .
$$


\subsection{Influence of $\tau_0$}


This parameter is used only in the second step, to fix the minimum threshold
between two similar patches. Indeed in the second step we got an estimate
$u^{\basic}$ and the distances between patches are better estimated on $u^{\basic}$
than on $\tilde u$. Thus, in homogeneous areas we can allow for many more similar
patches than $\zsize_{\wien}$. The parameter $\tau_0$ is voluntarily kept small,
because otherwise patches which differ significantly from  the reference patch
would be considered  similar.



\begin{center}
	\begin{tabular}{||c||c|c||c|c||c|c||c|c||c|c||}
		\hline
		 & \multicolumn{2}{c||}{$\tau_0 = 0$} & \multicolumn{2}{c||}{$\tau_0 = 2$} & \multicolumn{2}{c||}{$\tau_0 = 4$} & \multicolumn{2}{c||}{$\tau_0 = 8$} & \multicolumn{2}{c||}{$\tau_0 = 16$}\\
		\hline
		$\sigma$ & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE} & {\scriptsize PSNR} & {\scriptsize RMSE}\\
		\hline
		\hline
		2 & 45.99 & 1.28 & {\bf 46.01} & {\bf 1.27} & 46.00 & 1.28 & 45.94 & 1.29 & 45.81 & 1.30\\
		\hline
		5 & 39.88 & 2.58 & {\bf 39.93} & {\bf 2.57} & 39.91 & 2.58 & 39.85 & 2.59 & 39.68 & 2.64\\
		\hline
		10 & 35.36 & 4.35 & 35.44 & 4.31 & {\bf 35.45} & {\bf 4.30} & 35.39 & 4.34 & 35.21 & 4.42\\
		\hline
		20 & 31.17 & 7.05 & 31.28 & 6.96 & {\bf 31.29} & {\bf 6.95} & 31.25 & 6.99 & 31.08 & 7.12\\
		\hline
		30 & 28.82 & 9.23 & 29.01 & 9.03 & 29.02 & 9.02 & {\bf 29.03} & {\bf 9.02} & 28.89 & 9.16\\
		\hline
		40 & 27.18 & 11.16 & 27.40 & 10.87 & 27.44 & 10.82 & {\bf 27.46} & {\bf 10.80} & 27.34 & 10.95\\
		\hline
		60 & 25.43 & 13.64 & 25.55 & 13.46 & {\bf 25.58} & {\bf 13.42} & 25.54 & 13.47 & 25.44 & 13.64\\
		\hline
		80 & 24.08 & 15.94 & 24.18 & 15.75 & {\bf 24.21} & {\bf 15.71} & 24.17 & 15.78 & 24.00 & 16.10\\
		\hline
		100 & 23.16 & 17.72 & 23.28 & 17.48 & {\bf 23.33} & {\bf 17.37} & 23.31 & 17.42 & 23.08 & 17.88\\
		\hline
	\end{tabular}
	
	
{\scriptsize In {\bf bold} best result for a given $\sigma$.}
\end{center}
Using  the minimum threshold with a small value ($\tau_0 = 2$ or $4$) is always
better than  ($\tau_0 = 0$). Moreover, as expected, a  too large value ($\tau_0 =
16$) gives really worse results. According to this comparison, we shall set $\tau_0
= 4$.


\subsection{Summary table of the best parameters}


Here is the summary table with the final chosen values for all parameters,
depending on the value of the noise:

\begin{center}
	\begin{tabular}{||c||c|c|c|c||}
		\hline
		$\sigma$ & $0\leq \sigma < 20$ & $20\leq  \sigma < 50$ & $50 \leq \sigma < 70$ & $70\leq \sigma$\\
		\hline
		\hline
		$\psize_{\hard}$ & 3 & 5 & 7 & 7\\
		\hline
		$\psize_{\wien}$ & 3 & 3 & 5 & 7\\
		\hline
		$\gamma$ & \multicolumn{4}{c||}{1.05}\\
		\hline
		$\beta_{\hard}$ & \multicolumn{4}{c||}{1.0}\\
		\hline
		$\beta_{\wien}$ & \multicolumn{2}{c|}{1.2} & \multicolumn{2}{c||}{1.0}\\
		\hline
		$\zsize_{\hard}$ & 21 & 35 & 49 & 49\\
		\hline
		$\zsize_{\wien}$ & 21 & 21 & 35 & 49\\
		\hline
		$N_{\hard}$ & 30 & 60 & 90 & 90\\
		\hline
		$N_{\wien}$ & 30 & 30 & 60 & 90\\
		\hline
		$\tau_0$ & \multicolumn{4}{c||}{4}\\
 		\hline
	\end{tabular}
\end{center}
