# Hybrid Filter Based on Fuzzy Techniques for Mixed Noise Reduction in Color Images
## 2 Methods
### Impulsive Noise Detection and Reduction  
The denoising scheme used is founded on the \(FROD\) statistic [34] described in the following lines. We use the \(FROD\) instead of \(ROAD\) for its efficiency detecting impulses. Consider for each pixel \(x\), in RGB format \((x(1),x(2),x(3))\), a \(n\times n\) window \(W_{x}\) centered at \(x\). Let \(W_{x}^{0}\) be the neighborspixels of \(x\) in \(W_{x}\); i.e., \(W_{x}^{0}=W_{x}-\{x\}\). In order to compute the \(ROAD\) statistic [18] the distances \(d_{x,x,i},\;\mathbf{x}_{i}\in W_{x}^{0}\) are sorted in an ascending order, obtaining a set of non-negative reals \(r_{j}(\mathbf{x})\) such that: \(r_{1}(\mathbf{x})\leq r_{2}(\mathbf{x})\leq\ldots\leq r_{n^{2}-1}(\mathbf{x})\). Then, given an integer \(0<\alpha\leq n^{2}-1\), \(ROAD_{\alpha}\) denotes the a rank-ordered difference statistic, given by [18],  
\[ROAD_{\alpha}(\mathbf{x})=\sum_{j=1}^{\alpha}r_{j}(\mathbf{x}).\]  
\(ROAD_{\alpha}\) expresses the global distance between \(x\) and its \(\alpha\) nearest neighbors. This distance is expected to be greater for impulses than for noise-free pixels. The fuzzy metric \(M_{\infty}\)[34] was used to obtain the distances \(d_{x,\mathbf{x}_{i}},\;x_{i}\in W_{x}^{0}\), because it has been proven to be especially sensitive to impulsive noise. This metric, given two RGB image vectors \(\mathbf{x}_{i},\mathbf{x}_{j}\), is determined by  
\[M_{\infty}(\mathbf{x}_{i},\mathbf{x}_{j})=\min_{\ell=1}^{3}\frac{\min\{\mathbf{x}_{i}(\ell ),\mathbf{x}_{j}(\ell)\}+P}{\max\{\mathbf{x}_{i}(\ell),\mathbf{x}_{j}(\ell)\}+P}. \tag{1}\]  
The parameter \(P\) in Equation (1) was set to 1024, which has been proven to be a convenient value for RGB color vectors [35]. Ordering the fuzzy distances \(d_{x,\mathbf{x}_{i}}=M_{\infty}(\mathbf{x},\mathbf{x}_{i})\) in a decreasing sequence \(s_{1}(\mathbf{x})\geq s_{2}(\mathbf{x})\geq\cdots\geq s_{n^{2}-1}(\mathbf{x})\) the fuzzy \(ROD\) statistic (\(FROD_{m}\)) is defined by  
\[FROD_{\alpha}(\mathbf{x})=\prod_{j=1}^{\alpha}s_{j}(\mathbf{x}). \tag{2}\]  
The positive integer \(\alpha\) in Equation (2) is a parameter such that \(\alpha<n^{2}-1\). An impulse noise pixel will present a low value of \(FROD_{\alpha}\) because it is not expected to be similar to its neighbors, whereas impulse-free pixels are expected to have a \(FROD_{\alpha}\) value nearer to one. \(FROD_{\alpha}(\mathbf{x})\) was used in order to identify pixels that are clearly impulsive or clearly impulse-free:  
* Step 1: If \(FROD_{\alpha}(\mathbf{x})\) is greater than a first parameter \(th_{1}\), then \(\mathbf{x}\) is labeled as noise-free.
* If \(FROD_{\alpha}(\mathbf{x})\) is less than a second parameter \(th_{2}\) (\(th_{2}<th_{1}\)), \(\mathbf{x}\) is classified as noisy.
* If \(\mathbf{x}\) satisfies \(th_{1}\geq FROD_{\alpha}(x)\geq th_{2}\), then we conclude that it is not possible to classify \(\mathbf{x}\) at this step, and it is analyzed in a second step.
* Step 2: A third threshold parameter \(th_{3}\) is used. In this step \(FROD_{\alpha^{\prime}}(\mathbf{x})\) is computed on \(W_{x}^{0}\) excluding the pixels already labeled as noisy, and using another parameter \(\alpha^{\prime}<m\). If \(FROD_{\alpha^{\prime}}(\mathbf{x})>th_{3}\), then \(\mathbf{x}\) is labeled as impulse-free. If not, \(\mathbf{x}\) is labeled as impulsive.  
After the detection steps, each pixel labeled as impulsive is substituted by \(\mathrm{VMF}_{\mathrm{out}}\)[3] performed over the noise-free neighbors in the window \(W_{\mathbf{x}}\). In [34], authors proposed in Steps 1 and 2 to classify as noise-free, all the pixels \(\mathbf{x}_{j}\) used in \(FROD_{\alpha}(\mathbf{x}_{i})\). In our experiments, the variation of the algorithm we propose significantly improves the quality of the hybrid filter.