Underwater image enhancement method based on asymmetric gray world and gradient distribution characteristics
By using the asymmetric grayscale world and gradient distribution characteristics, the color and detail enhancement of underwater images are dynamically adjusted, solving the robustness and effectiveness problems of traditional methods under illumination attenuation and scattering, and achieving efficient underwater image enhancement.
Patent Information
- Application Number
- CN202511348513.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-21
- Publication Date
- 2026-01-16
AI Technical Summary
Traditional underwater image enhancement methods are not robust enough and are prone to over-enhancement when dealing with color distortion and low contrast blur caused by light attenuation and scattering, especially in different scenarios.
By employing a method based on the asymmetric grayscale world and gradient distribution characteristics, adaptive color correction and detail enhancement are performed by dynamically calculating the mean values of the R, G, and B channels and local gradient information, thereby restoring the color balance and clarity of underwater images.
It achieves highly robust color correction and detail restoration in different underwater environments, avoids over-enhancement, and improves the color and clarity of underwater images.
Smart Images

Figure CN121353085A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of computer vision and digital image processing, and relates to underwater image enhancement technology, in particular to an underwater image enhancement method based on asymmetric gray world and gradient distribution characteristics, which can be widely applied to underwater image repair, enhancement and related analysis tasks. BACKGROUND
[0002] In underwater exploration and research, robots play an irreplaceable role. Compared with other sensors, cameras have more intuitive advantages, so current underwater robots mostly use cameras as the main perception sensor. However, light will appear dynamic attenuation problem when propagating underwater, and the attenuation rate of light of different wavelengths is different, which leads to color distortion problem of underwater images. In addition, due to the influence of underwater particles, the scattering problem of light in the propagation process will lead to the problem of low contrast and blur of imaging. In view of these problems, different researchers have studied a variety of algorithms, which can be divided into: based on physical model, based on non-physical model and based on deep learning method.
[0003] The underwater image enhancement method based on physical model mainly constructs the underwater optical imaging model by analyzing the light propagation process, and then realizes the enhancement of underwater image by estimating the physical parameters. The accuracy of physical model parameter estimation directly affects the final enhancement effect. Song et al. proposed a depth estimation model based on underwater light attenuation prior, then solved the background light and transmission map parameters based on the estimated depth, and then realized the enhancement of underwater image (see Song W, Wang Y, Huang D, et al. A rapid scene depth estimation model based on underwater light attenuation prior for underwater image restoration [C] / / Advances in Multimedia Information Processing-PCM 2018: 19th Pacific-Rim Conference on Multimedia, Hefei, China, September 21-22, 2018, Proceedings, Part I 19. Springer International Publishing, 2018: 678-688).
[0004] The non-physical model-based underwater image enhancement method directly adjusts the image pixel value to realize the enhancement of a certain aspect of the underwater image. Song et al. proposed an enhancement method based on multi-scale fusion and global stretching to solve the problems of color distortion and poor visibility of underwater images. The method fully utilizes the characteristics of RGB and Lab color spaces to realize color correction and brightness enhancement (see Song H, Wang R. Underwater image enhancement based on multi-scale fusion and global stretching of dual-model[J]. Mathematics, 2021, 9(6): 595).
[0005] The deep learning-based underwater image enhancement method uses the convolutional neural network structure to automatically learn the characteristics of underwater images to improve the quality of underwater images. Li et al. proposed a medium transmission-guided multi-color space embedding underwater image enhancement network, which integrates different color space features into a multi-color space to realize the purpose of feature diversity representation (see Li C, Anwar S, Hou J, et al. Underwater image enhancement via medium transmission-guided multi-color space embedding[J]. IEEE Transactions on Image Processing, 2021, 30: 4985-5000).
[0006] The above algorithms can effectively enhance underwater images in specific scenarios. The physical model-based method is heavily dependent on underwater optical physical models and has poor robustness. The non-physical model-based method is prone to over-enhancement. The deep learning-based method is affected by the size and quality of the training data set, and the enhancement effect is poor in scenarios not covered by the data set. Therefore, it is essential to develop a high-robustness underwater image enhancement method for underwater robot automation. SUMMARY
[0007] The present invention addresses the current technical challenge of underwater images being affected by factors such as light attenuation and scattering, resulting in color casts (e.g., bluish or greenish tints), low contrast, and blurred details (referred to as degraded images). Traditional image enhancement methods struggle to effectively address this issue. The invention provides an underwater image enhancement method based on asymmetric grayscale world and gradient distribution characteristics. The asymmetric grayscale world algorithm optimizes the color balance of underwater images based on statistical analysis of existing undegraded underwater images, while simultaneously restoring details in the image through adaptive detail enhancement, thereby improving the color and clarity of underwater images.
[0008] To achieve the above objectives, the present invention adopts the following technical solutions.
[0009] The underwater image enhancement method based on asymmetric grayscale world and gradient distribution features provided by this invention includes the following steps: S1, using the asymmetric gray-world algorithm, performs color correction on the R, G, and B channels of the degraded underwater image; this step includes the following sub-steps: S11, Calculate the mean values of the R, G, and B channels of the input degraded underwater image. , , ; S12, calculate the gain coefficients of the R, G, and B channels according to the following formula. , , : ; in, , , This represents the mean values of the R, G, and B channels calculated based on existing undegraded underwater images; S13, calibrate the R, G, and B channels based on the gain coefficients of the R, G, and B channels; S2 determines the detail gain coefficients based on the local gradient of the underwater image, and performs adaptive detail enhancement on the corrected three channels based on the detail gain coefficients.
[0010] In step S11 above, the average values of the R, G, and B channels of the underwater image are input. , , The calculation formula is as follows: ; In the formula, N represents the number of pixels in the underwater image; c represents the R, G, and B channels; Indicates the location of the underwater image. The pixel value of the c channel.
[0011] In step S12 above, , , The values are the average values of the R, G, and B channels calculated based on existing undegraded underwater images. The calculation formula is as follows: ; In the formula, M represents the number of undegraded underwater images; N k This represents the number of pixels in the k-th underwater image; c represents the R, G, and B channels. Indicates the position of the k-th underwater image. The pixel value of the c channel.
[0012] In step S13 above, the R, G, and B channels are corrected based on their gain coefficients. The calculation formula is as follows: ; In the formula, , , These represent the channel pixel values of the underwater image after R, G, and B channel correction, respectively. , , These represent the channel pixel values of the underwater image before R, G, and B channel correction, respectively.
[0013] Furthermore, the processing results after correction for each channel. , , The pixel values for each channel are restricted to a range of [0-255], as shown below: .
[0014] Step S2 above includes the following sub-steps: S21, Obtain the gradient of the corrected underwater image; S22, Based on the acquired gradient, determine the underwater image detail gain coefficient; S23 uses detail gain coefficients to adaptively enhance the corrected underwater image.
[0015] In step S21 above, the gradient of the corrected underwater image is obtained, and the calculation formula is as follows: ; In the formula, This represents the corrected underwater image in R, G, and B channels. The pixel value at position (x, y).
[0016] In step S22 above, the formula for calculating the detail gain coefficient is as follows: ; Where max(•) represents taking the maximum value among all calculated gradients.
[0017] Further restricting the detail gain coefficient, the restricted detail gain coefficient is expressed as: ; In the formula, This represents the threshold for the detail gain coefficient.
[0018] In step S23 above, the formula for adaptively enhancing the corrected underwater image using the detail gain coefficient is as follows: ; In the formula, This indicates an underwater image with enhanced detail. This represents the standard deviation of the set Gaussian function.
[0019] Compared with existing technologies, the underwater image enhancement method based on asymmetric grayscale world and gradient distribution features provided by this invention has the following beneficial effects: 1. Based on the statistical features of multiple non-degraded images obtained in different scenarios, this invention proposes an asymmetric gray-world algorithm, which is more suitable for color correction in underwater environments. 2. This invention proposes an adaptive detail enhancement method that dynamically adjusts the enhancement intensity based on the local gradient information of the image, thereby restoring details in underwater images while avoiding over-sharpening. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the underwater image enhancement method based on asymmetric grayscale world and gradient distribution features provided in an embodiment of the present invention. Figure 2 A schematic diagram of the process for color correction of the R, G, and B channels of a degraded underwater image in an asymmetric grayscale world. Figure 3 This is a schematic diagram illustrating the process of adaptive detail enhancement of the corrected three channels using detail gain coefficients; Figure 4The images show the enhancement results of degraded underwater images using different methods. (a) corresponds to the original degraded underwater image, (b) corresponds to the enhancement result of the traditional gray-world algorithm (see Rizzi A, Gatta C, Marini D. Color correction between gray world and white patch[C] / / Human Vision and Electronic Imaging VII. SPIE, 2002, 4662: 367-375), (c) corresponds to the detail enhancement result of the Unsharp Masking (USM) algorithm, (d) is the underwater image enhancement result after correction using the asymmetric gray-world algorithm of this invention, and (e) is the underwater image enhancement result after processing using the underwater image enhancement method based on the asymmetric gray-world and gradient distribution characteristics of this invention. Detailed Implementation
[0021] The technical solutions of various embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Example
[0023] like Figure 1 As shown, this embodiment provides an underwater image enhancement method based on asymmetric grayscale world and gradient distribution characteristics, which includes the following steps:
[0024] S1 uses an asymmetric grayscale world algorithm to perform color correction on the R, G, and B channels of degraded underwater images.
[0025] Existing grayscale world algorithms are designed for imaging results in air, and they make the following assumptions: For a natural image, without special light source color shifts, the average values of the red, green, and blue channels in the image should be approximately the same. However, underwater scenes are complex and varied, and the average values of the red, green, and blue channels in their images are not equal.
[0026] To address this issue, this invention proposes an asymmetric grayscale world algorithm that dynamically calculates the mean distribution of the R, G, and B channels of an image in a different scene based on an undegraded underwater image, and then performs color correction based on the characteristics of the mean distribution.
[0027] This step includes the following sub-steps:
[0028] S11, Calculate the mean values of the R, G, and B channels of the input degraded underwater image. , , The specific formula is as follows: (1); In the formula, N represents the number of pixels in the underwater image; c represents the R, G, and B channels; Indicates the location of the underwater image. The pixel value of the c channel.
[0029] S12, calculate the gain coefficients of the R, G, and B channels according to the following formula. , , : (2); in, , , This represents the mean values of the R, G, and B channels calculated based on existing undegraded underwater images.
[0030] , , The values are the R, G, and B channel averages calculated based on existing undegraded underwater images. For example, the R, G, and B channel averages calculated based on undegraded underwater images from existing public underwater image datasets (UIEB, EUVP) are shown in the following formula: (3); In the formula, M represents the number of undegraded underwater images; N k This represents the number of pixels in the k-th underwater image; c represents the R, G, and B channels. Indicates the position of the k-th underwater image. The pixel value of the c channel.
[0031] S13, the R, G, and B channels are corrected based on their gain coefficients. The calculation formula is as follows: (4); In the formula, , , These represent the channel pixel values of the underwater image after R, G, and B channel correction, respectively. , , These represent the channel pixel values of the underwater image before R, G, and B channel correction, respectively.
[0032] Furthermore, the processing results after correction for each channel. , , The pixel values for each channel are restricted to a range of [0-255], as shown below: (5).
[0033] S2 determines the detail gain coefficients based on the local gradient of the underwater image, and performs adaptive detail enhancement on the corrected three channels based on the detail gain coefficients.
[0034] To address the problem of blurred details in underwater images, this invention also proposes an adaptive detail enhancement method based on image gradients, which adaptively adjusts the enhancement intensity using local change information (i.e., edge information) of the image.
[0035] This step includes the following sub-steps: S21, Obtain the gradient of the corrected underwater image, calculated using the following formula: (6); In the formula, This represents the corrected underwater image in R, G, and B channels. The pixel value at position (x, y).
[0036] S22, Based on the acquired gradient, determine the underwater image detail gain coefficient.
[0037] Regions in an image rich in detail have larger gradients, while regions with less detail have smaller gradients. To adaptively enhance detail, a detail gain coefficient is calculated based on the local gradients of the image, using the following formula: (7); Where max(•) represents taking the maximum value among all calculated gradients.
[0038] To prevent over-enhancement from causing loss of image detail or unnatural appearance, the detail gain coefficient is further constrained. The constrained detail gain coefficient is expressed as follows: (8); In the formula, This represents the detail gain coefficient threshold, which is set to 2 in this embodiment.
[0039] S23, adaptive enhancement of the corrected underwater image is performed using the detail gain coefficient, calculated as follows: (9); In the formula, This indicates an underwater image with enhanced detail. This represents the standard deviation of the Gaussian function, which is set to 0.5 in this embodiment.
[0040] Figure 4 The results of different methods for enhancing degraded underwater images are presented. As can be seen from the figures, the present invention achieves the best enhancement results in terms of color correction and detail enhancement.
[0041] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.
Claims
1. An underwater image enhancement method based on asymmetric grayscale world and gradient distribution characteristics, characterized in that, Includes the following steps: S1, using the asymmetric gray-world algorithm, performs color correction on the R, G, and B channels of the degraded underwater image; this step includes the following sub-steps: S11, Calculate the mean values of the R, G, and B channels of the input degraded underwater image. , , ; S12, calculate the gain coefficients of the R, G, and B channels according to the following formula. , , : ; in, , , This represents the mean values of the R, G, and B channels calculated based on existing undegraded underwater images; S13, calibrate the R, G, and B channels based on the gain coefficients of the R, G, and B channels; S2 determines the detail gain coefficients based on the local gradient of the underwater image, and performs adaptive detail enhancement on the corrected three channels based on the detail gain coefficients.
2. The underwater image enhancement method based on asymmetric grayscale world and gradient distribution characteristics according to claim 1, characterized in that, In step S11, the mean values of the R, G, and B channels of the underwater image are input. , , The calculation formula is as follows: ; In the formula, N represents the number of pixels in the underwater image; c represents the R, G, and B channels; Indicates the location of the underwater image. The pixel value of the c channel.
3. The underwater image enhancement method based on asymmetric grayscale world and gradient distribution characteristics according to claim 1, characterized in that, In step S12, , , The values are the average values of the R, G, and B channels calculated based on existing undegraded underwater images. The calculation formula is as follows: ; In the formula, M represents the number of undegraded underwater images; N k This represents the number of pixels in the k-th underwater image; c represents the R, G, and B channels. Indicates the position of the k-th underwater image. The pixel value of the c channel.
4. The underwater image enhancement method based on asymmetric grayscale world and gradient distribution characteristics according to claim 1, characterized in that, In step S13, the R, G, and B channels are corrected based on their gain coefficients. The calculation formula is as follows: ; In the formula, , , These represent the channel pixel values of the underwater image after R, G, and B channel correction, respectively. , , These represent the channel pixel values of the underwater image before R, G, and B channel correction, respectively.
5. The underwater image enhancement method based on asymmetric grayscale world and gradient distribution characteristics according to claim 4, characterized in that, Processing results after calibration of each channel , , The pixel values for each channel are restricted to a range of [0-255], as shown below: 。 6. The underwater image enhancement method based on asymmetric grayscale world and gradient distribution characteristics according to claim 1, characterized in that, Step S2 includes the following sub-steps: S21, Obtain the gradient of the corrected underwater image; S22, Based on the acquired gradient, determine the underwater image detail gain coefficient; S23 uses detail gain coefficients to adaptively enhance the corrected underwater image.
7. The underwater image enhancement method based on asymmetric grayscale world and gradient distribution characteristics according to claim 6, characterized in that, In step S21, the gradient of the corrected underwater image is obtained, and the calculation formula is as follows: ; In the formula, This represents the corrected underwater image in R, G, and B channels. The pixel value at position (x, y).
8. The underwater image enhancement method based on asymmetric grayscale world and gradient distribution characteristics according to claim 7, characterized in that, In step S22, the formula for calculating the detail gain coefficient is as follows: ; Where max(•) represents taking the maximum value among all calculated gradients.
9. The underwater image enhancement method based on asymmetric grayscale world and gradient distribution characteristics according to claim 7, characterized in that, In step S22, the detail gain coefficients are calculated and constrained. The constrained detail gain coefficients are expressed as follows: ; In the formula, max(•) represents taking the maximum value among all calculated gradients. This represents the threshold for the detail gain coefficient.
10. The underwater image enhancement method based on asymmetric grayscale world and gradient distribution features according to any one of claims 1 to 9, characterized in that, In step S23, the formula for adaptively enhancing the corrected underwater image using the detail gain coefficient is as follows: ; In the formula, This indicates an underwater image with enhanced detail. This represents the standard deviation of the set Gaussian function. This represents the R, G, and B channels of the underwater image after correction in step S1. The pixel value at position (x, y). This represents the detail gain coefficient at position (x, y).