Underwater image quality improvement method based on Retinex heuristic color correction and saturation driving

By employing Retinex heuristic color correction and saturation-driven methods, the shortcomings of underwater images in color cast correction and contrast enhancement are addressed, achieving efficient underwater image quality improvement and generating images with high contrast, rich detail, and natural colors.

CN121961949APending Publication Date: 2026-05-01CHIZHOU UNIV +1
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHIZHOU UNIV
Filing Date
2026-01-16
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing underwater image enhancement technologies suffer from problems such as inaccurate color shift correction, unstable contrast enhancement, and insufficient detail recovery when dealing with complex and ever-changing underwater environments, resulting in poor image quality improvement.

Method used

A Retinex-based heuristic color correction and saturation-driven approach is adopted. By using channel compensation, gamma correction, multi-scale Retinex algorithm and dark channel prior theory, transmittance is estimated to perform color correction and detail enhancement of the image, generating high-quality underwater images.

Benefits of technology

It significantly improves the accuracy and efficiency of transmittance estimation for underwater images, enhances image contrast and detail fidelity, and generates underwater images with natural colors and rich details.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121961949A_ABST
    Figure CN121961949A_ABST
Patent Text Reader

Abstract

The invention relates to an underwater image quality improvement method based on Retinex heuristic color correction and saturation driving. The method comprises the following steps: obtaining an underwater image after color correction; extracting a brightness channel, and decomposing the brightness channel into a base layer and three detail layers; estimating the transmissivity of the underwater image after color correction; and obtaining an underwater image with enhanced contrast and details, namely an enhanced image. According to the method, segmented channel compensation based on the maximum mean value is performed on the basis of channel characteristic difference observation of an underwater scene, the difference can be adapted in a targeted manner, and accurate channel compensation is realized; the color brightness is improved; the overall visual experience of the image is improved, and the color cast problem of the underwater image is effectively corrected; the accuracy and efficiency of underwater image transmissivity estimation can be obviously improved; according to the method, the fog effect removal of the image base layer and the enhancement of the gradient information of the multi-level detail layer are synchronously realized by using the estimated transmissivity, and finally the high-quality underwater image is generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0002] This invention relates to the field of underwater image processing technology, and in particular to a method for improving the quality of underwater images based on Retinex heuristic color correction and saturation-driven methods. Background Technology

[0004] High-quality underwater imagery is crucial for underwater environmental exploration and marine resource surveys. However, underwater scenes are inevitably affected by light absorption and scattering effects: absorption selectively attenuates light propagation energy, leading to significant color shifts in the image; scattering alters the direction of light propagation, introducing additional blurring components into the scene, ultimately resulting in low image contrast and blurred details. These degradation issues severely limit the effectiveness of underwater imagery in tasks such as information extraction and target detection, making underwater image enhancement technology an urgent need to improve underwater image quality and support related underwater operations.

[0005] Currently, to improve the visual quality of underwater images, researchers have proposed various image enhancement methods to achieve color cast correction, contrast enhancement, and detail restoration. These methods can be broadly classified into three categories: physical model-based methods, model-free methods, and deep learning-based methods.

[0006] Among these methods, physical model-based approaches typically rely on specific strong prior knowledge or assumptions to solve for unknown parameters in the underwater imaging process, such as transmittance and global backscattered light, and then reconstruct a clear image by inversely extrapolating the imaging model. However, because the pre-set prior knowledge and assumptions are difficult to adapt to the complex and ever-changing underwater environment, images processed by this type of method generally suffer from problems such as missing details and unnatural visual effects.

[0007] Model-free methods enhance image color and overall structure by modifying pixel value distribution or adjusting histogram features. However, these methods lack precise constraint mechanisms, making them prone to over-enhancing contrast and even introducing additional artifacts that compromise the realism of the original scene.

[0008] Deep learning-based methods have demonstrated significant advantages in underwater image enhancement tasks due to their powerful feature learning and generalization capabilities. However, the performance of these methods is highly dependent on large-scale, diverse labeled training data. Unfortunately, for dynamically changing and complex underwater scenarios, the coverage and richness of existing training data are often insufficient. This shortcoming directly restricts the stability and effectiveness of the models in different real-world scenarios. Summary of the Invention

[0010] To address the issues of current underwater image quality enhancement methods failing to adequately consider the complex degradation mechanisms of color cast and the low accuracy and efficiency of transmittance estimation during image restoration, this invention aims to provide a Retinex-based heuristic color correction and saturation-driven underwater image quality enhancement method. This method can specifically adapt to the differences in channel characteristics of underwater scenes, achieve precise channel compensation, effectively correct the color cast problem in underwater images, and significantly improve the accuracy and efficiency of underwater image transmittance estimation.

[0011] To achieve the above objectives, the present invention adopts the following technical solution: an underwater image quality enhancement method based on Retinex heuristic color correction and saturation-driven method, which includes the following sequential steps:

[0012] (1) Compare underwater images The global average values ​​of the red, green, and blue channels are calculated. Channel compensation is applied to the other two channels based on the channel with the largest global average value. Gamma correction coefficients are designed to correct each channel. A multi-scale Retinex algorithm is then used to dynamically stretch the gamma-corrected channels to obtain the color-corrected underwater image. ;

[0013] (2) Extract the color-corrected underwater image The brightness channel is defined, and the brightness channel is decomposed into a base layer. and three detail layers, the three detail layers including the first detail layer. Second layer of detail and the third layer of detail ;

[0014] (3) Color-corrected underwater images Original saturation Adjustments were made, and based on the dark channel prior theory, the mapping relationship between saturation and transmittance in the HSV color space was derived to estimate the color-corrected underwater image. transmittance ;

[0015] (4) Based on the estimated transmittance For the base layer The process is performed to obtain a clear, fog-free base layer. At the same time, utilizing transmittance The gradient information of the three detail layers is enhanced and amplified to obtain the enhanced three detail layers. Then, the fog-free clear base layer is applied. By merging the three enhanced detail layers, an underwater image with improved contrast and detail is obtained, i.e., the enhanced image. .

[0016] Step (1) specifically includes the following steps:

[0017] (1a) Comparison of underwater images Global average values ​​of the red, green, and blue channels , , If the global average value of the green channel If the maximum value is reached, then mathematical compensation is performed on the red and blue channels as follows:

[0018] ;

[0019] in, and These are the compensated red and blue channels, respectively. It is an underwater image. The pixel coordinates; , , Pixels in the red, green, and blue channels respectively Pixel value at; The red channel gain coefficient is given by the following formula:

[0020] ;

[0021] In the formula, and These are the standard deviations for the green channel and the red channel, respectively.

[0022] Compare the global average values ​​of the red, green, and blue channels. , , If the global average value of the blue channel If the maximum value is reached, then mathematical compensation is performed on the red and green channels as follows:

[0023] ;

[0024] in, This is the green channel after compensation; The red channel gain coefficient is given by the following formula:

[0025] ;

[0026] In the formula, The standard deviation of the green channel;

[0027] (1b) Applying gamma correction to underwater images Each channel undergoes a nonlinear transformation to improve the overall visual experience of the image. Gamma correction specifically involves:

[0028] ;

[0029] in, , R represents any one of the red, green, and blue channels of the image, where R, G, and B are the red, green, and blue channels, respectively. These are the channels of the image after gamma correction. For each channel of the image after channel compensation in step (1a); and Here, skewness and kurtosis are the skewness and kurtosis of each channel of the image, respectively, and their expressions are:

[0030] ;

[0031] ;

[0032] in, After channel compensation in step (1a), each channel at the pixel point Pixel value at; This is the global average value of all channels after channel compensation. The standard deviation of each channel after channel compensation; H and W represent the underwater image, respectively. Height and width;

[0033] (1c) The multi-scale Retinex algorithm is used to dynamically stretch each channel of the gamma-corrected image to obtain the pre-corrected underwater image channels. :

[0034] ;

[0035] in, The number of Gaussian kernel functions; For the first The weights corresponding to each Gaussian kernel; For each channel of the gamma-corrected image at the pixel level The pixel value at that position, the first A Gaussian kernel Defined as:

[0036] ;

[0037] In the formula, The scale of the Gaussian kernel function;

[0038] (1d) For each channel of the pre-corrected underwater image Perform histogram linear stretching, then merge the three stretched channels to obtain the color-corrected underwater image. .

[0039] Step (2) specifically includes the following steps:

[0040] (2a) Color-corrected underwater image Convert from RGB color space to HSV color space and extract the luminance channel. ;

[0041] (2b) Set the brightness channel Decomposed into a base layer And three detail layers, specifically including the following steps:

[0042] (2b1) Using a Gaussian filter Compared with the first-level scale image Perform convolution operations to obtain the base layer :

[0043] ;

[0044] Among them, the first-level scale image For brightness channel ;

[0045] First layer of detail Through the first layer of scale image With the base layer The difference is:

[0046] ;

[0047] (2b2) ​​For the first-level scale image Perform downsampling to obtain the second-level scale image. Using a Gaussian filter and Perform convolution operations to obtain the second base layer. :

[0048] ;

[0049] Second layer of detail Through the second-level scale image With the second base layer The difference is:

[0050] ;

[0051] (2b3) For the second-level scale image Perform downsampling to obtain the third-level scale image. Using a Gaussian filter and Perform convolution operations to obtain the third base layer. :

[0052] ;

[0053] Third layer of detail Through the third-level scale image With the third base layer The difference is:

[0054] .

[0055] Step (3) specifically includes the following steps:

[0056] (3a) Based on the dark channel prior theory, estimate the color-corrected underwater image. transmittance for:

[0057] ;

[0058] in, Represents pixels Transmittance at that location; Represents pixels The local neighborhood; For pixels All pixels within the local neighborhood; Indicates the color-corrected underwater image At pixel Pixel value at; This is global backscattered light; This indicates taking the minimum value among the red, green, and blue channels; Indicates at pixel point It takes the minimum value within its local neighborhood;

[0059] transmittance Simplified to:

[0060] (1);

[0061] in, ;

[0062] (3b) The definitions of brightness and saturation in the HSV color space are as follows:

[0063] (2)

[0064] (3)

[0065] in, and These represent the underwater images after color correction. At pixel Brightness and saturation at the location; and These are underwater images after color correction. The red, green, and blue channels at the pixel The maximum and minimum values ​​of the pixels at that location;

[0066] (3c) Substituting brightness (equation (2)) and saturation (equation (3)) into equation (1), we obtain the transmittance expressed in terms of saturation and brightness. :

[0067] ;

[0068] In the formula, and These represent the underwater images after color correction. At pixel Saturation and brightness at the location;

[0069] (3d) Color-corrected underwater image Original saturation Adjustments were made to obtain the adjusted saturation. :

[0070] ;

[0071] in, , and Original saturation The maximum, minimum, and average values; due to brightness It is usually constant within local blocks, while using adjusted saturation. The transmittance was obtained. for:

[0072] ;

[0073] In the formula, Indicates the color-corrected underwater image At pixel The adjusted saturation level;

[0074] Color-corrected underwater images The saturation of each pixel satisfies the inequality Therefore, use directly replace Calculate the transmittance to obtain the transmittance. The expression is:

[0075] ;

[0076] In the formula, Indicates the color-corrected underwater image At pixel The saturation level has been adjusted.

[0077] Step (4) specifically includes the following steps:

[0078] (4a) According to the scattering model, the base layer Represented as:

[0079] ;

[0080] in, It is a clear, fog-free base layer; It is the global backscattered light of the base layer; The base layer transmittance is equal to the transmittance. When the base layer transmittance When it approaches 0, the base layer Approximately equal to Using the base layer transmittance The pixel value corresponding to the smallest pixel is used as :

[0081] ;

[0082] in, ; Estimate the base layer transmittance for the 0.1% pixel with the lowest transmittance. Then, obtain the fog-free clear base layer according to the following formula. :

[0083] ;

[0084] in, Indicates taking Larger values ​​between 0.1 and 0.1 should be avoided. When the denominator is too small, it approaches 0, which leads to computational instability. Therefore, it is necessary to ensure the robustness of the algorithm.

[0085] (4b) For the first, second, and third detail layers , , Enhance details:

[0086] , ;

[0087] Where ∇ is the gradient operator; Parameters for controlling the gradient amplification intensity; Transmittance The average gradient of the three detail layers. Magnify to obtain the gradient for enhanced detail. The image is reconstructed from the gradient field using the Poisson equation, resulting in an enhanced detail layer image. :

[0088] , ;

[0089] in, The equation is Poisson's equation.

[0090] (4c) Enhanced second detail layer image Enhanced third detail layer image Upsampled to the input image respectively Same size, using multi-weighted arrays to enhance detail layer images By merging, an enhanced overall detail layer is obtained. :

[0091] ;

[0092] in, This is the enhanced first detail layer image; sgn is the sign function used to determine the sign of the detail layer and achieve adaptive weight adjustment; , and These are three non-negative parameters used to balance the contributions of detail layers at different scales;

[0093] (4d) Fusion Dehazing Clear Base Layer and the enhanced overall detail layer The reconstructed luminance channel is obtained. :

[0094] ;

[0095] The reorganized luminance channel The underwater image was obtained by converting the HSV color space back to the RGB color space. Enhanced image ;

[0096] ;

[0097] In the formula, HSV2RGB means converting the image from the HSV color space to the RGB color space.

[0098] As can be seen from the above technical solutions, the beneficial effects of the present invention are as follows: First, the present invention performs segmented channel compensation based on the maximum mean, based on the observation of channel characteristic differences in underwater scenes. Specifically, in most underwater scenes, the green channel is better preserved than the red and blue channels, while in some deep-water scenes, the blue channel may be better preserved. The present invention can specifically adapt to the above differences and achieve accurate channel compensation. Second, the present invention designs gamma correction coefficients, and improves color vividness without excessively amplifying noise by performing specific nonlinear transformations on each channel of the image. Third, the present invention uses the multi-scale Retinex algorithm to dynamically stretch the color channels after gamma correction, improving the overall visual experience of the image and effectively correcting the color cast problem of underwater images. Fourth, the present invention performs saturation-driven image transmittance estimation. Based on the prior theory of dark channels, it derives and establishes the mapping relationship between saturation and transmittance, and performs exclusive saturation adjustment, which can significantly improve the accuracy and efficiency of underwater image transmittance estimation. Fifth, the present invention uses the estimated transmittance to simultaneously achieve image base layer fog removal and multi-level detail layer gradient information enhancement, ultimately generating high-quality underwater images. Attached Figure Description

[0100] Figure 1 This is a flowchart of the method of the present invention;

[0101] Figure 2 This is a schematic diagram showing the visual comparison results of this invention with 10 other commonly used underwater image quality improvement methods on the UIEB dataset. Detailed Implementation

[0103] like Figure 1 As shown, an underwater image quality enhancement method based on Retinex heuristic color correction and saturation-driven methods includes the following sequential steps:

[0104] (1) Compare underwater images The global average values ​​of the red, green, and blue channels are calculated. Channel compensation is applied to the other two channels based on the channel with the largest global average value. Gamma correction coefficients are designed to correct each channel. A multi-scale Retinex algorithm is then used to dynamically stretch the gamma-corrected channels to obtain the color-corrected underwater image. ;

[0105] (2) Extract the color-corrected underwater image The brightness channel is defined, and the brightness channel is decomposed into a base layer. and three detail layers, the three detail layers including the first detail layer. Second layer of detail and the third layer of detail ;

[0106] (3) Color-corrected underwater images Original saturation Adjustments were made, and based on the dark channel prior theory, the mapping relationship between saturation and transmittance in the HSV color space was derived to estimate the color-corrected underwater image. transmittance ;

[0107] (4) Based on the estimated transmittance For the base layer The process is performed to obtain a clear, fog-free base layer. At the same time, utilizing transmittance The gradient information of the three detail layers is enhanced and amplified to obtain the enhanced three detail layers. Then, the fog-free clear base layer is applied. By merging the three enhanced detail layers, an underwater image with improved contrast and detail is obtained, i.e., the enhanced image. .

[0108] Step (1) specifically includes the following steps:

[0109] (1a) Specifically, in most underwater scenes, the green channel is better preserved than the red and blue channels; however, in some deep-water scenes, the blue channel may be better preserved. Based on this observation, a segmented channel compensation strategy based on the maximum mean is first proposed: comparing underwater images Global average values ​​of the red, green, and blue channels , , If the global average value of the green channel If the maximum value is reached, then mathematical compensation is performed on the red and blue channels as follows:

[0110] ;

[0111] in, and These are the compensated red and blue channels, respectively. It is an underwater image. The pixel coordinates; , , Pixels in the red, green, and blue channels respectively Pixel value at; The red channel gain coefficient is given by the following formula:

[0112] ;

[0113] In the formula, and These are the standard deviations for the green channel and the red channel, respectively. The differences in attenuation levels between channels were quantified;

[0114] Compare the global average values ​​of the red, green, and blue channels. , , If the global average value of the blue channel If the maximum value is reached, then mathematical compensation is performed on the red and green channels as follows:

[0115] ;

[0116] in, This is the green channel after compensation; The red channel gain coefficient is given by the following formula:

[0117] ;

[0118] In the formula, The standard deviation of the green channel;

[0119] (1b) Applying gamma correction to underwater images Each channel undergoes a nonlinear transformation to improve the overall visual experience of the image. Gamma correction specifically involves:

[0120] ;

[0121] in, , R represents any one of the red, green, and blue channels of the image, where R, G, and B are the red, green, and blue channels, respectively. These are the channels of the image after gamma correction. For each channel of the image after channel compensation in step (1a); and Here, skewness and kurtosis are the skewness and kurtosis of each channel of the image, respectively, and their expressions are:

[0122] ;

[0123] ;

[0124] in, After channel compensation in step (1a), each channel at the pixel point Pixel value at; This is the global average value of all channels after channel compensation. The standard deviation of each channel after channel compensation; H and W represent the underwater image, respectively. The height and width; gamma correction effectively optimizes the visual quality of an image by performing specific nonlinear transformations on each channel of the image; it can make dark details clearer and colors more vivid without excessively amplifying noise, thus obtaining a more natural visual effect through gamma correction processing;

[0125] (1c) The multi-scale Retinex algorithm is used to dynamically stretch each channel of the gamma-corrected image to obtain the pre-corrected underwater image channels. :

[0126] ;

[0127] in, The number of Gaussian kernel functions; For the first The weights corresponding to each Gaussian kernel; For each channel of the gamma-corrected image at the pixel level The pixel value at that position, the first A Gaussian kernel Defined as:

[0128] ;

[0129] In the formula, The scale of the Gaussian kernel function;

[0130] (1d) For each channel of the pre-corrected underwater image Perform histogram linear stretching, then merge the three stretched channels to obtain the color-corrected underwater image. .

[0131] Step (2) specifically includes the following steps:

[0132] (2a) Color-corrected underwater image Convert from RGB color space to HSV color space and extract the luminance channel. ;

[0133] (2b) Set the brightness channel Decomposed into a base layer And three detail layers, specifically including the following steps:

[0134] (2b1) Using a Gaussian filter Compared with the first-level scale image Perform convolution operations to obtain the base layer :

[0135] ;

[0136] Among them, the first-level scale image For brightness channel ;

[0137] First layer of detail Through the first layer of scale image With the base layer The difference is:

[0138] ;

[0139] (2b2) ​​For the first-level scale image Perform downsampling to obtain the second-level scale image. Using a Gaussian filter and Perform convolution operations to obtain the second base layer. :

[0140] ;

[0141] Second layer of detail Through the second-level scale image With the second base layer The difference is:

[0142] ;

[0143] (2b3) For the second-level scale image Perform downsampling to obtain the third-level scale image. Using a Gaussian filter and Perform convolution operations to obtain the third base layer. :

[0144] ;

[0145] Third layer of detail Through the third-level scale image With the third base layer The difference is:

[0146] .

[0147] Step (3) specifically includes the following steps:

[0148] (3a) Based on the dark channel prior theory, estimate the color-corrected underwater image. transmittance for:

[0149] ;

[0150] in, Represents pixels Transmittance at that location; Represents pixels The local neighborhood; For pixels All pixels within the local neighborhood; Indicates the color-corrected underwater image At pixel Pixel value at; This is global backscattered light; This indicates taking the minimum value among the red, green, and blue channels; Indicates at pixel point It takes the minimum value within its local neighborhood;

[0151] transmittance Simplified to:

[0152] (1);

[0153] in, ;

[0154] (3b) The definitions of brightness and saturation in the HSV color space are as follows:

[0155] (2)

[0156] (3)

[0157] in, and These represent the underwater images after color correction. At pixel Brightness and saturation at the location; and These are underwater images after color correction. The red, green, and blue channels at the pixel The maximum and minimum values ​​of the pixels at that location;

[0158] (3c) Substituting brightness (equation (2)) and saturation (equation (3)) into equation (1), we obtain the transmittance expressed in terms of saturation and brightness. :

[0159] ;

[0160] In the formula, and These represent the underwater images after color correction. At pixel Saturation and brightness at the location;

[0161] (3d) The definitions of brightness and saturation in step (3b) are only applicable to specific outdoor scenes and not to complex and challenging underwater scenes. Therefore, when using (3c) to calculate transmittance, the transmittance will be underestimated. Thus, saturation adjustment is needed to overcome this problem for the color-corrected underwater image. Original saturation Adjustments were made to obtain the adjusted saturation. :

[0162] ;

[0163] in, , and Original saturation The maximum, minimum, and average values; due to brightness It is usually constant within local blocks, while using adjusted saturation. The transmittance was obtained. for:

[0164] ;

[0165] In the formula, Indicates the color-corrected underwater image At pixel The adjusted saturation level;

[0166] Color-corrected underwater images The saturation of each pixel satisfies the inequality Therefore, use directly replace Calculate the transmittance to obtain the transmittance. The expression is:

[0167] ;

[0168] In the formula, Indicates the color-corrected underwater image At pixel The saturation level has been adjusted.

[0169] The present invention uses adjusted saturation to estimate the transmittance of underwater images, which has two advantages: first, it can significantly reduce halo artifacts caused by local region operations; second, it has high computational efficiency based on pixel operations.

[0170] Step (4) specifically includes the following steps:

[0171] (4a) According to the scattering model, the base layer Represented as:

[0172] ;

[0173] in, It is a clear, fog-free base layer; It is the global backscattered light of the base layer; The base layer transmittance is equal to the transmittance. When the base layer transmittance When it approaches 0, the base layer Approximately equal to Using the base layer transmittance The pixel value corresponding to the smallest pixel is used as :

[0174] ;

[0175] in, ; Estimate the base layer transmittance for the 0.1% pixel with the lowest transmittance. Then, obtain the fog-free clear base layer according to the following formula. :

[0176] ;

[0177] in, Indicates taking Larger values ​​between 0.1 and 0.1 should be avoided. When the denominator is too small, it approaches 0, which leads to computational instability. Therefore, it is necessary to ensure the robustness of the algorithm.

[0178] (4b) For the first, second, and third detail layers , , Enhance details:

[0179] , ;

[0180] Where ∇ is the gradient operator; Parameters for controlling the gradient amplification intensity; Transmittance The average gradient of the three detail layers. Magnify to obtain the gradient for enhanced detail. The image is reconstructed from the gradient field using the Poisson equation, resulting in an enhanced detail layer image. :

[0181] , ;

[0182] in, The equation is Poisson's equation.

[0183] (4c) Enhanced second detail layer image Enhanced third detail layer image Upsampled to the input image respectively Same size, using multi-weighted arrays to enhance detail layer images By merging, an enhanced overall detail layer is obtained. :

[0184] ;

[0185] in, This is the enhanced first detail layer image; sgn is the sign function used to determine the sign of the detail layer and achieve adaptive weight adjustment; , and These are three non-negative parameters used to balance the contributions of detail layers at different scales;

[0186] (4d) Fusion Dehazing Clear Base Layer and the enhanced overall detail layer The reconstructed luminance channel is obtained. :

[0187] ;

[0188] The reorganized luminance channel The underwater image was obtained by converting the HSV color space back to the RGB color space. Enhanced image ;

[0189] ;

[0190] In the formula, HSV2RGB means converting the image from the HSV color space to the RGB color space.

[0191] The following combination Figure 1 , Figure 2 The present invention will be further described below.

[0192] To fully evaluate the performance of this invention in improving underwater image quality, the image enhancement results were tested on the UIEB underwater image enhancement dataset. The UIEB dataset contains 890 images acquired in various real underwater environments and can be used to evaluate the image quality improvement capabilities of different methods in three dimensions: color, contrast, and detail. This invention selected ten competitively performing methods as control methods, specifically including LANet, PUIENet, DeepWav, LEPFNet, LiteNet, HFM, WWPF, UShape, OGO-ULAP, and PCFB. It is worth emphasizing that all of the above methods are research results published after 2022. Figure 2 The paper demonstrates the visual enhancement effects of different image quality improvement methods on three representative underwater images from the UIEB dataset. It can be seen that the original images suffer from degradation issues such as greenish, bluish, and blue-green tints, respectively.

[0193] For images with a green tint, the LANet algorithm corrects the green tone, but the enhanced image lacks sharpness; the PUIENet algorithm improves color reproduction but suffers from blurred details; the DeepWav algorithm only slightly corrects the green tone; the WWPF algorithm performs well in improving overall image brightness, but some local areas are too bright, which is not conducive to the presentation of details; the OGO-ULAP algorithm significantly improves image contrast, but its effect on correcting color cast and improving brightness is poor; the UShape algorithm produces a natural color tone, but the image is relatively blurry, and the improvement in contrast is limited; the PCFB algorithm still leaves a certain green tone in the processed image. Compared with the above methods, this invention can significantly improve image contrast, reasonably optimize brightness levels, and effectively highlight image details.

[0194] For images with a bluish tint, the DeepWav algorithm performs poorly in contrast enhancement and color cast correction. The LANet, LEPFNet, LiteNet, and UShape algorithms show similar enhancement effects, all correcting color cast in the foreground area. However, these methods are unsuccessful in correcting color cast and enhancing contrast in the background area. While the HFM algorithm removes the blue tint, its imprecise color correction method results in an additional yellowish tint. The OGO-ULAP algorithm not only fails to correct color cast but also creates large areas of overexposure. The UShape algorithm produces images with insufficient detail. The PCFB algorithm, while improving contrast, exacerbates an unintended green tint. In contrast, this invention can simultaneously correct color cast in both the foreground and background areas and effectively enhance contrast.

[0195] For images with degraded blue-green hues, the UShape algorithm produces images with good tonal representation, but the image is still not clear enough. The LANet, PUIENet, DeepWav, and LEPFNet algorithms can significantly reduce haze and correct blue-green tones, but their enhanced images have low contrast. The OGO-ULAP algorithm eliminates white haze but fails to achieve ideal color results. The WWPF and PCFB algorithms have advantages in improving brightness and contrast, but the enhanced images also lose some important details. In contrast, the enhancement effect of this invention is excellent; the processed image has a natural visual appearance and retains excellent details.

[0196] This invention employs four quantitative indicators to quantitatively calculate the image quality improvement effects of different methods, specifically including... , Blur and EMBM. Among them, and These metrics are used to evaluate image contrast and edge enhancement effects, respectively; Blur is used to evaluate the image's sharpness enhancement performance; EMBM is obtained by calculating the blur detection probability and is usually used for quantitative analysis of edge features. , The higher the value of EMBM and the lower the value of Blur, the better the image enhancement effect of the representation method.

[0197] Table 1 lists the relevant quantitative data for different methods on the UIEB dataset. The values ​​from this invention represent the optimal results, while the bolded values ​​represent the suboptimal results.

[0198] Table 1. Comparison of evaluation indicators between the method of this invention and other methods

[0199]

[0200] As can be seen from Table 1, the images processed by PUIENet and UShape algorithms suffer from blurred details and low contrast. and The index values ​​are also low; the OGO-ULAP algorithm's enhancement results are insufficient in brightness and have large areas of overexposure, damaging the image's structure and details. and The index values ​​are also not high. Among all the comparison methods, the present invention achieves the best results in all indicators. Compared with the second-best method, the present invention... , The values ​​of the EMBM index increased by 5.57%, 0.71%, and 2.47%, respectively, while the value of the Blur index decreased by 1.51%.

[0201] Comparative analysis of qualitative and quantitative indicators shows that the present invention has significant advantages in improving image clarity and correcting color cast.

[0202] In summary, this invention combines a Retinex heuristic color correction module with a saturation-driven contrast and detail enhancement module to improve the quality of underwater images. The Retinex heuristic color correction addresses information loss and dynamic range compression in underwater images by constructing three operations: color compensation, gamma correction, and multi-scale histogram stretching. These operations generate images with natural colors and a balanced histogram distribution. The saturation-driven contrast and detail enhancement derives the mapping relationship between saturation and transmittance from the dark channel of the input underwater image and performs pixel-level transmittance estimation based on the adjusted saturation to improve the accuracy and efficiency of transmittance estimation. This invention uses the estimated transmittance to remove fog effects from the base layer of the image and amplifies the gradient information of multiple detail layers, then fuses the two to generate an improved underwater image. Extensive experiments on the UIBE underwater image dataset demonstrate that this invention possesses excellent underwater image enhancement performance, generating images with high contrast, rich detail, and natural colors. Furthermore, this invention can also be used as a preprocessing strategy for image segmentation tasks and exhibits excellent enhancement capabilities for other foggy scenes.

[0203] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.

Claims

1. A method for improving the quality of underwater images based on Retinex heuristic color correction and saturation-driven methods, characterized in that: The method includes the following steps in sequence: (1) Compare underwater images The global average values ​​of the red, green, and blue channels are calculated. Channel compensation is applied to the other two channels based on the channel with the largest global average value. Gamma correction coefficients are designed to correct each channel. A multi-scale Retinex algorithm is then used to dynamically stretch the gamma-corrected channels to obtain the color-corrected underwater image. ; (2) Extract the color-corrected underwater image The brightness channel is defined, and the brightness channel is decomposed into a base layer. and three detail layers, the three detail layers including the first detail layer. Second layer of detail and the third layer of detail ; (3) Color-corrected underwater images Original saturation Adjustments were made, and based on the dark channel prior theory, the mapping relationship between saturation and transmittance in the HSV color space was derived to estimate the color-corrected underwater image. transmittance ; (4) Based on the estimated transmittance For the base layer The process is performed to obtain a clear, fog-free base layer. At the same time, utilizing transmittance The gradient information of the three detail layers is enhanced and amplified to obtain the enhanced three detail layers. Then, the fog-free clear base layer is applied. By merging the three enhanced detail layers, an underwater image with improved contrast and detail is obtained, i.e., the enhanced image. .

2. The underwater image quality enhancement method based on Retinex heuristic color correction and saturation-driven method according to claim 1, characterized in that: Step (1) specifically includes the following steps: (1a) Comparison of underwater images Global average values ​​of the red, green, and blue channels , , If the global average value of the green channel If the maximum value is reached, then mathematical compensation is performed on the red and blue channels as follows: ; in, and These are the compensated red and blue channels, respectively. It is an underwater image. The pixel coordinates; , , Pixels in the red, green, and blue channels respectively Pixel value at; The red channel gain coefficient is given by the following formula: ; In the formula, and These are the standard deviations for the green channel and the red channel, respectively. Compare the global average values ​​of the red, green, and blue channels. , , If the global average value of the blue channel If the maximum value is reached, then mathematical compensation is performed on the red and green channels as follows: ; in, This is the green channel after compensation; The red channel gain coefficient is given by the following formula: ; In the formula, The standard deviation of the green channel; (1b) Applying gamma correction to underwater images Each channel undergoes a nonlinear transformation to improve the overall visual experience of the image. Gamma correction specifically involves: ; in, , R represents any one of the red, green, and blue channels of the image, where R, G, and B are the red, green, and blue channels, respectively. These are the channels of the image after gamma correction. For each channel of the image after channel compensation in step (1a); and Here, skewness and kurtosis are the skewness and kurtosis of each channel of the image, respectively, and their expressions are: ; ; in, After channel compensation in step (1a), each channel at the pixel point Pixel value at; This is the global average value of all channels after channel compensation. The standard deviation of each channel after channel compensation; H and W represent the underwater image, respectively. Height and width; (1c) The multi-scale Retinex algorithm is used to dynamically stretch each channel of the gamma-corrected image to obtain the pre-corrected underwater image channels. : ; in, The number of Gaussian kernel functions; For the first The weights corresponding to each Gaussian kernel; For each channel of the gamma-corrected image at the pixel level The pixel value at that position, the first A Gaussian kernel Defined as: ; In the formula, The scale of the Gaussian kernel function; (1d) For each channel of the pre-corrected underwater image Perform histogram linear stretching, then merge the three stretched channels to obtain the color-corrected underwater image. .

3. The underwater image quality enhancement method based on Retinex heuristic color correction and saturation-driven method according to claim 1, characterized in that: Step (2) specifically includes the following steps: (2a) Color-corrected underwater image Convert from RGB color space to HSV color space and extract the luminance channel. ; (2b) Set the brightness channel Decomposed into a base layer And three detail layers, specifically including the following steps: (2b1) Using a Gaussian filter Compared with the first-level scale image Perform convolution operations to obtain the base layer : ; Among them, the first-level scale image For brightness channel ; First layer of detail Through the first layer of scale image With the base layer The difference is: ; (2b2) ​​For the first-level scale image Perform downsampling to obtain the second-level scale image. Using a Gaussian filter and Perform convolution operations to obtain the second base layer. : ; Second layer of detail Through the second-level scale image With the second base layer The difference is: ; (2b3) For the second-level scale image Perform downsampling to obtain the third-level scale image. Using a Gaussian filter and Perform convolution operations to obtain the third base layer. : ; Third layer of detail Through the third-level scale image With the third base layer The difference is: 。 4. The underwater image quality enhancement method based on Retinex heuristic color correction and saturation-driven method according to claim 1, characterized in that: Step (3) specifically includes the following steps: (3a) Based on the dark channel prior theory, estimate the color-corrected underwater image. transmittance for: ; in, Represents pixels Transmittance at that location; Represents pixels The local neighborhood; For pixels All pixels within the local neighborhood; Indicates the color-corrected underwater image At pixel Pixel value at; This is global backscattered light; This indicates taking the minimum value among the red, green, and blue channels; Indicates at pixel point It takes the minimum value within its local neighborhood; transmittance Simplified to: (1); in, ; (3b) The definitions of brightness and saturation in the HSV color space are as follows: ;(2) ;(3) in, and These represent the underwater images after color correction. At pixel Brightness and saturation at the location; and These are underwater images after color correction. The red, green, and blue channels at the pixel The maximum and minimum values ​​of the pixels at that location; (3c) Substituting brightness (equation (2)) and saturation (equation (3)) into equation (1), we obtain the transmittance expressed in terms of saturation and brightness. : ; In the formula, and These represent the underwater images after color correction. At pixel Saturation and brightness at the location; (3d) Color-corrected underwater image Original saturation Adjustments were made to obtain the adjusted saturation. : ; in, , and Original saturation The maximum, minimum, and average values; due to brightness It is usually constant within local blocks, while using adjusted saturation. The transmittance was obtained. for: ; In the formula, Indicates the color-corrected underwater image At pixel The adjusted saturation level; Color-corrected underwater images The saturation of each pixel satisfies the inequality Therefore, use directly replace Calculate the transmittance to obtain the transmittance. The expression is: ; In the formula, Indicates the color-corrected underwater image At pixel The saturation level has been adjusted.

5. The underwater image quality enhancement method based on Retinex heuristic color correction and saturation-driven method according to claim 1, characterized in that: Step (4) specifically includes the following steps: (4a) According to the scattering model, the base layer Represented as: ; in, It is a clear, fog-free base layer; It is the global backscattered light of the base layer; The base layer transmittance is equal to the transmittance. When the base layer transmittance When it approaches 0, the base layer Approximately equal to Using the base layer transmittance The pixel value corresponding to the smallest pixel is used as : ; in, ; Estimate the base layer transmittance for the 0.1% pixel with the lowest transmittance. Then, obtain the fog-free clear base layer according to the following formula. : ; in, Indicates taking Larger values ​​between 0.1 and 0.1 should be avoided. When the denominator is too small, it approaches 0, which leads to computational instability. Therefore, it is necessary to ensure the robustness of the algorithm. (4b) For the first, second, and third detail layers , , Enhance details: , ; Where ∇ is the gradient operator; Parameters for controlling the gradient amplification intensity; Transmittance The average gradient of the three detail layers. Magnify to obtain the gradient for enhanced detail. The image is reconstructed from the gradient field using the Poisson equation, resulting in an enhanced detail layer image. : , ; in, The equation is Poisson's equation. (4c) Enhanced second detail layer image Enhanced third detail layer image Upsampled to the input image respectively Same size, using multi-weighted arrays to enhance detail layer images By merging, an enhanced overall detail layer is obtained. : ; in, This is the enhanced first detail layer image; sgn is the sign function used to determine the sign of the detail layer and achieve adaptive weight adjustment; , and These are three non-negative parameters used to balance the contributions of detail layers at different scales; (4d) Fusion Dehazing Clear Base Layer and the enhanced overall detail layer The reconstructed luminance channel is obtained. : ; The reorganized luminance channel The underwater image was obtained by converting the HSV color space back to the RGB color space. Enhanced image ; ; In the formula, HSV2RGB means converting the image from the HSV color space to the RGB color space.

Citation Information

Cited By

  • Image enhancement method based on depth information guidance

    CN122199317A