An underwater image enhancement method and system based on dynamic multi-channel compensation

By using a dynamic multi-channel compensation method, the red, green and blue channels of underwater images are adaptively adjusted. Combined with an atmospheric scattering model and iterative color compensation, the problem of red information loss in underwater images is solved, achieving color balance and detail enhancement, thus improving the visual effect of underwater images.

CN121544511BActive Publication Date: 2026-04-07NANJING UNIV OF INFORMATION SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-21
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing underwater image enhancement methods are not adaptable enough to handle diverse underwater scenes, especially with the severe loss of red channel information, resulting in image color distortion, insufficient contrast and blurred details. Traditional methods are unable to adaptively process images with different tones and restore channel information in a balanced manner.

Method used

A dynamic multi-channel compensation method is adopted, which linearly attenuates and dynamically stretches the red, green and blue channels, combines atmospheric scattering model for dehazing, and adopts an iterative green channel-dominated asymmetric color compensation strategy to adaptively adjust the color. Combined with Lab and HSV space processing, image details and edges are extracted and enhanced.

Benefits of technology

It effectively restores red channel information, enhances the color naturalness and visual fidelity of images, adapts to different underwater environments, significantly improves the color balance and detail of images, and enhances the visual effect of underwater images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121544511B_ABST
    Figure CN121544511B_ABST
Patent Text Reader

Abstract

The application discloses an underwater image enhancement method and system based on dynamic multi-channel compensation. The method comprises the following steps: acquiring an underwater image to be processed, limiting the exclusive stretching intensity of a red channel, performing linear dynamic range stretching on a red-green-blue three-channel based on high and low quantile points, performing defogging based on inverse operation of an atmospheric scattering model, performing color correction on a blue-biased image and a green-biased image by using a green-channel-dominant differential color compensation strategy through an iterative loop, performing mean centering fine adjustment on a and b channels in a Lab space, performing strengthening processing on a brightness channel in an HSV space, extracting feature details of different levels and performing edge detection, fusing the details and edge information with the original brightness channel, and obtaining an enhanced underwater image. The application effectively recovers the lost information of the red channel by adaptively processing the blue-biased or green-biased image, significantly improves the visual effect of the underwater image, and enhances the detail presentation, color accuracy and overall clarity of the image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to an underwater image enhancement method and system based on dynamic multi-channel compensation, and belongs to the field of underwater optical imaging color restoration and image enhancement. BACKGROUND

[0002] Underwater remote sensing analysis is increasingly important due to the development of remote sensing technology, but underwater images are disturbed by light absorption, scattering and other factors, and have problems such as color distortion, insufficient contrast and blurred details. The core problem is the serious loss of red channel information - red light has a longer wavelength and a lower frequency, and is easily absorbed by water.

[0003] Current underwater image enhancement methods are divided into three categories: non-physical model method, physical model method and deep learning method. The non-physical model method adjusts the pixel value (such as histogram correction, image fusion, Retinex theory, etc.) to improve the visual quality, but due to the dynamic nature of the underwater environment, it is difficult to effectively restore the red channel and is prone to over / under enhancement; the physical model method is based on the optical model to reverse the degradation process (such as dark channel prior, color transfer, etc.), but it is sensitive to prior models or environments, and the enhancement effect is not good in special scenes; the deep learning method relies on data set training (such as WaterNet, UColor, etc.), but the existing data set lacks real underwater images and corresponding non-water environment images, and the synthetic data cannot reflect the real scene, resulting in limited red channel restoration capability.

[0004] In summary, due to the lack of adaptability of traditional methods, it is difficult to cope with diversified underwater scenes, and there is a problem of red channel loss. An enhancement scheme is needed that can adaptively process images of different color tones, balance the restoration of channel information. SUMMARY

[0005] The application aims to solve the problem of serious loss of underwater image information, and the existing method is prone to over-compensation, under-compensation and insufficient generalization. An underwater image enhancement method and system based on dynamic multi-channel compensation are proposed, which aims to effectively restore the lost information of the red channel by adaptively processing blue or green images, achieve more natural color balance, enhance image contour details, and ensure natural color and rich details in complex water environments.

[0006] Technical scheme: In a first aspect, an underwater image enhancement method based on dynamic multi-channel compensation includes the following steps:

[0007] Input the underwater image to be processed, linearly attenuate the red channel pixel value, and then perform linear dynamic range stretching based on high and low quantile points on the red, green and blue channels. The red channel uses a dedicated stretching intensity coefficient, which is adaptively calculated based on the blue channel stretching coefficient and the effective numerical range of the red and green channels.

[0008] Based on the stretched image, dehazing is performed using the inverse operation of the atmospheric scattering model;

[0009] Based on the dehazed image, color correction is performed on the blue-biased and green-biased images using an adaptive asymmetric color compensation strategy dominated by the green channel through iterative loops. For the blue-biased image, green information is injected into the red channel, while an appropriate amount of blue information is injected into the green channel. For the green-biased image, green information is injected into both the red and blue channels. The amount of injection is adaptively changed according to the difference in mean values ​​between channels and the pixel values ​​of the injected channels, so that the colors gradually tend to a natural balance. The iteration is stopped based on the channel histogram contour ratio commensurate measure.

[0010] Based on the color-corrected image, mean centering fine-tuning is performed on channels a and b in Lab space. By identifying the dominant axis of color deviation, directional suppression is implemented on the opposing side channel of the dominant axis while keeping the original distribution of the dominant axis channel unchanged.

[0011] Based on the fine-tuned image, the luminance channel is enhanced in the HSV color space to extract feature details at different levels and perform edge detection. The details and edge information are then fused with the original luminance channel to obtain the enhanced luminance channel. The enhanced luminance channel is then merged with the retained hue and saturation channels and converted back to the RGB color space to output the final enhanced underwater image.

[0012] Furthermore, linear dynamic range stretching based on high and low quantiles is applied to the red, green, and blue channels, specifically including:

[0013] Calculate the first and second quantiles of all pixel values ​​in the current color channel to determine the effective numerical range of the channel; apply a parameterized linear mapping independently to each channel, align each pixel value by shifting it to its minimum effective value, then normalize it by dividing it by the effective numerical range of the channel to [0,1], and finally multiply it by a differential stretching factor to achieve directional contrast amplification, realizing a channel heterogeneous dynamic stretching framework. For the red channel, a dedicated stretching strength factor is used. In the formula Indicates the stretching factor of the blue channel. and These represent the valid value ranges for the red channel and the green channel, respectively. This indicates the maximum allowable gain for the red channel.

[0014] Furthermore, dehazing is performed using the inverse operation of the atmospheric scattering model, specifically including:

[0015] The stretched color image is converted to a grayscale image, and the transmittance map is estimated by performing local minimum filtering and Gaussian smoothing on the grayscale image. Global atmospheric light offset compensation is introduced into the recovery formula, and the fog-free image is recovered by point division and strictly cropped to the range of [0,1]. Specifically, the original foggy image is obtained by subtracting the global atmospheric light offset value and then dividing it by the transmittance map.

[0016] Furthermore, through iterative loops, a green-channel-dominated adaptive asymmetric color compensation strategy is used to correct the blue-biased and green-biased images, specifically including:

[0017] At the beginning of each iteration, the current global mean of the red, green and blue channels is recalculated, and the current color cast of the image is dynamically determined to be either blue or green by comparing the difference between the mean of the blue channel and the mean of the green channel.

[0018] For a bluish image, green information is injected into the red channel, while an appropriate amount of blue information is injected into the green channel. The blue channel remains unchanged. The amount of green information injected into the red channel is obtained by multiplying the difference between the blue channel mean and the red channel mean with the current green channel value and then scaling it with a compensation factor. The amount of blue information injected into the green channel is obtained by multiplying the difference between the blue channel mean and the green channel mean with the current blue channel value and then scaling it with a compensation factor.

[0019] For a greenish image, green information is injected into the red and blue channels respectively, while the green channel remains unchanged. The amount of green information injected into the red channel is obtained by multiplying the difference between the mean of the green channel and the mean of the red channel with the current green channel value and then scaling it with a compensation factor. The amount of green information injected into the blue channel is obtained by multiplying the difference between the mean of the green channel and the mean of the blue channel with the current green channel value and then scaling it with a compensation factor.

[0020] Furthermore, the iteration is stopped based on the channel histogram contour ratio coincidence metric, specifically including:

[0021] Obtain the histograms for each channel. Calculate the contour similarity of the red-green channel histogram and the blue-green channel histogram using the Pearson correlation coefficient. The iteration terminates only when the mean deviation of all channels (based on the green channel) is less than a preset minimum color loss threshold and the contour similarity of both histograms exceeds a dynamic similarity threshold, indicating that the color distribution has reached a globally harmonious state. The dynamic similarity threshold is dynamically calculated using the following formula: In the formula Indicates the initial target similarity. Indicates the attenuation magnitude. Indicates the current iteration number. This indicates the maximum number of iterations.

[0022] Furthermore, mean centering fine-tuning is performed on channels a and b in the Lab space, specifically including:

[0023] Convert the RGB color space to the Lab color space, compare the global mean values ​​of channels a and b. If the mean value of channel a is greater than the mean value of channel b, then the red-green axis is determined to be the dominant bias axis and the yellow-blue axis is the opposing bias channel. If the mean value of channel a is less than the mean value of channel b, then the yellow-blue axis is the dominant bias axis and the red-green axis is the opposing bias channel.

[0024] Directional suppression adjustment is applied only to the opposing channel, while the original distribution of the dominant axis channel remains unchanged. The adjustment amount of directional suppression is obtained by scaling the difference between the theoretical neutral points of channels a and b and the global average value of the color channel that needs to be compensated using the compensation intensity coefficient.

[0025] The adjusted Lab color space image was then converted back to RGB color space. A numerical range check was performed on the converted RGB image to limit all pixel values ​​to within a specified range. Within the effective range.

[0026] Furthermore, the brightness channel is enhanced in the HSV space to extract feature details at different levels, and edge detection is performed. The details and edge information are then fused with the original brightness channel, including:

[0027] The image is converted from the RGB color space to the HSV color space. The V channel, i.e. the lightness channel, is extracted separately from the HSV. The lightness channel is filtered using a Gaussian kernel to extract image details at different scales. For each scale, the detail components at that scale are obtained by calculating the difference between the original lightness channel and the filtered result in the logarithmic domain. Finally, the detail components at all scales are averaged to obtain a comprehensive multi-scale detail map.

[0028] An adaptive edge boosting mechanism is introduced, using the Sobel operator to perform edge detection on the brightness channel, obtaining the edge intensity map of the image, and then performing edge boosting based on... The normalization of quantiles yields a normalized edge intensity map.

[0029] The original brightness channel, multi-scale detail map, and normalized edge intensity map are linearly fused to obtain the enhanced brightness channel, where the detail component is weighted using an enhancement coefficient, and the edge component is weighted using a fixed coefficient.

[0030] Secondly, an underwater image enhancement system based on dynamic multi-channel compensation includes:

[0031] The channel stretching module is used to input the underwater image to be processed, linearly attenuate the pixel value of the red channel, and then perform linear dynamic range stretching on the red, green and blue channels based on high and low quantiles. The red channel uses a dedicated stretching strength coefficient, which is adaptively calculated based on the stretching coefficient of the blue channel and the effective value range of the red and green channels.

[0032] The dehazing module is used to perform dehazing based on the stretched image using the inverse operation of the atmospheric scattering model;

[0033] The multi-channel differential compensation module is used to perform color correction on images with blue or green tints by iteratively applying an adaptive asymmetric color compensation strategy dominated by the green channel. For images with blue tints, green information is injected into the red channel, while an appropriate amount of blue information is injected into the green channel. For images with green tints, green information is injected into both the red and blue channels. The amount of injection is adaptively changed according to the difference in mean values ​​between channels and the pixel values ​​of the injected channels, so that the colors gradually tend to a natural balance. The iteration is stopped based on the channel histogram contour ratio commensurate measure.

[0034] The color cast elimination module is used to perform mean centering fine-tuning of the a and b channels in Lab space based on the color-corrected image. By identifying the dominant axis of color cast, it performs directional suppression on the opposing side channel of the dominant axis while keeping the original distribution of the dominant axis channel unchanged.

[0035] The detail enhancement module is used to enhance the luminance channel in HSV space based on the fine-tuned image, extract feature details at different levels, perform edge detection, and fuse the details and edge information with the original luminance channel to obtain the enhanced luminance channel. The enhanced luminance channel is then merged with the retained hue and saturation channels and converted back to the RGB color space to output the final enhanced underwater image.

[0036] Thirdly, the present invention also provides an electronic device comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the underwater image enhancement method based on dynamic multi-channel compensation as described in the first aspect of the present invention.

[0037] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the underwater image enhancement method based on dynamic multi-channel compensation as described in the first aspect of the present invention.

[0038] Beneficial effects:

[0039] (1) This invention effectively solves the core problem of severe loss of red information in underwater images through an adaptive asymmetric color compensation strategy dominated by the green channel. Due to the severe loss of red channel information, the images are often bluish or greenish, and there is a significant difference in channel loss between bluish and greenish images: bluish images only have severe loss of the red channel, while greenish images have significant damage to both the red and blue channels, requiring targeted enhancement. In view of this, this invention combines the red channel-specific limitation adjustment of channel stretching amplitude and the precise injection of cross-channel complementary information, effectively solving the core problem of severe attenuation and loss of red information in underwater image imaging, and significantly improving the accuracy, naturalness and visual fidelity of color reproduction.

[0040] (2) This invention automatically identifies scenes with a blue or green tint by real-time monitoring of channel relationships, and uses a histogram similarity evaluation mechanism based on shape proportion coordination and a dual convergence standard of minimum color loss preset value to ensure that the color achieves balance at both the statistical and distribution levels. This adaptive correction mechanism can accurately cope with the color characteristics of different underwater environments, avoiding the problem of insufficient adaptability of traditional methods when dealing with diverse underwater scenes.

[0041] (3) The present invention ensures the stability of the algorithm through mechanisms such as transmittance constraint and numerical truncation, and ensures convergence through dynamic threshold adjustment, enabling it to adapt to various underwater conditions from clear to turbid, and making the algorithm exhibit excellent practicality and reliability in real underwater environments. Attached Figure Description

[0042] Figure 1 This is a flowchart of the underwater image enhancement method based on dynamic multi-channel compensation provided by the present invention;

[0043] Figure 2 These are the original and enhanced images of marine life provided in the verification examples of this invention;

[0044] Figure 3 These are the original and enhanced images of seabed corals provided in the verification examples of this invention;

[0045] Figure 4 These are the original and enhanced images of seabed vegetation provided in the verification examples of this invention;

[0046] Figure 5 These are the original and enhanced images of seabed rocks provided in the verification examples of this invention. Detailed Implementation

[0047] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention, and should not be used to limit the scope of protection of the present invention.

[0048] Reference Figure 1This invention proposes an underwater image enhancement method based on dynamic multi-channel compensation, comprising the following steps:

[0049] Step S1: Acquire the underwater image to be processed, linearly attenuate the red channel, and then perform linear dynamic range stretching based on high and low quantiles on the three channels of the underwater imaging to adjust the overall contrast.

[0050] First, a linear attenuation is performed on the red channel, including: inputting the original image into the RGB color channels, and normalizing the pixel values ​​of the input original image to... The range is defined to facilitate precise mathematical calculations. For each pixel value in the red channel, a decay factor less than 1 is multiplied. The formula is as follows:

[0051]

[0052] In the formula, These are the normalized original red channel pixel values; It is the new channel value after attenuation processing; These are the pixel coordinates; It is the red channel attenuation factor.

[0053] The linear dynamic range stretching of the three channels of underwater imaging based on high and low quantiles specifically includes:

[0054] Create a zero matrix of the same size as the input image to store the processed results. Calculate the first and second quantiles of all pixel values ​​in the current color channel to determine the effective range of values ​​for that channel, while eliminating potential extreme noise points. In this embodiment, the first quantile is taken as the 1% quantile, and the second quantile as the 99th quantile. The formula for determining the effective range of values ​​for the channel is:

[0055]

[0056]

[0057] In the formula, 'c' represents the color channel index; Indicates the location passage Pixel intensity value; This represents the set of all pixel values ​​for channel c; Indicates the first percentile; Indicates channel The effective minimum value; Indicates channel The effective maximum value;

[0058] Parametric linear mapping is applied independently to each channel. Each pixel value is zero-point aligned by shifting the minimum effective value, and then normalized to [0,1] using dynamic range division. Finally, a differential stretching coefficient is multiplied to achieve directional contrast amplification, realizing a channel heterogeneous dynamic stretching framework. The formula is as follows:

[0059]

[0060] In the formula, Indicates the position after stretching passage pixel intensity value, This indicates the channel stretch factor; a conservative stretch factor, such as 180, is used for the blue and green channels to avoid oversaturation. For the red channel, the stretch factor uses the red channel-specific tensile strength factor. This coefficient is adaptively calculated based on the current channel stretching amplitude, and the specific calculation formula is as follows:

[0061]

[0062] This indicates the adaptive gain of the red channel, which is the tensile strength coefficient specific to the red channel. Indicates the stretching factor of the blue channel; and This indicates the valid value range for the red channel and the valid value range for the green channel. This indicates the maximum allowable gain for the red channel.

[0063] Step S2: Dehazing is performed using the inverse operation of the atmospheric scattering model, and the overall brightness of the image is reduced to a certain extent before the calculation to enhance the realism of the dehazing effect.

[0064] The RGB image is converted to grayscale, and the dark channel image is estimated by applying local minimum filtering and Gaussian smoothing to the grayscale image. This yields a smoother and more robust initial estimate of the transmission map, avoiding noise and artifacts. Simultaneously, a lower bound constraint on the transmission map is introduced; for example, the estimated T is forcibly limited to no less than 0.28. This effectively prevents division-induced noise amplification and color oversaturation problems caused by excessively small transmission maps in deep water or low-light regions. The transmittance calculation formula is as follows:

[0065]

[0066] In the formula, Indicates the defogging intensity parameter; Standard deviation Gaussian kernel; Indicates Centered window; This represents the input grayscale image; Indicates the convolution operation; This represents the final transmittance diagram;

[0067] Instead of relying on fixed atmospheric light values ​​or complex estimation algorithms, global atmospheric light offset compensation is introduced into the restoration formula. This effectively suppresses the overall darkening or bluish tint of the restored image while maintaining computational efficiency. Finally, the haze-free image is restored through a point division operation and strictly cropped to the [0,1] range. The formula is as follows:

[0068]

[0069] In the formula, This represents the original foggy image; Represents a transmittance diagram; This represents a global atmospheric light value estimate, ranging from 0.05 to 0.15, and is suitable for images with moderate or light fog. This represents the image after dehazing.

[0070] Step S3 involves correcting color deviation through iterative loops, dynamically determining whether the image is biased towards blue or green, and then using an adaptive asymmetric color compensation strategy dominated by the green channel for color correction based on the determination result.

[0071] At the beginning of each iteration, the current global mean of the RGB three channels is recalculated, and the current color cast type (blue cast or green cast) of the image is dynamically determined by comparing the difference between the mean values ​​of the blue and green channels.

[0072] Based on the dynamic judgment results, two targeted asymmetric channel equalization compensation strategies are applied, dominated by the green channel: For blue-biased images, green information is injected into the red channel to significantly supplement the missing warm color components, while an appropriate amount of blue information is injected into the green channel to prevent the green from being overly suppressed; For green-biased images, green information is injected into both the red and blue channels, and the surplus high-reliability information in the green channel is reasonably distributed to the relatively weak red and blue channels. The amount of injection is adaptively changed according to the mean difference between the channels of the image itself and the pixel value of the green channel, so that the color gradually tends to a natural balance.

[0073] Specifically, for a bluish image, the amount of green information injected into the red channel is obtained by multiplying the difference between the mean of the blue channel and the mean of the red channel by the current green channel value, and then scaling it using a compensation factor. Similarly, the amount of blue information injected into the green channel is obtained by multiplying the difference between the mean of the blue channel and the mean of the green channel by the current blue channel value, and then scaling it using a compensation factor. The formula is as follows:

[0074]

[0075] For a greenish image, the amount of green information injected into the red channel is obtained by multiplying the difference between the mean of the green channel and the mean of the red channel by the current green channel value, and then scaling it using a compensation factor. Similarly, the amount of green information injected into the blue channel is obtained by multiplying the difference between the mean of the green channel and the mean of the blue channel by the current green channel value, and then scaling it using a compensation factor. The formula is as follows:

[0076]

[0077] In the formula, This represents the compensation factor, with a value between 0.5 and 0.8, to avoid overcompensation in red or blue. , and Represents different color channels; , and This indicates the color correction values ​​for different channels.

[0078] This invention uses a histogram contour proportion symmetry metric to truncate iterations. By analyzing the similarity of the histogram distributions of the red-green and blue-green channels under natural lighting conditions, it embeds this into the iterative framework of underwater image processing to achieve a histogram contour proportion symmetry metric. Specifically, it employs a histogram combined with the Pearson correlation coefficient. The correlation coefficient focuses on the linear correlation between the two histogram vectors, emphasizing the overall consistency of the distribution shape, rather than the absolute frequency matching relied upon by traditional methods. Even if the histogram amplitudes of the two channels differ significantly due to differences in overall lighting intensity or exposure, as long as the shape proportions are highly consistent, a very high similarity score can still be obtained. Subsequently, a dynamic threshold that decays linearly with iteration is used. Only when the mean deviation under the green channel benchmark is less than the minimum color loss preset value and both symmetry coefficients exceed this threshold is the color distribution determined to have reached a global symmetry state, and the iteration terminates. The formula is as follows:

[0079]

[0080]

[0081] In the formula, These represent the mean values ​​of the red, green, and blue channels, respectively. Indicates minimum color loss; and These represent the similarity in the histogram contour proportions of the red-green channel and the green-blue channel, respectively. Indicates the dynamic similarity threshold; Indicates the current iteration number; Indicates the maximum number of iterations; This represents the initial target similarity, with a value of approximately 0.88-0.92, slightly lower than the perfect 1.0, to avoid overcompensation at the beginning that could lead to color distortion or increased noise. This represents the attenuation level, and a value of 0.15 is appropriate, so that the final similarity remains around 0.75-0.85.

[0082] Step S4: In the Lab space, the mean centering of channels a and b is finely adjusted to eliminate any possible residual systematic color shifts and further approximate the neutral colors under natural lighting.

[0083] By leveraging the difference in human eye sensitivity to the yellow-blue and purple-green axes, an opposing axis deviation suppression strategy is implemented to finely optimize color compensation, specifically including:

[0084] The image is converted to the Lab color space, and the global means of channels a and b are compared to accurately identify the dominant axis of color deviation: if the mean of channel a is greater than the mean of channel b, the red-green axis is determined to be the dominant deviation direction, and the yellow-blue axis is the opposing channel; conversely, if the mean of channel a is less than the mean of channel b, the yellow-blue axis is the dominant axis channel, and the red-green axis is the opposing channel. Subsequently, directional suppression adjustment is applied only to the opposing channel, while keeping the original distribution of the dominant deviation axis channel unchanged. The formula is as follows:

[0085]

[0086] In the formula, This represents the matrix of original pixel values ​​for the color channels that need compensation. Indicates the compensation strength coefficient; This represents the theoretical neutral point of channels a and b in the Lab color space; This indicates the color channel that needs compensation. The global average; This represents the channel pixel value matrix after compensation and correction;

[0087] The adjusted Lab color space image was then converted back to the RGB color space. A numerical range check was performed on the converted RGB image to limit all pixel values ​​to within a specified range. Within the effective range, prevent numerical overflow problems that may occur due to color space conversion and channel compensation.

[0088] Step S5: Enhance the brightness channel in the HSV space, extract feature details at different levels, perform edge detection, and fuse the details and edge information with the original brightness channel to complete strong detail enhancement.

[0089] The input image is converted from the RGB color space to the HSV color space. This conversion separates the color information from the brightness information of the image. Then, the V channel, i.e. the brightness channel, is extracted separately from the HSV. Since the human eye is most sensitive to subtle changes in brightness, all subsequent enhancement operations will be performed on the brightness channel to avoid color shifts that may be introduced by directly processing the color information.

[0090] A logarithmic domain multi-scale Gaussian residual extraction method is used to extract details, simulating the nonlinear perception of brightness changes by the human eye. Three Gaussian kernels of specific scales are used to filter the brightness channel, extracting image details at different scales. For each scale, the detail component is obtained by calculating the difference between the original brightness channel and the filtered result in the logarithmic domain. Finally, the detail components of all scales are averaged to obtain a comprehensive multi-scale detail map, expressed by the following formula:

[0091]

[0092] In the formula, This represents the standard deviation of the Gaussian kernel in the current iteration; This represents the original brightness channel extracted from the HSV color space; Indicates the use of standard deviation. Gaussian kernel for brightness channel The result after filtering; This represents an array containing the standard deviations of a Gaussian filter; This indicates the detail components calculated in the logarithmic field, with a constant offset of 0.01 added to prevent errors in logarithmic operations. Numerical problems; This indicates the number of Gaussian kernel scales involved in the calculation; This represents the final calculated multi-scale detail map;

[0093] An adaptive edge boosting mechanism is introduced, using the Sobel operator to perform edge detection on the brightness channel, obtaining the edge intensity map of the image, and then performing edge boosting based on... Quantile normalization facilitates control over the enhancement magnitude and improves the algorithm's robustness, mapping most edge values ​​to... Within this range, the edge enhancement intensity is adaptively matched to the image's own contrast, providing a moderate boost in strong edge regions while suppressing noise amplification in flat areas. The formula is as follows:

[0094]

[0095] In the formula, This represents the absolute value of the gradient magnitude of the brightness channel V; express The 99.5th percentile; Represent a very small positive number to prevent mathematical errors such as a denominator of zero; The final calculated normalized edge intensity map;

[0096] The original brightness channel, multi-scale detail map, and normalized edge map are linearly fused. The detail component is weighted using enhancement coefficients, while the edge component is weighted using fixed coefficients. This fusion method enhances both the texture details and major edge contours of the image. The formula is as follows:

[0097]

[0098] In the formula, Represents the detail enhancement factor; This represents a fixed weight coefficient for edge enhancement, which appropriately injects edge details while maintaining a natural and unexaggerated appearance. This indicates the enhanced brightness channel;

[0099] Perform a value range check on the enhanced luminance channel to ensure that all pixel values ​​are within the range. Within the effective range, the processed lightness channel is finally merged with the preserved hue and saturation channels, and converted back to the RGB color space to output the final enhanced image.

[0100] The enhancement effect of the proposed method was validated using the UIEB dataset, a benchmark dataset for underwater image enhancement. The underwater images in the UIEB dataset are highly complex, contain a large amount of detailed information, and show diverse object structures and complex lighting changes in the underwater environment.

[0101] This embodiment compares the image enhancement method with three existing underwater image enhancement methods: gradient domain-based color correction (GDCP), Laplacian operator-based image enhancement (ULAP), and deep learning-based underwater image enhancement (Water-Net). Four metrics were used in the evaluation: edge intensity (EI), average gradient (AG), color correction factor (CCF), and underwater color image quality assessment (UCIQE). A higher edge intensity value indicates clearer edge contours in the image; the average gradient metric reflects improved image visibility; a higher color correction factor indicates superior color perception; and a higher underwater color image quality assessment indicates better visual performance of the underwater image.

[0102] Table 1. Mean values ​​of EI, AG, CCF, and UCIQE for each method in the UIEB dataset.

[0103] Color correction method EI AG CCF UCIQE GDCP method 73.994 7.526 33.211 0.598 ULAP method 64.637 6.611 19.878 0.586 Water-Net method 43.054 4.327 15.281 0.627 The method of the invention 147.548 15.258 40.830 0.635

[0104] As shown in Table 1, the method proposed in this invention outperforms existing methods in terms of edge intensity (EI), average gradient (AG), color correction factor (CCF), and underwater color image quality assessment (UCIQE). Figures 2 to 5 The images show the enhancement effects of the method of this invention on images of marine life, corals, vegetation, and rocks. It can be seen that the invention has excellent enhancement effects on various target objects and in different underwater environments. This method effectively solves the problem of low image quality in complex underwater environments, significantly improves the visual effect of underwater images, and improves problems such as color distortion, insufficient contrast, and blurred details, enhancing the detail presentation, color accuracy, and overall clarity of the images.

[0105] Based on the same technical concept as the method embodiments, the present invention also provides an underwater image enhancement system based on dynamic multi-channel compensation, comprising:

[0106] The channel stretching module is used to input the underwater image to be processed, linearly attenuate the pixel value of the red channel, and then perform linear dynamic range stretching on the red, green and blue channels based on high and low quantiles. The red channel uses a dedicated stretching strength coefficient, which is adaptively calculated based on the stretching coefficient of the blue channel and the effective value range of the red and green channels.

[0107] The dehazing module is used to perform dehazing based on the stretched image using the inverse operation of the atmospheric scattering model;

[0108] The multi-channel differential compensation module is used to perform color correction on images with blue or green tints by iteratively applying an adaptive asymmetric color compensation strategy dominated by the green channel. For images with blue tints, green information is injected into the red channel, while an appropriate amount of blue information is injected into the green channel. For images with green tints, green information is injected into both the red and blue channels. The amount of injection is adaptively changed according to the difference in mean values ​​between channels and the pixel values ​​of the injected channels, so that the colors gradually tend to a natural balance. The iteration is stopped based on the channel histogram contour ratio commensurate measure.

[0109] The color cast elimination module is used to perform mean centering fine-tuning of the a and b channels in Lab space based on the color-corrected image. By identifying the dominant axis of color cast, it performs directional suppression on the opposing side channel of the dominant axis while keeping the original distribution of the dominant axis channel unchanged.

[0110] The detail enhancement module is used to enhance the luminance channel in HSV space based on the fine-tuned image, extract feature details at different levels, perform edge detection, and fuse the details and edge information with the original luminance channel to obtain the enhanced luminance channel. The enhanced luminance channel is then merged with the retained hue and saturation channels and converted back to the RGB color space to output the final enhanced underwater image.

[0111] It should be understood that the underwater image enhancement system based on dynamic multi-channel compensation in the embodiments of the present invention can realize all the technical solutions in the above method embodiments. The functions of each functional module can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above embodiments, which will not be repeated here.

[0112] The present invention also provides an electronic device comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the underwater image enhancement method based on dynamic multi-channel compensation as described above.

[0113] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the underwater image enhancement method based on dynamic multi-channel compensation as described above.

[0114] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, computer devices, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0115] This invention is described with reference to a flowchart of a method according to embodiments of the invention. It should be understood that each step in the flowchart and combinations thereof can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 A device for a function specified in one or more processes.

[0116] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 The function specified in one or more processes.

[0117] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 Steps of a specified function in one or more processes.

Claims

1. An underwater image enhancement method based on dynamic multi-channel compensation, characterized in that, Includes the following steps: Input the underwater image to be processed, linearly attenuate the pixel values ​​of the red channel, and then perform linear dynamic range stretching on the red, green and blue channels based on high and low quantiles. The red channel uses a dedicated stretching strength coefficient, which is adaptively calculated based on the stretching coefficient of the blue channel and the effective value range of the red and green channels. Based on the stretched image, dehazing is performed using the inverse operation of the atmospheric scattering model; Based on the dehazed image, color correction is performed on the blue-biased and green-biased images using an adaptive asymmetric color compensation strategy dominated by the green channel through iterative loops. For the blue-biased image, green information is injected into the red channel, while an appropriate amount of blue information is injected into the green channel. For the green-biased image, green information is injected into both the red and blue channels. The amount of injection is adaptively changed according to the difference in mean values ​​between channels and the pixel values ​​of the injected channels, so that the colors gradually tend to a natural balance. The iteration is stopped based on the channel histogram contour ratio commensurate measure. Based on the color-corrected image, mean centering fine-tuning is performed on channels a and b in Lab space. By identifying the dominant axis of color deviation, directional suppression is implemented on the opposing side channel of the dominant axis while keeping the original distribution of the dominant axis channel unchanged. Based on the fine-tuned image, the luminance channel is enhanced in the HSV color space to extract feature details at different levels and perform edge detection. The details and edge information are then fused with the original luminance channel to obtain the enhanced luminance channel. The enhanced luminance channel is then merged with the retained hue and saturation channels and converted back to the RGB color space to output the final enhanced underwater image.

2. The method according to claim 1, characterized in that, Linear dynamic range stretching of the red, green, and blue channels based on high and low quantiles is performed, specifically including: Calculate the first and second quantiles of all pixel values ​​in the current color channel to determine the effective numerical range of the channel; apply a parameterized linear mapping independently to each channel, align each pixel value by shifting it to its minimum effective value, then normalize it by dividing it by the effective numerical range of the channel to [0,1], and finally multiply it by a differential stretching factor to achieve directional contrast amplification, realizing a channel heterogeneous dynamic stretching framework. For the red channel, a dedicated stretching strength factor is used. In the formula Indicates the stretching factor of the blue channel. and These represent the valid value ranges for the red channel and the green channel, respectively. This indicates the maximum allowable gain for the red channel.

3. The method according to claim 1, characterized in that, Dehazing is performed using the inverse operation of the atmospheric scattering model, specifically including: The stretched color image is converted to a grayscale image, and the transmittance map is estimated by performing local minimum filtering and Gaussian smoothing on the grayscale image. Global atmospheric light offset compensation is introduced into the recovery formula. The fog-free image is recovered by point division and strictly cropped to the range of [0,1]. Specifically, the original foggy image is subtracted from the specified global atmospheric light offset value and then divided by the transmittance map to obtain the defogging image.

4. The method according to claim 1, characterized in that, Through iterative loops, a green-channel-dominated adaptive asymmetric color compensation strategy is used to correct blue-biased and green-biased images, specifically including: At the beginning of each iteration, the current global mean of the red, green and blue channels is recalculated, and the current color cast of the image is dynamically determined to be either blue or green by comparing the difference between the mean of the blue channel and the mean of the green channel. For a bluish image, green information is injected into the red channel, while an appropriate amount of blue information is injected into the green channel. The blue channel remains unchanged. The amount of green information injected into the red channel is obtained by multiplying the difference between the blue channel mean and the red channel mean with the current green channel value and then scaling it with a compensation factor. The amount of blue information injected into the green channel is obtained by multiplying the difference between the blue channel mean and the green channel mean with the current blue channel value and then scaling it with a compensation factor. For a greenish image, green information is injected into the red and blue channels respectively, while the green channel remains unchanged. The amount of green information injected into the red channel is obtained by multiplying the difference between the mean of the green channel and the mean of the red channel with the current green channel value and then scaling it with a compensation factor. The amount of green information injected into the blue channel is obtained by multiplying the difference between the mean of the green channel and the mean of the blue channel with the current green channel value and then scaling it with a compensation factor.

5. The method according to claim 1, characterized in that, The iteration is stopped based on the channel histogram contour ratio coincidence metric, specifically including: Obtain the histograms for each channel. Calculate the contour similarity of the red-green channel histogram and the blue-green channel histogram using the Pearson correlation coefficient. The iteration terminates only when the mean deviation of all channels (based on the green channel) is less than a preset minimum color loss threshold and the contour similarity of both histograms exceeds a dynamic similarity threshold, indicating that the color distribution has reached a globally harmonious state. The dynamic similarity threshold is dynamically calculated using the following formula: In the formula Indicates the initial target similarity. Indicates the attenuation magnitude. Indicates the current iteration number. This indicates the maximum number of iterations.

6. The method according to claim 1, characterized in that, In the Lab space, mean centering fine-tuning is performed on channels a and b, specifically including: Convert the RGB color space to the Lab color space, compare the global mean values ​​of channels a and b. If the mean value of channel a is greater than the mean value of channel b, then the red-green axis is determined to be the dominant bias axis and the yellow-blue axis is the opposing bias channel. If the mean value of channel a is less than the mean value of channel b, then the yellow-blue axis is the dominant bias axis and the red-green axis is the opposing bias channel. Directional suppression adjustment is applied only to the opposing channel, while keeping the original distribution of the dominant axis channel unchanged. The adjustment amount of directional suppression is obtained by scaling the difference between the theoretical neutral point of channels a and b and the global average value of the color channel that needs to be compensated using the compensation intensity coefficient. The adjusted Lab color space image was then converted back to RGB color space. A numerical range check was performed on the converted RGB image to limit all pixel values ​​to within a specified range. Within the effective range.

7. The method according to claim 1, characterized in that, The brightness channel is enhanced in the HSV color space to extract feature details at different levels, and edge detection is performed. The details and edge information are then fused with the original brightness channel, including: The image is converted from the RGB color space to the HSV color space. The V channel, i.e. the lightness channel, is extracted separately from the HSV. The lightness channel is filtered using a Gaussian kernel to extract image details at different scales. For each scale, the detail components at that scale are obtained by calculating the difference between the original lightness channel and the filtered result in the logarithmic domain. Finally, the detail components at all scales are averaged to obtain a comprehensive multi-scale detail map. An adaptive edge boosting mechanism is introduced, using the Sobel operator to perform edge detection on the brightness channel, obtaining the edge intensity map of the image, and then performing edge boosting based on... The normalization of quantiles yields a normalized edge intensity map. The original brightness channel, multi-scale detail map, and normalized edge intensity map are linearly fused to obtain the enhanced brightness channel, where the detail component is weighted using an enhancement coefficient, and the edge component is weighted using a fixed coefficient.

8. An underwater image enhancement system based on dynamic multi-channel compensation, characterized in that, include: The channel stretching module is used to input the underwater image to be processed, linearly attenuate the pixel values ​​of the red channel, and then perform linear dynamic range stretching on the red, green and blue channels based on high and low quantiles. The red channel uses a dedicated stretching strength coefficient, which is adaptively calculated based on the effective value range of the red and green channels. The dehazing module is used to perform dehazing based on the stretched image using the inverse operation of the atmospheric scattering model; The multi-channel differential compensation module is used to perform color correction on images with blue or green tints by iteratively applying an adaptive asymmetric color compensation strategy dominated by the green channel. For images with blue tints, green information is injected into the red channel, while an appropriate amount of blue information is injected into the green channel. For images with green tints, green information is injected into both the red and blue channels. The amount of injection is adaptively changed according to the difference in mean values ​​between channels and the pixel values ​​of the injected channels, so that the colors gradually tend to a natural balance. The iteration is stopped based on the channel histogram contour ratio commensurate measure. The color cast elimination module is used to perform mean centering fine-tuning of channels a and b in Lab space based on the color-corrected image. By identifying the dominant axis of color cast, it performs directional suppression on the opposing channel of the dominant axis while keeping the original distribution of the other channel unchanged. The detail enhancement module is used to enhance the luminance channel in HSV space based on the fine-tuned image, extract feature details at different levels, perform edge detection, and fuse the details and edge information with the original luminance channel to obtain the enhanced luminance channel. The enhanced luminance channel is then merged with the retained hue and saturation channels and converted back to the RGB color space to output the final enhanced underwater image.

9. An electronic device, characterized in that, include: One or more processors; Memory; And one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, wherein when the programs are executed by the processors, they implement the steps of the underwater image enhancement method based on dynamic multi-channel compensation as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the underwater image enhancement method based on dynamic multi-channel compensation as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Image enhancement method based on HSV and AM-RetinexNet

    CN115147311A

  • Self-adaptive underwater image enhancement method based on pyramid fusion

    CN119090752A