Underwater Image Enhancement Method Based on Piecewise Color Balance and Multi-Scale Enhancement Fusion

By employing segmented color balancing and multi-scale enhancement fusion, the problems of unnatural colors and incomplete details in underwater image enhancement are solved, achieving more natural color restoration and detail enhancement, which is suitable for underwater vision applications.

CN119904398BActive Publication Date: 2025-10-28ANHUI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510089673.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-10-28
Estimated Expiration
2045-01-21

AI Technical Summary

Technical Problem

Existing underwater image enhancement methods fail to effectively consider the underwater wavelength correlation attenuation characteristics, the high complexity of scene transmittance estimation, and the single local features, resulting in incomplete details and unnatural colors in the enhancement results.

Method used

A segmented color balance and multi-scale enhancement fusion method is adopted. The reference channel is selected by calculating the gray value of each color channel, the dynamic range is corrected by using the stretching function, the V channel is decomposed into the base layer and multiple detail layers, the global backscatter light and scene transmittance are estimated, and weighted fusion is performed to generate the final enhancement result.

Benefits of technology

It effectively reduces color loss, compensates for detail loss in underexposed or overexposed areas, prevents over-enhancement or under-enhancement of results, and improves image quality and detail recovery effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904398B_ABST
    Figure CN119904398B_ABST
Patent Text Reader

Abstract

This invention relates to an underwater image enhancement method based on piecewise color balance and multi-scale enhancement fusion, comprising: calculating the average grayscale value of each color channel and selecting a reference channel; obtaining a corrected first channel and a corrected first channel; decomposing the V channel into an original base layer and three scale detail layers; obtaining an enhanced detail layer; and generating the final enhancement result. This invention designs a gain factor to compensate for information loss in other channels, reduces color loss in the color-balanced image by considering the attenuation characteristics of different color channels, thereby satisfying the gray world assumption; it helps improve transmission estimation to obtain better detail enhancement and color preservation; it can estimate transmission without calculating the dark channel, reducing halos and computational complexity; it embeds a detail pyramid in the multi-scale fusion to compensate for detail loss in underexposed or overexposed areas of the underwater image; and the contrast and detail restoration of this invention are achieved at different scales.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and in particular to an underwater image enhancement method based on segmented color balance and multi-scale enhancement fusion. Background Technology

[0002] Due to the complexity of underwater scene imaging mechanisms, underwater images are prone to quality degradation. Unfortunately, these degradation issues hinder visual perception analysis and practical underwater applications, such as marine ecological research and aquatic robot inspection. Therefore, enhancing underwater image quality has a positive impact on underwater vision applications.

[0003] Current underwater image enhancement methods can be broadly categorized into three types: multi-image-based methods, single-image-based methods, and deep learning-based methods. Multi-image-based methods typically use specialized instruments or polarization filters to capture multiple orthogonal images and apply their complementary information to reconstruct a high-quality underwater image. However, due to the rapid changes in scene structure and lighting conditions, capturing orthogonal polarization images underwater within the same scene is extremely difficult. Furthermore, these complex and expensive imaging devices are not widely adopted in practical applications.

[0004] Single-image-based methods typically enhance underwater image quality in two ways: one is to derive two inputs from a degraded image using white balance and detail sharpening, then fuse them by designing multiple weights to obtain an enhanced image; the other is to design a handcrafted statistical prior based on certain haze-free images and use the prior to estimate haze parameters of a physical imaging model, thereby producing an enhanced result. However, both methods produce more or less unwanted enhancement problems in extreme environments, such as non-uniform exposure, residual haze, and color distortion, for two reasons: first, constructing complex underwater imaging environments and generalizing strong image priors is a challenging problem; second, using the same enhancement coefficients on the original image to enhance details ignores the differences in local detail exposure in complex lighting scenes.

[0005] Deep learning-based methods estimate unknown parameters of physical models or directly leverage the powerful learning capabilities of neural networks to generate enhanced images. Generally, training deep networks requires a large number of realistic degraded images and sharp images, but capturing these paired images in dynamic underwater scenes is difficult.

[0006] Therefore, designing a more effective method to enhance the quality of underwater images has become an urgent technical problem to be solved. Summary of the Invention

[0007] To address the limitations of existing underwater image enhancement methods, such as not fully considering underwater wavelength correlation attenuation characteristics, high complexity in scene transmittance estimation, and single local features, which lead to incomplete detail enhancement and unnatural color appearance in the enhancement results, the present invention aims to provide an underwater image enhancement method based on segmented color balance and multi-scale enhancement fusion that can reduce color loss in color-balanced images, compensate for detail loss in underexposed or overexposed areas of underwater images, and effectively prevent over-enhancement or under-enhancement of results.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: an underwater image enhancement method based on segmented color balance and multi-scale enhancement fusion, the method comprising the following sequential steps:

[0009] (1) Calculate the average grayscale value of each color channel, and select the color channel with the largest average grayscale value as the reference channel for color compensation.

[0010] (2) Use the stretching function to increase the reference channel The dynamic range forms a reference channel. Corrected version and utilize The first channel for compensation The second channel awaiting compensation The first channel after correction and the corrected second channel

[0011] (3) The images are merged into a color-corrected image, which is then converted from the RGB image space to the HSV color space. A Gaussian filter is used to decompose the V channel into the original base layer containing the haze effect. And three scale detail layers, the three scale detail layers including a first scale detail layer, a second scale detail layer and a third scale detail layer;

[0012] (4) Estimating global backscattered light Scene transmittance on V channel Utilizing scene transmittance on the V channel Remove the original base layer containing smog effects The smog effect has been clearly observed in the basic layer. Utilizing scene transmittance on the V channel As an independent stretching factor, it enhances the texture detail on each scale detail layer, resulting in an enhanced detail layer.

[0013] (5) Introduce a weighted fusion function to enhance the detail layer. Enhance detail layers and clear base layer A clear image J merged into the reconstructed luminance channel V. V (x,y), the sharp image J of the reconstructed luminance channel V. V The (x,y) data is then fused with the original H and S channels of the underwater image to form an enhanced image in HSV space. The enhanced image in HSV space is then converted into an RGB color space representation to generate the final enhanced result.

[0014] Step (1) specifically refers to: for underwater image I c The average grayscale value of each color channel is calculated.

[0015]

[0016] Where H and W represent the row and column of the input underwater image, respectively, and r, g, b represent the red, green, and blue channels of the input underwater image in the RGB space, respectively. c (i,j) is the pixel value of each color channel at pixel coordinates (i,j); c is the color channel of the underwater image;

[0017] Choose the color channel with the largest average grayscale value as the reference channel for color compensation.

[0018]

[0019] Here, max() is the function to find the maximum value. These represent the average grayscale values ​​of the red, green, and blue channels, respectively.

[0020] Step (2) specifically refers to: increasing the reference channel through the stretching function. The dynamic range forms a reference channel. Corrected version

[0021]

[0022] in, and These are the maximum and minimum values ​​in the input underwater image, respectively;

[0023] use The first channel for compensation The second channel awaiting compensation The first channel after correction and the corrected first channel

[0024]

[0025] in, for The average grayscale value, for The average grayscale value, This represents the average grayscale value of the reference channel; These represent the average grayscale values ​​of the red, green, and blue channels, respectively.

[0026] Step (3) specifically refers to: First, using the Gaussian convolution mask G and the luminance channel image I in the HSV color space... v The convolution operation between them generates the original base layer containing the haze effect.

[0027]

[0028] In the formula, the Gaussian convolution mask G is represented as:

[0029]

[0030] Where σ is the standard deviation of the distribution, and (x,y) are the pixel coordinates;

[0031] Using the luminance channel image I v and the original base layer containing the smog effect The difference is used to obtain the first-scale detail layer of the Gaussian pyramid.

[0032]

[0033] Then, for the brightness channel image I... v Downsampling is performed to obtain the second-scale brightness channel image I. v,2 Then, the second-scale detail layer is calculated according to the following formula.

[0034]

[0035] In the formula, This is the second-scale base layer;

[0036] Finally, examine the brightness channel image I at the second scale. v,2 The image was downsampled to obtain the third-scale brightness channel image I. v,3 The third-scale detail layer is calculated according to the following formula.

[0037]

[0038] In the formula, This is the third-scale foundation layer.

[0039] Step (4) specifically refers to: using the following formula to represent the original base layer containing the haze effect.

[0040]

[0041] In the formula, It is a clear foundation layer. This refers to global backscattered light; This represents the scene transmittance on the V channel. By using the original transmittance t of the underwater scene c Convert from RGB space to HSV space, extract the V channel component to obtain; when hour, choose The global backscatter light is estimated using the pixel coordinates of the smallest pixels in the top 0.1% of the spectrum.

[0042]

[0043] in, It means The pixel value of the top 99.9% of the largest pixels, (x*, y*) is The pixel coordinates of the smallest pixel in the top 0.1% of the dataset. It means The pixel value at coordinates (x*, y*);

[0044] For the scale detail layer, assuming that the scene transmittance is consistent within local block regions of the underwater image, the underwater physical imaging model expresses the inverse relationship between the underwater image gradient and the scene transmittance:

[0045]

[0046] in, Represents the gradient operator;

[0047] Using the original transmittance t of the underwater scene c Magnified underwater image I c gradient To enhance image clarity J c gradient

[0048] The operation in equation (1) is transformed to be performed in the gradient domain of the detail layer, and the gradient enhancement of the detail layer is expressed by the following equation.

[0049]

[0050] in, This refers to the original gradient of the i-th scale detail layer, where ω is a non-negative parameter that limits the gradient enhancement intensity of different detail layers. With the help of the Poisson equation, the enhanced detail layer at each scale is obtained according to the gradient modified by the following formula.

[0051]

[0052] In the formula, Restore refers to the gradient restoration operation.

[0053] Step (5) specifically refers to: based on the enhanced detail layer, using the following formula to perform a weighted summation of the first, second, and third scale detail layers to obtain the enhanced detail layer.

[0054]

[0055] Wherein, sgn is a sign function; w1, w2, and w3 are three composite parameters at different levels; and These represent the enhanced detail layers at the first, second, and third scales of detail, respectively.

[0056] Based on a clear foundation layer and Enhanced detail layer The sharp image J of the reconstructed luminance channel V is derived using the following formula. V (x,y):

[0057]

[0058] Finally, by J V The (x,y) and the H and S channels of the underwater image are fused to form an enhanced image in HSV space. The enhanced image in HSV space is then converted into an RGB color space representation to generate the final enhanced result.

[0059] In step (4), it is known that the underwater physical imaging model consists of two parts: the irradiance D of the reflecting object. c and backscattered irradiance A c The calculation formulas for both are as follows:

[0060] D c (x,y)=J c (x,y)t c (x,y),c∈{r,g,b} (2)

[0061]

[0062] Where (x,y) are pixel coordinates, J c For a clear image, Let t be the global air light constant.c Given the original transmittance of the underwater scene, according to equations (2) and (3), the underwater physical imaging model is expressed as:

[0063]

[0064] Among them, I c It is an underwater image; when in underwater image I c After color correction, the global backscattered light of the RGB channels is almost the same and has a pixel value that tends to 1. Therefore, for the color-corrected image, equation (3) can be rewritten as:

[0065] A c (x,y)=1-t c (x,y) (5)

[0066] According to the underwater physical imaging model, the backscattered light irradiance A c Each pixel value is higher than 0, but cannot be higher than I. c Given the minimum value of a component, we define an I. c The minimum channel is composed of the minimum pixel value of each pixel between the r, g, and b channels, that is:

[0067] I m (x,y)=min{I r (x,y),I g (x,y),I b (x,y)}

[0068] Among them, I m (x,y) refers to the minimum channel composed of the minimum values ​​in the r, g, and b channels of the underwater image, min{I r (x,y),I g (x,y),I b (x,y)} represents the selection of the minimum value among the r, g, and b channels; I r (x,y),I g (x,y),I b (x, y) represent the pixel values ​​of channels r, g, and b at pixel coordinates (i, j), respectively; since underwater images have similar backscattered light within a small local area, a median filter is used to ensure that each pixel has the same backscattered light.

[0069]

[0070] Among them, s v It is the window size of the median filter; M(x,y) refers to the smallest channel with approximately uniform backscattering.

[0071] The following equation is used to further filter out residual structure and texture information in M(x,y):

[0072]

[0073] Where A is coarse backscattered light;

[0074] Design a scaling factor to compensate for local backscattered illuminance, the factor being as follows:

[0075]

[0076] Where MeanA and MinA are the average and minimum values ​​of the coarse backscattered light A, respectively; Thres is the threshold value, which determines whether compensation for backscattered light is needed, Thres = MaxA; then, according to the Lambert-Beer empirical law, the degradation of light intensity is related to the properties of the material, and light propagates in an exponential dependence; simultaneously, considering the inverse iterative process between exponential and power functions, using A = A ratio To compensate for backscattered light; finally, with the help of improved backscattered light, the original transmittance of the underwater scene is estimated according to the following formula:

[0077] t c (x,y)=1-A c (x,y)

[0078] In the formula, A c (x,y) refers to the compensated backscattered light;

[0079] The original transmittance t of the underwater scene c Transformation to V-channel spatial expression And through the scene transmittance on the already estimated V channel. and global backscattered light Combined with the original base layer containing the haze effect Remove the original base layer containing smog effects The smog effect has been clearly observed in the basic layer.

[0080]

[0081] As can be seen from the above technical solutions, the beneficial effects of this invention are as follows: First, this invention proposes a segmented color balance method, which uses the maximum mean to explore the reference channel. With the help of this channel, a gain factor is designed to compensate for the information loss of other channels based on the degree of information loss of the channel itself. This invention reduces the color loss of the color-balanced image by considering the attenuation characteristics of different color channels, thereby satisfying the gray world hypothesis. Second, this invention proposes a pixel-based transmission estimation method. Based on the mapping relationship between transmission and the adjusted backscattered light of the underwater image, it helps to improve transmission estimation to obtain better detail enhancement and color preservation. This invention can estimate transmission without calculating the dark channel, which can reduce halos and computational complexity. Third, this invention proposes a multi-scale enhancement fusion strategy to improve the contrast based on the estimated transmission. In this multi-scale fusion, a detail pyramid is embedded to compensate for the detail loss in underexposed or overexposed areas of the underwater image. The contrast and detail restoration of this invention are achieved at different scales, which can effectively prevent the result from being over-enhanced or under-enhanced. Attached Figure Description

[0082] Figure 1 , 2 All of these are flowcharts of the method of the present invention;

[0083] Figure 3 This is a visual comparison result image. Detailed Implementation

[0084] like Figure 1 , Figure 2 As shown, an underwater image enhancement method based on piecewise color balance and multi-scale enhancement fusion is presented, which includes the following sequential steps:

[0085] (1) Calculate the average grayscale value of each color channel, and select the color channel with the largest average grayscale value as the reference channel for color compensation.

[0086] (2) Use the stretching function to increase the reference channel The dynamic range forms a reference channel. Corrected version and utilize The first channel for compensation The second channel awaiting compensation The first channel after correction and the corrected second channel

[0087] (3) The images are merged into a color-corrected image, which is then converted from the RGB image space to the HSV color space. A Gaussian filter is used to decompose the V channel into the original base layer containing the haze effect. And three scale detail layers, the three scale detail layers including a first scale detail layer, a second scale detail layer and a third scale detail layer;

[0088] (4) Estimating global backscattered light Scene transmittance on V channel Utilizing scene transmittance on the V channel Remove the original base layer containing smog effects The smog effect has been clearly observed in the basic layer. Enhance the contrast and sharpness of the base layer; utilize scene transmittance on the V channel. As an independent stretching factor, it enhances the texture detail on each scale detail layer, resulting in an enhanced detail layer. This improves the overall outline and key target information of the image;

[0089] (5) Introduce a weighted fusion function to enhance the detail layer. Enhance detail layers and clear base layer A clear image J merged into the reconstructed luminance channel V. V (x,y), the sharp image J of the reconstructed luminance channel V. V The (x,y) data is then fused with the original H and S channels of the underwater image to form an enhanced image in HSV space. The enhanced image in HSV space is then converted into an RGB color space representation to generate the final enhanced result.

[0090] like Figure 1 , Figure 2 As shown, step (1) specifically refers to: for underwater image I c The average grayscale value of each color channel is calculated.

[0091]

[0092] Where H and W represent the row and column of the input underwater image, respectively, and r, g, b represent the red, green, and blue channels of the input underwater image in the RGB space, respectively. c (i,j) is the pixel value of each color channel at pixel coordinates (i,j); c is the color channel of the underwater image;

[0093] Choose the color channel with the largest average grayscale value as the reference channel for color compensation.

[0094]

[0095] Here, max() is the function to find the maximum value. These represent the average grayscale values ​​of the red, green, and blue channels, respectively.

[0096] like Figure 1 , Figure 2 As shown, step (2) specifically refers to: increasing the reference channel through the stretching function. The dynamic range forms a reference channel. Corrected version

[0097]

[0098] in, and These are the maximum and minimum values ​​in the input underwater image, respectively;

[0099] use The first channel for compensation The second channel awaiting compensation The first channel after correction and the corrected first channel

[0100]

[0101] in, for The average grayscale value, for The average grayscale value, This represents the average grayscale value of the reference channel; These represent the average grayscale values ​​of the red, green, and blue channels, respectively.

[0102] like Figure 1 , Figure 2 As shown, step (3) specifically refers to: first, using the Gaussian convolution mask G and the luminance channel image I in the HSV color space... v The convolution operation between them generates the original base layer containing the haze effect.

[0103]

[0104] In the formula, the Gaussian convolution mask G is represented as:

[0105]

[0106] Where σ is the standard deviation of the distribution, and (x,y) are the pixel coordinates;

[0107] Using the luminance channel image I vand the original base layer containing the smog effect The difference is used to obtain the first-scale detail layer of the Gaussian pyramid.

[0108]

[0109] Then, for the brightness channel image I... v Downsampling is performed to obtain the second-scale brightness channel image I. v,2 Then, the second-scale detail layer is calculated according to the following formula.

[0110]

[0111]

[0112] In the formula, This is the second-scale base layer;

[0113] Finally, examine the brightness channel image I at the second scale. v,2 The image was downsampled to obtain the third-scale brightness channel image I. v,3 The third-scale detail layer is calculated according to the following formula.

[0114]

[0115] In the formula, This is the third-scale foundation layer.

[0116] To address the issue that the overall image enhancement process may result in under- or over-enhancement of complex underwater scenes, different operations were applied to multiple residual images to enhance contrast and detail respectively.

[0117] like Figure 1 , Figure 2 As shown, step (4) specifically refers to: using the following formula to represent the original base layer containing the haze effect.

[0118]

[0119] In the formula, It is a clear foundation layer. This refers to global backscattered light; This represents the scene transmittance on the V channel. By using the original transmittance t of the underwater scene c Convert from RGB space to HSV space, extract the V channel component to obtain; when hour, choose The global backscatter light is estimated using the pixel coordinates of the smallest pixels in the top 0.1% of the spectrum.

[0120]

[0121] in, It means The pixel value of the top 99.9% of the largest pixels, (x*, y*) is The pixel coordinates of the smallest pixel in the top 0.1% of the dataset. It means The pixel value at coordinates (x*, y*);

[0122] For the scale detail layer, assuming that the scene transmittance is consistent within local block regions of the underwater image, the underwater physical imaging model expresses the inverse relationship between the underwater image gradient and the scene transmittance:

[0123]

[0124] in, Represents the gradient operator;

[0125] Using the original transmittance t of the underwater scene c Magnified underwater image I c gradient To enhance image clarity J c gradient

[0126] The operation in equation (1) is transformed to be performed in the gradient domain of the detail layer, and the gradient enhancement of the detail layer is expressed by the following equation.

[0127]

[0128] in, This refers to the original gradient of the i-th scale detail layer, where ω is a non-negative parameter that limits the gradient enhancement intensity of different detail layers. With the help of the Poisson equation, the enhanced detail layer at each scale is obtained according to the gradient modified by the following formula.

[0129]

[0130] In the formula, Restore refers to the gradient restoration operation.

[0131] like Figure 1 , Figure 2 As shown, step (5) specifically refers to: based on the enhanced detail layer, using the following formula to perform a weighted summation of the first, second, and third scale detail layers to obtain the enhanced detail layer.

[0132]

[0133] Wherein, sgn is a sign function; w1, w2, and w3 are three composite parameters at different levels; and These represent the enhanced detail layers at the first, second, and third scales of detail, respectively.

[0134] Based on a clear foundation layer and Enhanced detail layer The sharp image J of the reconstructed luminance channel V is derived using the following formula. V (x,y):

[0135]

[0136] Finally, by J V The (x,y) and the H and S channels of the underwater image are fused to form an enhanced image in HSV space. The enhanced image in HSV space is then converted into an RGB color space representation to generate the final enhanced result.

[0137] In step (4), it is known that the underwater physical imaging model consists of two parts: the irradiance D of the reflecting object. c and backscattered irradiance A c The calculation formulas for both are as follows:

[0138] D c (x,y)=J c (x,y)t c (x,y),c∈{r,g,b} (2)

[0139]

[0140] Where (x,y) are pixel coordinates, J c For a clear image, Let t be the global air light constant. c Given the original transmittance of the underwater scene, according to equations (2) and (3), the underwater physical imaging model is expressed as:

[0141]

[0142] Among them, I c It is an underwater image; when in underwater image I c After color correction, the global backscattered light of the RGB channels is almost the same and has a pixel value that tends to 1. Therefore, for the color-corrected image, equation (3) can be rewritten as:

[0143] A c (x,y)=1-t c (x,y) (5)

[0144] According to the underwater physical imaging model, the backscattered light irradiance A c Each pixel value is higher than 0, but cannot be higher than I. c Given the minimum value of a component, we define an I. c The minimum channel is composed of the minimum pixel value of each pixel between the r, g, and b channels, that is:

[0145] I m (x,y)=min{I r (x,y),I g (x,y),I b (x,y)}

[0146] Among them, I m (x,y) refers to the minimum channel composed of the minimum values ​​in the r, g, and b channels of the underwater image, min{I r (x,y),I g (x,y),I b (x,y)} represents the selection of the minimum value among the r, g, and b channels; I r (x,y),I g (x,y),I b (x, y) represent the pixel values ​​of channels r, g, and b at pixel coordinates (i, j), respectively; since underwater images have similar backscattered light within a small local area, a median filter is used to ensure that each pixel has the same backscattered light.

[0147]

[0148] Among them, s v It is the window size of the median filter; M(x,y) refers to the smallest channel with approximately uniform backscattering.

[0149] The following equation is used to further filter out residual structure and texture information in M(x,y):

[0150]

[0151] Where A is coarse backscattered light;

[0152] In underwater scenarios, incident light is significantly attenuated by the water, resulting in typically low brightness in the recovered image. To further address this issue, the average value of the coarse backscattered light used for adaptive compensation is utilized.

[0153] Design a scaling factor to compensate for local backscattered illuminance, the factor being as follows:

[0154]

[0155] Where MeanA and MinA are the average and minimum values ​​of the coarse backscattered light A, respectively; Thres is the threshold value, which determines whether compensation for backscattered light is needed, Thres = MaxA; then, according to the Lambert-Beer empirical law, the degradation of light intensity is related to the properties of the material, and light propagates in an exponential dependence; simultaneously, considering the inverse iterative process between exponential and power functions, using A = A ratio To compensate for backscattered light; finally, with the help of improved backscattered light, the original transmittance of the underwater scene is estimated according to the following formula:

[0156] t c (x,y)=1-A c (x,y)

[0157] In the formula, A c (x,y) refers to the compensated backscattered light;

[0158] The original transmittance t of the underwater scene c Transformation to V-channel spatial expression And through the scene transmittance on the already estimated V channel. and global backscattered light Combined with the original base layer containing the haze effect Remove the original base layer containing smog effects The smog effect has been clearly observed in the basic layer.

[0159]

[0160] exist Figure 3 In this embodiment of the invention, the original underwater image input is shown in Figure (a), the underwater image processed by the prior art HFM is shown in Figure (b), the underwater image processed by the prior art PCDE is shown in Figure (c), the underwater image processed by the prior art WWPF is shown in Figure (d), the underwater image processed by the prior art LANet is shown in Figure (e), the underwater image processed by the prior art PUIE-Net is shown in Figure (f), the underwater image processed by the prior art NUDCP is shown in Figure (g), the underwater image processed by the prior art DAACC is shown in Figure (h), the underwater image processed by the prior art DATVR is shown in Figure (i), and the underwater image processed by the method proposed in this invention is shown in Figure (j).

[0161] In summary, this invention calculates the average grayscale value of each color channel, selects a reference channel, and uses it to correct and compensate the other two channels to form a color-corrected image. The V channel is decomposed into an original base layer and three scale detail layers, and a clear base layer and enhanced detail layers are obtained by estimating global backscattered light and scene transmittance, and the final enhanced result is generated. This invention proposes a segmented color balancing method that uses the maximum mean to explore a reference channel. With the help of this channel, a gain factor is designed to compensate for information loss in other channels based on the degree of information loss in the reference channel. This invention reduces color loss in the color-balanced image by considering the attenuation characteristics of different color channels, thus satisfying the gray world hypothesis. This invention proposes a pixel-based transmission estimation method, which, based on the mapping relationship between transmission and adjusted backscattered light in the underwater image, helps improve transmission estimation for better detail enhancement and color preservation. This invention estimates transmission without calculating the dark channel, reducing halos and computational complexity. This invention proposes a multi-scale enhancement fusion strategy to improve contrast based on estimated transmission, embedding a detail pyramid in the multi-scale fusion to compensate for detail loss in underexposed or overexposed areas of the underwater image. The contrast and detail restoration of this invention are achieved at different scales, which effectively prevents over-enhancement or under-enhancement of the results.

Claims

1. An underwater image enhancement method based on piecewise color balance and multi-scale enhancement fusion, characterized in that: The method includes the following steps in sequence: (1) Calculate the average grayscale value of each color channel, and select the color channel with the largest average grayscale value as the reference channel for color compensation. (2) Use the stretching function to increase the reference channel The dynamic range forms a reference channel. Corrected version and utilize The first channel for compensation The second channel awaiting compensation The first channel after correction and the corrected second channel (3) The images are merged into a color-corrected image, which is then converted from the RGB image space to the HSV color space. A Gaussian filter is used to decompose the V channel into the original base layer containing the haze effect. And three scale detail layers, the three scale detail layers including a first scale detail layer, a second scale detail layer and a third scale detail layer; (4) Estimating global backscattered light Scene transmittance on V channel Utilizing scene transmittance on the V channel Remove the original base layer containing smog effects The smog effect has been clearly observed in the basic layer. Utilizing scene transmittance on the V channel As an independent stretching factor, it enhances the texture detail on each scale detail layer, resulting in an enhanced detail layer. (5) Introduce a weighted fusion function to enhance the detail layer. Enhance detail layers and clear base layer A clear image J merged into the reconstructed luminance channel V. V (x,y), the sharp image J of the reconstructed luminance channel V. V The (x,y) data is then fused with the original H and S channels of the underwater image to form an enhanced image in HSV space. The enhanced image in HSV space is then converted into an RGB color space representation to generate the final enhanced result.

2. The underwater image enhancement method based on piecewise color balance and multi-scale enhancement fusion according to claim 1, characterized in that: Step (1) specifically refers to: for underwater image I c The average grayscale value of each color channel is calculated. Where H and W represent the row and column of the input underwater image, respectively, and r, g, b represent the red, green, and blue channels of the input underwater image in the RGB space, respectively. c (i,j) is the pixel value of each color channel at pixel coordinates (i,j); c is the color channel of the underwater image. Choose the color channel with the largest average grayscale value as the reference channel for color compensation. Here, max() is the function to find the maximum value. These represent the average grayscale values ​​of the red, green, and blue channels, respectively.

3. The underwater image enhancement method based on piecewise color balance and multi-scale enhancement fusion according to claim 1, characterized in that: Step (2) specifically refers to: increasing the reference channel through the stretching function. The dynamic range forms a reference channel. Corrected version in, and These are the maximum and minimum values ​​in the input underwater image, respectively; use The first channel for compensation The second channel awaiting compensation The first channel after correction and the corrected first channel in, for The average grayscale value, for The average grayscale value, This represents the average grayscale value of the reference channel; These represent the average grayscale values ​​of the red, green, and blue channels, respectively.

4. The underwater image enhancement method based on segmented color balance and multi-scale enhancement fusion according to claim 1, characterized in that: Step (3) specifically refers to: First, using the Gaussian convolution mask G and the luminance channel image I in the HSV color space... v The convolution operation between them generates the original base layer containing the haze effect. In the formula, the Gaussian convolution mask G is represented as: Where σ is the standard deviation of the distribution, and (x,y) are the pixel coordinates; Using the luminance channel image I v and the original base layer containing the smog effect The difference is used to obtain the first-scale detail layer of the Gaussian pyramid. Then, for the brightness channel image I... v Downsampling is performed to obtain the second-scale brightness channel image I. v,2 Then, the second-scale detail layer is calculated according to the following formula. In the formula, This is the second-scale base layer; Finally, examine the brightness channel image I at the second scale. v,2 The image was downsampled to obtain the third-scale brightness channel image I. v,3 The third-scale detail layer is calculated according to the following formula. In the formula, This is the third-scale foundation layer.

5. The underwater image enhancement method based on segmented color balance and multi-scale enhancement fusion according to claim 1, characterized in that: Step (4) specifically refers to: using the following formula to represent the original base layer containing the haze effect. In the formula, It is a clear foundation layer. This refers to global backscattered light; This represents the scene transmittance on the V channel. By using the original transmittance t of the underwater scene c Convert from RGB space to HSV space, extract the V channel component to obtain; when hour, choose The global backscatter light is estimated using the pixel coordinates of the smallest pixels in the top 0.1% of the spectrum. in, It means The pixel value of the top 99.9% of the largest pixels, (x*, y*) is The pixel coordinates of the smallest pixel in the top 0.1% of the dataset. It means The pixel value at coordinates (x*, y*); For the scale detail layer, assuming that the scene transmittance is consistent within local block regions of the underwater image, the underwater physical imaging model expresses the inverse relationship between the underwater image gradient and the scene transmittance: in, Represents the gradient operator; Using the original transmittance t of the underwater scene c Magnified underwater image I c gradient To enhance image clarity J c gradient The operation in equation (1) is transformed to be performed in the gradient domain of the detail layer, and the gradient enhancement of the detail layer is expressed by the following equation. in, This refers to the original gradient of the i-th scale detail layer, where ω is a non-negative parameter that limits the gradient enhancement intensity of different detail layers. With the help of the Poisson equation, the enhanced detail layer at each scale is obtained according to the gradient modified by the following formula. In the formula, Restore refers to the gradient restoration operation.

6. The underwater image enhancement method based on piecewise color balance and multi-scale enhancement fusion according to claim 1, characterized in that: Step (5) specifically refers to: based on the enhanced detail layer, using the following formula to perform a weighted summation of the first, second, and third scale detail layers to obtain the enhanced detail layer. Wherein, sgn is a sign function; w1, w2, and w3 are three composite parameters at different levels; and These represent the enhanced detail layers at the first, second, and third scales of detail, respectively. Based on a clear foundation layer and Enhanced detail layer The sharp image J of the reconstructed luminance channel V is derived using the following formula. V (x,y): Finally, by J V The (x,y) and the H and S channels of the underwater image are fused to form an enhanced image in HSV space. The enhanced image in HSV space is then converted into an RGB color space representation to generate the final enhanced result.

7. The underwater image enhancement method based on segmented color balance and multi-scale enhancement fusion according to claim 5, characterized in that: In step (4), it is known that the underwater physical imaging model consists of two parts: the irradiance D of the reflecting object. c and backscattered irradiance A c The calculation formulas for both are as follows: D c (x,y)=J c (x,y)t c (x,y),c∈{r,g,b}(2) Where (x,y) are pixel coordinates, J c For a clear image, Let t be the global air light constant. c Given the original transmittance of the underwater scene, according to equations (2) and (3), the underwater physical imaging model is expressed as: Among them, I c It is an underwater image; when in underwater image I c After color correction, the global backscattered light of the RGB channels is almost the same and has a pixel value that tends to 1. Therefore, for the color-corrected image, equation (3) can be rewritten as: TO c (x,y)=1-t c (x,y)(5) According to the underwater physical imaging model, the backscattered light irradiance A c Each pixel value is higher than 0, but cannot be higher than I. c Given the minimum value of a component, we define an I. c The minimum channel is composed of the minimum pixel value of each pixel between the r, g, and b channels, that is: I m (x,y)=min{I r (x,y),I g (x,y),I b (x,y)} Among them, I m (x,y) refers to the minimum channel composed of the minimum values ​​in the r, g, and b channels of the underwater image, min{I r (x,y),I g (x,y),I b (x,y)} represents the selection of the minimum value among the r, g, and b channels; I r (x,y),I g (x,y),I b (x, y) represent the pixel values ​​of channels r, g, and b at pixel coordinates (i, j), respectively; since underwater images have similar backscattered light within a small local area, a median filter is used to ensure that each pixel has the same backscattered light. Among them, s v It is the window size of the median filter; M(x,y) refers to the smallest channel with approximately uniform backscattering. The following equation is used to further filter out residual structure and texture information in M(x,y): Where A is coarse backscattered light; Design a scaling factor to compensate for local backscattered illuminance, the factor being as follows: Where MeanA and MinA are the average and minimum values ​​of the coarse backscattered light A, respectively; Thres is the threshold value, which determines whether compensation for backscattered light is needed, Thres = MaxA; then, according to the Lambert-Beer empirical law, the degradation of light intensity is related to the properties of the material, and light propagates in an exponential dependence; simultaneously, considering the inverse iterative process between exponential and power functions, using A = A ratio To compensate for backscattered light; finally, with the help of improved backscattered light, the original transmittance of the underwater scene is estimated according to the following formula: t c (x,y)=1-A c (x,y) In the formula, A c (x,y) refers to the compensated backscattered light; The original transmittance t of the underwater scene c Transformation to V-channel spatial expression And through the scene transmittance on the already estimated V channel. and global backscattered light Combined with the original base layer containing the haze effect Remove the original base layer containing smog effects The smog effect has been clearly observed in the basic layer.

Citation Information

Patent Citations

  • Single image defogging method based on morphological reconstruction and saturation compensation

    CN113191982A

  • Visibility improvement in color video stream

    US20050163393A1