Underwater image enhancement method and system based on brightness-guided multi-scale edge recovery

By employing a brightness-guided multi-scale edge recovery method, the problem of insufficient brightness and chromaticity coordination in underwater image enhancement is solved, improving the accuracy of color correction and the clarity of details, and achieving semantically consistent underwater image enhancement effects.

CN122391029APending Publication Date: 2026-07-14HAINAN UNIV +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HAINAN UNIV
Filing Date
2026-04-24
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing underwater image enhancement methods have limitations in terms of insufficient brightness and chromaticity coordination, poor semantic consistency, insufficient recovery of multi-scale details, and feature fusion bias, making it difficult to effectively correct color deviations and improve the clarity of multi-scale details.

Method used

A brightness-guided multi-scale edge recovery method is adopted. Through a trained underwater image enhancement model, the brightness and chroma channels are separated, multi-scale brightness features are extracted and fused with chroma features, and combined with a cascaded color correction and dehazing network. An adaptive weighted fusion and edge enhancement mechanism is used to generate high, medium and low resolution features and perform adaptive weighted fusion, and finally output a dehazed enhanced image.

Benefits of technology

It significantly improves the accuracy of color correction and the clarity of details in underwater images, enhances the ability to represent image boundaries, and ensures the semantic consistency and naturalness of the enhanced results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391029A_ABST
    Figure CN122391029A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, in particular to an underwater image enhancement method and system based on brightness-guided multi-scale edge recovery, which converts the original underwater image to a target color space, separates the brightness channel and the chroma channel; extracts multi-scale brightness features from the brightness channel to generate brightness-guided features; extracts and modulates the chroma channel, and fuses the brightness-guided features at multiple levels to reconstruct the color-corrected image; generates multiple resolution features from the color-corrected image, adaptively weights and fuses to obtain multi-scale fusion features; performs scale-adaptive edge enhancement on the multi-scale fusion features, and reconstructs and outputs the underwater image after haze enhancement. The present application effectively solves the problems of color deviation and detail blur of underwater images, and improves the clarity and naturalness of the images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to an underwater image enhancement method and system based on brightness-guided multi-scale edge recovery. Background Technology

[0002] Underwater imagery has significant applications in marine resource exploration, ecological monitoring, and underwater archaeology. However, the underwater environment, due to factors such as light absorption, scattering, and refraction, often results in images exhibiting problems such as color deviation, low contrast, and blurred details, severely hindering the development of underwater vision technology.

[0003] Traditional underwater image enhancement methods often rely on adjusting pixel brightness, contrast, and saturation, which struggles to effectively restore true colors and details. Physical model-based methods correct images by estimating medium transport and imaging parameters, but their effectiveness is limited by the complexity of the underwater environment and parameter estimation errors. In recent years, deep learning technology has offered new avenues for underwater image enhancement. For example, single-stage methods based on convolutional neural networks have achieved some success through data-driven learning of enhancement maps; some studies employ a two-stage framework to address color deviation and fogging effects separately, and introduce contrastive learning to optimize training.

[0004] Nevertheless, existing methods have limitations. Single-stage networks struggle to balance the optimization of multiple degradation problems, while multi-branch methods lack targeted constraints. Contrastive learning methods use the original image as negative samples, making it difficult to guarantee the lower bound of the enhancement results, especially in complex scenes. They suffer from insufficient semantic consistency and multi-scale detail recovery, and lack effective guidance from brightness features for color correction, as well as enhancement mechanisms for edges at different scales. Therefore, there is an urgent need for an underwater image enhancement method that can effectively correct color deviations, improve multi-scale detail clarity, and ensure semantic consistency. Summary of the Invention

[0005] In view of this, the purpose of this invention is to propose an underwater image enhancement method and system based on brightness-guided multi-scale edge recovery, so as to solve the problems of insufficient brightness and chromaticity coordination, poor semantic consistency, insufficient multi-scale detail recovery, and feature fusion deviation in existing underwater image enhancement methods.

[0006] To achieve the above objectives, this invention provides an underwater image enhancement method based on brightness-guided multi-scale edge recovery, comprising inputting the original underwater image to be enhanced into a trained underwater image enhancement model for processing, and outputting an enhanced underwater image, wherein the processing includes the following steps:

[0007] S1. Convert the original underwater image to the target color space and separate the luminance channel and chrominance channel;

[0008] S2. Extract multi-scale brightness features from the brightness channel and generate brightness guidance features based on the multi-scale brightness features;

[0009] S3. Perform feature extraction and modulation on the chroma channel, and fuse the modulated chroma features with the luminance guidance features at multiple feature extraction levels;

[0010] S4. Based on the fused chromaticity features and the luminance channel, reconstruct the color-corrected image;

[0011] S5. Generate multiple features with different resolutions from the color-corrected image;

[0012] S6. Perform adaptive weighted fusion on the multiple features with different resolutions to obtain multi-scale fused features;

[0013] S7. Perform scale-adaptive edge enhancement on the multi-scale fusion features to generate edge-enhanced features;

[0014] S8. Based on the edge enhancement features, reconstruct and output the dehazing enhanced underwater image.

[0015] Preferably, the trained underwater image enhancement model is obtained through a training method including the following steps:

[0016] Obtain an underwater image dataset, divide the dataset into training and testing sets, and uniformly adjust the image sizes;

[0017] Construct a cascaded color correction network and a dehazing network, wherein the color correction network is used to perform steps S1 to S4, and the dehazing network is used to perform steps S5 to S8;

[0018] Construct a first loss function for the color correction network and a second loss function for the dehazing network;

[0019] The cascaded color correction network and the dehazing network are trained end-to-end using the training set to obtain a trained underwater image enhancement model.

[0020] Preferably, the first loss function is a weighted combination of pixel-level loss and first feature-level loss, and the second loss function is a weighted combination of structural loss and second feature-level loss.

[0021] Preferably, the extraction of multi-scale luminance features from the luminance channel in step S2 specifically includes:

[0022] Calculate the global luminance statistics for the luminance channels, which integrate the mean, variance, and skewness of the luminance channels;

[0023] Based on the global brightness statistics, brightness features at multiple scales are extracted using convolutional kernels with different dilation rates.

[0024] Preferably, the feature extraction and modulation of the chroma channel in step S3 specifically includes:

[0025] Channel attention weights and spatial attention weights are generated for the extracted chroma features, and the chroma features are modulated using the channel attention weights and spatial attention weights.

[0026] Preferably, the fusion at multiple feature extraction levels described in step S3 specifically includes:

[0027] In the preset multiple intermediate feature extraction levels and the last feature extraction level, the modulated chromaticity features output from the corresponding level are fused with the luminance guiding features.

[0028] Preferably, the generation of multiple features with different resolutions in step S5 specifically includes:

[0029] The color-corrected image is convolved to generate high-resolution features; the high-resolution features are downsampled at least once to generate medium-resolution features and low-resolution features.

[0030] Preferably, the adaptive weighted fusion of multiple features at different resolutions in step S6 specifically includes:

[0031] After spatially aligning the medium-resolution features and low-resolution features, the fusion weights are dynamically calculated and adaptive weighted summation is performed to obtain optimized medium-resolution features.

[0032] After spatially aligning the high-resolution and medium-resolution features, the fusion weights are dynamically calculated and adaptively weighted summation is performed to obtain optimized high-resolution features.

[0033] Preferably, the scale-adaptive edge enhancement of the multi-scale fused features described in step S7 specifically includes:

[0034] For the optimized medium-resolution features, edge enhancement is performed using a convolutional kernel of the first size;

[0035] Edge enhancement is performed on the optimized high-resolution features using a convolutional kernel of a second size, wherein the first size is larger than the second size.

[0036] The present invention also provides an underwater image enhancement system based on brightness-guided multi-scale edge restoration, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0037] The beneficial effects of this invention are:

[0038] 1. This invention uses a brightness feature-guided mechanism to extract multi-scale brightness features from the brightness channel, which integrate mean, variance, and skewness. It also applies progressive brightness constraints to the chromaticity features at multiple feature extraction levels, effectively solving the color deviation problem in underwater images and improving the accuracy of color correction.

[0039] 2. This invention generates three resolution features (high, medium, and low) through multi-scale feature fusion and adaptive edge enhancement mechanism, and performs adaptive weighted fusion. For features of different scales, 5×5 and 3×3 convolution kernels are used for edge enhancement, which significantly improves the detail clarity and boundary expression ability of the image.

[0040] 3. This invention employs cascaded contrastive learning constraint training. In the color correction stage, it uses pixel-level loss and feature-level loss that only calculates the ab channels. In the dehazing stage, it uses structural loss and feature-level loss, thus ensuring the semantic consistency and naturalness of the enhanced results. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only for this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a flowchart of the underwater image enhancement method based on brightness-guided multi-scale edge restoration according to an embodiment of the present invention;

[0043] Figure 2 This is a network structure diagram of the two-stage color correction stage and the dehazing stage of the present invention;

[0044] Figure 3 This is a flowchart illustrating the invention of the Luminance Feature Guidance (LFG) module.

[0045] Figure 4 A visual comparison chart showing the enhancement effect on the UIEB dataset is presented. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.

[0047] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0048] like Figure 1 As shown, this embodiment provides an underwater image enhancement method based on brightness-guided multi-scale edge restoration, including the following steps:

[0049] Step 1: Obtain a dataset containing the original image and reference image, and establish a training set and a test set. Specifically, the existing open-source dataset UIEB (Underwater Image Enhancement Benchmark Dataset) is divided into 800 training images and 90 test images, and all input images are uniformly resized to 256*256 as input.

[0050] The process then proceeds to the multi-scale brightness feature-guided color correction stage, which includes:

[0051] Step 2: Input the original underwater image I and convert it to L ab Color space, separated to obtain luminance channel I L and chroma channel I ab Specifically, the RGB to Lab color space mapping function F is used. (RGB) →L ab(I) Its mathematical expression is based on CIE1976 L ab The color space standard is defined as follows:

[0052]

[0053]

[0054]

[0055] Where L represents brightness, a represents the green-red channel, and b represents the blue-yellow channel. , , These are the XYZ tristimulus values ​​obtained by linear transformation of the input RGB image, and the subscript n represents the reference white point.

[0056] Entering the color correction stage, the Luminance Feature Guidance (LFG) module is introduced.

[0057] Its core is to use multi-scale dilated convolution to transform I L Channel extraction of multi-scale brightness features to guide I ab Color correction.

[0058] This module first calculates I. L Global luminance statistics G L The calculation involves multiple statistical features, performed step by step. The first step is to calculate the luminance channel I. L mean As the baseline global average level, it is used for subsequent deviation calculations, and its expression is:

[0059]

[0060] Where H and W are the height and width of IL, respectively. This represents the pixel value at position (i, j), and the pixel value is obtained through L. ab The L-channel normalization function of the space is obtained, and the specific calculation is as follows:

[0061]

[0062] in, The L value is the original Lab-converted value. and These are the minimum and maximum values ​​of IL, respectively, to ensure that pixel values ​​are normalized to [0,1].

[0063] Then based on the mean Calculate variance The dispersion of quantified brightness values ​​is used as the distribution width index extracted in the second step, and the expression is:

[0064]

[0065] variance The standard deviation is obtained by taking its square root. Then skewness was introduced. Because of the asymmetry in the brightness distribution measured in the first two steps, The expression used to help identify possible brightness deviations (such as being too bright or too dark) in underwater images is:

[0066]

[0067] The final method for global luminance statistics (GL) is as follows:

[0068]

[0069] in, As the weighting coefficients, this nonlinear combination ensures that the mean, as a basis, is linearly scaled by the variance, while the skewness contributes directly through addition, to dynamically capture the nonlinear characteristics of the brightness distribution.

[0070] Based on the global luminance statistics GL, the LFG module uses 3×3 convolutions with dilation rates of 1, 2, and 3 to extract small, medium, and large-scale luminance features Fs, Fm, and Fl. The formula for extracting the small-scale luminance feature Fs is:

[0071]

[0072] in The convolution weights are 3×3 with an inflation rate of 1 (padding=1). For bias, Convolution operation, Represents element-wise multiplication. This is the ReLU activation function. Similarly, the extraction formulas for medium- and large-scale brightness features Fm and Fl are as follows:

[0073]

[0074]

[0075] The convolution weights are 3×3 with a dilation rate of 2 (padding=2). The convolution weights are 3×3 with a dilation rate of 3 (padding=3). and For bias, F s Focusing on local details, through G L Weighted emphasis on brightness-sensitive areas, Capture moderate contextual information and avoid over-smoothing of mesoscale structures, F l It emphasizes global structure, enhances brightness consistency over a wide area, and reduces overall deviation in underwater images.

[0076] Finally, a brightness guidance feature L is generated by 1×1 convolution fusion. LFG This ensures efficient merging of multi-scale luminance information, enables cross-channel guidance of chroma channels, and avoids coordination bias, manifested as follows:

[0077]

[0078] in, For 1×1 convolution weights, For bias.

[0079] Step 3: Process I using a cascaded 5-layer Feature Attention Module (FAB) and Semantic Fusion Modulator (SFM). ab Features, where SFM obtains the channel attention W by extracting the chromaticity feature Fr through global average pooling FAB. cha The formula is:

[0080] Among them, the size of the chromaticity feature Fr extracted by FAB is , Compress the features to , The weights are 1×1 convolution weights (reduced to the intermediate number of channels and then increased back to C). For bias, The Sigmoid activation function is used to normalize the channel attention weights to [0,1].

[0081] Secondly, based on Generate spatial attention weights By fusing the channel mean and maximum values ​​and combining them with contextual enhancement, the formula is expressed as:

[0082]

[0083] in, This represents the channel mean characteristic. The feature is the maximum value of the channel. The two are concatenated along the channel dimension and then convolved with a 1×1 convolution. (Output Channel 1) and bias deal with, Normalized generation spatial attention weights (size: ).

[0084] at last and By fusing with Iab features, modulated output features are generated. .

[0085]

[0086] Step 4: After combining FAB and SFM in layers 2 and 4, two luminance-guided fusions are performed through the intermediate feature fusion unit. Specifically, the chroma features output from the corresponding layer are concatenated with LLFG channels, and then subjected to a 1×1 convolution to obtain the intermediate fusion features. This achieves intermediate luminance constraint on the chroma features, avoiding the synergy deviation between luminance and chroma during feature extraction. Finally, after processing by FAB and SFM in layer 5, a third luminance-guided fusion is performed through the final feature fusion unit to generate the residual feature ∆(Iab) for chroma correction. = tanh(Iab + ∆(Iab)), merging IL to obtain the output image I of the color correction stage. CC .

[0087] The brightness-guided fusion process at each level can be expressed by the following formula:

[0088]

[0089] in, This indicates the output chromaticity characteristics of the FAB and SFM modules at the corresponding level (e.g., layer 2, layer 4, or layer 5). This is the brightness guidance feature generated previously. Features are spliced ​​along the channel dimension. For 1×1 convolution weights, This is the ReLU activation function. The expression applies to the intermediate and final fusions, where layer 5... Directly used as residual features .

[0090] After the color correction stage, the output image enters the dehazing stage, which involves multi-scale feature adaptive generation and selective fusion. The dehazing stage includes:

[0091] Step 5, I CC The image is used as input in the dehazing stage, and a multi-scale feature adaptive generation and selective fusion mechanism is introduced. High-resolution features F are obtained through direct 3×3 convolution input. high Preserve the original spatial details of the image.

[0092]

[0093] Secondly, regarding F high Perform one downsampling (2×) to obtain the medium-resolution feature F mid , This represents a 2×2 average pooling operation, which reduces the spatial dimension by half and balances details and semantic information.

[0094]

[0095] Finally, regarding F highThe low-resolution feature F is obtained by performing two downsampling operations (4× in total). low , By applying the method twice consecutively, the spatial dimension is gradually reduced to 1 / 4, focusing on global semantic features.

[0096]

[0097] Step 6: MidScalePyramid, a medium-resolution feature generator, generates the mid-resolution feature based on the input. Enhanced medium-resolution deep features are generated through two average pooling operations and a subsequent 1×1 convolution. ,

[0098] It manifests as:

[0099]

[0100] in, This indicates a 2×2 average pooling operation, applied twice consecutively to reduce spatial resolution. A 1×1 convolution is used for channel adjustment to enhance the semantic representation capability of the features, consistent with the downsampling logic in step 5.

[0101] Meanwhile, low-resolution features By performing a single upsampling (2×) operation, its spatial dimensions are adjusted to match... Maintain consistency to obtain upsampled features .

[0102]

[0103] in, This represents a 2× bilinear interpolation operation, where... The spatial dimension is restored to the same match.

[0104] High-resolution feature generator TopScalePyramid Based on the original spatial dimensions, the upsampled medium-resolution features Channel calibration is performed using 1×1 convolution to generate calibrated features. The number of channels is calibrated to ensure compatibility with high-resolution features and to provide optimized input for subsequent selective kernel feature fusion modules.

[0105] =

[0106] Step 7: In the medium-resolution fusion stage, the medium-resolution deep features are... Compared with upsampled low-resolution features The input is the Selective Kernel Feature Fusion (SKFF) module. First, the spatial dimensions of both are unified using bilinear interpolation. The size is determined, and then the fusion weights are dynamically calculated using channel and spatial attention mechanisms to achieve adaptive weighted summation of features, generating optimized medium-resolution features. Similarly, in the high-resolution fusion stage, high-resolution features are... Compared with calibrated medium resolution features Enter SKFF to After unifying the spatial dimensions based on the same criteria, weights are assigned using the same channels and spatial attention mechanism to output enhanced high-resolution features. This fusion mechanism ensures the effective integration of multi-scale features, improves the semantic consistency and detail recovery capability in the dehazing stage, and connects with the feature modulation logic in the color correction stage.

[0107] The core expression of the SKFF module is:

[0108]

[0109] in, For input multi-scale features (such as aligned features) and , (Number of input features) The dynamic attention weights are calculated using global average pooling and the softmax function, as shown in the formula:

[0110] .

[0111] Step 8: MidEdgeRestorer targets mid-resolution fused features. Applying 5×5 large kernel convolution to extract global edge masks Furthermore, it enhances contour details by combining modulation mechanisms with detailed features, generating optimized medium-resolution features. Similarly, the high-scale edge restoration module TopEdgeRestorer targets the high-resolution features output from step 7. Applying a 3×3 convolution kernel to extract local edge masks By using the same modulation method to enhance edge sharpness, high-resolution features are generated. This process enhances the boundary representation capability of multi-scale features through residual connections and edge modulation.

[0112] The core mathematical expression for the edge recovery process is:

[0113]

[0114] in, This represents the enhanced output features (corresponding to mesoscale). or high-scale ), Input fusion features (corresponding to) or ), Convolutions are used to extract edges (k=5 for medium scale and k=3 for high scale). Enhance convolutions for detail. Generate a mask for the Sigmoid activation function. Represents element-wise multiplication. This is a residual connection.

[0115] Step 9: Enhance high-resolution features As input, the image is expanded by filling the edges with reflections, then a 3×3 convolution is applied to restore the image channel dimensions, and finally the Tanh activation function is used to linearly translate and scale the pixel value range to [0,1] to generate the final dehazing and enhanced image. This achieves the final mapping from multi-scale features to a clear underwater image. The core mathematical expression for the dehazing and enhanced image generation process is:

[0116]

[0117] in, For high-resolution features as input, This indicates a reflection fill operation (extending the boundary by 1 pixel). The weights are 3×3 convolution weights. For bias, This represents the convolution operation. The activation function calibrates the output pixel values ​​to the range [0,1].

[0118] Step 10: Train the two-stage network using cascaded contrastive learning until it converges.

[0119] As one implementation method, cascaded contrastive learning constraint training can be employed. The loss function mainly consists of a combination of three types: pixel-level loss, structural loss, and feature-level loss.

[0120] The pixel-level loss is calculated directly using the MSE (mean squared error) loss to determine the difference between image pixel values, reflecting the degree of fit at the pixel level. The calculation process is as follows:

[0121] Image size is L in the color correction stage of the image ab In space, pixels The value of channel a is The value of channel b is (in , ).

[0122] The pixel-level ab channel MSE loss can be expressed as the mean of the sum of squared differences between all pixels in the two channels, as shown in the following formula:

[0123]

[0124] Because the LAB color space includes the luminance channel I L and chroma channel I ab Separation facilitates focused optimization for common color casts (greenish, bluish) in underwater images. By calculating only the MSE loss of the ab channels, interference from the luminance channel is avoided, ensuring that the loss function more accurately captures chromaticity degradation.

[0125] The above formula averages the sum of squared errors of the a and b channels for each pixel (with a coefficient of 1 / 2) to balance the contributions of the two chroma channels, preventing a single channel (such as the red-green axis of the a channel) from dominating the loss calculation, thus achieving more uniform color correction. Averaging over all H×W pixels ensures that the loss function is sensitive to the global image distribution, rather than being dominated by local noise, improving the model's generalization ability in complex underwater scenes. Furthermore, due to the convex nature of the MSE function, gradient descent optimization is convenient, robust, and effectively reduces color artifacts, especially in underwater light scattering environments with color casts (greenish or bluish tints), enhancing the naturalness and realism of the image.

[0126] The structural loss is calculated using SSIM, which measures structural similarity by calculating the mean, variance, and covariance of the images. Gaussian window filtering is used to compare local structures, and the final loss is 1 - SSIM (the smaller the value, the more similar the structures). The calculation process is as follows:

[0127] For any single pixel position in the image , indicating the first A linear index of pixels is used to calculate local statistics through a Gaussian window:

[0128] Local mean:

[0129] , Gaussian convolution

[0130] Local variance:

[0131]

[0132] Local covariance:

[0133]

[0134] Then pixel The local SSIM at that location is:

[0135]

[0136] SSIM loss is Subtract the global SSIM (the arithmetic mean of the local SSIMs of all pixels), that is:

[0137]

[0138] The feature-level loss is calculated from the high-level features extracted by the pre-trained network (VGG19), focusing on the semantic and abstract feature differences of the image. The calculation logic is as follows:

[0139] Using the outputs of the five convolutional layers of VGG19 as features, weights are assigned to each layer. A contrast loss is constructed by calculating the distance between the predicted features and the features of the positive sample (reference image) and the distance between the predicted features and the features of the negative sample (original image), ensuring that the enhanced image features are close to the positive samples and far away from the negative samples.

[0140] Regarding the color correction stage, The images are, respectively, an enhanced image after color correction, a hazy and color-accurate reference image, and the original, unprocessed image:

[0141]

[0142] For the defogging stage, These are, respectively, the enhanced image after the dehazing stage, the haze-free and color-accurate reference image, and the enhanced image after the color correction stage:

[0143]

[0144] in, Enhanced, reference, and original images in VGG19 layers respectively. Features For hierarchical weights, It is a small constant.

[0145] Therefore, the loss function of the method in the color correction stage is:

[0146]

[0147] The loss function in the defogging stage is:

[0148]

[0149] in, and It is the weighting coefficient.

[0150] As one implementation method, the two-stage cascaded training was performed using an NVIDIA GeForce RTX 4090D graphics card, and both stages were trained using the Adam optimizer for 180 iterations. In the color correction stage, the learning rate was set to 0.0005 and the loss function λ1 was set to 0.005; in the dehazing stage, the learning rate was set to 0.05 and the loss function λ1 was set to 0.5.

[0151] Step 11: Input the underwater image to be enhanced into the trained model and output the enhanced image.

[0152] To verify the effectiveness of the method of this invention, comparative experiments were conducted on the UIEB (Underwater Image Enhancement Benchmark Dataset) public dataset. The method of this invention was compared with four existing deep learning methods. All methods used the same training and test sets, and adopted the results from the official code or original reports. The evaluation metrics used were Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM). PSNR measures the pixel-level reconstruction error of the image, with a larger value indicating less distortion. SSIM measures the similarity of the image in terms of brightness, contrast, and structure, with a value closer to 1 indicating a closer resemblance to the reference image.

[0153] The comparison methods include:

[0154] FUnIE-GAN: An underwater image enhancement method based on generative adversarial networks;

[0155] UWCNN: An underwater image enhancement method based on convolutional neural networks;

[0156] Ucolor: An underwater image enhancement method incorporating color priors;

[0157] PUGAN: An underwater image enhancement method based on perceptual loss and generative adversarial networks.

[0158] The comparison results are shown in Table 1 below:

[0159]

[0160] Table 1

[0161] The experimental results show that the method of this invention outperforms existing comparative methods in both PSNR and SSIM. Compared with PUGAN, which has the second-best performance, the method of this invention improves PSNR by 0.64 dB and SSIM by 0.087. This indicates that the underwater image enhancement method proposed in this invention, which combines brightness feature guidance and multi-scale edge recovery, can more effectively correct color deviations, restore image details, and generate enhanced images with higher visual quality.

[0162] Example 2:

[0163] The present invention also provides an underwater image enhancement system based on brightness-guided multi-scale edge recovery, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method in Embodiment 1 above.

[0164] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0165] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0166] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0167] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0168] The implementation of all or part of the processes in the methods of the above embodiments can also be accomplished by a computer program product. When the computer program product is run on a terminal device, the terminal device can implement the steps in the various method embodiments described above.

[0169] The embodiments described above are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. An underwater image enhancement method based on brightness-guided multi-scale edge restoration, characterized in that, The process includes inputting the original underwater image to be enhanced into a trained underwater image enhancement model for processing, and outputting an enhanced underwater image. The processing includes the following steps: S1. Convert the original underwater image to the target color space and separate the luminance channel and chrominance channel; S2. Extract multi-scale brightness features from the brightness channel and generate brightness guidance features based on the multi-scale brightness features; S3. Perform feature extraction and modulation on the chroma channel, and fuse the modulated chroma features with the luminance guidance features at multiple feature extraction levels; S4. Based on the fused chromaticity features and the luminance channel, reconstruct the color-corrected image; S5. Generate multiple features with different resolutions from the color-corrected image; S6. Perform adaptive weighted fusion on the multiple features with different resolutions to obtain multi-scale fused features; S7. Perform scale-adaptive edge enhancement on the multi-scale fusion features to generate edge-enhanced features; S8. Based on the edge enhancement features, reconstruct and output the dehazing enhanced underwater image.

2. The underwater image enhancement method based on brightness-guided multi-scale edge restoration according to claim 1, characterized in that, The trained underwater image enhancement model is obtained through a training method including the following steps: Obtain an underwater image dataset, divide the dataset into training and testing sets, and uniformly adjust the image sizes; Construct a cascaded color correction network and a dehazing network, wherein the color correction network is used to perform steps S1 to S4, and the dehazing network is used to perform steps S5 to S8; Construct a first loss function for the color correction network and a second loss function for the dehazing network; The cascaded color correction network and the dehazing network are trained end-to-end using the training set to obtain a trained underwater image enhancement model.

3. The underwater image enhancement method based on brightness-guided multi-scale edge restoration according to claim 2, characterized in that, The first loss function is a weighted combination of pixel-level loss and first feature-level loss, and the second loss function is a weighted combination of structural loss and second feature-level loss.

4. The underwater image enhancement method based on brightness-guided multi-scale edge restoration according to claim 1, characterized in that, Step S2, which involves extracting multi-scale luminance features from the luminance channel, specifically includes: Calculate the global luminance statistics for the luminance channels, which integrate the mean, variance, and skewness of the luminance channels; Based on the global brightness statistics, brightness features at multiple scales are extracted using convolutional kernels with different dilation rates.

5. The underwater image enhancement method based on brightness-guided multi-scale edge restoration according to claim 1, characterized in that, The feature extraction and modulation of the chroma channel described in step S3 specifically includes: Channel attention weights and spatial attention weights are generated for the extracted chroma features, and the chroma features are modulated using the channel attention weights and spatial attention weights.

6. The underwater image enhancement method based on brightness-guided multi-scale edge restoration according to claim 1, characterized in that, The fusion process described in step S3, which involves fusing features across multiple feature extraction levels, specifically includes: In the preset multiple intermediate feature extraction levels and the last feature extraction level, the modulated chromaticity features output from the corresponding level are fused with the luminance guiding features.

7. The underwater image enhancement method based on brightness-guided multi-scale edge restoration according to claim 1, characterized in that, Step S5, which involves generating multiple features with different resolutions, specifically includes: The color-corrected image is convolved to generate high-resolution features; the high-resolution features are downsampled at least once to generate medium-resolution features and low-resolution features.

8. The underwater image enhancement method based on brightness-guided multi-scale edge restoration according to claim 7, characterized in that, Step S6, which describes adaptive weighted fusion of features at multiple different resolutions, specifically includes: After spatially aligning the medium-resolution features and low-resolution features, the fusion weights are dynamically calculated and adaptive weighted summation is performed to obtain optimized medium-resolution features. After spatially aligning the high-resolution and medium-resolution features, the fusion weights are dynamically calculated and adaptively weighted summation is performed to obtain optimized high-resolution features.

9. The underwater image enhancement method based on brightness-guided multi-scale edge restoration according to claim 8, characterized in that, Step S7, which describes scale-adaptive edge enhancement of the multi-scale fused features, specifically includes: For the optimized medium-resolution features, edge enhancement is performed using a convolutional kernel of the first size; Edge enhancement is performed on the optimized high-resolution features using a convolutional kernel of a second size, wherein the first size is larger than the second size.

10. An underwater image enhancement system based on brightness-guided multi-scale edge restoration, characterized in that, The method includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 9.