# Light Propagation and Multi-Scale Enhanced DeepLabV3+ for Underwater Crack Detection
## 2 Methods
### Innovation 1: Underwater Light Propagation Model
#### 2.2.2 Model Mechanics and Compensation Approach  
To compensate for these optical effects, our underwater light propagation model simulates the scattering and absorption of light and adjusts the color balance and contrast of underwater images [11]. The model includes the following steps:  
(1) Color Restoration (Absorption Compensation): To compensate for the absorption of longer wavelengths, a correction function is used that adjusts the color channels in the image based on the depth z. The model estimates the restored intensity \(I_{\text{restored}}(\lambda,z)\) at each wavelength \(\lambda\) using the following relationship:  
\[I_{\text{restored}}(\lambda,z)=I(\lambda,z)\cdot\left(\frac{I_{0}(\lambda)}{I( \lambda,z)}\right) \tag{3}\]  
This formula restores the missing intensity of red and yellow wavelengths based on their expected original values, allowing the model to recover the natural color balance of the underwater scene. The correction factor compensates for the absorption of light at deeper depths and reverses absorption effects by amplifying attenuated wavelengths. For example, it boosts red channel intensity by 3-5\(\times\) at 5 m depth to restore natural color balance. (2) Contrast Enhancement (Scattering Compensation): Scattering reduces contrast, making it difficult to distinguish cracks from the background. To enhance contrast, the histogram equalization was applied to the image. The histogram equalization method adjusts the pixel intensity distribution by transforming the original pixel values into a new range, typically [0; 255]. This process improves the differentiation between cracks and the surrounding structure. The contrast enhancement function can be written as follows:  
\[H(x)=\frac{\sum_{k=0}^{x}p(k)}{\sum_{k=0}^{255}p(k)} \tag{4}\]  
where \(H(x)\) is the cumulative distribution function (CDF) of the pixel intensities, and \(p(k)\) is the probability density function of the pixel intensities at intensity level \(k\). It counters scattering-induced haze by redistributing pixel intensities and dramatically improves visibility in turbid water (e.g., enhances crack-background contrast by 70% when turbidity > 5 NTU). After applying histogram equalization, the image contrast is enhanced, making fine cracks more visible and easier for segmentation algorithms to detect. (3) Depth-Dependent Compensation: To simulate the increasing absorption and scattering effects with depth, a depth-dependent compensation function was introduced. As the water depth increases, both the absorption and scattering of light become more significant. The proposed model achieves this compensation (light intensity compensation at depth \(z\)) through the following function:  
\[I_{\text{compensated}}(z)=I_{0}(\lambda)\cdot e^{-(\alpha(\lambda)+\beta( \lambda))\cdot z} \tag{5}\]  
where \(I_{\text{compensated}}(z)\) is the intensity of light at depth z after compensation, \(\alpha(\lambda)\) is the absorption coefficient at wavelength \(\lambda\), and \(\beta(\lambda)\) is the scattering coefficient at wavelength \(\lambda\). Models combined absorption + scattering effects. The total attenuation coefficient \(c(\lambda)=\alpha(\lambda)+\beta(\lambda)\) determines maximum visibility range (e.g., \(c\) (green) = 0.2 m\({}^{-1}\) allows 10 m visibility in our dataset). This compensation function adjusts the image's brightness and color balance according to the depth of the scene, ensuring that deeper areas of the image receive more correction. Scattering Simulation: The scattering process was simulated by an approximation of the Bidirectional Scattering Distribution Function (BSDF) [33]. This function models how light spreads when interacting with water particles and is used to simulate the impact of scattering on the image quality.