Self-adaptive underwater image enhancement system and method suitable for medium-deep water turbid scene

Through adaptive color channel compensation, improved histogram stretching and CLAHE algorithm combined with image pyramid technology, the problem of color distortion and low contrast of underwater images in medium and deep sea environments is solved, and efficient and automatic image enhancement effect is achieved.

CN120451027AActive Publication Date: 2025-08-08CHINA UNIV OF PETROLEUM (EAST CHINA)

Patent Information

Application Number
CN202510567239.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-08
Estimated Expiration
2045-04-30

AI Technical Summary

Technical Problem

The prior art is difficult to effectively solve the problems of color distortion, low contrast and blur caused by light attenuation and scattering in medium and deep-sea environments, and traditional algorithms rely on manual parameter adjustment and are inefficient and difficult to generalize.

Method used

The adaptive color channel compensation formula is used to automatically optimize the compensation parameters with the particle swarm optimization algorithm, and the improved histogram double-ended stretching and CLAHE algorithm are used to enhance global and local contrast, and multi-scale fusion is achieved through image pyramid technology.

Benefits of technology

It significantly improves the color shift problem of underwater images, improves the global and local contrast of the image, retains detailed information, improves the structural similarity and visual effect of the image, and does not require manual preset parameters to adapt to underwater scenes of different depths and turbidity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451027A_ABST
    Figure CN120451027A_ABST
Patent Text Reader

Abstract

The invention relates to a self-adaptive underwater image enhancement system and method suitable for medium-deep water turbid scenes, and belongs to the technical field of underwater image enhancement. Comprising the following steps: S1, selecting a reference channel based on RGB channel pixel mean value distribution of an underwater image, performing adaptive color compensation on an attenuation channel, and automatically optimizing compensation parameters through a particle swarm optimization algorithm; s2, global contrast enhancement and local contrast enhancement are carried out on the image after color compensation, the global contrast enhancement adopts an improved histogram double-end stretching method, and the local contrast enhancement adopts a CLAHE algorithm combined with guiding filtering noise reduction; and S3, performing multi-scale fusion on the global contrast enhancement result and the local contrast enhancement result based on an image pyramid technology, and generating a final enhanced image through weight distribution and layered reconstruction. A self-adaptive color channel compensation formula is provided, and self-adaptive color compensation is performed on channels which are easy to attenuate, so that the problem of color cast is solved, and the visual effect of an image is remarkably improved. By further enhancing the contrast and improving the texture of the underwater image after the color cast is improved and utilizing an image pyramid technology to realize multi-scale fusion, the problems of blurring and low contrast caused by underwater scattering particles in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an adaptive underwater image enhancement system and method suitable for medium-deep water turbidity scenes, belonging to the technical field of underwater image enhancement. Background Art

[0002] With the rapid development of marine information processing technology, underwater optical imaging technology has shown great advantages in underwater intelligent operations and has been widely used in the fields of marine resource development, seabed engineering surveys, marine ranch construction, and marine military. Unlike land images, underwater images are often accompanied by obvious light attenuation problems during light propagation due to the influence of the complex marine environment. On the one hand, due to the selective absorption effect of the water medium on different spectral regions, the collected underwater images usually show color distortion. On the other hand, the large number of suspended particles in the seawater will scatter light, resulting in reduced image contrast, blurred texture and distortion. Specifically:

[0003] Light attenuation and color cast issues:

[0004] The selective absorption of light of different wavelengths by water results in severe color distortion. For example, red light (long wavelengths) rapidly attenuates in shallow and medium waters, causing the image to appear bluish-green. Meanwhile, in deep waters, blue light (short wavelengths) has enhanced penetration, resulting in an overall bluish image. Furthermore, suspended particles in turbid water exacerbate shortwave scattering, further disrupting color balance. This makes traditional algorithms based on fixed wavelength compensation (such as gamma correction and histogram equalization) unsuitable for the changing deep-sea environment.

[0005] Scattering effects and contrast degradation:

[0006] Suspended particles and microorganisms in seawater scatter light, causing image blur and loss of detail. Existing methods, such as the Dark Channel Prior (DCP), remove haze by estimating transmittance. However, the uneven illumination and color decay of underwater scenes lead to transmittance estimation errors, which can easily lead to color oversaturation and localized distortion after restoration.

[0007] Artificial dependencies and lack of generalization:

[0008] Current mainstream algorithms (such as the transmittance-based UDCP and the integrated color model (ICM)) rely on manually preset parameters (such as attenuation coefficient and scattering intensity), requiring repeated adjustments when turbidity or depth changes, resulting in low efficiency and difficulty in generalization. For example, tests on the UIEBD dataset show that traditional algorithms generally achieve PSNR values below 15dB and SSIM values below 0.6, which cannot meet the real-time processing requirements of underwater intelligent equipment.

[0009] Although some studies have attempted to introduce adaptive mechanisms (such as unsupervised color correction (UCM)), these are designed only for a single type of degradation and do not comprehensively consider the coupled effects of color cast, contrast, and noise. As a result, the restored images still suffer from blurred details or artifacts. Therefore, there is an urgent need for an adaptive, fully automatic underwater image enhancement technology that can dynamically adjust the processing flow based on the image's inherent characteristics to address the complex and changing imaging challenges of the mid- and deep-sea waters. Summary of the Invention

[0010] The purpose of this invention is to propose an adaptive underwater image enhancement system and method suitable for turbid scenes at medium depths. Addressing the inherent color distortion of underwater images, an adaptive color channel compensation formula is proposed. This adaptive color compensation is performed on channels prone to attenuation, thereby improving color cast and significantly enhancing the visual quality of the image. Furthermore, by further enhancing contrast and texture on the color-corrected underwater images and utilizing image pyramid technology for multi-scale fusion, the system addresses the blurring and low contrast issues inherent in existing techniques caused by underwater scattering particles.

[0011] The adaptive underwater image enhancement method for deep-water turbidity scenes according to the present invention comprises the following steps:

[0012] S1: Based on the mean distribution of RGB channel pixels in underwater images, a reference channel is selected, adaptive color compensation is performed on the attenuation channel, and the compensation parameters are automatically optimized using the particle swarm optimization algorithm;

[0013] S2: performing global contrast enhancement and local contrast enhancement on the color-compensated image, wherein the global contrast enhancement adopts an improved histogram double-end stretching method, and the local contrast enhancement adopts a CLAHE algorithm combined with guided filtering noise reduction;

[0014] S3: Based on the image pyramid technology, the global contrast enhancement results and the local contrast enhancement results are multi-scale fused, and the final enhanced image is generated through weight distribution and hierarchical reconstruction.

[0015] Preferably, the specific steps of adaptive color compensation in step S1 include:

[0016] S11: Crop the pixels at both ends of each channel of the image to exclude outliers and calculate the mean of the remaining pixels;

[0017] S12: determining a reference channel, a slightly attenuated channel, and a heavily attenuated channel according to the mean value, and selecting the channel with the largest pixel mean value as the reference channel;

[0018] S13: Perform color compensation on the lightly attenuated channel and the heavily attenuated channel using the sigmoid function, and optimize the compensation factor using the particle swarm optimization algorithm;

[0019] S14: Based on the improved grayscale world hypothesis, the compensated channels are corrected twice to make the mean values of the pixels in each channel equal.

[0020] The color compensation formula is:

[0021]

[0022] in:

[0023]

[0024] Where, represents the pixel mean of the reference channel, and Represent the pixel mean of the lightly attenuated channel and the heavily attenuated channel, It is used to measure the difference between the slightly attenuated channel and the reference channel to compensate the attenuated channel based on the reference channel. α and β represent two compensation factors, which are automatically optimized by the particle swarm optimization algorithm.

[0025] The particle swarm optimization algorithm PSO is used to automatically optimize the parameters α and β. The formula is as follows:

[0026]

[0027] In the formula (4), the objective function set in PSO is shown as: and are the pixel means of the lightly attenuated channel and the heavily attenuated channel after color compensation, respectively. The optimal values of α and β are found by using PSO.

[0028] The secondary correction of the compensated channel in step S14 specifically includes the following: further improving the classic grayscale world hypothesis, it is believed that the restored underwater image should satisfy the equality of the pixel mean of each channel and equal to the channel pixel mean, as shown in the following formula:

[0029]

[0030] Where, are the pixel means of the red channel, green channel, and blue channel, respectively. Based on the improved grayscale world hypothesis, the underwater image after color compensation is corrected. The correction formula is as follows:

[0031]

[0032] Where, I c is the channel pixel value of the underwater image, is the pixel mean of the channel, is the channel pixel mean of the image, I′ c The channel pixel values are corrected and the visual effect of underwater images is further improved after the improved gray-scale world hypothesis correction.

[0033] The improved histogram double-end stretching method in step S2 includes:

[0034] S21: determining a segmentation point according to the average of the pixel mean and the pixel median, and dividing the histogram into a dark area and a bright area;

[0035] S22: Use segmented stretching to map dark areas to an extended high brightness range, and linear stretching to preserve details in bright areas.

[0036] S23: Fusing the dark area and bright area stretching results according to preset weights.

[0037] The calculation formula of the split point is:

[0038]

[0039] Where I represents any underwater image, mean(I) is the pixel mean, and median(I) is the pixel median;

[0040] The segmentation point divides the pixel histogram distribution of image I into two parts: dark area histogram and bright area histogram. The dark area histogram and bright area histogram after segmentation are stretched according to formula (8) and formula (9), respectively, as shown below:

[0041]

[0042] Where, I in is the input pixel, I dark and I light are the output pixels of the dark area and the output pixels of the bright area after stretching, I min is the minimum pixel value of the histogram, I max is the maximum pixel value of the histogram, I seg is the pixel value at the segmentation point; through the above histogram stretching formula, the dark area of the original underwater image is mapped to [I min , 255], the bright area is mapped to [0, 255], and finally, the dark area and bright area histograms are added according to the weights to obtain the final global contrast enhanced image;

[0043] I gc =0.5*I dark +0.5*I light (10).

[0044] Preferably, the weights of multi-scale fusion in step S3 include:

[0045] Laplacian weights, local contrast weights, saliency weights, and exposure weights.

[0046] Preferably, the weights of each weight map are calculated in the order of Laplacian weight, local contrast weight, saliency weight, and exposure weight. After the weights are normalized, the underwater image is first decomposed using a Gaussian pyramid, with filtering and downsampling operations performed step by step. The Laplacian pyramid is then used to reconstruct the decomposed layers in sequence to obtain the final restored image.

[0047] The adaptive underwater image enhancement system for deep-water turbidity scenes of the present invention comprises:

[0048] The color compensation module is used to select a reference channel based on the mean distribution of RGB channel pixels in the underwater image, perform adaptive color compensation on the attenuation channel, and integrate the particle swarm optimization algorithm to automatically optimize the compensation parameters;

[0049] A contrast enhancement module includes a global contrast enhancement unit and a local contrast enhancement unit. The global contrast enhancement unit adopts an improved histogram double-end stretching method, and the local contrast enhancement unit adopts a CLAHE algorithm combined with guided filtering for noise reduction.

[0050] The multi-scale fusion module is used to perform weight distribution and hierarchical reconstruction of global and local contrast enhancement results based on image pyramid technology to generate the final enhanced image.

[0051] The adaptive underwater image enhancement system and method of the present invention, which is applicable to turbid scenes in medium and deep water, has the following beneficial effects:

[0052] (1) Adaptive color compensation and color cast correction

[0053] The adaptive color channel compensation formula proposed in the present invention dynamically analyzes the mean distribution of RGB channel pixels of underwater images, selects a reference channel and introduces a sigmoid function for nonlinear compensation, effectively solving the color cast problem caused by spectral selective absorption and suspended particle scattering. For example, in turbid scenes (yellow-green bias), the compensation amounts of the red and blue light channels are increased to 1.5-2 times the original values, respectively, reducing the chromaticity error of the repaired image. Combined with the improved grayscale world hypothesis, after the mean values of the pixels in each channel are equalized, the image saturation (UCIQE) is increased to 0.671, which is significantly better than the traditional algorithm (DCP is only 0.489), making the color restoration of underwater targets closer to the real scene.

[0054] (2) Complementary enhancement of global and local contrast

[0055] By integrating the improved histogram double-end stretching and CLAHE algorithm, the present invention retains local details while improving global contrast. The improved histogram stretching method divides the dark area / bright area by the segmentation point (the average of the pixel mean and the median), maps the dark area to the high brightness range, and linearly expands the bright area to the full dynamic range, solving the problem of detail loss caused by traditional stretching. Experiments show that after global contrast enhancement, the PSNR value of the underwater image reaches 23.089dB, which is nearly 3 times higher than that of DCP (8.577dB). In local contrast enhancement, CLAHE is combined with guided filtering noise reduction to improve the edge clarity (SSIM) to 0.897, and the information entropy (Entropy) reaches 7.825, indicating that the image texture information is richer.

[0056] (3) Multi-scale fusion and detail preservation

[0057] The multi-scale fusion framework based on the image pyramid achieves a precise fusion of global brightness balance and local details through the synergistic effect of Laplacian weights, local contrast weights, saliency weights, and exposure weights. For example, in deep water and bluish scenes, multi-scale fusion enhances the gradient intensity of the target contour while suppressing noise amplification (UIQM value reaches 1.259). Compared with a single enhancement method, the structural similarity (SSIM) of the fused image is improved by more than 20%, and the visual saliency of underwater targets (such as corals and shipwrecks) is increased to more than 95% of the reference image.

[0058] (4) Fully automatic parameter optimization and versatility improvement

[0059] By automatically optimizing the compensation factors α and β using the particle swarm optimization algorithm (PSO), the present invention can adapt to underwater scenes of different depths and turbidity without manually presetting parameters. Tests show that among 100 samples of the UIEBD dataset, the processing time of the present invention is 80% shorter than that of the manual parameter adjustment method, and the standard deviations of the PSNR and SSIM indicators are reduced to 0.8dB and 0.05, respectively, demonstrating its robustness and generalization ability. In addition, the modular system design (color compensation, contrast enhancement, multi-scale fusion) supports parallel computing and can be integrated into underwater robots or real-time imaging equipment, providing efficient solutions for scenarios such as marine resource exploration and military reconnaissance. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 This is a classic presentation of underwater images in a deep-water turbidity scene in the UIEBD dataset of this invention; (a) and (b) show the case where the optical imaging in the turbid scene is yellow-green, and (c) shows the case where the optical imaging in the deep-water environment is blue.

[0061] Figure 2RGB channel histogram distribution and corresponding channel pixel mean of underwater image in deep water turbidity scene in the present invention, wherein (a) and (b) are underwater images, pixel value histogram distribution, and corresponding channel pixel mean in turbidity scene; (c) represents underwater image, pixel value histogram distribution, and corresponding channel pixel mean in deep water scene;

[0062] Figure 3 The restoration reference images corresponding to each underwater image in the UIEBD dataset of the present invention, where (a) and (b) are underwater images, pixel value histogram distribution, and corresponding channel pixel means in turbid scenes; (c) represents underwater images, pixel value histogram distribution, and corresponding channel pixel means in deep water scenes;

[0063] Figure 4 The Sigmoid function in the present invention can perform nonlinear compensation according to its own characteristics;

[0064] Figure 5 Schematic diagram of an underwater image after color compensation and improved grayscale world hypothesis according to the present invention; wherein (a) is the original image; (b) is a schematic diagram of an underwater image after color compensation; (c) is a schematic diagram of an underwater image according to improved grayscale world hypothesis;

[0065] Figure 6 Schematic diagram of histogram division in the improved histogram stretching method of the present invention;

[0066] Figure 7 The present invention is a multi-scale fusion framework diagram based on image pyramid;

[0067] Figure 8 Schematic diagram of the results of the adaptive underwater image enhancement technology of the present invention applicable to medium-deep water turbidity scenes; wherein, (a) is the original image; (b) is the restored image; and (c) is the reference image. DETAILED DESCRIPTION

[0068] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0069] Example 1:

[0070] like Figure 1 As shown, this embodiment discloses an adaptive underwater image enhancement method applicable to deep-water turbidity scenes, comprising the following steps:

[0071] Step 1: Adaptive color channel compensation formula based on particle swarm optimization algorithm

[0072] The complex and changeable ocean environment will produce absorption and scattering reactions on the spectrum, resulting in serious color cast. Among them, red light is usually absorbed first due to its longest wavelength and attenuates most severely. In turbid scenes, a large number of suspended tiny particles will produce a strong light scattering effect. Blue light, due to its shorter wavelength, is more likely to interact with underwater particles and thus attenuate. Therefore, green light with a moderate wavelength is relatively well preserved in turbid water bodies, and underwater images in turbid scenes usually appear yellow-green. In deep water scenes, red and green light with shorter wavelengths attenuate first. At this time, blue light with the longest wavelength is relatively well preserved, and underwater images usually appear blue. In the field of underwater image enhancement, the public dataset UIEBD is extremely classic and is widely used in testing. Therefore. The present invention also conducts subsequent tests of underwater image enhancement technology based on this dataset. Figure 1 These are several typical representations of underwater images in deep-water turbidity scenes from the UIEBD dataset. (a) and (b) show the yellowish-green color of optical imaging in turbid scenes, and (c) shows the blue color of optical imaging in deep-water environments.

[0073] Generally speaking, the color characteristics of a color image are directly reflected in the pixel value distribution of each channel. Therefore, by observing the pixel histogram distribution of each channel of an underwater image, we can more intuitively see the impact of color deviation on the color characteristics of the underwater image. Figure 2 Figure 2 shows the RGB channel histogram distribution and corresponding channel pixel mean values of underwater images from deep, turbid scenes. It is clear that (a) and (b), as underwater images from turbid scenes, exhibit severe attenuation of red and blue light, and the corresponding channel pixel means are also relatively small. (c) represents an underwater image from a deep water scene. Similarly, red light is most severely attenuated, while green light exhibits some attenuation. The blue light channel pixel mean is the largest, indicating relatively intact preservation.

[0074] like Figure 3 As shown in the figure, the restoration reference images corresponding to each underwater image in the UIEBD dataset. Based on the displayed channel histogram distribution and channel pixel mean, it can be seen that in the final restoration reference image, the two channels that were originally severely attenuated have been compensated, and the channel pixel mean has also been improved compared to before attenuation. Considering that other image enhancement operations such as contrast adjustment and filtering will also cause changes in image pixel values, it can be assumed that in the step of correcting color cast, the channel with a larger pixel mean has not undergone significant attenuation, and the pixel histogram distribution of its corresponding channel is relatively intact. Based on this idea, the channel with the largest pixel mean is used as the reference channel, and the other two channels with more severe attenuation are compensated according to its pixel value distribution characteristics to correct the color cast.

[0075] According to the above content, let the channel with the largest pixel mean be I max , the light attenuation channel and the heavy attenuation channel are I midand I min , according to I max Based on the histogram distribution characteristics, the following color compensation formula is designed:

[0076]

[0077] in

[0078]

[0079] Formula (1) and formula (2) are the color compensation formulas for the two attenuation channels. represents the pixel mean of the reference channel, and Represent the pixel mean of the lightly attenuated channel and the heavily attenuated channel, It is used to measure the difference between the slightly attenuated channel and the reference channel, so as to compensate the attenuated channel based on the reference channel. In order to take into account the characteristics of the attenuated channel itself, the sigmoid function is introduced to ensure that the severely attenuated area in the attenuated channel is compensated more. Formula (3) shows the calculation process of the sigmoid function, and its schematic diagram is shown as follows: Figure 4 As shown in Figure 2, the Sigmoid function can perform nonlinear compensation based on its own characteristics, making the compensation of each pixel in the channel smoother.

[0080] Formula (1) and formula (2) are based on the color characteristics of the underwater image itself to calculate the slightly attenuated channel I mid and heavily attenuated channel I min To compensate, two compensation factors α and β are also introduced. However, the introduction of α and β increases the uncertainty and complexity of the color compensation formula to a certain extent. When correcting the color deviation of different underwater images, the optimal values of parameters α and β are often difficult to define, and manual attempts are required one by one, which is very time-consuming and laborious. Therefore, the particle swarm optimization algorithm PSO is selected to realize the automatic optimization of parameters α and β. Among many optimization algorithms, PSO has good robustness and can quickly converge to the optimal value. Formula (4) shows the objective function set in PSO:

[0081]

[0082] Where, and are the pixel means of the lightly attenuated channel and the heavily attenuated channel after color compensation, respectively. By using PSO to find the optimal values of α and β, the color compensation formula can achieve adaptive color cast correction for different underwater images. It has a good processing effect on underwater images in medium-deep turbidity scenes without any preset parameters.

[0083] In the field of image processing, the grayscale world hypothesis is widely used. This hypothesis assumes that the pixel means of the three channels of a color image should be roughly equal. In order to make the visual effect of the color-compensated underwater image more natural and further enhance the overall visual effect of the restored image, this paper further improves the classic grayscale world hypothesis and assumes that the restored underwater image should satisfy the requirement that the pixel means of each channel are equal and equal to the channel pixel mean, as shown in formula (5):

[0084]

[0085] Where, are the pixel means of the red channel, green channel, and blue channel, respectively. Based on the improved grayscale world hypothesis, the underwater image after color compensation is corrected. The correction formula is as follows:

[0086]

[0087] Where, I c is the channel pixel value of the underwater image, is the pixel mean of the channel, is the channel pixel mean of the image, I′ c is the corrected channel pixel value. After the improved grayscale world hypothesis correction, the visual effect of the underwater image is further improved. The results are as follows Figure 5 As shown, it can be seen that the underwater image after color compensation no longer presents a single color distribution, and the overall richness and saturation of the image are greatly improved. In addition, after the improved grayscale world hypothesis correction, the visualization of the image is further improved.

[0088] Step 2: Image contrast enhancement method based on CLAHE and histogram double-end stretching

[0089] After processing in step 1, the color cast problem of the underwater image is effectively improved, and the overall visual effect of the image is also enhanced. However, due to the presence of uneven lighting and scattering of suspended particles in the ocean environment, the underwater images obtained by shooting also have problems such as blurring and low contrast. Therefore, it is necessary to adopt contrast enhancement methods and filtering algorithms to improve image contrast and clarity. In terms of contrast enhancement, global contrast enhancement can adjust the entire image so that the overall brightness and contrast of the image are improved. However, relying solely on global contrast enhancement may result in the loss of local details. Therefore, the present invention adopts a fusion of global contrast enhancement and local contrast enhancement to further highlight the detail information in the image on the basis of ensuring contrast improvement, so that the texture and edges of the image are clearer, so as to achieve a more comprehensive image enhancement effect.

[0090] (1) Global contrast enhancement based on improved histogram stretching

[0091] The global contrast enhancement of an image is usually performed by histogram stretching. The traditional histogram stretching method linearly maps the pixel range of the image to [0, 255], so that the dark area pixels in the image are extended to lower values and the bright area pixels are extended to higher values, thereby improving the global contrast. However, this stretching method based on global pixel extreme values often causes problems such as noise amplification, detail loss, and color distortion. In order to circumvent the defects of the traditional histogram stretching method, the present invention makes the following improvements: first, a cutting point is selected according to the histogram distribution characteristics of the underwater image, and the original histogram is decomposed into a dark area histogram and a bright area histogram according to the cutting point, and stretched respectively, and finally added according to the weights to achieve global contrast enhancement of the underwater image. Among them, for any underwater image I, the calculation of the segmentation point is shown in formula (7):

[0092]

[0093] Here, the segmentation point is determined by both the pixel mean and pixel median of image I. Generally speaking, the pixel mean reflects the overall brightness of the image. Given the high number of outliers often found in underwater images, incorporating the pixel median, which is more robust to outliers, can more objectively reflect the actual brightness distribution center of the image.

[0094] The segmentation point divides the pixel histogram distribution of image I into two parts: dark area histogram and bright area histogram, such as Figure 6 As shown. For the segmented dark area histogram and bright area histogram, they are stretched according to formula (8) and formula (9), respectively, as shown below:

[0095]

[0096] Where, I in is the input pixel, I dark and I light are the output pixels of the dark area and the output pixels of the bright area after stretching, I min is the minimum pixel value of the histogram, I max is the maximum pixel value of the histogram, I seg is the pixel value at the segmentation point. Through the above histogram stretching formula, the dark area of the original underwater image is mapped to [I min ,255], the bright area is mapped to [0, 255], and finally, the dark area and bright area histograms are added according to the weights to obtain the final global contrast enhanced image.

[0097] I gc =0.5*I dark +0.5*I light (10)

[0098] The improved histogram stretching method balances the enhancement of dark areas and the preservation of details in bright areas, significantly improving the global contrast of underwater images while avoiding the defects of traditional image enhancement methods.

[0099] (2) Local contrast enhancement based on CLAHE and guided filtering

[0100] The present invention uses the Contrast-Limited Adaptive Histogram Equalization (CLAHE) algorithm to improve the local contrast of underwater images. CLAHE achieves a more uniform grayscale distribution by spreading the grayscale values of the image from more concentrated areas to the entire available range. The process first divides the image into multiple small blocks and performs histogram equalization on each block separately. When the histogram of a certain block exceeds a preset threshold, the excess histogram is "cropped" and the cropped portion is evenly distributed to other areas of the histogram. This processing method not only optimizes the contrast of the image, but also effectively controls the amplification of noise, thereby ensuring detail enhancement while avoiding the problem of excessive brightness.

[0101] CLAHE can capture richer image texture details by allocating brightness through the calculation of local histograms. However, CLAHE also amplifies noise while enhancing local contrast. Therefore, by combining CLAHE with filtering algorithms, underwater image noise can be further reduced and the visual effect can be significantly improved. Filtering algorithms are often used to process image noise. However, simple smoothing filters and Gaussian smoothing filters are both homogeneous filters. This type of filtering has difficulty distinguishing between noise and edge information, so it usually smoothes the texture detail information of the image when eliminating noise. Correspondingly, anisotropic filtering algorithms such as bilateral filtering and guided filtering can distinguish between noise and edges and have better noise reduction capabilities. Among them, the guided filtering algorithm is based on the idea of least squares and is calculated through box filtering and integral image technology, which reduces time complexity, has higher efficiency and faster speed. It is also the filtering algorithm adopted by the present invention.

[0102] Step 3: Multi-scale fusion framework based on image pyramid

[0103] Step 2 further enhances the image contrast based on the underwater image after color deviation correction obtained in step 1, and incorporates the guided filtering algorithm for noise reduction, significantly improving the texture clarity of the image. However, the global contrast enhancement and local contrast enhancement methods in step 2 belong to different levels of processing. Simply superimposing pixels or fusing the two results with a single weight not only fails to take into account the advantages of the two methods, but will cause partial distortion of the image. Therefore, the present invention adopts a multi-scale fusion framework based on an image pyramid, extracts multi-scale feature information from the input image, and performs fusion reconstruction to obtain a more refined fusion result. In this process, the weighted image is first input into a Gaussian pyramid for decomposition, and the image to be fused is decomposed into a Laplacian pyramid. Finally, reconstruction is performed layer by layer to ensure that the details of each layer are properly processed, thereby obtaining a clearer and more detailed fused image.

[0104] Before image fusion, it is necessary to set a weight map representing the image features. The present invention selects classic Laplace weights, local contrast weights, saliency weights and exposure weights for multi-scale fusion of underwater images. Laplace weights estimate the global contrast of an image by applying a Laplace filter to the brightness channel of each input image and taking the absolute value of the result. Local contrast weights are used to quantify the standard deviation between the brightness of each pixel in the input image and the average brightness of its neighboring area. This indicator can effectively highlight the transition area between bright and dark areas in the image. Generally speaking, Laplace weights and local contrast weights work together to accurately distinguish between bright areas, dark areas and transition areas. Saliency weights are intended to highlight target objects that are not easily noticeable in underwater environments. Exposure weights are used to evaluate the pixel assignment values with good exposure. By combining the above weights and normalizing each weight map, the comprehensive improvement effect of underwater images can be effectively improved. As Figure 7 As shown in Figure 2, a multi-scale fusion framework based on image pyramid is demonstrated.

[0105] Through steps 1 to 3, the inherent color cast, low contrast and blur of underwater images in deep and turbid water scenes have been greatly improved. Figure 8 As shown in the figure, the underwater image restoration image obtained by the underwater image enhancement technology proposed in this invention clearly shows that the restored underwater image no longer displays a single color feature. The red and blue light in the underwater image in turbid scenes (the overall image is greenish) are effectively compensated, and the red and green light in the underwater image in deep water scenes (the overall image is bluish) are also effectively enhanced. In addition, the contrast of the underwater image is further improved, and the texture detail of the image is also effectively improved. The overall image is close to the reference image in the UIEBD dataset, fully demonstrating the effectiveness of the image enhancement technology proposed in this invention.

[0106] Specific test data:

[0107] According to the technical solution of the present invention, 100 underwater images are randomly selected for testing and the average test process is as follows:

[0108] For underwater images in medium-deep turbidity scenarios, the pixel sequences of each channel are obtained and sorted in ascending order. To avoid interference from outliers, 2% of the pixels at each end are cropped. The pixel mean of each channel is calculated. A reference channel, a slightly attenuated channel, and a heavily attenuated channel are selected in order of their pixel means. The color compensation formula in step 1 of the technical solution is then used to perform color compensation on the two channels with the most severe attenuation. A PSO optimization algorithm is then used to find the optimal values of the compensation factors and . Finally, a secondary correction is performed on the color-compensated pixels using the modified grayscale world hypothesis to further enhance the visualization of the underwater image.

[0109] For the underwater image after color cast correction, the three channels of the underwater image are first expanded to obtain the pixel sequence of the entire image and sorted in ascending order. The pixel mean and pixel median are calculated to obtain the cut point. Based on the cut point, the pixel histogram is divided into a dark area histogram and a bright area histogram. Each is stretched according to the histogram stretching formula in step 2. The two histograms are added with a 50% weighting to obtain the underwater image with global contrast enhancement. In addition, the underwater image after color cast correction is subjected to CLAHE enhancement and guided filtering denoising to obtain an underwater image with enhanced local contrast and texture detail.

[0110] For the underwater image obtained above after global and local contrast enhancement, the weights of each weight map are calculated in the order of Laplacian weight, local contrast weight, saliency weight, and exposure weight. After the weights are normalized, the underwater image is first decomposed using a Gaussian pyramid, with filtering and downsampling operations performed step by step. The Laplacian pyramid is then used to reconstruct each decomposed layer in turn to obtain the final restored image.

[0111] To compare the effectiveness of the proposed adaptive underwater image enhancement technique, the test results were compared with those of classic image enhancement algorithms and underwater image enhancement algorithms proposed in recent years. The test algorithm set included an image enhancement algorithm based on a dark channel prior (DCP), a gamma correction algorithm (GC), an underwater image enhancement algorithm based on an integrated color model (ICM), a low-quality image enhancement algorithm based on unsupervised color correction (UCM), an underwater image enhancement algorithm based on transmittance estimation (UDCP), and an underwater image enhancement model based on an underwater light attenuation prior (ULAP). Furthermore, to quantitatively evaluate the effectiveness of various image enhancement algorithms on underwater image restoration, both full-reference and no-reference evaluation metrics were used for objective evaluation. The full-reference evaluation metric, which primarily includes peak signal-to-noise ratio (PSNR) and structural similarity (SSIM), is evaluated by comparing the restored underwater image with a reference image. The no-reference evaluation metric evaluates the restored underwater image using custom comprehensive metrics, including underwater image quality metric (UIQM), underwater color image quality evaluation (UCIQE), and information entropy (ENTROPY). To further demonstrate the versatility of various image enhancement algorithms, 100 underwater images were randomly selected from the UIEBD dataset for testing and averaged. The test results are shown in Tables 1 to 5.

[0112] (1) Full reference evaluation indicators

[0113] 1. Peak Signal-to-Noise Ratio (PSNR)

[0114] PSNR is a metric used to evaluate image noise and distortion. It is achieved by comparing the pixel errors and color differences between the underwater image restored by the image enhancement algorithm and the reference image. A larger PSNR value indicates less distortion in the restored underwater image, further indicating that the two images are closer in texture detail and color distribution, thus demonstrating that the enhancement algorithm has a better restoration effect. The test results based on PSNR are shown in Table 1.

[0115] Table 1 PSNR test results

[0116]

[0117] 2. Structural Similarity (SSIM)

[0118] SSIM is used to objectively evaluate the similarity between two images. It analyzes the image distortion by comparing the differences in brightness, contrast and overall structure between the underwater image restored by the image enhancement algorithm and the reference image. Specifically, SSIM is between The larger the value, the closer the brightness, contrast, and structure of the underwater image restored by the algorithm are to the reference image, thus proving the effectiveness of the image enhancement algorithm. The test results based on SSIM are shown in Table 2.

[0119] Table 2 SSIM test results

[0120]

[0121] The public dataset UIEBD provides a corresponding restored reference image for each underwater image for testing. The test results for the full-reference evaluation metrics in Tables 1 and 2 show that the adaptive underwater image enhancement algorithm proposed in this paper significantly outperforms other image enhancement algorithms in both PSNR and SSIM. This indicates that the images restored using our algorithm are generally closer to the reference restored images, fully demonstrating the excellent performance of our adaptive underwater image enhancement algorithm.

[0122] (2) No reference evaluation indicators

[0123] 1. Underwater Image Quality Metric (UIQM)

[0124] UIQM encompasses three underwater image attributes: the underwater image color metric UICM, the underwater image clarity metric UISM, and the underwater image contrast metric UIConM. This metric assesses image quality by linearly superimposing contrast, color, and clarity metrics using an underwater image degradation model. Test results based on UIQM are shown in Table 3.

[0125] Table 3 UIQM test results

[0126]

[0127]

[0128] 2. Underwater Color Image Quality Evaluation (UCIQE)

[0129] Similar to UIQM, UCIQE also uses a linear overlay approach. Using the CIE-Lab color space, which approximates human vision, it quantitatively evaluates hue, saturation, and contrast using a linear combination of hue, saturation, and contrast. These metrics quantify uneven color casts, blur, and low contrast. The UCIQE-based test results are shown in Table 4.

[0130] Table 4 UCIQE test results

[0131] Reference Image The present invention DCP GC 0.656 0.671 0.489 0.506 ICM UCM UDCP ULAP 0.538 0.629 0.465 0.495

[0132] 3. Entropy

[0133] Entropy is used to measure the amount of information contained in an image. A larger value indicates richer information, which means better visualization. The test results based on Entropy are shown in Table 5.

[0134] Table 5 Entropy test results

[0135] Reference Image The present invention DCP GC 7.768 7.825 6.126 6.459 ICM UCM UDCP ULAP 6.998 7.450 3.639 4.079

[0136] The non-reference evaluation metric quantitatively evaluates the restoration effect based on the comprehensive characteristics of the restored underwater image. The test results in Tables 3 to 5 show that the adaptive underwater image enhancement algorithm proposed in this paper significantly outperforms other image enhancement algorithms, approaching the test data of the reference image. Even in the UCIQE test results, the test results of the proposed algorithm are superior to those of the reference image, fully demonstrating the excellent restoration effect of the proposed algorithm on underwater images in medium-depth and turbid water scenes.

[0137] Example 2:

[0138] Based on Example 1, the adaptive underwater image enhancement system for deep-water turbidity scenes according to the present invention includes:

[0139] The color compensation module is used to select a reference channel based on the mean distribution of RGB channel pixels in the underwater image, perform adaptive color compensation on the attenuation channel, and integrate the particle swarm optimization algorithm to automatically optimize the compensation parameters;

[0140] A contrast enhancement module includes a global contrast enhancement unit and a local contrast enhancement unit. The global contrast enhancement unit adopts an improved histogram double-end stretching method, and the local contrast enhancement unit adopts a CLAHE algorithm combined with guided filtering for noise reduction.

[0141] The multi-scale fusion module is used to perform weight distribution and hierarchical reconstruction of global and local contrast enhancement results based on image pyramid technology to generate the final enhanced image.

[0142] This system can be deployed on underwater robots, deep-sea exploration equipment, or real-time imaging platforms. Its hardware architecture includes:

[0143] Image acquisition module: uses a high-resolution underwater camera (such as the SONY IMX585 sensor), supports RAW format image acquisition, a dynamic range of ≥120dB, and a frame rate of 30fps.

[0144] Processing unit: Equipped with NVIDIA Jetson AGX Xavier embedded GPU with built-in CUDA core for parallel computing of color compensation, contrast enhancement, and multi-scale fusion algorithms.

[0145] Storage and transmission module: Integrates a 1TB SSD solid-state drive and a 5G communication module, supporting local storage and remote transmission of real-time enhanced images.

[0146] System operation process

[0147] Input: Original image captured by underwater camera (resolution 3840×2160, bit depth 12bit).

[0148] Preprocessing: Convert to RGB format and normalize to the range of 0-255.

[0149] Color compensation: Optimize the compensation factor through PSO and output the color-corrected image (taking time ≤ 50ms).

[0150] Contrast enhancement: Global and local enhancements are processed in parallel to generate two intermediate results (total time ≤ 80ms).

[0151] Multi-scale fusion: weight calculation and pyramid fusion to output the final enhanced image (taking time ≤ 30ms).

[0152] Output: Save in JPEG format, UIQM value ≥ 1.25, meeting real-time processing requirements (total delay ≤ 160ms).

[0153] In the UIEBD dataset test, the average results of the system processing 100 images are as follows:

[0154] Table 6 UIEBD data test results

[0155]

[0156] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.

Claims

1. An adaptive underwater image enhancement method suitable for deep and turbid water scenes, characterized by: The steps include: S1: Based on the mean distribution of RGB channel pixels in underwater images, a reference channel is selected, adaptive color compensation is performed on the attenuation channel, and the compensation parameters are automatically optimized using the particle swarm optimization algorithm; S2: performing global contrast enhancement and local contrast enhancement on the color-compensated image, wherein the global contrast enhancement adopts an improved histogram double-end stretching method, and the local contrast enhancement adopts a CLAHE algorithm combined with guided filtering noise reduction; S3: Based on the image pyramid technology, the global contrast enhancement results and the local contrast enhancement results are multi-scale fused, and the final enhanced image is generated through weight distribution and hierarchical reconstruction.

2. The adaptive underwater image enhancement method for deep-water turbidity scenes according to claim 1 is characterized in that: The specific steps of the adaptive color compensation in step S1 include: S11: Crop the pixels at both ends of each channel of the image to exclude outliers and calculate the mean of the remaining pixels; S12: Determine the reference channel, the slightly attenuated channel, and the heavily attenuated channel according to the mean value, and select the channel with the largest pixel mean value as the reference channel; S13: Perform color compensation on the lightly attenuated channel and the heavily attenuated channel using the sigmoid function, and optimize the compensation factor using the particle swarm optimization algorithm; S14: Based on the improved grayscale world hypothesis, the compensated channels are corrected twice to make the mean values of the pixels in each channel equal.

3. The adaptive underwater image enhancement method for deep-water turbidity scenes according to claim 2, characterized in that: The color compensation formula is: in: Where, represents the pixel mean of the reference channel, and Represent the pixel mean of the lightly attenuated channel and the heavily attenuated channel, It is used to measure the difference between the slightly attenuated channel and the reference channel to compensate the attenuated channel based on the reference channel. α and β represent two compensation factors, which are automatically optimized by the particle swarm optimization algorithm.

4. The adaptive underwater image enhancement method for deep-water turbidity scenes according to claim 3 is characterized in that: The particle swarm optimization algorithm PSO is used to automatically optimize the parameters α and β. The formula is as follows: In the formula (4), the objective function set in PSO is shown as: and are the pixel means of the lightly attenuated channel and the heavily attenuated channel after color compensation, respectively. The optimal values of α and β are found by using PSO.

5. The adaptive underwater image enhancement method for deep-water turbidity scenes according to claim 2, characterized in that: The secondary correction of the compensated channel in step S14 specifically includes the following: further improving the classic grayscale world hypothesis, it is believed that the restored underwater image should satisfy the equality of the pixel mean of each channel and equal to the channel pixel mean, as shown in the following formula: Where, are the pixel means of the red channel, green channel, and blue channel, respectively. Based on the improved grayscale world hypothesis, the underwater image after color compensation is corrected. The correction formula is as follows: Where, I c is the channel pixel value of the underwater image, is the pixel mean of the channel, is the channel pixel mean of the image, I′ c The channel pixel values are corrected and the visual effect of underwater images is further improved after the improved gray-scale world hypothesis correction.

6. The adaptive underwater image enhancement method for deep-water turbidity scenes according to claim 1, characterized in that: The improved histogram double-end stretching method in step S2 includes: S21: determining a segmentation point according to the average of the pixel mean and the pixel median, and dividing the histogram into a dark area and a bright area; S22: Use segmented stretching to map dark areas to an extended high brightness range, and linear stretching to preserve details in bright areas. S23: The dark area and bright area stretching results are fused according to a preset weight.

7. The adaptive underwater image enhancement method for deep-water turbidity scenes according to claim 6, characterized in that: The calculation formula of the split point is: Where I represents any underwater image, mean(I) is the pixel mean, and median(I) is the pixel median; The segmentation point divides the pixel histogram distribution of image I into two parts: dark area histogram and bright area histogram. The dark area histogram and bright area histogram after segmentation are stretched according to formula (8) and formula (9), respectively, as shown below: Where, I in is the input pixel, I dark and I light are the output pixels of the dark area and the output pixels of the bright area after stretching, I min is the minimum pixel value of the histogram, I max is the maximum pixel value of the histogram, I seg is the pixel value at the segmentation point; through the above histogram stretching formula, the dark area of the original underwater image is mapped to [I min , 255], the bright area is mapped to [0, 255], and finally, the dark area and bright area histograms are added according to the weights to obtain the final global contrast enhanced image; I gc =0.5*I dark +0.5*I light (10)。 8. The adaptive underwater image enhancement method for deep-water turbidity scenes according to claim 6, characterized in that: The weights of the multi-scale fusion in step S3 include: Laplacian weights, local contrast weights, saliency weights, and exposure weights.

9. The adaptive underwater image enhancement method for deep-water turbidity scenes according to claim 8, characterized in that: The weights of each weight map are calculated in the order of Laplacian weight, local contrast weight, saliency weight, and exposure weight. After normalization, the underwater image is decomposed using a Gaussian pyramid, with filtering and downsampling operations performed step by step. The Laplacian pyramid is then used to reconstruct each layer in turn to obtain the final restored image.

10. An adaptive underwater image enhancement system suitable for deep and turbid water scenes, characterized by: The adaptive underwater image enhancement method for deep-water turbidity scenes according to any one of claims 1 to 9 is characterized in that the system comprises: The color compensation module is used to select a reference channel based on the mean distribution of RGB channel pixels in the underwater image, perform adaptive color compensation on the attenuation channel, and integrate the particle swarm optimization algorithm to automatically optimize the compensation parameters; A contrast enhancement module includes a global contrast enhancement unit and a local contrast enhancement unit. The global contrast enhancement unit adopts an improved histogram double-end stretching method, and the local contrast enhancement unit adopts a CLAHE algorithm combined with guided filtering for noise reduction. The multi-scale fusion module is used to perform weight distribution and hierarchical reconstruction of global and local contrast enhancement results based on image pyramid technology to generate the final enhanced image.

Citation Information

Patent Citations

  • Underwater image sharpening method based on adaptive transmissivity estimation

    CN110930319A

  • Particle swarm optimization method for underwater image enhancement processing

    CN111563854A

  • MSRCR transformer under-oil image enhancement method based on adaptive channel compensation and standard deviation

    CN116805288A

  • Underwater image enhancement method based on multi-stage processing

    CN116823651A

  • Image processing method and device

    CN116894795A

Cited By

  • Deep learning-based tower crane detection method and system

    CN120931658A

  • Tower crane detection method and system based on deep learning

    CN120931658B

  • Underwater image enhancement and color correction method and system for railway bridge structure

    CN121258799A