Underwater image enhancement method based on dynamic color channel compensation
By performing dynamic color channel compensation and brightness enhancement on underwater images, the problems of color distortion and low contrast in underwater images are solved, achieving high-quality underwater image enhancement.
Patent Information
- Application Number
- CN202310266588.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-18
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-03-18
AI Technical Summary
Existing technologies cannot achieve dynamic color compensation for underwater images, resulting in color distortion and low contrast in underwater images.
By decomposing the original underwater image into three channels (R, G, and B), calculating and normalizing the average value of the three channels, and determining the underwater image color based on the largest channel value for dynamic compensation, the color and brightness are adjusted using a grayscale world white balance algorithm and a Gamma correction method, thus achieving dynamic color channel compensation and brightness enhancement.
It achieves dynamic compensation for underwater images, improves the color accuracy and contrast of the images, adapts to the color distortion compensation needs of different water areas, and enhances robustness.
Smart Images

Figure CN116385568B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of underwater image enhancement technology, and relates to an underwater image enhancement method based on dynamic color channel compensation. Background Technology
[0002] The Earth's surface area is approximately 510 million square kilometers, of which the ocean area is about 360 million square kilometers, accounting for about 71% of the total area. The ocean not only provides humanity with abundant high-quality protein resources but is also a crucial foundation for human future development. With the continuous growth of the global population and rapid socio-economic development, humanity's demand for the development and utilization of the ocean is becoming increasingly strong.
[0003] High-quality underwater imagery is crucial for marine resource development and a range of other underwater operations. Underwater robots play a vital role in marine resource development, especially in deep-sea exploration and development, and cameras are the "eyes" of these robots. Camera imaging quality directly impacts the robot's underwater target detection and safe navigation. Therefore, highly robust underwater image enhancement algorithms are a key technology for intelligent robotic operations.
[0004] When a camera images underwater, the medium is fluid, making the situation more complex: (1) Different colors of light have different attenuation rates underwater, which is related to the wavelength characteristics of light. Red light has a longer wavelength, so it is absorbed first when propagating underwater; blue and green light have shorter wavelengths and relatively lower attenuation rates, which explains why underwater images appear blue and green. (2) The suspended particles in different waters are different, which also has a certain impact on the attenuation rate of light, resulting in different colors in underwater images; (3) Underwater lighting is relatively dim, which affects the contrast of underwater images.
[0005] Patent application CN202010430434.0 discloses an underwater image enhancement method and system based on red channel attenuation. Addressing issues such as low contrast and blurred edges in underwater images, the method first compensates for each pixel value in the red channel by using the pixel values in the green and blue channels within the same neighborhood, resulting in a compensated image. Then, a white balance algorithm is used to adjust the colors of the compensated image. However, as... Figure 1 As shown, underwater images are not predominantly green; in deep waters or areas with low plankton concentrations, the images appear blue. This is because in murky waters or areas with high plankton concentrations, the absorption of light by organic matter causes significant attenuation of blue light, resulting in a greenish image. In such cases, compensation for the blue channel is necessary. Furthermore, when the underwater robot is at greater depths, the images are predominantly blue, requiring compensation for red and green channels.
[0006] Therefore, it is crucial to study a dynamic compensation method for underwater images, realize effective enhancement of underwater images, and obtain high-quality underwater images. SUMMARY
[0007] The present application aims to solve the problem that the prior art cannot realize dynamic compensation of underwater image colors, and provides a dynamic color channel compensation-based underwater image enhancement method, which can realize dynamic compensation of underwater image colors, can be applied to a wider range of underwater conditions and has stronger robustness, and can further enhance the contrast of underwater image targets.
[0008] To achieve the above-mentioned purpose, the present application adopts the following technical solutions.
[0009] The dynamic color channel compensation-based underwater image enhancement method provided by the present application comprises the following steps:
[0010] S1, dynamic channel compensation is performed on an original underwater image to obtain a color channel compensation image; this step comprises the following sub-steps:
[0011] S11, the original underwater image is decomposed into R, G, and B three-channel image components, and the average values of the R, G, and B three channels are solved and normalized to obtain normalized results of the three channels;
[0012] S12, the color of the underwater image is determined according to the maximum normalized result in the G and B channels, and the other two channels are compensated with the corresponding channel normalized result;
[0013] S13, the compensated R, G, and B three channels are merged to obtain a color channel compensation image;
[0014] S2, a color adjustment image is obtained by performing color adjustment on the color channel compensation image through a gray world white balance algorithm;
[0015] S3, dynamic brightness enhancement is performed on the color adjustment image to obtain a brightness enhancement image; this step comprises the following sub-steps:
[0016] S31, the color adjustment image obtained in step S2 is decomposed into R, G, and B three-channel image components;
[0017] S32, the three-channel image components are converted to an HSV color space to obtain H, S, and V components;
[0018] S33, the minimum value, maximum value, and average value of the V channel are solved, and the V channel component is corrected;
[0019] S34, the channel components H and S obtained in step S32 and the corrected V channel component obtained in step S33 are converted to an RGB space to obtain a brightness enhancement image;
[0020] S4 adjusts the brightness enhanced image by using Gamma correction to obtain a final enhanced underwater image.
[0021] The step S1 is mainly aimed at the color distortion problem of the underwater image. The color presented by the underwater image is found out, and then the color presented by the underwater image is used to compensate other channels. Since the compensation can change with the color presented by the underwater image, dynamic compensation of the color of the underwater image can be realized, and the compensation demand of color distortion in different water areas can be met.
[0022] The step S11 decomposes the original underwater image into R, G, B three channel image components, respectively denoted as R, G, B, and respectively solves the average values of the three channels, denoted as Then, the obtained average values are normalized to obtain the normalized results of the three channels, denoted as The normalization is performed according to the following formula:
[0023]
[0024] In the step S12, the and are compared, and the maximum value thereof is used as the color of the underwater image, and the corresponding channel normalization result is used to compensate the other two channels. If the maximum value is g, it is determined that the obtained underwater image presents green color, and the red and blue channels are compensated according to the following formula (2) by using the green channel; if the maximum value is b, it is determined that the obtained underwater image presents blue color, and the red and green channels are compensated according to the following formula (3) by using the blue channel:
[0025]
[0026]
[0027] In the formula, k represents a compensation coefficient, which can be set according to the compensation condition.
[0028] In the step S13, the compensated three channel images R', G', B' are superimposed and merged to obtain a color channel compensation image.
[0029] In step S2, the color adjustment image obtained in step S1 can be adjusted by using the gray world white balance algorithm disclosed in the art, see Gasparini F, Schettini R. Color Correction for Digital Photographs [C] / / International Conference on Image Analysis & Processing. IEEE Computer Society, 2003.
[0030] Step S3 is to enhance the contrast of the underwater image target. First, the underwater image is converted from the RGB color space to the HSV color space, and then the V component is modified, and then converted from the HSV space to the RGB space to obtain the brightness enhancement image.
[0031] In step S31, the color adjustment image obtained in step S2 is decomposed into R, G, B three channel image components, respectively denoted as
[0032] In step S32, the following formulas (4) and (5) are used to convert to the HSV color space:
[0033]
[0034]
[0035] In step S33, the maximum value V max and the average value V mean of the V channel are obtained, and then the V channel component is modified according to the following formula (6):
[0036]
[0037] In step S34, the channel components H and S obtained in step S32 and the modified V channel component V new are converted to the RGB space by using formula (7) to obtain the brightness enhancement image.
[0038]
[0039] In step S4, the brightness enhancement image obtained in step S3 can be adjusted by using the Gamma correction method disclosed in the art, see Wiggin, Joseph F. "Gamma correction in live color TV cameras." IEEE Transactions on Broadcasting 1 (1968): 8-13.
[0040] Compared with the prior art, the underwater image enhancement method based on dynamic color channel compensation provided by the application has the following beneficial effects:
[0041] 1、 The application is based on the original underwater image R, G, B, determines the color channel of the underwater image, and then compensates the other two image channels by using the corresponding normalized results, thereby realizing dynamic compensation of the underwater image and solving the problem of color distortion of the underwater image in the prior art.
[0042] 2、 The application also provides a method for solving low contrast, which converts the underwater image from RGB space to HSV space, modifies the V component, and then converts back to RGB space, so that the brightness of the image can be enhanced, thereby realizing dynamic adjustment of the brightness of the image.
[0043] 3、 The application has strong robustness and can meet color adjustment and brightness adjustment in different scenes. DETAILED DESCRIPTION
[0044] Figure 1 It is an underwater light attenuation schematic diagram.
[0045] Figure 2 It is a flowchart of the underwater image enhancement method based on dynamic color channel compensation provided by the application.
[0046] Figure 3 It is an underwater image obtained by processing at different stages in the embodiment of the application; wherein (a) is an original underwater image, (b) is a color channel compensation image, (c) is a color adjustment image obtained by processing the color channel compensation image by the gray world white balance algorithm, (d) is a V component brightness dynamic adjustment image, (e) is a brightness enhancement image, and (f) is a final enhanced underwater image.
[0047] DETAILED DESCRIPTION
[0048] The specific embodiments of the application are described below to facilitate those skilled in the art to understand the application, but it should be clear that the application is not limited to the scope of the specific embodiments, and for those skilled in the art, it is obvious that various changes are within the spirit and scope of the application defined and determined by the appended claims, and all applications utilizing the concept of the application are within the scope of protection.
[0049] Embodiment 1
[0050] As shown in Figure 2 The underwater image enhancement method based on dynamic color channel compensation includes the following steps:
[0051] S1 performs dynamic channel compensation on the original underwater image to obtain a color channel compensation image; this step includes the following sub-steps:
[0052] S11 decomposes the original underwater image into R, G, B three-channel image components, and solves the R, G, B three-channel average values and performs normalization processing to obtain the three-channel normalization processing results.
[0053] In this step, the original underwater image is decomposed into R, G, B three-channel image components, respectively denoted as R, G, B, and the average values of the three channels are solved, respectively denoted as Then, the obtained average values are normalized to obtain the three-channel normalization processing results, denoted as The normalization processing is performed according to the following formula:
[0054]
[0055] S12 determines the underwater image color according to the maximum normalized result in the G, B channel, and compensates the other two channels with the corresponding channel normalized result.
[0056] In this step, and are compared, and the maximum value corresponding channel is taken as the underwater image color, and the other two channels are compensated with the corresponding channel normalized result. If the maximum value is g, it is determined that the obtained underwater image presents green color, and the red and blue channels need to be color compensated according to the following formula (2) using the green channel; if the maximum value is b, it is determined that the obtained underwater image presents blue color, and the red and green channels need to be color compensated according to the following formula (3) using the blue channel:
[0057]
[0058]
[0059] In the formula, k represents the compensation coefficient, which can be set according to the compensation situation.
[0060] S13 merges the compensated R, G, B three channels to obtain a color channel compensation image.
[0061] In this step, the compensated three-channel images R', G', B' are superimposed and merged to obtain a color channel compensation image.
[0062] The original underwater image targeted in this embodiment is shown in Figure 3 (a), and the color channel compensation image obtained after step S1 processing is shown in Figure 3 (b); through color compensation, the degree of underwater image color distortion can be reduced, laying a foundation for subsequent color correction.
[0063] S2 color adjustment is performed on the color channel compensation image by using the gray world white balance algorithm to obtain a color adjusted image.
[0064] The color adjustment of the color channel compensation image obtained in step S1 can be performed by using the gray world white balance algorithm disclosed in the art, see Gasparini F, Schettini R. Color Correction for Digital Photographs [C] / / International Conference on Image Analysis & Processing. IEEE Computer Society, 2003.
[0065] The color adjusted image obtained by processing the color channel compensation image in step S2 is shown in Fig. 2 (c). By using the gray world white balance processing, further color correction can be achieved to improve the image quality. Figure 3
[0066] S3 performs dynamic brightness enhancement on the color adjusted image to obtain a brightness enhanced image; this step includes the following sub-steps:
[0067] S31 decomposes the color adjusted image obtained in step S2 into R, G, and B three-channel image components.
[0068] In this step, the color adjusted image obtained in step S2 is decomposed into R, G, and B three-channel image components, respectively denoted as
[0069] S32 converts the three-channel image components to HSV color space to obtain H, S, and V components.
[0070] In this step, conversion to HSV color space is performed according to the following formulas (4) and (5):
[0071]
[0072] S33 obtains the maximum value and the average value of the V channel, and corrects the V channel component.
[0073] In this step, the maximum value Vmax and the average value Vavg of the V channel are obtained, and then the V channel component is corrected according to the following formula (6): max mean
[0074]
[0075] S34 converts the channel components H, S obtained in step S32 and the modified V channel component obtained in step S33 to the RGB space to obtain a luminance enhanced image.
[0076] In this step, the channel components H, S obtained in step S32 and the modified V channel component V obtained in step S33 are converted to the RGB space to obtain a luminance enhanced image. new The conversion to the RGB space is performed according to the following formula (7) to obtain a luminance enhanced image:
[0077]
[0078] The color adjustment image is subjected to luminance dynamic enhancement processing through step S3. The V component luminance dynamic adjustment image obtained through step S33 is shown in Fig. (d), and the luminance enhanced image obtained through step S34 is shown in Fig. (e). As can be seen from the figures, through luminance dynamic adjustment, the luminance is enhanced to make the processed image clearer. Figure 3 Figure 3 (e) shows the luminance enhanced image obtained through step S34. As can be seen from the figures, through luminance dynamic adjustment, the luminance is enhanced to make the processed image clearer.
[0079] S4 adjusts the luminance enhanced image through Gamma correction to obtain a final enhanced underwater image.
[0080] The luminance enhanced image obtained through step S3 can be adjusted using the Gamma correction method disclosed in the art, see Wiggin, Joseph F. "Gamma correction in live color TV cameras." IEEE Transactions on Broadcasting 1 (1968): 8-13.
[0081] The luminance enhanced image is subjected to Gamma correction through step S4 to obtain a final enhanced underwater image, as shown in Fig. (f). As can be seen from the figure, the contrast of the final image is enhanced. Figure 3
[0082] In summary, the underwater image enhancement method based on dynamic color channel compensation provided by the present application can effectively solve the problems of color distortion and low contrast of underwater images, has strong robustness, and can meet the image adjustment of different underwater scenes.
[0083] The present application is described in reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device that implements the flow Figure 1 one or more flows and / or blocks. Figure 1 one or more blocks.
[0084] These computer program instructions can also be stored in a computer readable memory that can direct the computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce a product including instruction devices, which implement the flow Figure 1 one or more flows and / or blocks. Figure 1 one or more blocks.
[0085] These computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the flow Figure 1 one or more flows and / or blocks. Figure 1 one or more blocks.
[0086] The principles and implementation of the present application are described in the specific embodiments, and the above description of the embodiments is only for the purpose of helping the reader to understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation and application range, and the above description of the present application should not be understood as a limitation of the present application.
[0087] Those skilled in the art will realize that the embodiments described herein are for the purpose of helping the reader to understand the principles of the present application, and should be understood as not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations according to the technical inspiration disclosed in the present application without departing from the essence of the present application, and these modifications and combinations are still within the scope of protection of the present application.
Claims
1. A method for underwater image enhancement based on dynamic color channel compensation, characterized in that, Includes the following steps: S1 performs dynamic channel compensation on the original underwater image to obtain a color channel compensated image; this step includes the following sub-steps: S11 decomposes the original underwater image into three-channel image components: R, G, and B. It then calculates the average values of the three channels and performs normalization to obtain the normalized results of the three channels. S12 determines the underwater image color based on the largest normalization result in the G and B channels, and compensates the other two channels with the corresponding channel's normalization result; S13 merges the compensated R, G, and B channels to obtain a color channel compensated image; S2 uses a grayscale world white balance algorithm to adjust the color channels of the compensated image to obtain a color-adjusted image. S3 performs dynamic brightness enhancement on the color-adjusted image to obtain a brightness-enhanced image; this step includes the following sub-steps: S31 decomposes the color-adjusted image obtained in step S2 into three-channel image components: R, G, and B. The S32 three-channel image components are converted to the HSV color space to obtain the H, S, and V components; S33 calculates the maximum and average values of the V channel and corrects the V channel components; S34 converts the channel components H and S obtained in step S32 and the corrected V channel component obtained in step S33 to RGB space to obtain a brightness-enhanced image. S4 uses Gamma correction to adjust the brightness-enhanced image to obtain the final enhanced underwater image.
2. The underwater image enhancement method based on dynamic color channel compensation according to claim 1, characterized in that, In step S11, the original underwater image is decomposed into three channel image components: R, G, and B, denoted as R, G, and B respectively. The average value of each of the three channels is then calculated and denoted as... Then, the obtained average value is normalized to obtain the normalized result of the three channels, denoted as . Normalize according to the following formula:
3. The underwater image enhancement method based on dynamic color channel compensation according to claim 2, characterized in that, In step S12, for and The values are compared, and the channel corresponding to the maximum value is used as the underwater image color. The other two channels are then compensated using the normalized result of that channel. If the maximum value is... If the acquired underwater image is determined to be green, then the red and blue channels need to be color compensated using the green channel according to the following formula (2); if the maximum value is b, then the acquired underwater image is determined to be blue, and the red and green channels need to be color compensated using the blue channel according to the following formula (3): In the formula, k represents the compensation coefficient, which is set according to the compensation situation.
4. The underwater image enhancement method based on dynamic color channel compensation according to claim 1, characterized in that, In step S31, the color-adjusted image obtained in step S2 is decomposed into R, G, and B three-channel image components, denoted as follows: In step S32, the color space is converted to HSV color space according to the following formulas (4) and (5):
5. The underwater image enhancement method based on dynamic color channel compensation according to claim 1 or 4, characterized in that, In step S33, the maximum value V of the V channel is obtained. max and average value V mean Then, the V channel components are corrected according to the following formula (6):
6. The underwater image enhancement method based on dynamic color channel compensation according to claim 5, characterized in that, In step S34, the channel components H and S obtained in step S32 and the corrected channel component V obtained in step S33 are combined. new Convert to RGB space using the following formula (7):
Citation Information
Patent Citations
A method and system for underwater image enhancement based on red channel attenuation
CN111696052B
Multi-scale fusion underwater image enhancement method based on HSV color space
CN114612354A
Systems and methods for automated hierarchical image representation and haze removal
US20170132771A1