# Systematic Evaluation on Speckle Suppression Methods in Examination of Ultrasound Breast Images
## 2 Filtering Methods
### Local Statistical-Based Filter
#### 2.2.3 Bilateral Filter  
BF is a specialization of non-local mean filter. It extends the concept of Gaussian smoothing by weighting the filter coefficients with a corresponding penalty for difference of pixel intensity between the pixel to be filtered and its neighboring pixels. The output of the BF is a weighted average of its neighboring pixels. The BF was first introduced by [PERSON] et al. [42] by using the name of \"non-linear Gaussian filter\", and then rediscovered by [PERSON] et al. [43] who gave it the current name. Due to the simplicity and good performance in edge preservation, many researchers highly praised this method and applied it for de-speckling medical ultrasound images [18]. BF is defined as  
\[I_{\underset{f}{\sim}}(x,y)=\frac{\sum_{kl}I_{g}(k,l)W_{d}(x,y,k,l)W_{r}(x,y,k,l)}{\sum_{kl}W_{d}(x,y,k,l)W_{r}(x,y,k,l)} \tag{5}\]  
and,  
\[W_{d}(x,y,k,l)=\exp(-\frac{(x-k)^{2}+(y-l)^{2}}{\sigma_{d}{}^{2}}),\ W_{r}(x,y,k,l)=\exp(-\frac{\left[I_{g}(x,y)-I_{g}(k,l)\right]^{2}}{\sigma_{r}{}^{2}}) \tag{6}\]  
where \(\sigma_{d}\) and \(\sigma_{r}\) are the parameters affecting low-pass filter and the degradation function separately.  
It can be indicated that the smoothing degree in the homogeneous region of image depends on \(\sigma_{d}\). The higher \(\sigma_{d}\) is, the smaller cut-off frequency of the Gaussian low-pass filter is. The gray value of homogeneous region is more close to the Direct Current (DC) component.  
Assuming that \(I_{f(x,y)}=C\), \((x,y)\) belongs to the homogeneous region, and the contaminated image is \(I_{g}=I_{f}\cdot n_{m}+n_{a}\), where \(n_{a}\) is GWN, we have  
\[F(0)\ \ \overset{FT}{\longleftrightarrow}\ \ I_{\underset{f}{\sim}}(x,y)=mean(I_{g}(x,y))= mean(I_{f}(x,y)+n_{a}) \tag{7}\]  
and  
\[I_{\underset{f}{\sim}}(x,y)=mean(I_{\underset{f}{\sim}}(x,y))=C,\text{ and }\text{var}(I_{\underset{f}{\sim}}(x,y))=0 \tag{8}\]  
Where \(mean(\cdot)\) operator means to calculate the mean value of an image, and \(\text{var}(\cdot)\) operator means to calculate the variance of an image. As shown above, in the homogeneous region of an image, the de-noising result is equal to the expectation of the neighbor, such as de-noising by a low-pass filter with the cut-off frequency zero. However, we cannot just increase \(\sigma_{d}\) because greater \(\sigma_{d}\) leads to more loss of edge information. Thus, in order to preserve the smoothness of homogeneous region and sharpness of the edge region, both \(\sigma_{r}\) and \(\sigma_{d}\) need to be adjusted simultaneously. The relationship between \(\sigma_{d}\) and \(\sigma_{r}\) can be calculated by the fixed LRD [32] as the following  
\[\
abla^{2}[I_{\underset{f}{\sim}}(x,y)]=C \tag{9}\]Then  
\[C=\
abla^{2}[I_{\underset{f}{I_{g}}}(x,y)]=\
abla^{2}\left[\frac{\sum_{kl}I_{g}(k, I)W_{d}(x,y,k,l)W_{r}(x,y,k,l)}{\sum_{kl}W_{d}(x,y,k,l)W_{r}(x,y,k,l)}\right] \tag{10}\]  
If \(I_{g}(k,l)\) and LRD are kept constant, we can then obtain:  
\[{\sigma_{d}}^{2}\propto 1/{\sigma_{r}}^{2} \tag{11}\]  
The Equation (11) means that when increasing \(\sigma_{d}\), in order to keep LRD unchanged, \(\sigma_{r}\) should be decreased simultaneously.