# Improvement of [PERSON]'s Stripe Noise Suppression Method for Side-Scan Sonar Images
## 2 Methods  
### Criminisi Algorithm  
The Criminisi image restoration model is a method for repairing texture-like damages. Its main approach involves first identifying the boundaries of the damaged regions, locating the pixels on these boundaries, and defining blocks centered around these boundary points. By utilizing the self-similarity of the image in undamaged areas, it globally searches for the sample block most similar to the defined block and uses this sample block to fill the damaged region. This process iterates until all damaged areas are filled. As shown in Figure 2, I represents the entire damaged image, \(\Phi\) denotes the known information of the undamaged regions, \(\Omega\) signifies the damaged region, \(\delta\Omega\) represents the boundary of the damaged region, \(p\) is a pixel point on the boundary, \(\Psi_{p}\) is the block centered around the point \(p\), \(n_{p}\) denotes the normal vector to \(p\) on the damaged boundary, and \(\
abla I_{p}^{\perp}\) represents the iso-intensity lines at the point \(p\). The algorithm primarily consists of the three steps detailed below [29].  
Figure 2: Symbol flag diagram of the Criminisi algorithm.  
Step 1: Priority Calculation. The Criminisi image inpainting model defines two factors that determine the priority of repairing an image, which dictates the order of restoration. These factors are the data term \(D(p)\) and the confidence term \(C(p)\).  
The data term \(D(p)\) represents the information of the iso-intensity lines in the image and is formulated as follows:  
\[D(p)=\frac{\left|\
abla I_{p}^{\perp}\cdot n_{p}\right|}{\alpha}\]  
where \(\alpha\) is a normalization factor, typically set to 255.  
The confidence term \(C(p)\) measures the reliability of pixel \(p\) based on known information in the undamaged area \(\Phi\), and it is calculated as follows:  
\[C(p)=\frac{\sum_{q=\Psi_{p}\cap\Phi_{q}}C(q)}{\left|\Psi_{p}\right|}\]  
where \(\Psi_{p}\) is the block centered around point \(p\), \(q\) represents the pixels within \(\Psi_{p}\) that are known in \(\Phi\), and \(C(q)\) is the confidence at pixel \(q\).  
Using these terms, the priority \(P(p)\) for repairing point \(p\) is defined as follows:  
\[P(p)=C(p)D(p)\]  
Step 2: Optimal Patch Search. After calculating the repair priority, the algorithm searches for the optimal matching block in the undamaged region based on the image's self-similarity. The optimal matching block is found by minimizing the Sum of Squared Differences (SSD) criterion between the target block to be repaired and the candidate blocks in the known region \(\Phi\). The matching criterion between the target block \(\Psi_{p}\) and a candidate block \(\Psi_{q}\) is as follows:  
\[\Psi_{q}=arg\min_{\Psi_{q}\in\Phi}d\big{(}\Psi_{p},\Psi_{q}\big{)}\]  
where \(d\big{(}\Psi_{p},\Psi_{q}\big{)}\) is the sum of the squared color differences between the corresponding known pixels in \(\Psi_{\hat{p}}\) and \(\Psi_{q}\). The definition is as follows:  
\[d\big{(}\Psi_{\hat{p}},\Psi_{q}\big{)}=\sum\Big{[}\left(I_{R}-I^{\prime}_{R} \right)^{2}+\left(I_{G}-I^{\prime}_{G}\right)^{2}+\left(I_{B}-I^{\prime}_{B} \right)^{2}\Big{]}\]  
where \(I\) and \(I^{\prime}\) correspond to the pixel points in blocks \(\Psi_{\hat{p}}\) and \(\Psi_{q}\), respectively.  
Step 3: Update Confidence \(C(p)\). Finally, after repairing point \(p\), the confidence \(C(p)\) is updated to reflect the newly restored information:  
\[C(p)=C(\hat{p})\ \ \ \forall q\in\Psi_{p}\cap\Omega\]  
where \(\hat{p}\) is the center of the newly filled patch.