## 3 Weighted Wavelet Fusion Approach
### Weighted Wavelet Fusion Based on Structure-Aware Sobel Operator  
Color correction and contrast enhancement solve complementary parts of the visual-quality problem, so the final stage combines their strengths through image fusion. Early work by [PERSON] et al. employed a Laplacian pyramid scheme that blends two preprocessed versions of the same frame in the spatial domain [23]. Although it is effective for global appearance, the method relies on fixed weight maps and therefore recovers fine textures only weakly. Weighted wavelet fusion, introduced by [PERSON] et al., first decomposes each input into one low-frequency band and three directional high-frequency bands (horizontal, vertical, diagonal) and then assigns an independent weight to every band [24]. Direction-specific weighting enhances edges and micro-textures more selectively than pyramid fusion. Building on this idea, we fuse the color-corrected and contrast-enhanced images after a three-level discrete wavelet transform. Following [PERSON] et al. 's practice, the weights for the high-frequency coefficients are proportional to the average gradient, because a larger gradient indicates richer local detail and thus a sharper contribution. For the low-frequency bands, we complement the gradient cue with the sum-modified Laplacian energy, which quantifies the spatial distribution of high-frequency content and helps to suppress low-contrast haze. Experiments show that this hybrid weighting produces a fused image that is simultaneously color-balanced, high-contrast, and rich in structural detail. The MSRCR-enhanced images first undergo a two-dimensional discrete wavelet transform (2D DWT) to perform single-level decomposition. This decomposition yields approximation coefficients representing the low-frequency component, which encodes the structural profile and intensity distribution of underwater infrastructure elements (e.g., piles, columns), alongside detail coefficients capturing high-frequency components that preserve critical edge features and surface texture details essential for defect identification. An adaptive weighting scheme, dynamically derived from the average gradient magnitude within the high-frequency sub-bands, is then applied to optimize detail preservation under varying turbidity conditions. The inverse discrete wavelet transform (IDWT) subsequently reconstructs the fused image, integrating enhanced structural clarity with amplified defect signatures for improved inspection efficacy [29]. The procedure is formally described through the following algorithmic steps:  
\[\mathrm{c}A=\sum\limits_{i,j}h(i)h(j)f(x-i,y-j) \tag{4}\]  
\[\mathrm{c}V,cH,cD=\sum\limits_{i,j}h(i)g(j)f(x-i,y-j) \tag{5}\]  
where \(cA\) is the low-frequency component of the image; \(cH,cV,cD\) represent the horizontal, vertical, and diagonal high-frequency components, respectively; \(h(i)\) denotes the low-pass filter; \(g(i)\) is the high-pass filter; and \(f(x,y)\) is the original image. The Sobel operator \(\
abla G\) calculates the intensity of edge responses by detecting the gradient of the image [30], which is computed using the following formula:  
\[\
abla G=\frac{\sum\limits_{i=1}^{M-1}\sum\limits_{j=1}^{N-1}\sqrt{\left(Gx \right)^{2}+\left(Gy\right)^{2}}}{(M-1)(N-1)} \tag{6}\]  
where \(M\) and \(N\) denote the number of rows and columns of the image, respectively; \(i\) and \(j\) are the row and column indices of the pixel, respectively; and \(Gx\) and \(Gy\) denote the gradient magnitude maps of the pixel \((i,j)\) in the horizontal and vertical directions, i.e., the product of the gradient map and the Sobel convolution kernel. In order to fully fuse the high-frequency components, the Sobel operator \(\
abla G\) is computed for each image and used as a weight factor for the detail intensity. To obtain the weights of the high-frequency components, they are calculated using the following equation:  
\[\left\{