# Unsharp Mask Guided Filtering for Acoustic Point Cloud of Water-Conveyance Tunnel
## 3 Method  
Our approach is motivated by the classical sharpness-enhancement techniques of unsharp masking, guided image filtering, and edge-aware weighted guided image filtering. However, these methods cannot be directly applied to 3D point clouds because some point cloud models have only spatial information, and no intensity-attribute information. Therefore, we construct a new widely applicted filtering method by using the position information of points to replace the pixel value in three classical image-filtering methods above. The block diagram of proposed method is shown in Figure 1.  
Given target point-cloud set \(P=\left\{\mathbf{p}_{i}\in R^{3}\right\}\) and guidance point-cloud set \(G=\left\{\mathbf{g}_{i}\in R^{3}\right\}\), the neighborhood \(N(\mathbf{p}_{i})=\left\{\mathbf{p}_{ij}\in P\right\}\) and \(N(\mathbf{g}_{i})=\left\{\mathbf{g}_{ij}\in G\right\}\) are searched by using the k-nearest neighbor (KNN) method, where \(\mathbf{p}_{ij}\) and \(\mathbf{g}_{ij}\) represent the \(j\)th neighboring point of \(\mathbf{p}_{i}\) and \(\mathbf{g}_{i}\), respectively. As mentioned before, we also assume that the filtered output point cloud has a linear model with the guidance point cloud in a particular neighborhood, that is,  
\[\mathbf{p}_{ij}^{\prime}=a_{i}\mathbf{g}_{ij}+\mathbf{b}_{i}. \tag{7}\]  
Here, \(\mathbf{p}_{ij}^{\prime}\) represents the filtered output point of \(\mathbf{p}_{ij}\). \(a_{i}\) and \(\mathbf{b}_{i}\) are the conversion coefficients in the neighborhood \(N(\mathbf{g}_{i})\). As with Equation (2) and its optimization solution, we can obtain the values of \(a_{i}\) and \(\mathbf{b}_{i}\) by  
\[a_{i}=\frac{\frac{\frac{1}{|N(\mathbf{g}_{i})|}\sum\limits_{\mathbf{g}_{ij}\in N(\mathbf{ g}_{i})}\mathbf{p}_{ij}\mathbf{g}_{ij}-\overline{\mathbf{p}}_{i}\cdot\overline{\mathbf{g}}_{i}} {\sigma_{\overline{g}_{i}}^{2}+\varepsilon}}{,} \tag{8}\]  
\[\mathbf{b}_{i}=\overline{\mathbf{p}}_{i}-a_{i}\overline{\mathbf{g}}_{i}. \tag{9}\]  
where \(|N(\mathbf{g}_{i})|\) represents the number of points in \(N(\mathbf{g}_{i})\). \(\varepsilon\) is a regularization parameter penalizing large \(a_{i}\). \(\overline{\mathbf{g}}_{i}\) and \(\sigma_{\overline{g}_{i}}^{2}\) are the mean and variance of guidance point \(\mathbf{g}_{i}\) in \(N(\mathbf{g}_{i})\). \(\overline{\mathbf{p}}_{i}\) is the mean of \(\mathbf{p}_{i}\) in \(N(\mathbf{p}_{i})\). Taking the calculation of \(\overline{\mathbf{p}}_{i}\) in \(N(\mathbf{p}_{i})\) as an example, it is given by  
\[\overline{\mathbf{p}}_{i}=\frac{1}{|N(\mathbf{p}_{i})|}\sum\limits_{\mathbf{p}_{ij}\in N( \mathbf{p}_{i})}\mathbf{p}_{ij}. \tag{10}\]  
The filtered output point can be obtained by Equation (7). However, the output point \(\mathbf{p}_{ij}^{\prime}\) has different values because \(\mathbf{g}_{ij}\) may be contained in different neighborhoods. Therefore, we calculate the filtered point \(\hat{\mathbf{p}}_{ij}^{\prime}\) by averaging all possible values of \(\mathbf{p}_{ij}^{\prime}\) with  
\[\hat{\mathbf{p}}_{ij}^{\prime}=\frac{1}{N}{\sum{(a_{i}\mathbf{g}_{ij}+\mathbf{b}_{i})}}. \tag{11}\]  
where \(N\) represents the number of neighborhoods which containing point \(\mathbf{g}_{i}\). Motivated by unsharp masking, summarized in Equation (6), we insert Equation (9) into Equation (11) to eliminate \(\mathbf{b}_{i}\), and obtain  
\[\hat{\mathbf{p}}_{ij}^{\prime}=\overline{a}_{i}(\mathbf{g}_{ij}-\widetilde{\mathbf{g}}_{i })+\overline{\mathbf{p}}_{i}, \tag{12}\]  
where \(\overline{a}_{i}=\frac{1}{N}{\sum{a_{i}}},\widetilde{\mathbf{g}}_{i}=\frac{1}{N}{ \sum{\overline{\mathbf{g}}_{i}}}\), and \(\overline{\mathbf{p}}_{i}=\frac{1}{N}{\sum{\overline{\However, it is clearly visible from Equation (12) that the denoising effect is greatly affected by the number of k-neighborhood points, which determines the values of \(\overline{a}_{i},\widetilde{\mathbf{g}}_{i}\), and \(\widetilde{\mathbf{p}}_{i}\). If the value of \(k\) is too large, the resulting point cloud usually loses sharp edges, resulting in over-smoothing problem.