# A Novel Guided Box Filter Based on Hybrid Optimization for Medical Image Denoising
## 3 Proposed Methodology  
_Hybrid Optimization Based Image Denoising Filter_  
In this work, we propose a filter for medical images. The model is designed with hybrid bio-inspired algorithms with a digital filter for coefficient estimation. The block diagram of the designed medical image filter is shown in Figure 2.  
The basic step of the proposed algorithm is dependent on a guided decimation box filter using a hybrid cuckoo particle swarm optimization model for medical image filters. In the first step, the input image (noisy) is taken, and its red, green, and blue sub-components are extracted. Further, each sub-band is passed through a low-pass filter. Here, the Butterworth low pass filter is used to filter noisy images by removing high-frequency noise from a digital image and preserving low-frequency components. The transfer function of LPF of order n is mathematically represented as  
\[H(u,v)=\frac{1}{1+\left[\frac{\hat{v}\sqrt{(u^{2}+v^{2})}}{D_{o}}\right]^{2n}} \tag{14}\]  
Here, \(\frac{2}{\sqrt[2]{(u^{2}+v^{2})}}\) is the Euclidean distance between the origin and any point \((u,v)\) in the input image. \(D_{o}\) is the cutoff frequency. After LPF, a two-level discrete wavelet transform (2-DWT) is applied over all sub-components. Then, desired coefficients are selected among each sub-band correspondingly and passed through a decimation box filter of \(n\times n\) size having n factor; for this, padding is performed on each sub-band. Then, noisy coefficients are extracted by using the designed hybrid cuckoo particle swarm optimization (HCPSO) algorithm. Then, thresholding functions are applied to find the Optimized Filter Coefficients (OFC) to obtain \(\mathrm{R_{coeff}}\), \(\mathrm{G_{coeff}}\) and \(\mathrm{B_{coeff}}\) to remove noise from each component, respectively. The fitness function of the optimized solution is evaluated, and then the best solution or coefficient is evaluated. Later, coefficients respective to zero-padding locations are removed and passed through inverse discrete wavelet transform (IDWT) to generate a filtered image [27]. The entire proposed algorithm is presented in Algorithm 4. ```
Input : \(I_{x,y}\) input noisy image Output : \(\mathrm{O}_{x,y}\) output filtered image Begin
1. \(I_{x,y}\xrightarrow[\mathrm{R}\mathrm{R}\mathrm{G}\mathrm{E}\mathrm{x}\mathrm{x} \mathrm{t}]\)\(\{I_{R},\ I_{G},\ I_{B}\}\)
2. For I = 1:3 Initialize decimation box of \(n\times n\) size with n decimation factor
4. \(I_{i}\xrightarrow[\mathrm{2-}\mathrm{DWT}]\)\(I_{coeff}\)\(\{\)here, \(I_{coeff}\) is the DWT coefficient\(\}\)
5. \(I_{coeff}\xrightarrow[\mathrm{n\times n}]\)\(D_{I}\)\(\{\)here, \(D_{I}\) is the decimation box coefficient\(\}\)
6. \(D_{I}\xrightarrow[\mathrm{HCPSO}]\)\(D_{lept}\)\(\{\)here, \(D_{I}\) is the optimized filter coefficient\(\}\)
7. \(D_{lept}\xrightarrow[\mathrm{2-}\mathrm{IDWT}]\)\(\{\)\(O_{i}\}\)
8. End
9. \(O_{R}\), \(O_{G}\), \(O_{B}\xrightarrow[\mathrm{RGB}\mathrm{Combine}]\)\(\{O_{x,y}\}\)
10. Return \(O_{x,y}\) End
```  
**Algorithm 4** Proposed Hybrid-Optimization-based Image Filter  
Figure 2: Flowchart of medical image filtering using proposed novel guided decimation box filter. First, an input image \(I_{x,y}\) is considered and corrupted by introducing random noise with a noise factor \(N_{x,y}\). Then, the corrupted image \(I_{c(x,y)}\) is represented as  
\[I_{c(x,y)}=I_{(x,y)}+N_{(x,y)} \tag{15}\]  
Different levels of noise are introduced by the variance in the noise. These filters are designed to remove this noise. Generally, bilateral filters are used for image denoising, but it shows computational complexity and sometimes introduce unwanted radiant reversal artifacts that cause image distortion.