# Gray Image Denoising Based on Array Stochastic Resonance and Improved Whale Optimization Algorithm
## 4 Array Stochastic Resonance Strategy Based on Improved Whale Optimization Algorithm
### Array Stochastic Resonance Strategy Based on Improved Whale Optimization Algorithm  
The peak signal-to-noise ratio (PSNR) is an important means to evaluate images in common use, and is an important evaluation index of image processing performance in most image processing. The value of PSNR is proportional to the image quality. The PSNRis used to evaluate the image denoising effect of the proposed algorithm. The PSNR can be expressed as  
\[\text{MSE}=\frac{1}{mn}\sum_{i=0}^{m-1}\sum_{j=0}^{n-1}\|X(i,j)-Y(i,j)\|^{2} \tag{18}\]  
\[\text{PSNR}=10*\text{log}_{10}(\frac{(2^{n}-1)^{2}}{\text{MSE}}) \tag{19}\]  
where MSE represents the Mean Square Error [37] of the denoised image \(X\) and the original input image \(Y\), and \(n\) is the number of bits per pixel. The larger the PSNR, the smaller the gap with the original input image, and the higher the image quality.  
For WOA whose population size is N, the problem dimension is dim, and the maximum number of iterations is Max_iter; the complexity calculation method is  
\[\text{O}(\text{WOA})=\text{O}(\text{N}\cdot\text{dim}\cdot\text{Max\_iter}) \tag{20}\]  
For array stochastic resonance with gray image pixel size \(m\cdot n\) and array element number L, the complexity calculation method is  
\[\text{O}(\text{Array SR})=\text{O}(\text{m}\cdot\text{n}\cdot 8\cdot 102+ \text{L}) \tag{21}\]  
The computational complexity of parameter adaptive array model method based on WOA is as follows  
\[\text{O}(\text{N}\cdot\text{dim}\cdot\text{Max\_iter}\cdot(\text{m}\cdot \text{n}\cdot 8\cdot 102+\text{L})) \tag{22}\]  
IWOA algorithm adopts the iterative mapping method to initiate the iterative population. In array stochastic resonance, the pixel size of gray image is \(m\cdot n\) and the number of array units is L. Therefore, the complexity calculation method of the proposed algorithm is  
\[\text{O}(\text{this paper})=\text{O}(\text{N}^{2}\cdot\text{dim}\cdot\text{ Max\_iter}\cdot(\text{m}\cdot\text{n}\cdot 8\cdot 102+\text{L})) \tag{23}\]  
It can be seen from the above analysis that the computational complexity of the algorithm proposed in this paper is greater than that of array stochastic resonance and WOA based parametric adaptive array model methods.  
The process of the algorithm proposed in this paper is shown in Figure 3. Firstly, the image with noise is processed by gray scale mapping and dimensionality reduction scanning to meet the requirements of the stochastic resonance input signal. The processed image signal is used as the input signal of the bistable stochastic resonance model, and the fourth order Runge-Kutta method is used to solve the problem numerically. Then, the negative number of PSNR is taken as the fitness function of IWOA, and the optimal position is updated according to the principle that the minimum value of the fitness function corresponds to the optimal position. The operation is repeated until the maximum number of iterations, and the minimum fitness function value is selected. At this time, the parameter combinations \(a\), \(b\) and \(h\) are taken as the optimal parameter combination of the system. Finally, the optimal parameter combination is brought into the system for solving, and the final image of array random resonance processing is obtained.