\def\papertitle{Stochastic Differential Equation in Image Restoration}
\def\paperauthorA{\underline{Radhia Halilou} and Fatma Zohra Nouri}
%\def\paperauthorB{Author_B_fullname}
% you can add more authors using alphabets after \paperauthor
% 
%------------------------------------------------------------------------------------------
% Do not delete this part starting from here and up to .....
\documentclass[oneside]{article}
\usepackage{icma2021,amssymb,amsmath,mathrsfs} 
%\setcounter{page}{1}
%\input{../../expages.tex}\setpagenumber{1}
%\input{expages.tex}\setpagenumber{1}
\ninept

\usepackage{mathptmx} 
% Saves a lot of ouptut space in PDF... after conversion with the distiller	  
% Delete if you cannot get PS fonts working on your system.
% pdf-tex settings: detect automatically if run by latex or pdflatex
\newif\ifpdf
\ifx\pdfoutput\relax
\else
\ifcase\pdfoutput
\pdffalse
\else
\pdftrue
\fi

\ifpdf % compiling with pdflatex
\usepackage[pdftex,
pdftitle={\papertitle},
%pdfauthor={\paperauthorA},
% for more than one author use pdfauthor={\paperauthorA,\paperauthorB, .....},
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%ù
colorlinks=false, % links are activated as colror boxes instead of color text
bookmarksnumbered, %use section numbers with bookmarks
pdfstartview= XYZ	% starts with zoom=100% instead of full screen; especially useful if working with a big screen :-)
]{hyperref}
\pdfcompresslevel=9
\usepackage[pdftex]{graphicx}
\usepackage[figure,table]{hypcap}
\else % compiling with latex
\usepackage[dvips]{graphicx}
\usepackage[dvips,
colorlinks=false,           % no color links
bookmarksnumbered, %use section numbers with bookmarks
pdfstartview= XYZ	% starts with zoom=100% instead of full screen
]{hyperref}
% hyperrefs are active in the pdf file after conversion
\usepackage[figure,table]{hypcap}
\fi

\newcommand\dsum{\displaystyle\sum}
\newcommand\dprod{\displaystyle\prod}
%------------------------------------------------------------------------------------------
\title{\papertitle}
\affiliation{\paperauthorA}	% This command replaces \name{The DAFx Crew} 
{LAM$^2$SIN, Universit\'{e} Badji Mokhtar-Annaba}

%\usepackage{layout}
%------------------------------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%% to here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
	
	%\layout
	
	% more pdf-tex settings:
	\ifpdf % used graphic file format for pdflatex
	\DeclareGraphicsExtensions{.png,.jpg,.pdf}
	\else  % used graphic file format for latex
	\DeclareGraphicsExtensions{.eps}
	\fi
	
	\maketitle
	
\begin{abstract}
In this work, we propose to solve the problem of restoring images using
stochastic differential equations (SDEs). In a recent work \cite{Halilou21},
we combined two approaches due to Barbu \cite{Bar11, Bar16} and Borkowski \cite
{Bor13} and deducted that the SDEs are very promising in image
restoration.The main idea here is to try to find a good choice for the
drift and diffusion terms. In 1990 Perona-Malik (PM) \cite{PM90} explored two
functions to better handle contours of objects in images. In this proposed
model, we exploit these functions in the SDE; more precisely we try to fix
the drift and diffusion terms according to PM-functions to improve our
previous SDEs results. The obtained experimental results are very
encouraging and competetive compare to other SDEs models.
\end{abstract}

\section{INTRODUCTION}

Recently, the use of stochastic differential equations in image restoration
has significantly grown and evolved. Various models have been proposed to
solve this problem, including the works by Barbu et al \cite{Bar11} and
Borkowski et al \cite{Bor13, Bor17}, unfortunately the first one identified
the diffusion term to $1$ and the second neglected the drift term.

In our previous work, we incorporated both terms (the drift and the
diffusion) in the SDE and obtained encouraging results compare to models
based on the Partial Differential Equations (PDEs). Here, we propose a new
SDE model with different drift and diffusion terms, exploring PM-functions,
in order to improve denoising with contour preservation.

\section{PROPOSED MODEL}

We consider the following model
\begin{equation}
\left\{ dX(t)=\underset{drift}{\underbrace{\mu (X(t))}}dt+\underset{diffusion%
}{\underbrace{\text{ }\sigma (X(t))}}dW_{t},\newline
\text{ }X(0,x,y)=X_{0}(x,y)\in 
%TCIMACRO{\U{211d} }%
%BeginExpansion
\mathbb{R}
%EndExpansion
^{2}.\right.   \label{Eq1}
\end{equation}
We suggest the drift and the diffusion terms to be the PM-funcions and Borkowski's diffusion and write
\begin{equation}
\mu =e^{-(\frac{\left\Vert \nabla X\right\Vert ^{2}}{k^{2}})} \text{  or  }\frac{1%
}{1+\frac{\left\Vert \nabla X\right\Vert ^{2}}{k^{2}}}, \text{ and  }%
\sigma (X(s))=\left( 
\begin{array}{c}
-\frac{(G_{\gamma }\ast I)_{y}(X_{t})}{\left\vert \nabla (G_{\gamma }\ast
I)(X_{t})\right\vert }\text{ \ \ \ \ \ \ }0\newline
\text{ } \\ 
\text{\ \ }\frac{(G_{\gamma }\ast I)_{x}(X_{t})}{\left\vert \nabla
(G_{\gamma }\ast I)(X_{t})\right\vert }\text{ \ \ \ \ \ \ }0%
\end{array}%
\right)   \label{Eq2}
\end{equation}
where $X(t)=(X_{1}(t),X_{2}(t))$ is the stochastic process and $W(t)$
represents a 2D-Brownian motion in a probability space$\left\{ \Omega,\tciFourier ,P\right\}.$
The solution will be the stochastic process $%
X=(X_{1}(t,X_{0}),X_{2}(t,X_{0}))$ adapted to the natural filtration $%
(F_{t})_{t\geq 0}$ on the probability space, which satisfies the
following equation%
\begin{equation}
X(t)=X_{0}+\int_{0}^{t}\mu (X(s))ds+\int_{0}^{t}\sigma (X(s))dW_{s}.
\label{Eq3}
\end{equation}
The restored image is defined by 
\begin{equation}
u(x,y)=E[u_{0}(X_{T})]=\frac{1}{M}\sum_{i=1}^{M}u_{0}(X_{T}^{m}(\beta _{i}))
\label{4}
\end{equation}
with $u_{0}:%
%TCIMACRO{\U{211d} }%
%BeginExpansion
\mathbb{R}
%EndExpansion
^{2}\rightarrow 
%TCIMACRO{\U{211d} }%
%BeginExpansion
\mathbb{R}
%EndExpansion
$, the noisy image,  $X^{m}(\beta _{i})$ the approximation of trajectory for
the stochastic process $X$ and $M$ is the number of Monte Carlo's iterations.

\section{IMPLEMENTATION AND NUMERICAL RESULTS}

\subsection{Numerical scheme}

By using the modified Euler's numerical scheme, we obtain  
\begin{equation}
X_{t_{n+1}}^{m}(i,j)=X_{t_{n}}^{m}(i,j)+\mu (X_{t_{n}}^{m}(i,j))\Delta
t+\sigma (X_{t_{n}}^{m}(i,j))dW_{t},  \label{Eq5}
\end{equation}%
where $t_{n}=nh,$ $h=\frac{T}{m},$ $n=0,1,..,m$ and we study two cases:
\bigskip

\begin{enumerate}
\item PM-functions as drift term and Borkowski's diffusion term, i.e. 
\begin{equation}
\mu (X_{t_{n}}^{m}(i,j))=\left( 
\begin{array}{c}
e^{-\left( 0.5\left( \frac{%
(X_{1}^{m}(i+1,j)-X_{2}^{m}(i-1,j))^{2}+(X_{1}^{m}(i,j+1)-X_{2}^{m}(i,j-1))^{2}%
}{k^{2}}\right) \right) } \\
\text{or} \\ 

\frac{1}{1+\left( 0.5\left( \frac{%
(X_{1}^{m}(i+1,j)-X_{2}^{m}(i-1,j))^{2}+(X_{1}^{m}(i,j+1)-X_{2}^{m}(i,j-1))^{2}%
}{k^{2}}\right) \right) }%
\end{array}%
\right)   \label{Eq6}
\end{equation}
and  
\begin{equation}
\sigma (X_{t_{n}}^{m}(i,j))=\left( 
\begin{array}{c}
-\frac{((u(i,j+1)+u(i,j-1))\ast 0.5)}{\sqrt{(u(i,j+1)+u(i,j-1))\ast
0.5)^{2}+(u(i+1,j)+u(i-1,j))\ast 0.5)^{2}}}\text{\ \ \ \ \ \ \ \ \ }0\newline
\\ 
\frac{((u(i+1,j)+u(i-1,j))\ast 0.5)}{\sqrt{(u(i,j+1)+u(i,j-1))\ast
0.5)^{2}+(u(i+1,j)+u(i-1,j))\ast 0.5)^{2}}}\text{\ \ \ \ \ \ \ \ \ \ \ }0%
\end{array}%
\right) .  \label{Eq7}
\end{equation}
with $(G_{\gamma }\ast I)_{y}=u_{y}$=$((u(i,j+1)+u(i,j-1))\ast 0.5)\ $and $%
(G_{\gamma }\ast I)_{x}=u_{x}=(u(i+1,j)+u(i-1,j))\ast 0.5).$ Note that the
space steps $dx=dy=1.$
\bigskip
\newline

\item Barbu's drift term \cite{Bar11} and PM-functions  (\ref{Eq6}) as diffusion term.
\end{enumerate}

\subsection{Results and comments}

From the obtained results in Table 1. and Figure 1., we note that the
proposed model provides good results in noise removal and important image
features perserving (such as texture, curvature, ect..), compare to the combined Barbu-Borkowski SDE (Barbu's drift and Borkowski's diffusion terms) \cite{Halilou21}. Both cases are more
or less similar; but results related to the second case, where
the drift and the diffusion terms are chosen to be the Barbu's drift
and PM-functions, respectively, give a slight improvement to the first
case.

The numerical results shown in Table 1. and Figure 1, are presented on a grey-scale image altered by Gaussian white noise of zero mean and variance $V = 0.01$ and $0.1$,  in terms of the PSNR (Peak Signal to Noise Ratio) and SSIM (Structure Similarity Index Measure)

\section{Conclusion}

In this work, we proposed a stochastic based model for image restoration. The model uses both
drift and diffusion terms in the SDE for noise removal and without losing
significant features or creating false ones. The drift and the
diffusion terms have been reformulated in order to adapt the stochastic
process to the complexity of the geometric structures. 
From the obtained numerical results, we deduct that our proposed model tends to be qualitatively more efficient compare to the combined Barbu-Borkowski SDE one \cite{Halilou21}, this is not only visually as shown in Figure 1, but also by the means of the PSNR and SSIM as reported in Table 1. It has to be pointed out that the proposed model case 2 is intuitively more realistic. \\ Other numerical experimentations are under consideration. 

\bigskip
\newline


\centering{
\textbf{Table 1. A Comparison of results for image restoration} \\
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
& \multicolumn{2}{|c|}{Proposed Model (case 1)} & \multicolumn{2}{|c|}{Combined Model} & \multicolumn{2}{|c|}{
Proposed Model (case 2)} \\ \hline
Variance & PSNR & SSIM & PSNR & SSIM & PSNR & SSIM \\ \hline
0.01 & \textbf{35.7052} & \textbf{0.9781} & 30.9638 & 0.8645 & \textbf{38.6025}
& \textbf{0.9865} \\ \hline
0.1 & \textbf{23.8868} & \textbf{0.7758} & 23.0485 & 0.5656 & \textbf{24.5423} & 
\textbf{0.7926} \\ \hline
\end{tabular}
}

\begin{figure}[h]
\centering{
\includegraphics[scale=1.10]{Figure1}
\caption{A comparison of results for image restoration: \textbf{(a)} original image, \textbf{(b)} noised image, \textbf{(c)} restored image by the combined model \cite{Halilou21}, \textbf{(d) and (e)} restored image by the proposed model for case 1 and case 2, respectively, $V=0.01$.}
}
\end{figure}


\begin{thebibliography}{9}
\bibitem{Bar11} T. Barbu, G. Da Prato, et L. Tubaro, Kolmogorov equation
associated to the stochastic reflection problem on a smooth convex set of a
Hilbert space $II.$Annales de l'IHP Probabilit\'{e}s et Statistiques, vol.
47, no. 3, pp.699-724, 2011.

\bibitem{Bar16} T. Barbu, et A. Favini, Novel stochastic differential model
for image restoration. Processings of the Romanian Academy-Series A:
Mathematics, Physics, Technical Sciences, Information Science. vol. 17, no.
2, pp. 109-116,2016.

\bibitem{Bor13} D. Borkowski, Dariusz, et K. Ja\'{n}czak-Borkowska, Image
Restoration Using Anisotopic Stochastic Diffusion Collaborated with Non
Local Means. In IFIP Internatinal Conference on Computer Information Systems
and Industial Management. Springer, Berlin, Heidelberg, 2013.

\bibitem{Bor17} D. Borkowski, et K. Ja\'{n}czak-Borkowska, Image Denoising
Using Backward Stochastic Differential Equations, A dvances in Intelligent
Systems and Computing, pp. 185-194, 2017.

\bibitem{Halilou21} R. Halilou and F.Z.\ Nouri, A stochastic Differential
Equation for image restoration, accepted to be presented in MCMA'2021, 27-28
october 2021.

\bibitem{PM90} P. Perona and J. Malik, "Scale-space and edge detection using
anisotropic diffusion", IEEE Trans. Pattern Anal. Machine Intell., vol. 12,
pp. 629-639, 1990.
\end{thebibliography}

\bigskip

\end{document}
