# Image Noise Reduction by Means of Bootstrapping-Based Fuzzy Numbers
## 5 Filtering Images
### Fuzzy Spatial Closeness  
For the case of fuzzy spatial closeness between pixels, we did exactly the same as [PERSON] et al. [15]. Let us consider the pixels in an \(n\times n\) filter window \(W\) represented in Cartesian coordinates; thus, denote by \(i=i_{1},i_{2}\in\mathcal{V}^{2}\) the position of a pixel \(\tilde{u}_{i}\) in where \(Y=\{0,1,2,\ldots,n-1\}\). We consider the standard fuzzy metric \(S\) deduced from the \(L_{\infty}\) metric [15] given by  
\[S(i,j,t)=\frac{t}{t+\|i-j\|_{\infty}},\]  
where \(i,j\in Y^{2}\), \(t>0\), and \(\|i-j\|_{\infty}=\max\{|i_{1}-j_{1}|,|i_{2}-j_{2}|\}\). It can be easily seen that pixels farther from the window center are less close overall to the rest of the pixels in the window. It has been experimentally observed that the \(L_{\infty}\) metric has a better result than the Euclidean metric [15]. Thus, \(S(i,j,t)\) expresses the amount of fuzzy spatial closeness between color pixels \(\tilde{u}_{1}\) and \(\tilde{u}_{2}\) with respect to the value of \(t\). Here also, the parameter \(t\) is used to adjust the importance given to the spatial closeness criterion. Now, considering that each pixel is displayed as a three-component color vector \(RGB\) and location, so to achieve our purpose, we used a combination fuzzy metric as follows:  
\[BCFM(\tilde{u}_{i},\tilde{u}_{j},t)=R(\tilde{u}_{i},\tilde{u}_{j}).S(i,j,t)= \frac{c}{c+\|\tilde{u}_{i}-\tilde{u}_{j}\|}\cdot\frac{t}{t+\|i-j\|_{\infty}}. \tag{3}\]  
If we identify each pixel \(\tilde{u}_{i}\) with \(\tilde{u}_{i}=(\tilde{u}_{i}^{1},\tilde{u}_{i}^{2},\tilde{u}_{i}^{3},i_{1},i_ {2})\), then it can be proven that \(BCFM\) is a fuzzy metric for the fuzzy set on \(X^{3}\times Y^{2}\). This fuzzy metric expresses the degree of similarity of color and the closeness of pixels.  
For example, suppose we have:  
\[\|\tilde{u}_{i}-\tilde{u}_{j}\|=d_{2}(\tilde{u},\tilde{v})=(\int_{0}^{1}f( \alpha)d^{2}(L_{\alpha}\tilde{u},L_{\alpha}\tilde{v})d\alpha)^{\frac{1}{2}},\]  
and \(\tilde{u},\tilde{v}\) are two triangular fuzzy numbers as \(\tilde{u}=(a,s_{a})_{T},\tilde{v}=(b,s_{b})_{T}\), then  
\[d_{2}(\tilde{u},\tilde{v})=(\int_{0}^{1}\alpha d^{2}(L_{\alpha}\tilde{u},L_{ \alpha}\tilde{v})d\alpha)^{\frac{1}{2}}=[(a-b)^{2}+\frac{1}{6}(s_{a}-s_{b})^{ 2}]^{\frac{1}{2}}. \tag{4}\]  
so \(BCFM\) will be equal to  
\[BCFM(\tilde{u}_{i},\tilde{u}_{j},t)=\frac{c}{c+[(a-b)^{2}+\frac{1}{6}(s_{a}-s _{b})^{2}]^{\frac{1}{2}}}\cdot\frac{t}{t+\|i-j\|_{\infty}}. \tag{5}\]  
In the following example, we assume that we have a fuzzy image matrix (which is described in Section 6).  
**Example 3**.: _Suppose the following matrix (Figure 1) is equal to the pixel values of a part of an image on a gray scale. For each pixel, the amount of gray is expressed as a symmetric triangular fuzzy number._  
_We want to use \(BCFM\) to estimate the value of 165 in the above matrix. Now, using Equation (5), we calculated the value of each pixel in the neighborhood of \(165\) and considered the pixel that has the largest \(BCFM\) as the best alternative to the value of 165._  
_Note that in Figure 2 the maximum value in matrix \(BCFM\) is \(4.0756\), which corresponds to pixel number \((3,2)\). Therefore, the value of this pixel, \((162,0.1)\), can be chosen as the best alternative to the \(3\times 3\) neighborhood matrix center._  
Figure 1: The \(3\times 3\) neighborhood for 165.  
1.6330 1.6375 3.7018  
3.8509 3.8400 4.0105  
3.7260 4.0756 3.7800  
To express the accuracy of this method, we assumed that a noise is added to the image so that the neighborhood matrix is as follows (Figure 3):  
\begin{tabular}{l l l} (44,0.5) & (45,0.3) & (159,0.7) \\ (161,0.8) & (0,0.4) & (159,0.6) \\ (157,0.7) & (162,0.1) & (154,0.4) \\ \end{tabular}  
The maximum value in matrix BCFM (Figure 4) is 3.5294, which corresponds to the pixel number \((2,3)\). Therefore, the value of this pixel, \((159.0.6)\), is the best estimate for the center of the \(3\times 3\) neighborhood matrix.  
1.6699 1.6726 3.2207  
3.3116 1.1058 5.5293  
3.3083 3.5130 3.0433