# Structural Information Reconstruction of Distorted Underwater Images Using Image Registration
## 3 Results  
In the experiment, the proposed method was implemented on MATLAB (MathWorks Co., Natick, MA, USA). The basic data sets usedwere the same as [PERSON]'s in [8]. The source codes are opened online for the public and available in the following link: [[https://github.com/tangyugui1998/Reconstruction-of-distorted-underwater-images](https://github.com/tangyugui1998/Reconstruction-of-distorted-underwater-images)]([https://github.com/tangyugui1998/Reconstruction-of-distorted-underwater-images](https://github.com/tangyugui1998/Reconstruction-of-distorted-underwater-images)). To verify the performance of the proposed method, we made a comparison with our previous study [21] and [PERSON] et al. [20], whose source codes are also available online. The same image sequence was processed by three methods individually, and for all three methods, the maximum number of iterations was set as five. The tested data sets contain \"checkboard\", \"Large fonts\", \"Middle fonts\", and \"Small fonts\". Each data set was composed of 61 frames. The size of the frame and patch used in patches fusion was manually preset before running the algorithm, which is shown in Table 1.  
```
Input: Distorted image sequence \(V_{d}=\{I_{d1},I_{d2},\ldots I_{dn}\},I_{dk}\in\mathbb{R}^{locw}(k=1,2,\ldots n)\) Output: Undistorted image sequence and dewarped image \(V_{f}=\{I_{f1},I_{f2},\ldots I_{fn}\},I_{fk}\in\mathbb{R}^{locw}(k=1,2,\ldots n),F\in\mathbb{R}^{locw}\) While\(s\leq MaximallIteration\)do Step 1: Lucky patches fusion for each patch sequence \(B^{i}=\{B_{1},\ldots,B_{n}\}(i=1,\ldots,N)\) \(Q=\{q_{1},\ldots,q_{n}\}\Leftarrow ComputeQualityMetric(B^{i})\) ; \(B^{*}=\{B_{1}{}^{*},\ldots,B_{n}{}^{*}\}\Leftarrow\mathit{KmeansClustering}(B^{i},Q)\) ; \(B_{m}{}^{i}\Leftarrow\mathit{Mean}(B^{*})\) ; End \(R_{m}\in\mathbb{R}^{locw}\Leftarrow\mathit{SpliceTogether}(B_{m}{}^{i})\) ; Step 2: Guided filter \(R_{g}\in\mathbb{R}^{locw}\Leftarrow GuidedFilter(R_{m})\) ; Step 3: Image registration \(T=\{T_{1},\ldots,T_{n}\}\Leftarrow\mathit{ComputerDeformation}(V,T)\) ; \(V_{r}=\{I_{r1},I_{r2},\ldots I_{m}\}\Leftarrow\mathit{Dewarp}(V,T)\) ; \(s=s+1\); End Step 4: Post-processing
```  
**Algorithm 1**Structural Information Reconstruction  
The registration results are shown in Figure 2. The results indicate that all three methods can compensate for the distortion, defocusing, and double image of an underwater image sequence to some extent, while our method has better performance in some details, especially on three text data sets. The adjacent letters are blurred together by the Oreifej method and the previous research, which has been marked in red rectangles. Meanwhile, there are some ghosting and misalignment in marked red regions, such as the Oreifej's results of \"Large fonts\" and \"checkboard\" and the result of our previous method in \"Large fonts\". On the contrary, the proposed method successfully avoids the above problems, and the letters in results are clearer and easier to be observed. Moreover, for some data sets such as \"checkboard\", the proposed method is inferior to our previous method in regional restoration (marked with green rectangles), and some letters in the result of \"Large fonts\" suffered from slight aberration. Although some areas marked in green rectangles are more distorted compared with other methods, the letter observation is not affected dramatically. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Checkboard** & **Large Fonts** & **Middle Fonts** & **Small Fonts** \\ \hline Frame size & \(238\times 285\) & \(238\times 324\) & \(238\times 285\) & \(238\times 285\) \\ Patch size & \(68\times 114\) & \(68\times 108\) & \(68\times 114\) & \(68\times 114\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The Frame Size and Patch Size of Different Data Sets. In addition, to compare the running time of three methods, we used a laptop computer (Intel Core i5-9300H, 8 GB RAM) to measure the processing time.