# A Deconvolutional Deblurring Algorithm Based on Dual-Channel Images
## 4 Blocked Image Restoration Based on Clustering Algorithm  
The main improvement of the proposed method in this section, which deals with space-variant blurred images, is the block strategy, which is based on the mean-shift method to restore large-scale blurred images. In space-variable blurred images, the kernel of each block is different [13]. Therefore, it is necessary to fully consider the selection of pixel values in the overlapping area in the \begin{table}
\begin{tabular}{c c c c} \hline \hline
**WG-NGM** & 0.5498 & 0.5509 & 0.5519 \\
**NGM** & 0.5415 & 0.5474 & 0.5488 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Final results of SSIM. Figure 3: Levin image restoration experiment. Left is PSNR and right is SSIM. This paper used the same parameters and solution methods to test the performance of the two regular terms of WG-NGM and NGM under the same conditions. process of restoring image block stitching. It is hard to obtain a good kernel estimation result, due to the weak intensity of the texture edge in some parts of images. Furthermore, if the blocks are derived from different blurred transition regions, the results of estimating the blur kernels have no valuable reference significance area. Therefore, if the mean value of the corresponding pixels in the relevant blocks is used as the corresponding pixel value of the restored image directly, the result is inaccurate [13]. To solve these problems, this paper used a kernel classification technique based on the mean-shift clustering algorithm [13] to distinguish high-weight kernels from low-weight kernels. In the final step of stitching, the value of the corresponding pixel was determined according to the quality weight of the blur kernel. The restoration of the final image has three main components:  
1. Block image restoration  
As mentioned above, if the blurred images are all divided into \(N\) groups horizontally and \(M\) groups vertically, for a total of \(N\times M\) blocks, the number of corresponding kernels is also \(N\times M\). First, this paper used the kernel of each block to restore the corresponding block of the images separately. For each blur kernel \(Kernel_{i}\) (\(i\) means the order of the kernel, and \(i\in N\times M\)), the alternating direction method of multipliers (ADMM) [20] algorithm was applied to restore the block of blurred images corresponding to that kernel. 2. Mean-shift cluster weight calculation  
In the process of image restoration, the determination of the pixel values of the overlapping parts of the image blocks is an important part of image deblurred. The method used in this paper requires all the weights of the image blocks. The weights are used in determining the rate of value in the final recovered image from each image block. Generally, the more blur kernels that have a similar blur form, the more pixels in the whole image that are blurred according to that blur pattern. Therefore, this paper used a mean-shift clustering algorithm to classify the blur kernels and finally obtain a clustering result where the blur kernels are classified according to similarity as the flow shown in Table 3.