Adaptive underwater image enhancement system and method suitable for mid-deep water turbid scene
By employing adaptive color channel compensation, global and local contrast enhancement, and multi-scale fusion techniques, the problems of color distortion and low contrast in underwater images in the mid-deep sea environment have been solved, achieving efficient and automated underwater image enhancement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2026-03-31
AI Technical Summary
Existing underwater image enhancement technologies are ineffective in dealing with the complex and variable light attenuation and scattering effects in the mid-to-deep sea, resulting in color distortion, low contrast, and blurred textures. Furthermore, they rely on manual parameter adjustments, which are inefficient and difficult to generalize.
An adaptive color channel compensation formula combined with a particle swarm optimization algorithm is adopted. Through adaptive color compensation, global and local contrast enhancement and multi-scale fusion techniques, the processing flow is dynamically adjusted to improve color cast and contrast. An improved histogram double-ended stretching and CLAHE algorithm are combined with guided filtering noise reduction, and multi-scale fusion is performed based on image pyramid technology.
It significantly improves the chromaticity error and contrast of underwater images, enhances the visual effect of the images, enriches texture information, reduces processing time, improves the robustness and versatility of the system, and supports parallel computing.
Smart Images

Figure CN120451027B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an adaptive underwater image enhancement system and method suitable for medium-deep turbid water scenarios, belonging to the field of underwater image enhancement technology. Background Technology
[0002] With the rapid development of marine information processing technology, underwater optical imaging technology has demonstrated significant advantages in intelligent underwater operations and is widely used in fields such as marine resource development, seabed engineering surveys, marine ranching construction, and marine military applications. Unlike land-based images, underwater images often suffer from significant light attenuation during light propagation due to the complex marine environment. On the one hand, due to the selective absorption effect of water on different spectral regions, acquired underwater images typically exhibit color distortion. On the other hand, the large number of suspended particles in seawater scatters light, causing reduced image contrast, blurred textures, and distortion. Specifically:
[0003] Light attenuation and color shift issues:
[0004] The selective absorption of light of different wavelengths by water leads to severe color distortion. For example, red light (long wavelength) attenuates rapidly in shallow and medium-depth waters, making images appear bluish-green; while in deep water, blue light (short wavelength) has enhanced penetration, resulting in an overall bluish image. Furthermore, suspended particles in turbid waters exacerbate short-wave scattering, further disrupting color balance and making traditional algorithms based on fixed wavelength compensation (such as gamma correction and histogram equalization) ill-suited to the variable deep-sea environment.
[0005] Scattering effects and contrast degradation:
[0006] Suspended particles and microorganisms in seawater scatter light, causing image blurring and loss of detail. Existing methods, such as Dark Channel Prior (DCP), dehaze by estimating transmittance, but the uneven illumination and color attenuation in underwater scenes lead to biased transmittance estimation, resulting in color oversaturation or local distortion after restoration.
[0007] Insufficient artificial dependence and generalization:
[0008] Current mainstream algorithms (such as UDCP based on transmittance estimation and integrated color model ICM) rely on manually preset parameters (such as attenuation coefficient and scattering intensity), which need to be repeatedly adjusted when turbidity or depth changes, resulting in low efficiency and difficulty in generalization. For example, tests on the UIEBD dataset show that the PSNR values of traditional algorithms are generally below 15dB and SSIM is less than 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 coupling 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 automated underwater image enhancement technology that can dynamically adjust the processing flow according to the image's own characteristics to address the complex and ever-changing imaging challenges in the mid-to-deep sea. Summary of the Invention
[0010] The purpose of this invention is to propose an adaptive underwater image enhancement system and method suitable for medium-deep turbid water scenarios. Addressing the inherent color distortion problem in underwater images, an adaptive color channel compensation formula is proposed to adaptively compensate for channels prone to attenuation, thereby improving color cast and significantly enhancing the visual effect of the image. Based on this, further contrast enhancement and texture enhancement are performed on the color-cast-corrected underwater image, and multi-scale fusion is achieved using image pyramid technology, solving the problems of blurring and low contrast caused by underwater scattering particles in existing technologies.
[0011] The adaptive underwater image enhancement method for medium-deep turbid water scenarios described in this invention includes the following steps:
[0012] S1: Based on the pixel mean distribution of the RGB channels in the underwater image, a reference channel is selected, adaptive color compensation is performed on the attenuation channel, and the compensation parameters are automatically optimized through the particle swarm optimization algorithm.
[0013] S2: Perform global contrast enhancement and local contrast enhancement on the color-compensated image. The global contrast enhancement adopts an improved histogram double-end stretching method, and the local contrast enhancement adopts the CLAHE algorithm combined with guided filtering noise reduction.
[0014] S3: Based on image pyramid technology, the global contrast enhancement results and local contrast enhancement results are fused at multiple scales, and the final enhanced image is generated through weight allocation 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 eliminate outliers, and calculate the mean of the remaining pixels;
[0017] S12: Determine the reference channel, the slightly attenuated channel, and the heavily attenuated channel based on the mean value, and select the channel with the largest pixel mean value as the reference channel;
[0018] S13: Color compensation is performed on the mildly attenuated and heavily attenuated channels using the sigmoid function, and the compensation factor is optimized using the particle swarm optimization algorithm.
[0019] S14: Based on the improved gray-scale world assumption, the compensated channels are corrected a second time to make the average pixel value of each channel equal.
[0020] The formula for color compensation is:
[0021]
[0022] in:
[0023]
[0024] In the formula, This represents the pixel mean of the reference channel. and These represent the pixel mean values of the mildly attenuated channel and the severely attenuated channel, respectively. Used to measure the difference between the slightly attenuated channel and the reference channel, so as to achieve compensation of 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 (PSO) algorithm is used to automatically optimize parameters α and β, as shown in the following formula:
[0026]
[0027] In the formula, equation (4) shows the objective function set in PSO. and These are the pixel mean values of the mildly attenuated channel and the severely attenuated channel after color compensation, respectively. The optimal values of α and β are found by using PSO.
[0028] The secondary correction of the compensated channels in step S14 specifically includes the following: Further improvements are made to the classic gray-scale world assumption, assuming that the repaired underwater image should satisfy the condition that the mean pixel value of each channel is equal to the mean pixel value of the channel, as shown in the following formula:
[0029]
[0030] In the formula, These are the pixel mean values for the red, green, and blue channels, respectively. Based on the improved grayscale world assumption, the color-compensated underwater image is corrected using the following formula:
[0031]
[0032] In the formula, I c These are the channel pixel values of the underwater image. This is the pixel mean of that channel. I′ is the average pixel value of the image's channels. c The corrected channel pixel values, after being corrected using an improved grayscale world hypothesis, further enhance the visual quality of the underwater images.
[0033] The improved histogram double-end stretching method in step S2 includes:
[0034] S21: Determine the segmentation point based on the average of the pixel mean and pixel median, and divide the histogram into dark and bright areas;
[0035] S22: Apply segmented stretching mapping to the extended high-brightness range to dark areas, and perform linear stretching to preserve details in bright areas;
[0036] S23: Blend the stretching results of dark and bright areas according to preset weights.
[0037] The formula for calculating the segmentation 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 points divide the pixel histogram distribution of image I into two parts: the dark area histogram and the bright area histogram. The segmented dark area histogram and bright area histogram are stretched according to formulas (8) and (9) respectively, as shown below:
[0041]
[0042] In the formula, I in For input pixels, I dark and I light These are the stretched dark area output pixels and bright area output pixels, respectively. min I is the minimum pixel value of the histogram. max I is the maximum pixel value in the histogram. seg The pixel value at the segmentation point; using the above histogram stretching formula, the dark area of the original underwater image is mapped to [I]. min The bright areas are mapped to [0, 255]. Finally, the histograms of the dark and bright areas are summed according to their 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 for multi-scale fusion in step S3 include:
[0045] Laplacian weight, local contrast weight, saliency weight, and exposure weight.
[0046] Preferably, the weights of each weight map are calculated sequentially in the order of Laplacian weight, local contrast weight, saliency weight, and exposure weight. After normalizing the weights, the underwater image is first decomposed using Gaussian pyramid, and then filtering and downsampling operations are performed step by step. After that, the decomposed layers are reconstructed using Laplacian pyramid to obtain the final repaired image.
[0047] The adaptive underwater image enhancement system for medium-deep turbid water scenarios described in this invention includes:
[0048] The color compensation module is used to select a reference channel based on the average pixel distribution of the RGB channels in the underwater image, perform adaptive color compensation on the attenuation channel, and integrate a particle swarm optimization algorithm to automatically optimize the compensation parameters.
[0049] The 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 the CLAHE algorithm combined with guided filtering noise reduction.
[0050] The multi-scale fusion module is used to perform weight allocation and hierarchical reconstruction of global and local contrast enhancement results based on image pyramid technology to generate the final enhanced image.
[0051] The present invention provides an adaptive underwater image enhancement system and method suitable for medium-deep turbid water scenarios, which has the following beneficial effects:
[0052] (1) Adaptive color compensation and color shift correction
[0053] The adaptive color channel compensation formula proposed in this invention effectively solves the color shift problem caused by spectral selective absorption and scattering by suspended particles by dynamically analyzing the pixel mean distribution of the RGB channels in underwater images, selecting a reference channel, and introducing a sigmoid function for nonlinear compensation. For example, in turbid scenes (yellow-green bias), the compensation amount for the red and blue channels is increased to 1.5-2 times the original value, reducing the chromaticity error of the repaired image. Combined with the improved gray-world assumption, after equalizing the pixel mean of each channel, the image saturation (UCIQE) is increased to 0.671, significantly better than the traditional algorithm (DCP 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 an improved histogram-based double-ended stretching algorithm with the CLAHE algorithm, this invention enhances global contrast while preserving local details. The improved histogram stretching method divides dark and bright areas using a segmentation point (the average of the pixel mean and median), mapping dark areas to a high-brightness range and linearly expanding bright areas to the full dynamic range, thus solving the detail loss problem caused by traditional stretching. Experiments show that after global contrast enhancement, the PSNR value of the underwater image reaches 23.089dB, nearly three times higher than DCP (8.577dB). In local contrast enhancement, CLAHE combined with guided filtering noise reduction improves the edge sharpness (SSIM) to 0.897 and the information entropy (Entropy) to 7.825, indicating richer image texture information.
[0056] (3) Multi-scale fusion and detail preservation
[0057] Based on an image pyramid-based multi-scale fusion framework, this method achieves 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 blue-toned scenes, multi-scale fusion enhances the gradient intensity of target contours while suppressing noise amplification (UIQM value reaches 1.259). Compared to single enhancement methods, 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 that in the reference image.
[0058] (4) Fully automatic parameter optimization and improved versatility
[0059] By automatically optimizing compensation factors α and β using the Particle Swarm Optimization (PSO) algorithm, this invention can adapt to underwater scenes with different depths and turbidity without manual parameter presets. Tests show that, in 100 samples from the UIEBD dataset, the processing time of this invention is reduced by 80% compared to manual parameter tuning methods, and the standard deviations of PSNR and SSIM indices are reduced to 0.8 dB and 0.05, respectively, demonstrating its robustness and generalization ability. Furthermore, 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. Attached Figure Description
[0060] Figure 1 This is a classic representation of underwater images in medium-deep turbid water scenes within the UIEBD dataset of this invention; where (a) and (b) show the case where optical imaging is yellowish-green in turbid scenes, and (c) shows the case where optical imaging is bluish in deep water environments.
[0061] Figure 2This invention presents the RGB channel histogram distribution and corresponding channel pixel mean of underwater images in deep-water turbidity scenes, where (a) and (b) represent the underwater image, pixel value histogram distribution, and corresponding channel pixel mean in turbidity scenes; and (c) represents the underwater image, pixel value histogram distribution, and corresponding channel pixel mean in deep-water scenes.
[0062] Figure 3 The images shown are reference images for restoration of underwater images in the UIEBD dataset of this invention. (a) and (b) are underwater images, pixel value histogram distributions, and corresponding channel pixel mean values in turbid scenes; (c) represents underwater images, pixel value histogram distributions, and corresponding channel pixel mean values in deep water scenes.
[0063] Figure 4 In this invention, the Sigmoid function can be nonlinearly compensated based on its own characteristics.
[0064] Figure 5 The following are schematic diagrams of underwater images after color compensation and improvement of the grayscale world hypothesis according to the present invention; wherein, (a) is the original image; (b) is a schematic diagram of the underwater image after color compensation; and (c) is a schematic diagram of the underwater image after improvement of the grayscale world hypothesis.
[0065] Figure 6 This is a schematic diagram of histogram division in the improved histogram stretching method of the present invention;
[0066] Figure 7 This invention is a multi-scale fusion framework diagram based on image pyramids;
[0067] Figure 8 This is a schematic diagram showing the results of the adaptive underwater image enhancement technology applicable to medium-deep turbid water scenarios of the present invention; wherein, (a) is the original image; (b) is the restored image; and (c) is the reference image. Detailed Implementation
[0068] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0069] Example 1:
[0070] like Figure 1 As shown, this embodiment discloses an adaptive underwater image enhancement method suitable for medium-deep turbid water scenarios, including the following steps:
[0071] Step 1: Adaptive color channel compensation formula based on particle swarm optimization algorithm
[0072] The complex and ever-changing marine environment causes absorption and scattering of the spectrum, leading to severe color shifts. Red light, with its longest wavelength, is typically absorbed first and attenuates most severely. In turbid waters, numerous suspended microparticles create strong light scattering effects. Blue light, with its shorter wavelength, interacts more easily with underwater particles, resulting in attenuation. Consequently, green light, with its moderate wavelength, is relatively well-preserved in turbid waters, often appearing yellowish-green in underwater images. In deep water, shorter wavelengths of red and green light attenuate preferentially, while the longest wavelength, blue light, is relatively well-preserved, typically resulting in blue underwater images. The UIEBD dataset is a classic and widely used public dataset for underwater image enhancement; therefore, this invention also uses this dataset to test subsequent underwater image enhancement techniques. Figure 1 These are some classic representations of underwater images in turbid, deep-water scenes within the UIEBD dataset. (a) and (b) show the yellowish-green tint in optical imaging during turbid scenes, while (c) shows the bluish tint in optical imaging during deep-water conditions.
[0073] Generally speaking, the color features of a color image are directly reflected in the pixel value distribution of its various channels. Therefore, by observing the pixel histogram distribution of each channel in an underwater image, we can more intuitively see the impact of color cast on the color features of the underwater image. Figure 2 As shown, the histogram distribution of RGB channels and the corresponding average pixel values of underwater images in turbid deep-water scenes clearly show that (a) and (b), as underwater images in turbid scenes, exhibit severe attenuation of red and blue light, and the corresponding average pixel values of these channels are also relatively small. (c) represents an underwater image in a deep-water scene, where it can also be seen that red light attenuation is the most severe, green light shows some attenuation, and blue light has the largest average pixel value, indicating relatively good preservation.
[0074] like Figure 3 As shown, the reference images for restoration of each underwater image in the UIEBD dataset demonstrate that, based on the displayed channel histogram distribution and channel pixel mean, the two channels that were originally severely attenuated in the final restored reference image 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 also change image pixel values, it can be assumed that in the color cast correction step, the channel with the larger pixel mean did not experience significant attenuation, and its corresponding channel's pixel histogram distribution 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 color cast.
[0075] Based on the above, let I be the channel with the largest pixel average. max The mild attenuation channel and the severe attenuation channel are I, respectively. 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] Formulas (1) and (2) are the color compensation formulas for the two attenuation channels. Where, This represents the pixel mean of the reference channel. and These represent the pixel mean values of the mildly attenuated channel and the severely attenuated channel, respectively. This is used to measure the difference between a slightly attenuated channel and a reference channel, so as to achieve compensation for the attenuated channel based on the reference channel. In order to take into account the characteristics of the attenuated channel itself, a sigmoid function is introduced to ensure that the severely attenuated areas in the attenuated channel receive more compensation. Equation (3) shows the calculation process of the sigmoid function, and its schematic diagram is shown below. Figure 4 As shown, the Sigmoid function can perform non-linear compensation based on its own characteristics, making the compensation of each pixel within the channel smoother.
[0080] Formulas (1) and (2) apply the slight attenuation to channel I based on the color characteristics of the underwater image itself. mid and heavily attenuated channel I min Compensation is performed, and two compensation factors, α and β, are introduced. However, the introduction of α and β increases the uncertainty and complexity of the color compensation formula to some extent. When correcting color cast in different underwater images, the optimal values of parameters α and β are often difficult to define, requiring manual trial and error, which is time-consuming and laborious. Therefore, the particle swarm optimization algorithm (PSO) is selected to achieve automatic optimization of parameters α and β. Among many optimization algorithms, PSO has good robustness and can quickly converge to the optimized value. Formula (4) shows the objective function set in PSO:
[0081]
[0082] In the formula, and These are the pixel mean values of the mildly attenuated and severely attenuated channels 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, and has a good processing effect on underwater images in medium-deep turbid water scenes without any preset parameters.
[0083] In the field of image processing, the gray-world assumption has wide applications. This assumption holds that the average pixel value of the three channels of a color image should be approximately equal. To make the visual effect of the color-compensated underwater image more natural and further improve the overall visual effect of the restored image, this invention further improves the classic gray-world assumption, believing that the restored underwater image should satisfy the condition that the average pixel value of each channel is equal to the average pixel value of the channel, as shown in formula (5):
[0084]
[0085] In the formula, These are the pixel mean values for the red, green, and blue channels, respectively. Based on the improved grayscale world assumption, the color-compensated underwater image is corrected using the following formula:
[0086]
[0087] In the formula, I c These are the channel pixel values of the underwater image. This is the pixel mean of that channel. I′ is the average pixel value of the image's channels. c These are the corrected channel pixel values. After the improved gray-world assumption correction, the visual quality of the underwater image is further improved, as shown in the following figures. Figure 5 As shown, 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 improvement of the gray world hypothesis, 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 in the underwater image is effectively improved, and the overall visual effect of the image is enhanced. However, due to uneven lighting and scattering by suspended particles in the marine environment, the underwater images captured also suffer from blurriness and low contrast. Therefore, contrast enhancement methods and filtering algorithms are needed to improve image contrast and clarity. Regarding contrast enhancement, global contrast enhancement can adjust the entire image, improving its overall brightness and contrast. However, relying solely on global contrast enhancement may lead to the loss of local details. Therefore, this invention employs a fusion of global and local contrast enhancement, further highlighting image details while ensuring contrast improvement, making the image texture and edges clearer, thus achieving a more comprehensive image enhancement effect.
[0090] (1) Global contrast enhancement based on improved histogram stretching
[0091] Global contrast enhancement of images typically employs histogram stretching. Traditional histogram stretching methods linearly map the pixel range of an image to [0, 255], expanding dark pixels to lower values and bright pixels to higher values, thereby improving global contrast. However, this stretching method based on global pixel extrema often leads to problems such as noise amplification, loss of detail, and color distortion. To avoid the shortcomings of traditional histogram stretching methods, this invention makes the following improvements: First, cut points are selected based on the histogram distribution characteristics of underwater images. The original histogram is then decomposed into dark area histograms and bright area histograms based on the cut points, and each is stretched separately. Finally, the weights are added together to achieve global contrast enhancement of the underwater image. For any underwater image I, the calculation of the cut points is shown in formula (7):
[0092]
[0093] In the formula, the selection of the segmentation point is determined by the pixel mean and pixel median of image I. Generally speaking, the pixel mean can reflect the overall brightness of the image. Considering that there are often a large number of outliers 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: the dark area histogram and the bright area histogram, as shown below. Figure 6 As shown. The segmented dark area histogram and bright area histogram are stretched according to formulas (8) and (9) respectively, as shown below:
[0095]
[0096] In the formula, I in For input pixels, I dark and I light These are the stretched dark area output pixels and bright area output pixels, respectively. min I is the minimum pixel value of the histogram. max I is the maximum pixel value in the histogram. seg Let [I] be the pixel value at the segmentation point. Using the histogram stretching formula described above, the dark areas of the original underwater image are mapped to [I]. min The bright areas are mapped to [0, 255]. Finally, the histograms of the dark and bright areas are summed according to their 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 dark area enhancement with bright area detail preservation, significantly improving the global contrast of underwater images while avoiding the shortcomings of traditional image enhancement methods.
[0099] (2) Local contrast enhancement based on CLAHE and guided filtering
[0100] This invention employs the Limiting Contrast Adaptive Histogram Equalization (CLAHE) algorithm to improve the local contrast of underwater images. CLAHE achieves a more uniform grayscale distribution by spreading the image's grayscale values from concentrated areas to the entire usable range. The process first divides the image into multiple small regions, and performs histogram equalization on each region individually. When the histogram of a region exceeds a preset threshold, the excess portion of the histogram is "cropped," and the cropped portion is evenly distributed to other regions of the histogram. This processing method optimizes image contrast while effectively controlling noise amplification, thus ensuring enhanced detail while avoiding excessive brightness.
[0101] CLAHE (Clear Frames Filtering) allocates brightness through the calculation of local histograms, capturing richer image texture details. However, while enhancing local contrast, CLAHE also amplifies noise. Therefore, combining CLAHE with filtering algorithms can further reduce underwater image noise and significantly improve visual quality. Filtering algorithms are commonly used to process image noise; however, simple smoothing filters and Gaussian smoothing filters are isotropic filters, which struggle to distinguish between noise and edge information, often smoothing out image texture details while eliminating noise. In contrast, anisotropic filtering algorithms such as bilateral filtering and guided filtering distinguish between noise and edges, offering better noise reduction capabilities. Among these, guided filtering, based on the least squares principle, uses box filtering and integral image techniques for computation, reducing time complexity and achieving higher efficiency and speed; this is the filtering algorithm used in this invention.
[0102] Step 3: Multi-scale fusion framework based on image pyramid
[0103] Step 2 further enhances the image contrast based on the color-corrected underwater image obtained in Step 1, and incorporates a guided filtering algorithm for noise reduction, significantly improving the image's texture clarity. However, the global contrast enhancement and local contrast enhancement methods in Step 2 are processing at different levels. Simply superimposing the two results pixel by pixel or performing single-weighted fusion not only fails to take advantage of both methods but also leads to partial image distortion. Therefore, this invention adopts a multi-scale fusion framework based on image pyramids. By extracting multi-scale feature information from the input image and performing fusion reconstruction, a more refined fusion result is obtained. In this process, the weighted image is first input into a Gaussian pyramid for decomposition, while 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, resulting in a clearer and more detailed fused image.
[0104] Before image fusion, a weight map representing image features needs to be set. This invention selects classic Laplacian weight, local contrast weight, saliency weight, and exposure weight for multi-scale fusion of underwater images. Laplacian weight estimates the global contrast of the image by applying a Laplacian filter to the brightness channel of each input image and taking the absolute value of the result. Local contrast weight quantifies the standard deviation between the brightness of each pixel in the input image and the average brightness of its neighboring area; this metric effectively highlights transition areas between bright and dark areas in the image. Typically, Laplacian weight and local contrast weight work together to accurately distinguish bright, dark, and transition areas. Saliency weight aims to highlight targets that are difficult to detect in the underwater environment. Exposure weight is used to evaluate the pixel allocation value for good exposure. By combining the above weights and normalizing each weight map, the overall enhancement effect of underwater images can be effectively improved. Figure 7 As shown, a multi-scale fusion framework based on image pyramids is presented.
[0105] Through steps 1 to 3, the inherent problems of color cast, low contrast, and blurriness in underwater images in medium-deep turbid water scenes are greatly improved, such as... 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 exhibits a single color feature. In underwater images with turbid scenes (overall greenish tint), both red and blue light are effectively compensated, and in underwater images with deep water scenes (overall bluish tint), both red and green light are also effectively enhanced. Furthermore, the contrast of the underwater image is further improved, and the texture details are also effectively enhanced. Overall, it 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] To test the technical solution of this invention, 100 underwater images were randomly selected and averaged. The testing process is as follows:
[0108] For underwater images in turbid, medium-deep water, the pixel sequences of each channel are acquired and sorted in ascending order. To avoid interference from outliers, 2% of the pixels at both ends are cropped. The pixel mean of each channel is calculated, and the reference channel, slightly attenuated channel, and heavily attenuated channel are selected sequentially according to the pixel mean. The color compensation formula from step 1 of the technical solution is used to perform color compensation on the two channels with more severe attenuation. Then, the PSO optimization algorithm is used to find the optimal value of the compensation factor. Finally, the improved grayscale world assumption is used to perform secondary correction on the color-compensated pixels to further improve the visualization effect of the underwater image.
[0109] For the color-corrected underwater image, the three channels of the underwater image are first expanded to obtain the pixel sequence of the entire image, which is then sorted in ascending order. The pixel mean and pixel median are calculated to obtain the cut points. Based on the cut points, the pixel histogram is divided into a dark area histogram and a bright area histogram, and each is stretched according to the histogram stretching formula in step 2. The two histograms are then added together with a 50% weight to obtain an underwater image with enhanced global contrast. In addition, the color-corrected underwater image is subjected to CLAHE enhancement and guided filtering noise reduction sequentially to obtain an underwater image with enhanced local contrast and texture details.
[0110] For the underwater images 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 normalizing the weights, the underwater image is first decomposed by using Gaussian pyramids and filtering and downsampling operations step by step. Then, the decomposed layers are reconstructed by using Laplacian pyramids to obtain the final repaired image.
[0111] To compare the effectiveness of the adaptive underwater image enhancement technology proposed in this invention, the test results were compared with classic image enhancement algorithms and underwater image enhancement algorithms proposed in recent years. The test algorithm set included image enhancement algorithms based on dark channel prior (DCP), gamma correction algorithms (GC), underwater image enhancement algorithms based on integrated color models (ICM), low-quality image enhancement algorithms based on unsupervised color correction (UCM), underwater image enhancement algorithms based on transmittance estimation (UDCP), and underwater image enhancement models based on underwater light attenuation prior (ULAP). Furthermore, to quantitatively evaluate the restoration effect of various image enhancement algorithms on underwater images, both full-reference and no-reference evaluation metrics were used for objective evaluation. The full-reference evaluation metrics, mainly including Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity (SSIM), were evaluated by comparing the restored underwater image with a reference image. The no-reference evaluation metrics evaluated the restored underwater image based on custom comprehensive metrics, including Underwater Image Quality Metric (UIQM), Underwater Color Image Quality Evaluation (UCIQE), and Entropy. To further demonstrate the versatility of various image enhancement algorithms, 100 underwater images were randomly selected from the UIEBD dataset for testing and the average was taken. 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 pixel errors and color differences between an underwater image restored by an image enhancement algorithm and a reference image. A higher PSNR value indicates lower distortion in the restored underwater image, further suggesting that the two images are closer in texture detail and color distribution, thus demonstrating better restoration results from the enhancement algorithm. 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 image distortion by comparing the differences between an underwater image restored by an image enhancement algorithm and a reference image in three key aspects: brightness, contrast, and overall structure. Specifically, SSIM is based on... Between these values, a larger value indicates that the underwater image restored by the algorithm is closer to the reference image in terms of brightness, contrast, and structure, 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 publicly available dataset UIEBD provides a corresponding restoration reference image for each underwater image for testing. The test results of the full-reference evaluation metrics in Tables 1 and 2 show that, for both PSNR and SSIM, the adaptive underwater image enhancement algorithm proposed in this invention significantly outperforms other image enhancement algorithms. This indicates that the image restored by the algorithm of this invention is closer in overall quality to the reference restoration image, fully demonstrating the excellent performance of the adaptive underwater image enhancement algorithm proposed in this invention.
[0122] (2) No reference evaluation indicators
[0123] 1. Underwater Image Quality Metric (UIQM)
[0124] The UIQM comprises three attributes of underwater images: underwater image color metric (UICM), underwater image sharpness metric (UISM), and underwater image contrast metric (UIConM). This metric evaluates image quality by linearly superimposing these three metrics—contrast, color, and sharpness—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 Assessment (UCIQE)
[0129] Similar to UIQM, UCIQE also employs a linear superposition processing method. Utilizing the CIE-Lab color space, which approximates human vision, it quantitatively evaluates chroma, saturation, and contrast using a linear combination of these parameters, quantifying uneven color shift, blurring, and low contrast. The test results based on UCIQE are shown in Table 4.
[0130] Table 4 UCIQE Test Results
[0131] Reference image This 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. Information Entropy
[0133] Entropy measures the amount of information contained in an image; a higher value indicates richer information and better visualization. The test results based on Entropy are shown in Table 5.
[0134] Table 5 Entropy Test Results
[0135] Reference image This 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 restoration effect is quantitatively evaluated based on the comprehensive features of the restored underwater image without a reference evaluation index. The test results in Tables 3 to 5 show that the adaptive underwater image enhancement algorithm proposed in this invention is significantly superior to other image enhancement algorithms, approaching the test data of the reference image. Even in the UCIQE test results, the algorithm of this invention outperforms the test results of the reference image, fully demonstrating the excellent restoration effect of the algorithm of this invention on underwater images in mid-deep turbid water scenes.
[0137] Example 2:
[0138] Based on Example 1, the adaptive underwater image enhancement system for medium-deep turbid water scenarios described in this invention includes:
[0139] The color compensation module is used to select a reference channel based on the average pixel distribution of the RGB channels in the underwater image, perform adaptive color compensation on the attenuation channel, and integrate a particle swarm optimization algorithm to automatically optimize the compensation parameters.
[0140] The 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 the CLAHE algorithm combined with guided filtering noise reduction.
[0141] The multi-scale fusion module is used to perform weight allocation 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: Employs a high-resolution underwater camera (such as the SONY IMX585 sensor), supports RAW format image acquisition, dynamic range ≥120dB, and frame rate 30fps.
[0144] Processing unit: Equipped with an NVIDIA Jetson AGX Xavier embedded GPU with a 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 real-time enhanced image local storage and remote transmission.
[0146] System operation process
[0147] Input: Raw images captured by an 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: The compensation factor is optimized by PSO to output a color-corrected image (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, outputting the final enhanced image (time ≤30ms).
[0152] Output: Save as JPEG format, UIQM value ≥ 1.25, to meet real-time processing requirements (total latency ≤ 160ms).
[0153] In the UIEBD dataset test, the system's average results for processing 100 images are as follows:
[0154] Table 6 UIEBD Data Test Results
[0155]
[0156] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. An adaptive underwater image enhancement method suitable for mid-deep water turbid scene, characterized in that, The method comprises the following steps: S1: selecting a reference channel based on the RGB channel pixel mean distribution of the underwater image, performing adaptive color compensation on the attenuation channel, and automatically optimizing the compensation parameters through a 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 a guided filter denoising; 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 hierarchical reconstruction; The specific steps of the adaptive color compensation in the step S1 comprise: S11: cropping the pixels at both ends of each channel of the image to exclude outliers, and calculating the mean value of the remaining pixels; S12: determining the reference channel, the light attenuation channel and the heavy attenuation channel according to the mean value, and selecting the channel with the maximum pixel mean value as the reference channel; S13: performing color compensation on the light attenuation channel and the heavy attenuation channel through a sigmoid function, and optimizing the compensation factor by using a particle swarm optimization algorithm; S14: performing secondary correction on the compensated channel based on an improved gray world assumption, so that the pixel mean values of the channels are equal; The formula of the color compensation is: Wherein: In the formula, represents the pixel mean value of the reference channel, and respectively represent the pixel mean value of the light attenuation channel and the heavy attenuation channel, for measuring the difference between the light attenuation channel and the reference channel to compensate the attenuation channel based on the reference channel; and represent two compensation factors, and automatically optimized by a particle swarm optimization algorithm; The particle swarm optimization algorithm (PSO) is used to realize the automatic optimization of parameters and The formula is as follows: In the formula, formula (4) shows the target function set in PSO , and are the pixel mean values of the light attenuation channel and the heavy attenuation channel after color compensation respectively, and the optimal values of and are found by using PSO.
2. The adaptive underwater image enhancement method suitable for mid- deep water hazy scenes according to claim 1, characterized in that, The secondary correction on the compensated channel in the step S14 comprises the following: the classic gray world assumption is further improved, and it is considered that the restored underwater image should satisfy that the pixel mean values of the channels are equal and equal to the pixel mean value of the channel, as shown in the following formula: wherein are the pixel mean values of the red, green and blue channels respectively, the underwater image after color compensation is corrected based on the improved gray world assumption, and the correction formula is as follows: wherein, is the channel pixel value of the underwater image, is the pixel mean value of the channel, is the channel pixel mean value of the image, is the corrected channel pixel value, the visual effect of the underwater image is further improved after the improved gray world assumption correction.
3. The adaptive underwater image enhancement method suitable for mid- deep water hazy scenes according to claim 1, characterized in that, The improved histogram double-end stretching method in the step S2 comprises: S21: determining a split point according to the average of the pixel mean value and the pixel median value, and dividing the histogram into a dark region and a bright region; S22: mapping the dark region to an expanded high luminance range through segmented stretching, and performing linear stretching on the bright region to retain details; S23: fusing the stretching results of the dark region and the bright region according to a preset weight.
4. The adaptive underwater image enhancement method suitable for mid- deep water hazy scenes according to claim 3, characterized in that, The calculation formula of the split point is: wherein, represents any underwater image, is the pixel mean, is the pixel median; The split point divides the pixel histogram distribution of the image into a dark region histogram and a bright region histogram, and for the split dark region histogram and bright region histogram, stretching is performed according to formula (8) and formula (9), as follows: wherein, is the input pixel, and are the output pixel of dark region and bright region after stretching respectively, is the minimum pixel value of the histogram, is the maximum pixel value of the histogram, is the pixel value at the split point; through the histogram stretching formula above, the dark region part of the original underwater image is mapped to , the bright region part is mapped to , and finally, the dark region and bright region histograms are added by weight to obtain the final global contrast enhanced image; 。 5. The adaptive underwater image enhancement method suitable for mid- deep water hazy scenes according to claim 3, characterized in that, The weights of the multi-scale fusion in the step S3 comprise: Laplacian weight, local contrast weight, saliency weight and exposure weight.
6. The adaptive underwater image enhancement method suitable for mid- deep water hazy scenes according to claim 5, characterized in that, In the order of the Laplacian weight, the local contrast weight, the saliency weight and the exposure weight, the weights of each weight map are calculated, and then the weights are normalized. First, the underwater image is decomposed through filtering and downsampling operation by using a Gaussian pyramid, then each layer after decomposition is reconstructed by using a Laplacian pyramid, and finally a restored image is obtained.
7. An adaptive underwater image enhancement system suitable for mid- deep water turbid scenes, characterized in that, The adaptive underwater image enhancement method suitable for a middle-deep water turbid scene based on any one of claims 1-6, wherein the system comprises: a color compensation module configured to select a reference channel based on the RGB channel pixel mean distribution of the underwater image, perform adaptive color compensation on the attenuation channel, and integrate a particle swarm optimization algorithm to automatically optimize the compensation parameters; The contrast enhancement module comprises 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 a guided filter denoising; The multi-scale fusion module is used for weight distribution and hierarchical reconstruction of the global and local contrast enhancement results based on an image pyramid technology, so as to generate a final enhancement image.
Citation Information
Patent Citations
Single underwater image enhancement method based on contrast stretching and fusion
CN118195976A