### Previous work on anisotropic diffusion for speckle reduction

Anisotropic diffusion was proposed in [14] and has been employed for noise reduction for some time. The basic equation used in anisotropic diffusion is a partial differential equation which can be expressed as [14]:

\left\{\begin{array}{c}\frac{\partial I}{\partial t}=div\left[c\left(|\nabla I|\right)\bullet \nabla I\right]\\ I\left(t=0\right)={I}_{0}\end{array}\right.

(3)

where ∇ is the gradient operator, *div* is the divergence operator, |•| is the magnitude.

In the study of anisotropic diffusion for speckle reduction, a lot of research focuses on the development of the computation of *c*(*x*). One of the methods is speckle reducing anisotropic diffusion filter developed by Yu and Acton [18]. In [18], they proposed the following equation to compute the diffusion coefficients:

c\left(q\right)=\frac{1}{1+\left[{q}^{2}\left(i,j;t\right)-{q}_{0}^{2}\left(t\right)\right]/\left[{q}_{0}^{2}\left(t\right)\left(1+{q}_{0}^{2}\left(t\right)\right)\right]}

(4)

where

q{\left(i,j;t\right)}^{2}=\frac{\frac{1}{2}{\left(|\nabla I/I\right)}^{2}-\frac{1}{16}{\left({\nabla}^{2}I/I\right)}^{2}}{{\left[1+\left(1/4\right)\left({\nabla}^{2}I/I\right)\right]}^{2}}

(5)

is called instantaneous coefficient of variation (ICOV).

In fact, SRAD is obtained by combining anisotropic diffusion with Lee filter [22]. Similar to SRAD, Aja-Fernandez et al. developed another anisotropic diffusion filter by combining anisotropic diffusion with Kuan filter. They called their filter as detail preserving anisotropic diffusion (DPAD). DPAD is shown to have similar speckle reduction performance to SRAD but is less sensitive to the diffusion iteration times. DPAD computes the coefficient of variation as follows:

q{\left(i,j;t\right)}^{2}=\frac{\frac{1}{\left|{\eta}_{i,j}^{U}\right|-1}\sum _{p\in {\eta}_{i,j}^{U}}{\left({I}_{p}-{\overline{I}}_{i,j}\right)}^{2}}{{\overline{I}}_{i,j}^{2}}

(6)

and the diffusion coefficient function adopted by DPAD is

c\left(q\right)=\frac{1+\frac{1}{q{\left(i,j;t\right)}^{2}}}{1+\frac{1}{{q}_{0}{\left(t\right)}^{2}}}

(7)

Besides Aja-Fernandez's work, Tauber et al. [23] modified the diffusion in SRAD and used:

c\left(q\right)=\left\{\begin{array}{cc}\hfill \frac{1}{2}{\left[1-\frac{q{\left(i,j;t\right)}^{2}-{q}_{0}{\left(t\right)}^{2}}{{q}_{0}{\left(t\right)}^{2}\left(1+{q}_{0}{\left(t\right)}^{2}\right)}\right]}^{2}\hfill & \hfill \mathsf{\text{if}}\frac{q{\left(i,j;t\right)}^{2}-{q}_{0}{\left(t\right)}^{2}}{{q}_{0}{\left(t\right)}^{2}\left(1+{q}_{0}{\left(t\right)}^{2}\right)}\le 1\hfill \\ \hfill 0\hfill & \hfill \mathsf{\text{otherwise}}\hfill \end{array}\right.

(8)

as the diffusion coefficient function. He used the same way as SRAD to compute the coefficient of variation but different diffusion coefficient function. The diffusion coefficient function in (8) is from [17]:

c\left(x,{\sigma}_{e}\right)=\left\{\begin{array}{cc}\hfill \frac{1}{2}{\left[1-{\left(x\u2215{\sigma}_{e}\right)}^{2}\right]}^{2}\hfill & \hfill \left|x\right|\le {\sigma}_{e}\hfill \\ \hfill 0\hfill & \hfill \mathsf{\text{otherwise}}\hfill \end{array}\right.

(9)

The diffusion coefficient function in (9) allows the neighbours with larger gradient magnitude than *σ*_{
e
} has no influence on the current pixel. The method can preserve sharper edges than previous formulations.

Inspired by their success [17, 22, 23], in this paper, we aim to improve the robustness of DPAD algorithm and develop a modified algorithm with both advantages from DPAD and Tauber' algorithm [23]. The modified algorithm will preserve sharper edges and be less sensitive to the iteration times.

### The proposed robust detail preserving anisotropic diffusion

In this section, we will develop a new scheme to compute the instantaneous coefficient of variation, and then we introduce the new technique which combines the DPAD algorithm and the diffusion coefficient function in equation (9) from [17]. The proposed method will have the advantages of being robust to outliers (the edges of the image) and less sensitive to the number of diffusion iterations.

#### Computation of instantaneous coefficient of variation with a new scheme

In SRAD and DPAD, coefficient of variation is adopted to distinguish homogeneous regions from edges. However, the computation of coefficient of variation from 3 × 3 neighbour is not robust [21], and thus DPAD adopted 5 × 5 neighbour (as shown in Figure 7(a)) to compute *q*(*i*, *j*;*t*). However, the computation using 5 by 5 neighbours is a little costive. In order to make the diffusion robust and less costive, we propose a new scheme to compute *q*(*i*, *j*;*t*). The new scheme is shown in Figure 7(b). Let the pixels be *v* 0,.. *v*_{12} as shown in the Figure 7, (8) can be reformulated as:

q{\left(i,j;t\right)}^{2}=\frac{\frac{1}{12}\sum _{m=0}^{11}\sum _{n=m+1}^{12}{\left({v}_{n}-{v}_{m}\right)}^{2}}{{\left(\sum _{m=0}^{12}{v}_{m}\right)}^{2}}

(10)

#### Robust DPAD diffusion function (RDPAD)

Now let's introduce robust DPAD (RDPAD). Starting from equation (9), we have:

\begin{array}{lll}\hfill c\left(q\right)& =\frac{1+\frac{1}{q{\left(i,j;t\right)}^{2}}}{1+\frac{1}{{q}_{0}{\left(t\right)}^{2}}}=\frac{{q}_{0}{\left(t\right)}^{2}\left[1+q{\left(i,j;t\right)}^{2}\right]}{q{\left(i,j;t\right)}^{2}\left[1+{q}_{0}{\left(t\right)}^{2}\right]}\phantom{\rule{2em}{0ex}}& \hfill \text{(1)}\\ =\frac{1}{\frac{q{\left(i,j;t\right)}^{2}+q{\left(i,j;t\right)}^{2}{q}_{0}{\left(t\right)}^{2}}{{q}_{0}{\left(t\right)}^{2}+{q}_{0}{\left(t\right)}^{2}q{\left(i,j;t\right)}^{2}}}=\frac{1}{1+\frac{q{\left(i,j;t\right)}^{2}-{q}_{0}{\left(t\right)}^{2}}{{q}_{0}{\left(t\right)}^{2}\left[1+q{\left(i,j;t\right)}^{2}\right]}}\phantom{\rule{2em}{0ex}}& \hfill \text{(2)}\\ \hfill \text{(3)}\end{array}

(11)

Let

R\left(i,j;t\right)=\frac{q{\left(i,j;t\right)}^{2}-{q}_{0}{\left(t\right)}^{2}}{{q}_{0}{\left(t\right)}^{2}\left[1+q{\left(i,j;t\right)}^{2}\right]}

(12)

Using equation (9) and equation (12), we can obtain a new computation of c(q), which can be expressed as follows:

c\left(q\right)=\left\{\begin{array}{cc}\hfill \frac{1}{2}{\left[1-\frac{q{\left(i,j;t\right)}^{2}-{q}_{0}{\left(t\right)}^{2}}{{q}_{0}{\left(t\right)}^{2}\left[1+q{\left(i,j;t\right)}^{2}\right]}\right]}^{2}\hfill & \hfill \mathsf{\text{if}}\frac{q{\left(i,j;t\right)}^{2}-{q}_{0}{\left(t\right)}^{2}}{{q}_{0}{\left(t\right)}^{2}\left[1+q{\left(i,j;t\right)}^{2}\right]}\le 1\hfill \\ \hfill 0\hfill & \hfill \mathsf{\text{otherwise}}\hfill \end{array}\right.

(13)

The above equation can be rewritten as

c\left(q\right)=\left\{\begin{array}{cc}\hfill \frac{1}{2}{\left[1-\frac{q{\left(i,j;t\right)}^{2}-{q}_{0}{\left(t\right)}^{2}}{{q}_{0}{\left(t\right)}^{2}\left[1+q{\left(i,j;t\right)}^{2}\right]}\right]}^{2}\hfill & \hfill \mathsf{\text{if}}q{\left(i,j,t\right)}^{2}\le \frac{2{q}_{0}{\left(t\right)}^{2}}{\left|1-{q}_{0}{\left(t\right)}^{2}\right|}\hfill \\ \hfill 0\hfill & \hfill \mathsf{\text{otherwise}}\hfill \end{array}\right.

(14)

In equation (14), we assigns zero weights to the outliers (edges can be seen as outliers in an image) when the instantaneous coefficients of variation is larger than\frac{2{q}_{0}{\left(t\right)}^{2}}{\left|1-{q}_{0}{\left(t\right)}^{2}\right|}. However, a decreasing small positive weight is assigned to outliers in Aja-Fernandez's algorithm. Therefore, although both of the proposed method and Aja-Fernandez's method perform diffusion similarly when *q* is small. The behaviour of the two methods will be different when q is large. In the case of large q, the proposed method will stop diffusion while Aja-Fernandez will still perform diffusion. Thus the proposed method can result in sharper edges than Aja-Fernandez's method and the proposed method is also robust to the diffusion iterations.

The proposed anisotropic diffusion can be implemented numerically using the similar way to SRAD, the only difference lies in that the computation of c(q) is different.