Underwater image enhancement method based on color channel unit compensation amount
By adopting a method based on the unit compensation amount of color channels in underwater image enhancement, combined with adaptive platform histogram equalization, CLAHE, GUM and Gamma correction algorithms, the problems of color shift, low contrast, blurred details and limited histogram dynamic range in underwater images are solved, and the naturalness and visual effect of the image are improved.
Patent Information
- Application Number
- CN202510188996.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-06-06
AI Technical Summary
Existing underwater image enhancement methods are difficult to effectively solve the problems of color shift, low contrast, blurred details and limited histogram dynamic range in underwater images, resulting in unnatural images after enhancement.
The method based on the unit compensation amount of color channels is used to compensate the red, green and blue channels of the underwater image respectively, and the contrast, details and local brightness of the image are improved through adaptive platform histogram equalization, CLAHE algorithm, GUM algorithm and Gamma correction algorithm, and finally the enhanced output image is obtained through multi-scale fusion.
It effectively corrects the color shift of underwater images, enhances contrast and details, improves local brightness, and improves the overall visual effect and naturalness of the image.
Smart Images

Figure CN120107133A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of underwater image processing, and more particularly to an underwater image enhancement method based on color channel unit compensation amount. Background Art
[0002] About 70% of the Earth's surface is covered by the ocean, which contains rich and underdeveloped resources. However, the lack of oxygen, corrosion and high pressure in the marine environment make it difficult for humans to reach the bottom of the ocean for research. As an important means for humans to obtain marine information, underwater images will help humans understand the seabed and develop marine resources. The underwater environment is complex, and factors such as the absorption and scattering of light by the water body, turbulence, non-uniform illumination, suspended particles and plankton will have a significant impact on the image quality. Underwater images have the following problems: 1. Color distortion (color shift): The water body absorbs and scatters light of different wavelengths to different degrees, resulting in an imbalance in the color of the image, which is usually manifested as a more serious loss of the red channel, while the green and blue channels are relatively light, making the underwater image mostly present a green or blue hue. 2. Low contrast: Due to the attenuation and scattering of light when it propagates in water, the overall contrast of the image is reduced, the details are not obvious, and the visual clarity of the image and the recognition of the target are affected. 3. Blurred details: Suspended particles and plankton in the water increase the scattering of the medium, resulting in blurred images, loss of details, and reduced image resolution and clarity. 4. Limited histogram dynamic range: The histogram dynamic range of underwater images is narrow, which makes it difficult to preserve the details of both bright and dark parts of the image, resulting in partial overexposure or underexposure of the image. The above problems limit the availability and accuracy of underwater images and affect the progress of marine resource development and scientific research.
[0003] In order to improve the quality of underwater images, researchers have proposed a variety of image enhancement methods. Existing image enhancement methods can be roughly divided into three categories: methods based on non-physical models, methods based on physical models, and methods based on deep learning. Methods based on non-physical models mainly improve images by adjusting the pixel values of the image. For example, grayscale world algorithm, white balance algorithm, histogram equalization, etc. The method based on physical models establishes an underwater optical imaging model, assumes prior conditions and estimates key parameters, and then inverts and solves to achieve image restoration. This method is mainly divided into two technical routes. One is to use the statistical characteristics of the darkest pixels in the image to estimate and invert the dark channel to restore the image, such as the dark channel prior algorithm (DCP) and the underwater dark channel prior algorithm (UDCP). The other is to restore the image based on parameter estimation of the underwater optical imaging model.
[0004] In recent years, deep learning methods have gradually become a research hotspot in the field of underwater image enhancement due to their powerful feature extraction and learning capabilities. The underwater image enhancement U-shape Transformer network (u-shape transformer) effectively solves the problem of inconsistent attenuation of underwater images in different color channels and spatial regions, and restores better images. There are also algorithms such as UGAN and UW-CycleGAN based on generative adversarial networks (GAN), which can also restore images well.
[0005] However, the methods based on non-physical models improve image quality through color balance and contrast enhancement, without fully considering the physical mechanism of underwater light propagation, and are prone to new color cast and distortion problems. The methods based on physical models can restore the true color and details of the image to a certain extent, but the stability is poor. The methods based on deep learning are difficult to form pairs of real images and underwater lossy images due to the lack of diverse and high-quality training data, especially the lack of real control samples. Underwater image enhancement is limited and the enhanced image is unnatural. Therefore, how to provide an underwater image enhancement method based on color channel unit compensation is a problem that technicians in this field urgently need to solve. Summary of the invention
[0006] In view of this, the present invention provides an underwater image enhancement method based on color channel unit compensation amount, which uses the color channel compensation method with unit compensation amount to compensate the three channels of underwater attenuation respectively, and uses adaptive platform histogram equalization to expand the distribution of the three channels; then, the brightness channel is processed by contrast-limited adaptive histogram equalization and adaptive Gamma correction algorithm respectively; finally, the contrast-improved image, the detail-enhanced image and the local brightness-improved image are multi-scale fused to obtain the final enhanced output image.
[0007] In order to achieve the above object, the present invention provides the following technical solutions:
[0008] An underwater image enhancement method based on color channel unit compensation amount comprises the following steps:
[0009] S1. Using a color channel compensation method with a unit compensation amount, respectively compensate the attenuated red, green and blue channels of the underwater image, correct the color deviation, and obtain corrected images of the three channels;
[0010] S2, respectively performing adaptive platform histogram equalization on the corrected images of the red, green and blue channels to achieve grayscale expansion and redistribution of pixel values;
[0011] S3, for the brightness channel, use the CLAHE algorithm to improve image contrast, use the GUM algorithm to enhance details, and use the Gamma correction algorithm to improve local brightness;
[0012] S4, performing multi-scale fusion on the contrast-improved image, the detail-enhanced image and the local brightness-improved image to obtain a final output enhanced image.
[0013] Optionally, S1 is:
[0014] S11. Use the percentage of the original value of each pixel of the original image as the unit compensation amount to compensate the original red light:
[0015] I tr (x) = I r (x)+[α·I r (x)]·n
[0016] S12, using the percentage of the original value of each pixel of the original image as the unit compensation amount to compensate the original green light:
[0017] I tg (x) = I g (x)+[β·I g (x)]·n
[0018] S13, using the percentage of the original value of each pixel of the original image as the unit compensation amount to compensate the original blue light:
[0019] I tb (x) = I b (x)+[χ·I b (x)]·n
[0020] In the formula, I r (x), I g (x), I b (x) represent the original red, green, and blue channels, respectively, tr (x), I tg (x), I tb (x) represents the red, green, and blue channels after compensation, α, β, and χ are the compensation scales, and α·I r (x), β·I g (x), χ·I b (x) represents the compensation amount of the red channel, green channel, and blue channel respectively, and n is the number of compensation times.
[0021] Optionally, S2 is specifically:
[0022] S21, analyzing the statistical histograms of the corrected images of the red, green and blue channels, and screening out the non-zero parts as a processing basis;
[0023] S22, taking the average value of the local maximum value in the calculated histogram as a threshold, and correcting the histogram according to the threshold:
[0024]
[0025] In the formula, I(i) tc 、I(i) c and T represent the original channel value, the corrected channel value and the threshold value, respectively;
[0026] S23, calculating the cumulative histogram to reasonably allocate new gray values, using the mapping relationship to replace the gray values of the original image by table lookup, and expanding the dynamic range of the RGB three channels.
[0027] Optionally, the CLAHE algorithm is used in S3 to improve the image contrast as follows:
[0028] The CLAHE algorithm divides the image into multiple small blocks, performs local histogram equalization on each small block, limits the range of contrast enhancement, and finally merges the processing results into the final image through bilinear interpolation. The CLAHE algorithm is used to enhance the brightness channel of the image, improve the local contrast of the image, and enhance the overall visual effect of the image.
[0029] Optionally, the GUM algorithm enhancement details used in S3 are as follows:
[0030] Firstly, the image is divided into model component and residual, and the model component and residual are processed separately to enhance contrast and clarity. Secondly, the edge-preserving filter is used to reduce the halo effect. Then, the logarithmic ratio and tangent operation are used to solve the out-of-bounds problem. After that, the overall contrast is enhanced by adaptive histogram equalization, and the residual component is processed by adaptive gain function to enhance the details. Finally, the enhanced model component and residual component are merged to obtain the enhanced output image. The GUM algorithm processing highlights the texture detail information of underwater images.
[0031] Optionally, S3 uses a gamma correction algorithm to improve local brightness as follows:
[0032] Apply the adaptive gamma correction algorithm to the brightness channel, and the brightness V after correction of the original brightness channel 1 (x,y) is:
[0033] V t (x,y)=255-(255-V(x,y)) δ
[0034]
[0035] Where V(x,y) represents the original brightness, δ represents the adaptive factor, ρ represents the number of pixels with a value lower than 50, and s represents the total number of pixels. The adaptive gamma correction algorithm adjusts the brightness value through nonlinear transformation, reduces the local overbrightness, enhances the brightness of the dark area, and improves the overall image quality.
[0036] Optionally, S4 is specifically:
[0037] S41, respectively calculating the brightness weights of the contrast-improved image, the detail-enhanced image, and the local brightness-improved image, the brightness weight calculation formula being:
[0038]
[0039] Where W G (x,y) is the brightness weight, V k (x,y) represents the kth input V component;
[0040] S42, normalizing the brightness weights of the contrast-improved image, the detail-enhanced image, and the local brightness-improved image to obtain a normalized weight map;
[0041] S43, using an image pyramid method to decompose the normalized weight map into a Gaussian pyramid, and decompose the brightness into a Laplacian pyramid for fusion;
[0042] S44. The Gaussian pyramid and the Laplacian pyramid are fused by a multi-scale fusion algorithm to obtain the fused brightness, which is expressed as:
[0043]
[0044] Where V t (x,y) represents the output, G i {W G (x,y)} represents the i-th level Gaussian pyramid of the normalized weight map; L i {V k (x,y)} represents the i-th level Laplacian pyramid of normalized brightness.
[0045] It can be seen from the above technical solutions that, compared with the prior art, the present invention provides an underwater image enhancement method based on color channel unit compensation, which has the following beneficial effects:
[0046] 1. Color cast correction: Through the improved color compensation method, the color cast of underwater images is effectively corrected, making the color restoration more natural and improving the authenticity of the image;
[0047] 2. Contrast enhancement: The CLAHE algorithm is used to improve the local contrast of the image, while avoiding the overbrightness caused by global contrast enhancement, thus improving the overall visual effect of the image;
[0048] 3. Detail enhancement: The texture detail information of the image is enhanced through the GUM algorithm, making the details of the underwater image more prominent and improving the clarity of the image;
[0049] 4. Local brightness improvement: Adaptive Gamma correction algorithm is applied to effectively reduce the local over-brightness phenomenon, enhance the brightness of dark areas, and improve the overall image quality;
[0050] 5. Multi-scale fusion: By fusing image features at different scales, the information content of the image is enriched and the exposure appearance and visual quality of the image are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0052] Figure 1 It is a flow chart of the multi-scale fusion underwater image enhancement method of the present invention;
[0053] Figure 2 This is a schematic diagram of a first atmospheric scene image in an embodiment of the present invention;
[0054] Figure 3 is a histogram of the first atmospheric scene image in an embodiment of the present invention;
[0055] Figure 4 is a schematic diagram of a second atmospheric scene image in an embodiment of the present invention;
[0056] Figure 5 is a histogram of the second atmospheric scene image in an embodiment of the present invention;
[0057] Figure 6 Schematic diagram of a first underwater color-shifted image in an embodiment of the present invention;
[0058] Figure 7 is a histogram of the first underwater color-shifted image in an embodiment of the present invention;
[0059] Figure 8 Schematic diagram of a second underwater color-shifted image in an embodiment of the present invention;
[0060] Fig. 9 is a histogram of a second underwater color-shifted image in an embodiment of the present invention;
[0061] Fig.10is an original image of the third underwater color-shifted image in an embodiment of the present invention;
[0062] Fig.11 is a color correction image of a third underwater color-shifted image in an embodiment of the present invention;
[0063] Fig.12 is a dynamically expanded histogram of the third underwater color-shifted image in an embodiment of the present invention;
[0064] Fig.13 is a histogram of an original image of a third underwater color-shifted image in an embodiment of the present invention;
[0065] Fig.14 is a histogram of a color correction image of a third underwater color cast image in an embodiment of the present invention;
[0066] Fig.15 is a histogram of a dynamic expansion graph of a third underwater color-shifted image histogram in an embodiment of the present invention;
[0067] Fig.16 Schematic diagram of a fourth underwater color-shifted image in an embodiment of the present invention;
[0068] Fig.17 is a color correction image of a fourth underwater color-shifted image in an embodiment of the present invention;
[0069] Fig.18 Schematic diagram of a fifth underwater color-shifted image in an embodiment of the present invention;
[0070] Fig.19 4 is a color correction image of the fifth underwater color shift image in an embodiment of the present invention. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0072] The embodiment of the present invention discloses an underwater image enhancement method based on color channel unit compensation amount, such as Figure 1 As shown, the following steps are included:
[0073] S1. Using a color channel compensation method with a unit compensation amount, respectively compensate the attenuated red, green and blue channels of the underwater image, correct the color deviation, and obtain corrected images of the three channels;
[0074] S2, respectively performing adaptive platform histogram equalization on the corrected images of the red, green and blue channels to achieve grayscale expansion and redistribution of pixel values;
[0075] S3, for the brightness channel, use the CLAHE algorithm to improve image contrast, use the GUM algorithm to enhance details, and use the Gamma correction algorithm to improve local brightness;
[0076] S4, performing multi-scale fusion on the contrast-improved image, the detail-enhanced image and the local brightness-improved image to obtain a final output enhanced image.
[0077] Furthermore, S1 is specifically:
[0078] S11. Use the percentage of the original value of each pixel of the original image as the unit compensation amount to compensate the original red light:
[0079] I tr (x) = I r (x)+[α·I r (x)]·n
[0080] S12, using the percentage of the original value of each pixel of the original image as the unit compensation amount to compensate the original green light:
[0081] I tg (x) = I g (x)+[β·I g (x)]·n
[0082] S13, using the percentage of the original value of each pixel of the original image as the unit compensation amount to compensate the original blue light:
[0083] I tb (x) = I b (x)+[χ·I b (x)]·n
[0084] In the formula, I r (x), I g (x), I b (x) represent the original red, green, and blue channels, respectively, tr (x), I tg (x), I tb (x) represents the red, green, and blue channels after compensation, α, β, and χ are the compensation scales, and α·I r (x), β·I g (x), χ·I b (x) represents the compensation amount of the red channel, green channel, and blue channel respectively, and n is the number of compensation times.
[0085] In complex underwater environments such as turbidity or rich organisms, the light in the red band decays rapidly, and the blue band is also greatly affected. However, the attenuation of the green band is relatively small. And the influence of water on the red light of each pixel in the entire image is the same, so the percentage of the original value of each pixel in the original image is used as the unit compensation amount to compensate for the original red light; the green channel and the blue channel still have different degrees of attenuation when propagating underwater, and also lose some color information. Similarly, the original green channel and blue channel are compensated.
[0086] The grayscale world hypothesis states that under natural lighting conditions, the average reflectance of the entire scene is equal in the RGB color channels. Based on this hypothesis, for an image containing multiple colors, the average values of its R, G, and B color channels tend to a common grayscale value. For example, Figure 2 and Figure 4 are the first atmospheric scene image and the second atmospheric scene image, Figure 3 and Figure 5 As the corresponding histogram, it can be seen that the mean values of the three channels R, G, and B of the high-quality atmospheric scene images are similar, and their grayscale value trends have a very strong correlation, indicating that the R, G, and B channels contain each other's color information. Figure 6 and Figure 8 are the first underwater color-shifted image and the second underwater color-shifted image, Figure 7 and Fig. 9 The corresponding histogram shows that in the underwater environment, due to the absorption and scattering of water bodies and the interference of various suspended particles and plankton, the R, G, and B channels of the underwater image suffer different degrees of loss, and the red channel suffers the most serious loss. Due to these losses, it is difficult to observe the grayscale value trend and correlation of the R, G, and B channels of the underwater degraded image histogram, and the mean values of the three channels are very different, which has deviated from the grayscale world hypothesis. From the comparison of the histograms of high-quality atmospheric scene images and underwater color-shifted images, it is found that the R, G, and B of the former have a wider dynamic distribution range, while the latter have a smaller dynamic distribution range.
[0087] Furthermore, S2 is specifically:
[0088] S21, analyzing the statistical histograms of the corrected images of the red, green and blue channels, and screening out the non-zero parts as a processing basis;
[0089] S22, taking the average value of the local maximum values in the calculated histogram as a threshold, and correcting the histogram according to the threshold:
[0090]
[0091] In the formula, I(i) tc 、I(i) cand T represent the original channel value, the corrected channel value and the threshold value, respectively;
[0092] S23, calculating the cumulative histogram to reasonably allocate new gray values, using the mapping relationship to replace the gray values of the original image by table lookup, and expanding the dynamic range of the RGB three channels.
[0093] Fig.10 , Fig.11 , Fig.12 They are respectively an original image, a color-corrected image, and a histogram dynamically expanded image of the third underwater color-shifted image in an embodiment of the present invention, Fig.13 , Fig.14 , Fig.15 They are the corresponding histograms respectively; it can be seen that after the color correction algorithm is used to correct the original image, the colors of the three channels of R, G, and B are increased, and the average values of the three channels are also improved. After the adaptive platform histogram equalization algorithm expands the histogram distribution range, it can be seen that the histogram is more dispersed and the distribution is more uniform, and the mean values of the three channels are more in line with the grayscale world hypothesis.
[0094] Fig.16 , Fig.18 are respectively original images of the fourth underwater color patch image and the fifth underwater color patch image in the embodiment of the present invention, Fig.17 , Fig.19 The corresponding color correction effect diagrams are shown respectively. It can be seen that the color correction algorithm in the embodiment of the present invention can effectively remove color cast, restore the original color of the image, and retain the texture details of the image. Therefore, the color correction algorithm proposed in the embodiment of the present invention can effectively remove color cast, and is conducive to the effects of subsequent contrast enhancement, detail highlighting, local brightness improvement and multi-scale fusion algorithms.
[0095] Furthermore, the CLAHE algorithm is used in S3 to improve the image contrast as follows:
[0096] Traditional histogram equalization algorithms easily lead to excessive image contrast and overbrightness in local areas due to the global contrast enhancement method. The CLAHE algorithm divides the image into multiple small blocks, performs local histogram equalization on each small block, limits the range of contrast enhancement, and finally merges the processing results into the final image through bilinear interpolation. The CLAHE algorithm is used to enhance the brightness channel of the image, improve the local contrast of the image, and enhance the overall visual effect of the image.
[0097] In the embodiment of the present invention, the CLAHE algorithm effectively improves the image contrast and enhances the visual effect, but the edge detail information needs to be further highlighted.
[0098] Furthermore, the GUM algorithm is used in S3 to enhance the details as follows:
[0099] Firstly, the image is divided into model component and residual, and the model component and residual are processed separately to enhance contrast and clarity. Secondly, the edge-preserving filter is used to reduce the halo effect. Then, the logarithmic ratio and tangent operation are used to solve the out-of-bounds problem. After that, the overall contrast is enhanced by adaptive histogram equalization, and the residual component is processed by adaptive gain function to enhance the details. Finally, the enhanced model component and residual component are merged to obtain the enhanced output image. The GUM algorithm processing highlights the texture detail information of underwater images.
[0100] Furthermore, the gamma correction algorithm used in S3 to improve local brightness is as follows:
[0101] Apply the adaptive gamma correction algorithm to the brightness channel, and the brightness V after correction of the original brightness channel 1 (x,y) is:
[0102] V t (x,y)=255-(255-V(x,y))δ
[0103]
[0104] Where V(x,y) represents the original brightness, δ represents the adaptive factor, ρ represents the number of pixels with a value lower than 50, and s represents the total number of pixels. The adaptive gamma correction algorithm adjusts the brightness value through nonlinear transformation, reduces the local overbrightness, enhances the brightness of the dark area, and improves the overall image quality.
[0105] Underwater degraded images have overbright and overdark areas. However, while the platform histogram equalization expands the dynamic range of the RGB three channels and enhances the image contrast, it will lead to over-enhancement of some overbright and overdark areas and loss of some information. Therefore, the adaptive gamma correction algorithm is used to solve the above problem. For images of underwater scenes with uneven illumination, the adaptive gamma correction adjusts the brightness value through nonlinear transformation, effectively reducing the local overbrightness, enhancing the brightness of dark areas, and improving the overall image quality.
[0106] Furthermore, S4 is specifically:
[0107] S41, respectively calculating the brightness weights of the contrast-improved image, the detail-enhanced image, and the local brightness-improved image, the brightness weight calculation formula being:
[0108]
[0109] Where W G (x, y) is the brightness weight, V k (x,y) represents the kth input V component;
[0110] S42, normalizing the brightness weights of the contrast-improved image, the detail-enhanced image, and the local brightness-improved image to obtain a normalized weight map;
[0111] S43, using an image pyramid method to decompose the normalized weight map into a Gaussian pyramid, and decompose the brightness into a Laplacian pyramid for fusion;
[0112] S44. The Gaussian pyramid and the Laplacian pyramid are fused by a multi-scale fusion algorithm to obtain the fused brightness, which is expressed as:
[0113]
[0114] Where V t (x,y) represents the output, G i {W G (x,y)} represents the i-th level Gaussian pyramid of the normalized weight map; L i {V k (x,y)} represents the i-th level Laplacian pyramid of normalized brightness.
[0115] The image multi-scale fusion algorithm extracts feature information from multiple images of the same scene and fuses this information into the same image to enrich its information content. In the embodiment of the present invention, multi-scale fusion is performed only on the brightness channel in the HSV color space. Generally, a high-quality image should not be too bright or too dark. When the mean value is approximately equal to 0.5 and the mean value of the standard deviation is approximately equal to 0.25, the pixel tends to have a high exposure appearance.
[0116] Furthermore, in order to verify the performance of the image enhancement method in the embodiment of the present invention, the method is compared with Fusion (color balance and fusion for underwater image enhancement), MSRCR (multi-scale retinex with color restoration), L 2 UWE (low-light underwater image enhancer), IBLA (image blurriness and light absorption), automatic red-channel compensation algorithm (automatic red-channel underwater image restoration), and UDCP algorithm were compared and the experimental results were carefully analyzed and comprehensively evaluated using visual evaluation and objective evaluation methods.
[0117] The original image has low brightness, low contrast and color cast. Although the Fusion algorithm has a good defogging effect, some images still have color cast that cannot be improved. Although MSRCR enhances the contrast, it introduces too much red and produces a new color cast. 2 Although the UWE algorithm enhances contrast and brightness, it does not improve color deviation ideally. Some parts are too bright, resulting in poor visual effects. The IBLA algorithm enhances contrast and brightness. 2 The UWE algorithm has improved the color cast, but it is not as good as expected, and there are some dark areas in some areas. The automatic red channel compensation algorithm and the UDCP algorithm have improved the image contrast, but failed to effectively correct the image color cast, and even aggravated the color distortion. The image is dark as a whole, and the dark details are seriously lost. The image enhancement method proposed in the embodiment of the present invention shows more superior performance in color correction, contrast and detail enhancement, and local brightness adjustment. The color restoration is closer to nature, which significantly improves the image visibility.
[0118] The objective evaluation indicators UCIQE, UIQM and average brightness of the 10 images processed by the above algorithm are calculated respectively, and the calculation results are shown in Table 1, Table 2 and Table 3. It can be seen from Table 1, Table 2 and Table 3 that the average UCIQE, average UIQM and average IE of the algorithm in this paper are the best, indicating that the underwater image enhanced by the image enhancement method proposed in the embodiment of the present invention has certain advantages in color correction, contrast, clarity and image average information content. In summary, the underwater image processed by the image enhancement method proposed in the embodiment of the present invention can effectively correct color cast, enhance contrast and details, improve local over-brightness and over-darkness areas, and has a good underwater image enhancement effect.
[0119] Table 1 Underwater color image quality evaluation (UCIQE)
[0120]
[0121] Table 2 Underwater image quality measurement (UIQM)
[0122]
[0123] Table 3 Average brightness
[0124]
[0125]
[0126] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0127] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An underwater image enhancement method based on color channel unit compensation, characterized in that: The following steps are involved: S1. Using a color channel compensation method with a unit compensation amount, respectively compensate the attenuated red, green and blue channels of the underwater image to correct the color deviation and obtain corrected images of the three channels; S2, respectively performing adaptive platform histogram equalization on the corrected images of the red, green and blue channels to achieve grayscale expansion and redistribution of pixel values; S3, for the brightness channel, use the CLAHE algorithm to improve image contrast, use the GUM algorithm to enhance details, and use the Gamma correction algorithm to improve local brightness; S4, performing multi-scale fusion on the contrast-improved image, the detail-enhanced image and the local brightness-improved image to obtain a final output enhanced image.
2. The underwater image enhancement method based on color channel unit compensation according to claim 1, characterized in that: S1 is specifically: S11. Use the percentage of the original value of each pixel of the original image as the unit compensation amount to compensate the original red light: I tr (x)=I r (x)+[α·I r (x)]·n S12, using the percentage of the original value of each pixel of the original image as the unit compensation amount to compensate the original green light: I tg (x)=I g (x)+[β·I g (x)]·n S13, using the percentage of the original value of each pixel of the original image as the unit compensation amount to compensate the original blue light: I tb (x)=I b (x)+[χ·I b (x)]·n In the formula, I r (x), I g (x), I b (x) represent the original red, green, and blue channels, respectively, tr (x), I tg (x), I tb (x) represents the red, green, and blue channels after compensation, α, β, and χ are the compensation scales, and α·I r (x), β·I g (x), χ·I b (x) represents the compensation amount of the red channel, green channel, and blue channel respectively, and n is the number of compensation times.
3. The underwater image enhancement method based on color channel unit compensation according to claim 1, characterized in that: S2 is specifically: S21, analyzing the statistical histograms of the corrected images of the red, green and blue channels, and screening out the non-zero parts as a processing basis; S22, taking the average value of the local maximum value in the calculated histogram as a threshold, and correcting the histogram according to the threshold: In the formula, I(i) tc 、I(i) c and T represent the original channel value, the corrected channel value and the threshold value, respectively; S23, calculating the cumulative histogram to reasonably allocate new gray values, using the mapping relationship to replace the gray values of the original image by table lookup, and expanding the dynamic range of the RGB three channels.
4. The underwater image enhancement method based on color channel unit compensation according to claim 1, characterized in that: The CLAHE algorithm used in S3 to improve image contrast is as follows: The CLAHE algorithm divides the image into multiple small blocks, performs local histogram equalization on each small block, limits the range of contrast enhancement, and finally merges the processing results into the final image through bilinear interpolation. The CLAHE algorithm is used to enhance the brightness channel of the image, improve the local contrast of the image, and enhance the overall visual effect of the image.
5. The underwater image enhancement method based on color channel unit compensation according to claim 1, characterized in that: The details of using the GUM algorithm to enhance S3 are as follows: Firstly, the image is divided into model component and residual, and the model component and residual are processed separately to enhance contrast and clarity. Secondly, the edge-preserving filter is used to reduce the halo effect. Then, the logarithmic ratio and tangent operation are used to solve the out-of-bounds problem. After that, the overall contrast is enhanced by adaptive histogram equalization, and the residual component is processed by adaptive gain function to enhance the details. Finally, the enhanced model component and residual component are merged to obtain the enhanced output image. The GUM algorithm processing highlights the texture detail information of underwater images.
6. The underwater image enhancement method based on color channel unit compensation according to claim 1, characterized in that: The gamma correction algorithm used in S3 to improve local brightness is as follows: Applying the adaptive gamma correction algorithm to the brightness channel, the brightness V1(x,y) of the original brightness channel after correction is: V t (x,y)=255-(255-V(x,y)) δ Where V(x,y) represents the original brightness, δ represents the adaptive factor, ρ represents the number of pixels with a value lower than 50, and s represents the total number of pixels. The adaptive gamma correction algorithm adjusts the brightness value through nonlinear transformation, reduces the local overbrightness, enhances the brightness of the dark area, and improves the overall image quality.
7. The underwater image enhancement method based on color channel unit compensation according to claim 1, characterized in that: S4 is specifically: S41, respectively calculating the brightness weights of the contrast-improved image, the detail-enhanced image, and the local brightness-improved image, the brightness weight calculation formula being: Where W G (x,y) is the brightness weight, V k (x,y) represents the kth input V component; S42, normalizing the brightness weights of the contrast-improved image, the detail-enhanced image, and the local brightness-improved image to obtain a normalized weight map; S43, using an image pyramid method to decompose the normalized weight map into a Gaussian pyramid, and decompose the brightness into a Laplacian pyramid for fusion; S44. The Gaussian pyramid and the Laplacian pyramid are fused by a multi-scale fusion algorithm to obtain the fused brightness, which is expressed as: Where V t (x,y) represents the output, G i {W G (x,y)} represents the i-th level Gaussian pyramid of the normalized weight map; L i {V k (x,y)} represents the i-th level Laplacian pyramid of normalized brightness.
Citation Information
Cited By
Method and system for enhancing microscopic image of zooplankton based on optical density reconstruction
CN121073849A
Underwater image enhancement and color correction method and system for railway bridge structure
CN121258799A
Railway bridge structure underwater image enhancement and color correction method and system
CN121258799B