Underwater image enhancement method, device, storage medium and program product

By fusing adaptive channel compensation, lightweight descattering, and RetinexGuI closed-loop solution enhancement, the problems of enhancement effect and computational complexity in underwater image enhancement technology are solved, and efficient image quality improvement is achieved on resource-constrained platforms.

CN122434748APending Publication Date: 2026-07-21SOUTHERN MARINE SCIENCE & ENGINEERING GUANGDONG LABORATORY (ZHANJIANG) +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610522524.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-20
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing underwater image enhancement techniques struggle to balance enhancement effectiveness with low computational complexity, especially on resource-constrained platforms where they are difficult to apply in real time.

Method used

A fusion enhancement algorithm is adopted, including adaptive channel compensation, lightweight descattering, and RetinexGuI closed-loop solution enhancement. By combining a physical model with Retinex theory, it can specifically correct color cast, scattering blur, and brightness problems in underwater images.

Benefits of technology

It effectively improves the color, clarity, and brightness of underwater images, with a computational complexity of O(N), making it suitable for various platforms with limited computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122434748A_ABST
    Figure CN122434748A_ABST
Patent Text Reader

Abstract

The application discloses an underwater image enhancement method and device, a storage medium and a program product, and relates to the technical field of image processing; the underwater image enhancement method comprises the following steps: acquiring an original underwater image; and processing the original underwater image by using a fusion enhancement algorithm to obtain a target image; wherein the fusion enhancement algorithm at least comprises adaptive channel compensation, lightweight despeckling and RetinexGuI closed-form solution enhancement. The application fuses a physical model driven correction method with RetinexGuI closed-form solution enhancement technology, constructs a lightweight framework which does not require training data, does not require GPU support and has a calculation complexity of O(N), guarantees excellent enhancement effect, realizes extremely high processing efficiency, and is particularly suitable for resource-limited embedded platforms and real-time vision systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an underwater image enhancement method, device, storage medium, and program product. Background Technology

[0002] In underwater environments, images captured suffer from poor quality due to the physical effects of light absorption and scattering. Specifically, differences in light attenuation across different wavelengths cause a blue-green tint in underwater images, while scattering from suspended particles results in blurring and low contrast. These issues not only affect visual perception but also hinder advanced vision tasks such as object detection and SLAM (Simultaneous Localization and Mapping).

[0003] Current underwater image enhancement technologies can be mainly divided into three categories: image processing-based methods (such as histogram equalization and white balance) are computationally simple but lack physical basis and are prone to distortion; physical model-based methods (such as dark channel prior and its variants) are based on underwater imaging models and are highly interpretable, but their neighborhood minimum filtering and guided filtering have high computational complexity and are difficult to apply in real time; deep learning-based methods have excellent results, but they heavily rely on a large amount of training data and require GPU (Graphics Processing Unit) support, making them difficult to deploy on resource-constrained platforms.

[0004] Therefore, there is an urgent need for a new underwater image enhancement method to solve the problem that current underwater image enhancement techniques cannot achieve both enhancement effect and low computational complexity.

[0005] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0006] The main objective of this application is to provide an underwater image enhancement method, device, storage medium, and program product, aiming to solve the technical problem that current underwater image enhancement technologies struggle to balance enhancement effectiveness with low computational complexity.

[0007] To achieve the above objectives, this application proposes an underwater image enhancement method, the method comprising: Acquire raw underwater images; The original underwater image is processed using a fusion enhancement algorithm to obtain the target image; wherein the fusion enhancement algorithm includes at least adaptive channel compensation, lightweight descattering, and Retinex GuI closed-loop solution enhancement.

[0008] In one embodiment, the step of processing the original underwater image using a fusion enhancement algorithm to obtain the target image includes: Adaptive channel compensation is performed on the original underwater image to obtain a color-corrected image; Lightweight descattering is performed on the color-corrected image to obtain a scatter-corrected scene image; The scene image is enhanced using Retinex GuI closed-form decoding to obtain the target image.

[0009] In one embodiment, before the step of performing Retinex GuI closed-form enhancement processing on the scene image to obtain the target image, the method further includes: The scene image is dynamically restored to obtain a dynamically restored image; Correspondingly, the step of performing Retinex GuI closed-form enhancement on the scene image to obtain the target image includes: The target image is obtained by performing Retinex GuI closed-form enhancement on the dynamically restored image.

[0010] In one embodiment, the step of performing Retinex GuI closed-form enhancement on the dynamically restored image to obtain the target image includes: The dynamically restored image is converted from the RGB color space to the HSV color space to obtain the initial HSV image; The luminance channel of the initial HSV image is cascaded enhanced by applying the Retinex GuI closed-form solution formula to obtain a cascaded enhanced image; Linear enhancement and gamma correction are performed on the saturation channel of the cascaded enhanced image to obtain the enhanced HSV image; The enhanced HSV image is converted to the RGB color space to obtain the target image.

[0011] In one embodiment, the step of applying the Retinex GuI closed-form formula to the luminance channel of the initial HSV image for cascade enhancement to obtain a cascaded enhanced image includes: Calculate the mean luminance value of the luminance channel of the initial HSV image; The number of cascaded enhancement stages is adaptively determined based on the average brightness value of the brightness channel. Take the natural logarithm of the luminance channel of the initial HSV image to obtain its logarithmic domain representation; The logarithmic domain representation is cascaded and calculated K times using the Retinex GuI closed-form solution to obtain the cascaded enhanced logarithmic domain luminance component; where K is the number of cascaded enhancement stages. The cascaded enhanced image is obtained by performing an exponential operation on the logarithmic domain luminance component.

[0012] In one embodiment, the step of performing adaptive channel compensation on the original underwater image to obtain a color-corrected image includes: The mean value of each color channel in the original underwater image is calculated; wherein, the original underwater image is an RGB three-channel image; The global mean of all channels of the original underwater image is calculated; The compensation gain of each color channel is calculated based on the channel mean of each color channel and the global mean of all channels. For each color channel of each pixel in the original underwater image, a multiplication operation is performed using the compensation gain of the corresponding color channel to obtain the color-corrected image.

[0013] In one embodiment, the step of performing lightweight descattering on the color-corrected image to obtain a scatter-corrected scene image includes: Based on the channel statistics of the color-corrected image, the background light and pixel-wise transmittance of the color-corrected image are estimated; The background light and the pixel-by-pixel transmittance are substituted into the underwater imaging model for inverse operation to obtain the scene image after scattering correction.

[0014] Furthermore, to achieve the above objectives, this application also proposes an underwater image enhancement device, which includes: The image acquisition module is used to acquire raw underwater images; The image enhancement module is used to process the original underwater image using a fusion enhancement algorithm to obtain the target image; wherein the fusion enhancement algorithm includes at least adaptive channel compensation, lightweight descattering, and Retinex GuI closed-loop de-enhancement.

[0015] In addition, to achieve the above objectives, this application also proposes an underwater image enhancement device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the underwater image enhancement method as described above.

[0016] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the underwater image enhancement method described above.

[0017] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the underwater image enhancement method described above.

[0018] One or more technical solutions proposed in this application have at least the following technical effects: The underwater image enhancement method of this application first acquires the original underwater image, providing a data foundation for subsequent processing. Then, it processes the image using a fusion enhancement algorithm that includes at least adaptive channel compensation, lightweight descattering, and Retinex-GuI closed-loop enhancement. Adaptive channel compensation specifically corrects the blue-green bias caused by the selective absorption of different wavelengths of light by water. Lightweight descattering effectively eliminates the scattering effect caused by suspended particles in the water, restoring image clarity. Retinex-GuI closed-loop enhancement, based on Retinex theory, further improves the brightness and detail of the image. Through the synergistic effect of these three algorithms—adaptive channel compensation, lightweight descattering, and Retinex-GuI closed-loop enhancement—the method effectively solves the problems of color attenuation, scattering blur, brightness, and detail in underwater images, effectively enhancing the image quality of underwater images. Furthermore, the entire fusion enhancement algorithm does not require pre-iterative training or training data, and has good physical interpretability. Most of the operations are pixel-wise or based on global statistics, making the computational complexity of this fusion enhancement algorithm O(N), thus ensuring extremely high computational efficiency. This allows this underwater image enhancement method to be easily deployed on various platforms with limited computing resources. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating an embodiment of the underwater image enhancement method of this application. Figure 2 This is a flowchart illustrating Embodiment 2 of the underwater image enhancement method of this application; Figure 3 This is a flowchart illustrating Embodiment 3 of the underwater image enhancement method of this application; Figure 4This is a flowchart illustrating Embodiment 4 of the underwater image enhancement method of this application; Figure 5 This is a flowchart illustrating Embodiment 5 of the underwater image enhancement method of this application; Figure 6 This is a simplified flowchart of the underwater image enhancement method provided in Embodiment 3 of this application; Figure 7 A comparative diagram showing the performance indicators and runtime of the underwater image enhancement method provided in this application; Figure 8 This is a schematic diagram of the module structure of the underwater image enhancement device according to an embodiment of this application; Figure 9 This is a schematic diagram of the device structure of the hardware operating environment involved in the underwater image enhancement method in this application embodiment.

[0022] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0023] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0024] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0025] The main solution of this application embodiment is: to acquire the original underwater image; to process the original underwater image using a fusion enhancement algorithm to obtain the target image; wherein, the fusion enhancement algorithm includes at least adaptive channel compensation, lightweight descattering and RetinexGuI closed-loop de-enhancement.

[0026] In this embodiment, for ease of description, the following description uses an electronic device as the execution subject.

[0027] Current underwater image enhancement techniques mainly fall into three categories: image processing-based methods (such as histogram equalization and white balance) are computationally simple but lack physical basis and are prone to distortion; physical model-based methods (such as dark channel prior and its variants) are based on underwater imaging models and are highly interpretable, but their neighborhood minimum filtering and guided filtering have high computational complexity, making them difficult to apply in real time; deep learning-based methods, while achieving excellent results, heavily rely on pairwise training data and require GPU support, making them difficult to deploy on resource-constrained platforms. Furthermore, the RetinexGuI (Retinex-Guided Iterative Illumination Estimation) algorithm proposed by Gu et al., while possessing the advantages of O(N) complexity and closed-form solutions, is designed specifically for low-light conditions on land and does not consider the unique color attenuation and scattering underwater, resulting in poor performance when applied directly.

[0028] Therefore, there is an urgent need for a new underwater image enhancement method to solve the problem that current underwater image enhancement techniques cannot achieve both enhancement effect and low computational complexity.

[0029] Based on this, this application provides a solution that obtains a target image by acquiring a raw underwater image and processing the raw underwater image using a fusion enhancement algorithm; wherein the fusion enhancement algorithm includes at least adaptive channel compensation, lightweight descattering, and RetinexGuI closed-loop solution enhancement.

[0030] The technical solution of this application first acquires raw underwater images, providing a data foundation for subsequent processing. Then, it employs a fusion enhancement algorithm that includes at least adaptive channel compensation, lightweight descattering, and Retinex-GuI closed-loop enhancement. Adaptive channel compensation specifically corrects the blue-green bias caused by the selective absorption of different wavelengths of light by water. Lightweight descattering effectively eliminates the scattering effect caused by suspended particles in the water, restoring image clarity. Retinex-GuI closed-loop enhancement, based on Retinex theory, further improves the brightness and detail of the image. Through the synergistic effect of these three algorithms—adaptive channel compensation, lightweight descattering, and Retinex-GuI closed-loop enhancement—the problem of color attenuation, scattering blur, and brightness and detail issues in underwater images can be effectively solved, significantly enhancing the image quality of underwater images. Furthermore, the entire fusion enhancement algorithm does not require pre-iterative training or training data, and has good physical interpretability. Most of the operations are pixel-wise or based on global statistics, making the computational complexity of this fusion enhancement algorithm O(N), thus ensuring extremely high computational efficiency. This allows this underwater image enhancement method to be easily deployed on various platforms with limited computing resources.

[0031] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a computing cluster, tablet computer, personal computer, mobile phone, etc., or an embedded device capable of implementing the above functions. The following description uses an electronic device as an example to illustrate this embodiment and the subsequent embodiments.

[0032] Based on this, embodiments of this application provide an underwater image enhancement method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the underwater image enhancement method of this application.

[0033] In this embodiment, the underwater image enhancement method includes steps S10 to S20: Step S10: Obtain the original underwater image; It should be noted that raw underwater images refer to digital images captured directly by underwater camera equipment (such as cameras mounted on underwater robots, waterproof cameras held by divers, etc.) without any enhancement processing. Due to the absorption and scattering effects of underwater light, these images typically exhibit degraded quality characteristics such as a blue-green tint, overall blurriness, and low contrast. In this embodiment, the raw underwater image is read through an image input interface, preferably in RGB color space, where each pixel is represented by component values ​​from the red, green, and blue channels.

[0034] Among them, acquiring raw underwater images ,in This is an RGB three-channel image, representing a size of [size missing]. An RGB three-channel color image, and:

[0035] In the formula, I R ( x , y ), I G ( x , y ), I B ( x , y ) represent pixel positions sequentially The components of the three color channels R, G, and B at that location.

[0036] In step S10, by acquiring the basic data to be processed, input can be provided for subsequent enhancement processing.

[0037] Step S20: The original underwater image is processed using a fusion enhancement algorithm to obtain the target image; wherein the fusion enhancement algorithm includes at least adaptive channel compensation, lightweight descattering, and Retinex GuI closed-loop de-enhancement.

[0038] In step S20, the problems of color, blur and low brightness in underwater images are solved by combining the physical model with Retinex theory, thereby obtaining high-quality target images.

[0039] It should be noted that the fusion enhancement algorithm refers to combining multiple different image processing techniques into a unified processing flow to comprehensively address the multiple degradation problems of underwater images. In this embodiment, the fusion enhancement algorithm integrates at least three core processing algorithms: Adaptive Channel Compensation (ACC), Lightweight De-Scattering (LDS), and RetinexGuI (Retinex-Guided Iterative Illumination Estimation) closed-loop enhancement. RetinexGuI closed-loop enhancement is used to improve brightness and detail.

[0040] Adaptive channel compensation is essentially a gray-world white balance correction based on global statistics, used to correct blue-green color bias. Lightweight descattering is used to remove blur and haze effects. Unlike the traditional Dark Channel Prior (DCP) method, it is a physical model-based underwater image enhancement method. In this embodiment, lightweight descattering does not use computationally intensive neighborhood filtering to estimate background light and transmittance. Instead, it calculates the mean and standard deviation of each color channel in the underwater image, estimating the background light as a linear combination of the channel's mean and standard deviation. A pixel-by-pixel method is then used to estimate transmittance. Finally, the background light and transmittance are substituted into the underwater imaging model for inverse calculation, thus achieving the enhancement effect of removing blur and haze. Retinex GuI closed-form enhancement applies the Retinex GuI closed-form formula to cascade enhancement of the image's luminance channel, thereby improving image brightness and detail.

[0041] Furthermore, it should be noted that this fusion enhancement algorithm possesses excellent physical interpretability. Specifically, each core processing algorithm in this fusion enhancement algorithm has a clear correspondence with the physical degradation process of underwater imaging: adaptive channel compensation corresponds to correcting the selective absorption effect of water on different wavelengths of light; lightweight descattering corresponds to eliminating the forward and backscattering effects caused by suspended particles in the water; and RetinexGuI closed-loop solution enhancement corresponds to illumination component estimation and reflectivity recovery based on Retinex theory. This physics-driven design makes the method highly interpretable, and the processing effect of each step can be analyzed and understood from a physical perspective.

[0042] During the fusion enhancement algorithm's operation, firstly, the adaptive channel compensation module adjusts the gain of the red, green, and blue channels based on global color statistics of the image to correct the blue-green color bias. Then, the lightweight descattering module, based on a simplified underwater imaging model, estimates transmittance and background light through pixel-by-pixel calculations to retrieve the clear scene. Finally, the RetinexGuI closed-form enhancement module applies a closed-form formula to the luminance channel in the HSV color space for cascade enhancement and corrects saturation. The entire process requires no prior iterative training or training data; all calculations are pixel-by-pixel or based on global statistics, resulting in a computational complexity of O(N), where N is the total number of pixels in the image.

[0043] In one example, an underwater coral reef image with a bluish-green tint and a hazy blur can be input into the processing flow. First, adaptive channel compensation calculates that the gain of the blue channel is lower than that of the red and green channels, effectively reducing the blue component. Next, lightweight descattering estimates the transmittance map based on the color-corrected image, successfully removing the "haze" caused by backscattering. Finally, RetinexGuI closed-loop enhancement significantly brightens the dark details of the image (such as shadowed areas in coral crevices) while maintaining the realism of the highlights. The final output image has natural colors, high clarity, and rich detail.

[0044] This embodiment provides an underwater image enhancement method. First, it acquires the original underwater image, providing a data foundation for subsequent processing. Then, it employs a fusion enhancement algorithm that includes at least adaptive channel compensation, lightweight descattering, and Retinex-GuI closed-loop enhancement. Adaptive channel compensation specifically corrects the blue-green bias caused by the selective absorption of different wavelengths of light by water. Lightweight descattering effectively eliminates the scattering effect caused by suspended particles in the water, restoring image clarity. Retinex-GuI closed-loop enhancement, based on Retinex theory, further improves the brightness and detail of the image. Through the synergistic effect of these three algorithms—adaptive channel compensation, lightweight descattering, and Retinex-GuI closed-loop enhancement—the method effectively solves the problems of color attenuation, scattering blur, and brightness and detail in underwater images, effectively enhancing the image quality of underwater images. Furthermore, the entire fusion enhancement algorithm does not require pre-iterative training or training data, and has good physical interpretability. Most of the operations are pixel-wise or based on global statistics, making the computational complexity of this fusion enhancement algorithm O(N), thus ensuring extremely high computational efficiency. This allows this underwater image enhancement method to be easily deployed on various platforms with limited computing resources.

[0045] Overall, this embodiment integrates a physics model-driven correction method with the efficient RetinexGuI closed-loop solution enhancement technique to construct a lightweight framework that requires no training data, no GPU support, and has a computational complexity of O(N). While ensuring excellent enhancement effects, it achieves extremely high processing efficiency, making it particularly suitable for resource-constrained embedded platforms and real-time vision systems.

[0046] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S20 includes steps S21 to S24: Step S21: Perform adaptive channel compensation on the original underwater image to obtain a color-corrected image; It should be noted that Adaptive Channel Compensation (ACC) refers to a method for correcting blue-green color bias based on global color statistics of an image. ACC analyzes the difference between the average brightness of the red, green, and blue channels in the original underwater image and the overall average brightness, adaptively calculates a compensation gain for each channel, and then performs a multiplication operation on the corresponding channel value for each pixel.

[0047] In one example, an underwater image with an overall bluish-green tint can be input. Calculations show that the average value of the red channel is 50, the average value of the green channel is 80, the average value of the blue channel is 100, and the global average is 76.7. Because the red channel's average value is much lower than the global average, it receives a compensation gain greater than 1 (e.g., 1.5); while the blue channel's average value is higher than the global average, its gain is less than 1 (e.g., 0.8). After performing a multiplication operation on each pixel, the red component is enhanced, the blue component is suppressed, and the color of the output image is significantly improved; white objects no longer appear bluish-green.

[0048] In step S21, adaptive channel compensation is performed on the original underwater image to quickly and effectively eliminate the blue-green bias caused by severe red light attenuation in the underwater image, restoring the image color to a near-real color balance.

[0049] Step S22: Perform lightweight descattering on the color-corrected image to obtain a scene image after scattering correction; It should be noted that Lightweight De-Scattering (LDS) refers to a method that removes water scattering effects through efficient pixel-by-pixel and global statistical computations based on a simplified underwater imaging model. Lightweight de-scattering avoids the computationally expensive neighborhood filtering operations found in traditional methods (such as the dark channel prior method mentioned above).

[0050] In step S22, by using lightweight descattering to perform scattering correction processing on the color-corrected image, the hazy blur in the image can be effectively removed with extremely low computational cost, significantly improving the image's clarity and contrast.

[0051] In one feasible implementation, the color-corrected image still exhibits detail blurring caused by forward scattering. Therefore, after calculating the background light estimate, the normalized minimum value for pixels in the distant region of the image is small, and the corresponding transmittance value is also small, indicating severe scattering. Conversely, for pixels in the near region, the transmittance value is close to 1. After restoration using the inverse model, the haze in the distant region is effectively suppressed, and the originally blurred rock texture becomes clearly visible.

[0052] Step S24: Perform Retinex GuI closed-form enhancement on the scene image to obtain the target image.

[0053] It should be noted that RetinexGuI closed-form solution enhancement refers to applying the closed-form solution of the Retinex-Guided Iterative Illumination Estimation algorithm, specifically designed for low-light conditions, to further improve the brightness and detail of an image. This method, based on Retinex theory, treats the image as a product of illumination and reflection components, directly estimating and enhancing the illumination component through the closed-form solution.

[0054] In the implementation process, the scene image is first converted from the RGB color space to the HSV color space, and the luminance V channel is extracted. Then, the logarithm of the V channel is taken, and the Retinex Guil closed-form formula is applied for one or more cascaded enhancements. This closed-form formula is derived from the convergence limit of the iterative formula after infinite iterations, which can efficiently achieve global luminance enhancement and local contrast enhancement. Finally, the enhanced V channel is merged with the original H and S channels and converted back to the RGB color space to obtain the final target image.

[0055] In step S24, Retinex GuI closed-form enhancement is performed on the scene image to further brighten the dark areas of the image on the basis of descattering and color correction, restore the compressed dynamic range, and make the image details richer and the visual experience more natural.

[0056] In one feasible implementation, while the descattered scene image is clear, its overall brightness is too low, and details in shadow areas are lost. After converting it to HSV space, the average value of the V channel is 0.3. After applying Retinex GuI closed-form enhancement to this V channel, its average value is increased to 0.6, and the pixel values ​​in the dark areas are significantly improved. Details such as small fish that were originally hidden in the shadows of corals are clearly revealed, while the corals in the highlight areas are not overexposed, and the overall visual quality of the image is greatly improved.

[0057] In this embodiment, firstly, adaptive channel compensation is applied to the original underwater image to accurately correct the unique blue-green color bias characteristic of underwater images, providing a foundation for color fidelity in subsequent processing. Then, lightweight descattering is used to perform scattering correction processing on the color-corrected image. This effectively removes the blurring caused by water scattering by utilizing a simplified physical model and efficient pixel-by-pixel computation, restoring image clarity. Finally, Retinex Guil closed-form enhancement is applied to the scene image to further improve image brightness and detail. These three steps precisely address different degradation factors in underwater images.

[0058] Overall, this embodiment connects the three core modules of color correction, descattering, and brightness enhancement into a complete processing pipeline, achieving comprehensive enhancement from color to sharpness to brightness. This ensures that the final target image has natural colors, high sharpness, and rich details, resulting in excellent overall enhancement.

[0059] Based on the second embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to the second embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 Before step S24, the underwater image enhancement method further includes step S23: Step S23: Perform dynamic range restoration on the scene image to obtain a dynamically restored image; It should be noted that Dynamic Range Recovery (DRR) refers to a method that uses percentile histogram stretching to expand the pixel value distribution of an image to the full [0, 1] range, thereby restoring the dynamic range that has been compressed due to scattering and absorption effects.

[0060] In the implementation process, for each color channel of the scene image, its cumulative distribution histogram (CDF) is first calculated. Then, based on preset low percentiles (e.g., 0.5%) and high percentiles (e.g., 99.5%), the corresponding pixel value thresholds are located on the CDF. Finally, all pixel values ​​below the low threshold are set to 0, and pixel values ​​above the high threshold are set to 1. Pixel values ​​between the two thresholds are linearly mapped to the range [0, 1]. The computational complexity of this operation is O(N).

[0061] The calculation process for dynamic range recovery is as follows: For each color channel of scene image J ,in, Calculate the lower percentile threshold and the higher percentile threshold separately: For each color channel Perform the following operations:

[0062]

[0063] In the formula, Indicates according to the channel Determined by the pixel statistical distribution Quantiles, quantiles are obtained through channels The grayscale distribution is obtained by performing cumulative distribution statistics. and Representing channels At the corresponding percentile and The specific pixel values ​​below, , These are the lower percentile threshold and the higher percentile threshold, respectively, preferably... =0.5, =99.5.

[0064] Then the channel Perform linear stretching on each pixel in the image to obtain:

[0065] In the formula, For the channel after dynamic range recovery Pixel value; To prevent extremely small constants with a denominator of zero; This is a truncation function that restricts pixel values ​​to the range [0,1]; the other symbols are the same as in the above formula.

[0066] The dynamic range recovery process also possesses good physical interpretability: it corresponds to restoring the dynamic range compression of the image caused by scattering and absorption. This makes the four core algorithms in this fusion enhancement algorithm—adaptive channel compensation, lightweight descattering, dynamic range recovery, and RetinexGuI closed-loop enhancement—well interpretable, allowing for analysis and understanding of the processing effect of each step from a physical perspective. Furthermore, this fusion enhancement algorithm is an unsupervised, training-free method. All its parameters are preset constants or adaptively calculated based on the global statistical information of the input image (such as mean and standard deviation). It requires no prior dataset for training and no GPU hardware support, and can be directly deployed on various embedded platforms with limited computing resources.

[0067] In step S23, by performing dynamic range restoration on the scene image, the contrast of the image can be effectively stretched, making the details in the bright and dark parts of the image more distinct, thus providing a better quality input image for the subsequent RetinexGuI enhancement step.

[0068] In one example, the pixel values ​​of a scene image after descattering processing are mainly concentrated in a narrow range of [0.2, 0.7], resulting in insufficient contrast. Calculations revealed that the pixel value at the 0.5% quantile is 0.25, and the pixel value at the 99.5% quantile is 0.75. After percentile stretching, the original pixel value of 0.25 is mapped to 0, and the original pixel value of 0.75 is mapped to 1, effectively expanding the image pixel values ​​to the entire [0, 1] interval. After processing, the bright areas of the image are brighter, the dark areas are darker, and the overall contrast is significantly improved.

[0069] Correspondingly, step S24 includes step A24: Step A24: Perform Retinex GuI closed-form enhancement on the dynamically restored image to obtain the target image.

[0070] The implementation process of this step is basically the same as step S24: the dynamically restored image is converted to HSV space, its luminance V channel is enhanced by cascaded application of the Retinex Guil closed-form formula, the saturation S channel is corrected, and finally it is converted back to RGB space. Since the input image has already undergone dynamic range restoration, its contrast and pixel distribution are more reasonable. Therefore, this step can more effectively focus on improving the local brightness and details of the image, avoiding poor enhancement effects or the introduction of new noise due to the low dynamic range of the input image.

[0071] In step A24, RetinexGuI closed-form enhancement is performed on the dynamically restored image, thereby further improving the visual brightness and visibility of dark details of the image on the basis of the restored contrast of the dynamically restored image.

[0072] In one example, the dynamically restored image had good contrast, but the overall brightness was still too low, especially making objects in the deep water area difficult to discern. After inputting this image into this step, RetinexGuI closed-loop enhancement improved the overall brightness while maintaining the high contrast of the restored image. The final output image not only had strong contrast between light and dark areas, but also had a bright and clear overall appearance, with details of sea urchins and reefs in the deep water area clearly visible.

[0073] In this embodiment, an additional dynamic range restoration step is introduced. Specifically, after lightweight descattering and before Retinex GuI closed-loop enhancement, this step performs dynamic range restoration on the scatter-corrected scene image. Through efficient percentile histogram stretching, the image dynamic range compression problem caused by absorption and scattering is effectively solved, significantly improving image contrast. Subsequently, by applying Retinex GuI closed-loop enhancement to the dynamically restored image with good contrast, the focus can be more on brightness enhancement and detail enhancement, avoiding interference from insufficient contrast on the brightness enhancement effect.

[0074] Overall, this embodiment adds dynamic range recovery as an intermediate step in the processing flow, making the entire enhancement method a complete physical degradation reversal chain of color correction, descattering, contrast restoration, and brightness / detail enhancement. Each step works synergistically to achieve an enhanced image with more natural colors, stronger contrast, and richer details in both bright and dark areas.

[0075] In one feasible implementation, step A24 includes steps A241 to A244: Step A241: Convert the dynamically restored image from the RGB color space to the HSV color space to obtain the initial HSV image; It's important to note that the HSV color space is a color model that represents color as three components: hue, saturation, and value. Compared to the RGB color space, the HSV space separates color information from brightness information. This ensures that adjusting image brightness does not alter the inherent properties of color (hue), thus avoiding color distortion.

[0076] During implementation, the RGB value of each pixel in the dynamically restored image is calculated according to the standard RGB to HSV conversion formula to obtain the corresponding H, S, and V values, which form the initial HSV image.

[0077] In step A241, the image is converted to a color space that allows for independent processing of brightness and color, laying the foundation for subsequent brightness enhancement and saturation correction.

[0078] In one example, a dynamically restored image contains a piece of red coral; the red coral has values ​​of (R=0.8, G=0.2, B=0.2) in RGB space. After conversion to HSV space, its hue H corresponds to the red area, its saturation S is high, and its brightness V=0.8. Through this conversion, the red attribute of the red coral is encoded in the H component, while the brightness information is separated into the V component. Subsequent operations on the V component will not change the red hue of the coral.

[0079] Step A242: Apply the Retinex GuI closed-form solution formula to the luminance channel of the initial HSV image for cascade enhancement to obtain a cascaded enhanced image; It should be noted that cascaded enhancement refers to repeatedly applying the RetinexGuI closed-loop enhancement operation multiple times, using the output of the previous operation as input each time, thereby achieving a stronger brightness and detail enhancement effect.

[0080] In the implementation process, the luminance V channel is first extracted from the initial HSV image. Then, the natural logarithm of this V channel is taken to obtain its logarithmic domain representation. Next, according to a preset rule or an adaptively determined cascade enhancement level K, the Retinex Guil closed-form formula is repeatedly applied K times to the logarithmic domain V channel. After K calculations, the cascaded enhanced logarithmic domain luminance component is obtained. Finally, this component is subjected to an exponential operation to restore the linear domain enhanced luminance channel, which is then merged with the original H and S channels to obtain the cascaded enhanced image.

[0081] In step A242, by applying efficient closed-form solutions multiple times, the brightness and local contrast of the image are gradually improved, so that the details in the dark areas are fully revealed.

[0082] In one example, the V channel of the initial HSV image was generally dark. After performing a Retinex GuI closed-form enhancement on the initial HSV image, the brightness was improved, but the details in the shadow areas were still not ideal. The result of the first enhancement was used as input for a second enhancement (cascaded enhancement levels K=2). After the second enhancement, the pixel values ​​of the originally darkest areas were significantly improved, the texture details hidden within became clearly visible, and the overall image brightness was more uniform and natural.

[0083] Step A243: Perform linear enhancement and gamma correction on the saturation channel of the cascaded enhanced image to obtain the enhanced HSV image; It should be noted that saturation correction refers to adjusting the saturation channel of an image after brightness enhancement to compensate for the potential decrease in color saturation caused by brightness stretching, resulting in a more vibrant and natural final image. In the implementation process, the saturation S channel in the cascaded enhanced image obtained in step S200 is first linearly boosted. Then, gamma correction is performed on the linearly boosted saturation.

[0084] The calculation formulas for linear enhancement and gamma correction are as follows:

[0085]

[0086] In the formula, This is the intermediate saturation channel after linear enhancement; S ( x , y ) represents the saturation channel of the cascaded enhanced image; This is a truncation function that restricts pixel values ​​to the range [0,1]. This is the linear enhancement coefficient for saturation. , is the gamma correction factor, used to control the degree of saturation enhancement; This is the final corrected saturation channel. When... and At the same time, the color vibrancy and naturalness of underwater images can be appropriately enhanced without avoiding color distortion.

[0087] In step A243, the overall saturation of the image is moderately increased to avoid color fading that may occur due to increased brightness, while gamma correction is used to prevent excessive saturation from causing color distortion.

[0088] In one example, the image became brighter overall after brightness enhancement, but the originally vibrant yellow anemone appeared somewhat whitish. First, the saturation channel S was multiplied by a factor of 1.2 to initially increase the saturation of the yellow anemone. Then, gamma correction was performed to further enhance the colors in the low-to-mid-saturation areas while limiting excessive enhancement in the high-saturation areas. Ultimately, the yellow anemone regained its vibrant yellow color, while the surrounding seawater appeared purer, resulting in a natural and harmonious overall color scheme.

[0089] Step A244: Convert the enhanced HSV image to the RGB color space to obtain the target image.

[0090] It should be noted that step A244 is the reverse process of step A241. During implementation, according to the standard HSV to RGB conversion formula, the H, S, and V values ​​of each pixel in the enhanced HSV image are calculated to obtain the corresponding R, G, and B values, forming the final RGB format target image that can be output on a standard display device. The following conversion formula can be referenced in the specific calculation process:

[0091] In the formula, I out The target image; RGB(*,*,*) represents the RGB space conversion of the three channels; H , S’ , V enh The images are, in order: the H channel of the enhanced HSV image, the corrected S channel of the enhanced HSV image, and the cascaded enhanced V channel of the enhanced HSV image.

[0092] In step A244, the processed image data is converted back to the most commonly used RGB format to facilitate subsequent display, storage, or application to other visual tasks.

[0093] In this implementation, firstly, by converting the image to the HSV color space, luminance and color information are separated, creating conditions for independent luminance processing and avoiding color distortion. Then, by cascading the Retinex Guil closed-form formula onto the luminance channels, image luminance and local contrast are progressively enhanced with extremely high efficiency, effectively restoring details in dark areas. Next, the saturation channels are corrected through linear enhancement and gamma correction to compensate for any loss of color saturation that might result from luminance enhancement, ensuring the vibrancy of the output image. Finally, the processed image is converted back to the universal RGB color space.

[0094] Overall, this implementation achieves decoupling and independent optimization of luminance and saturation within the HSV color space. Through cascaded closed-loop de-enhancement of the luminance channel and segmented correction of the saturation channel, it significantly improves image brightness and detail while ensuring accurate and natural colors, thus achieving high-quality image enhancement output.

[0095] In one feasible implementation, step A242 includes steps A2421 to A2425: Step A2421: Calculate the average brightness of the brightness channel of the initial HSV image; It should be noted that the average brightness value refers to the arithmetic mean of all pixel values ​​in the brightness V channel, reflecting the overall brightness level of the image. During implementation, each pixel in the brightness V channel of the initial HSV image is iterated over, its pixel value is accumulated, and then the sum is divided by the total number of pixels to obtain the average brightness value.

[0096] The following calculation method can be used in the specific calculation of the average brightness value of the brightness channel:

[0097] In the formula, The average brightness value of the brightness channel of the initial HSV image. N This represents the total number of pixels in the initial HSV image. V ( x , y ) is the pixel position ( x , y The luminance component of the luminance channel at (). It is the set of spatial pixel coordinates of the image.

[0098] In step A2421, by calculating the average brightness of the brightness channel of the initial HSV image, the brightness status of the input image can be quantitatively evaluated, providing an objective basis for the subsequent adaptive selection of enhancement intensity.

[0099] Step A2422: Adaptively determine the number of cascaded enhancement stages based on the average brightness value of the brightness channel; It should be noted that the cascade enhancement level K refers to the number of times the Retinex Guil closed-form formula is repeatedly applied to the luminance channel. The larger the K value, the stronger the enhancement effect, but the computational load also increases linearly. Adaptive determination means that the K value is not fixed, but dynamically determined based on the average luminance value calculated in step S210.

[0100] In the process of adaptively determining the number of cascade enhancement stages, the following method can be used as a reference:

[0101] In the formula, KFor cascaded enhancement series; The average brightness value of the brightness channel of the initial HSV image is calculated by step A2421 above.

[0102] During implementation, a mapping rule or function is pre-set to map the average brightness range to the corresponding K value. For example, if the average brightness is less than 0.08, such as 0.05, it indicates that the image is too dark, so K=3 is set; if the average brightness is between 0.08 and 0.16, K=2 is set; if the average brightness is greater than 0.16, it indicates that the image brightness is acceptable, so K=1 is set.

[0103] In step A2422, the enhancement intensity is automatically adjusted based on the average brightness value of the brightness channel to avoid over-enhancing images that are already bright enough or under-enhancing images that are too dark.

[0104] Step A2423: Take the natural logarithm of the luminance channel of the initial HSV image to obtain the logarithmic domain representation; It's important to note that taking the natural logarithm refers to applying the natural logarithm to each pixel value of the luminance (V) channel. Retinex theory states that the luminance (V) of an image is equal to the product of the reflection component (R) and the illumination component (L), i.e., V = R * L. Taking the logarithm transforms this product relationship into an additive one: log(V) = log(R) + log(L). This facilitates the separation and enhancement of the illumination component.

[0105] The formula for calculating the logarithm field representation is as follows:

[0106] In the formula, This represents the initial state after taking the logarithm of the luminance channel. V ( x , y ) is the pixel position ( x , y The luminance component of the luminance channel at (). To prevent the oddly small constants in logarithmic operations.

[0107] In step A2423, the luminance channel is converted from a multiplicative model to an additive model to prepare for the application of the linear form of the Retinex GuI closed-form solution formula.

[0108] Step A2424: Apply the Retinex GuI closed-form solution formula to the logarithmic domain representation and perform cascaded calculations K times to obtain the cascaded enhanced logarithmic domain luminance components; where K is the number of cascaded enhancement stages; It should be noted that the RetinexGuI closed-form solution formula is presented in this embodiment as a simple iterative form.

[0109] The formula for calculating K consecutive iterations of the Retinex Guil closed-form solution for the logarithmic field representation is as follows:

[0110] In the formula, The logarithmic domain luminance component after the (k+1)th cascaded enhancement; Let K be the logarithmic domain luminance component after the k-th cascade enhancement; K is the cascade enhancement level. It should be noted that this Retinex-GuI closed-form solution is derived from the convergence limit of the Retinex-GuI iterative formula as the number of iterations N approaches infinity.

[0111] Step A2425: Perform an exponential operation on the logarithmic domain luminance component to obtain the cascaded enhanced image.

[0112] It should be noted that the exponentiation operation refers to applying an exponentiation operation with the natural constant e as the base to each value in the logarithmic domain luminance component after cascade enhancement. This is the reverse process of the logarithmic operation in step S2423 above, and is used to restore the logarithmic domain representation back to the linear domain luminance value.

[0113] The calculation formula for exponential operation of the logarithmic domain luminance component is as follows:

[0114] In the formula, V enh The cascaded enhanced V channel in the enhanced HSV image; This is a truncation function that restricts pixel values ​​to the range [0,1]; exp(*) is an exponential function with the natural constant e as its base. This represents the logarithmic domain luminance component after the k-th cascaded enhancement.

[0115] In step A2425, the transformation from the logarithmic domain to the linear domain is completed, and the output is an enhanced brightness channel that can be directly used for image display.

[0116] In this implementation, firstly, the cascade enhancement level K is adaptively determined based on the average brightness of the input image, achieving intelligent adjustment of the enhancement intensity and avoiding under-enhancement or over-enhancement, thus improving the robustness of the method. Then, a logarithmic transformation converts the multiplicative model into an additive model, laying the foundation for subsequent linear processing. Next, by repeatedly applying the simplified Retinex Guil closed-form iterative formula, the logarithmic domain brightness component is efficiently brought closer to its maximum value, achieving brightness enhancement and dynamic range compression. Finally, the logarithmic domain result is restored through exponential operations.

[0117] Overall, this implementation provides an adaptive, controllable, and computationally simple brightness enhancement scheme. Its core iterative formula consists only of addition and division, eliminating the need for complex multiplication and convolution operations, thus ensuring a linear complexity of O(N). Furthermore, the adaptive mechanism guarantees optimal enhancement results for images at different brightness levels.

[0118] Based on the second embodiment of this application, in the fourth embodiment of this application, the same or similar content as the second embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 Step S21 includes steps S211 to S214: Step S211: Calculate the channel mean of each color channel of the original underwater image; wherein, the original underwater image is an RGB three-channel image; It should be noted that the channel mean refers to the arithmetic mean of all pixel values ​​in the red, green, and blue channels of the original RGB image; the channel mean reflects the overall intensity level of the image in the red, green, and blue color components.

[0119] During implementation, for the red channel, all pixels in the image are traversed, their red component values ​​are accumulated, and then divided by the total number of pixels to obtain the red channel mean. The mean values ​​for the green and blue channels are calculated similarly.

[0120] In step S211, the mean value of each color channel of the original underwater image is calculated to quantitatively evaluate the degree of attenuation of the underwater image in each color channel, providing a basis for subsequent compensation.

[0121] In one example, the original underwater image suffered from severe red light attenuation, resulting in an average red channel value of only 40, a green channel value of 90, and a blue channel value of 110. These three values ​​clearly quantify the degree of blue-green tint in the colors.

[0122] Step S212: Calculate the global mean of all channels of the original underwater image; It should be noted that the global mean refers to the total average value of all color channels and all pixels in the original RGB image; it is a single value that represents the overall brightness level of the image.

[0123] The specific calculation formula is as follows:

[0124]

[0125] In the formula, μ cis the global pixel average value of channel c, where c can be any of the R, G, and B channels; N is the total number of pixels in the image. The set of spatial pixel coordinates of the image; I c ( x , y ) is the spatial pixel of the image ( x , y ) R , G , B Component values ​​of the three channels; μ avg This represents the average brightness across all channels, i.e., the global average across all channels. μ R , μ G , μ B These are the global pixel averages for channels R, G, and B, respectively.

[0126] In step S212, a reference benchmark for balancing the channels is provided by calculating the global mean of all channels of the original underwater image.

[0127] Step S213: Calculate the compensation gain of each color channel based on the channel mean of each color channel and the global mean of all channels. It should be noted that compensation gain is a coefficient used to multiply the original channel pixel value, designed to correct the intensity deviation of that channel. The formula for calculating compensation gain is based on the gray-world assumption, which states that ideally, the mean of each channel should equal the global mean. Based on this, compensation gains can be generated for each color channel so that the channel mean of each color channel, after being compensated by the corresponding compensation gain, approaches the global mean of all channels.

[0128] The specific calculation formulas for the compensation gain of each color channel are as follows:

[0129] In the formula, The compensation gain coefficient for channel c; To compensate for the strength control parameters, This is when full compensation is achieved; This is to prevent extremely small constants with a denominator of zero.

[0130] In step S213, by calculating a suitable gain value for each channel, the channel with severe attenuation (low mean) receives a gain greater than 1, while the channel with weak attenuation (high mean) receives a gain less than 1, thereby achieving color equalization.

[0131] Step S214: For each color channel of each pixel in the original underwater image, perform a multiplication operation using the compensation gain of the corresponding color channel to obtain the color-corrected image.

[0132] It should be noted that multiplication refers to multiplying the value of each channel of each pixel in the original image by the compensation gain corresponding to that channel to obtain a new color-corrected pixel value.

[0133] In the specific calculation process, the calculation formula can be referred to as follows:

[0134] In the formula, I cc,c ( x , y ) is spatial pixel ( x , y (Color correction at this point) R , G , B The component values ​​of the three channels; clip(*,0,1) is a truncation function that restricts the pixel values ​​to the range [0,1], with the constraint interval being [0,1]. g c This is the compensation gain for the corresponding channel. I c ( x , y ) is the spatial pixel of the image ( x , y ) R , G , B Component values ​​of the three channels.

[0135] In step S214, for each color channel of each pixel in the original underwater image, a multiplication operation is performed using the compensation gain of the corresponding color channel, which can efficiently complete color correction and generate a color-balanced image.

[0136] In one example, a pixel in the original image has values ​​of (R=0.1, G=0.5, B=0.6). After applying the calculated gain (2.0, 0.89, 0.73), the corrected values ​​are: R'=0.2, G'=0.445, B'=0.438. The pixel's color changes from a bluish-green tint (0.1, 0.5, 0.6) to near gray (0.2, 0.445, 0.438), effectively correcting the bluish-green tint. Performing this process on all pixels yields the color-corrected image.

[0137] In this embodiment, firstly, the color deviation and overall brightness of the image are quantified by calculating the mean of each channel and the global mean separately. Then, based on the gray-world assumption that the channel mean should approach the global mean, a compensation gain is calculated for each channel using a simple ratio formula. This gain automatically adapts to different levels of color degradation in the image: channels with severe degradation receive a gain greater than 1, and vice versa. Finally, the compensation gain is efficiently applied to the entire image through pixel-by-pixel and channel-by-channel multiplication operations.

[0138] Overall, this embodiment provides a minimalist color correction scheme based entirely on global statistics, requiring no neighborhood operations. Its calculation process consists only of mean calculation and scalar multiplication, with a complexity of O(N). It can quickly and effectively correct the blue-green bias in underwater images caused by red light attenuation, providing a color-accurate base image for subsequent processing steps.

[0139] Based on the second embodiment of this application, in the fifth embodiment of this application, the content that is the same as or similar to the second embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 5 Step S22 includes steps S221 to S222: Step S221: Based on the channel statistics of the color-corrected image, estimate the background light and pixel-wise transmittance of the color-corrected image; It should be noted that channel statistics refer to the global mean and standard deviation of each color channel in the color-corrected image. Background light represents the intensity of scattered light in an object-free area of ​​the underwater environment and is a key parameter in underwater imaging models. Per-pixel transmittance describes the proportion of light that is not scattered as it travels from an object to the camera; its value is between 0 and 1, with smaller values ​​indicating more severe scattering.

[0140] In the implementation process, firstly, the background light is estimated using the channel statistics method: for each channel c, the background light B... c The mean value of the channel is estimated to be 1. c with standard deviation std c A linear combination, namely B c =mean c +beta*std c , where beta is a coefficient controlling the degree of conservatism. Then, the transmittance is estimated using a pixel-by-pixel method: for each pixel position, the channel values ​​of that pixel are first normalized by dividing each channel by the background light of the corresponding channel, then the minimum value among all normalized channels is taken, and finally the final transmittance is obtained through a linear transformation.

[0141] The specific formula for calculating the background light of the color-corrected image is as follows:

[0142]

[0143]

[0144] In the formula, Color-corrected images Central Channel The global mean; N is the total number of pixels in the image; I cc,c ( x , y ) is spatial pixel ( x , y (Color correction at this point) R , G , B Component values ​​of the three channels; Color-corrected images Central Channel Standard deviation; These are the background light estimation coefficients, controlling the degree of conservatism in the background light estimation; These are the lower and upper clipping values ​​for the background light; For channel Background light estimate; This is a truncation function that restricts pixel values ​​to the range [0,1].

[0145] In addition, the specific formula for calculating the transmittance t of a color-corrected image is as follows:

[0146]

[0147]

[0148] In the formula, The channel after background light normalization Pixel values; I cc,c ( x , y ) is spatial pixel ( x , y (Color correction at this point) R , G , B Component values ​​of the three channels; For channel Background light estimate; To prevent extremely small constants where the denominator is zero; , is the descattering intensity factor, which controls the degree of descattering; This is an operation that takes the minimum value for all color channels; To set a minimum transmittance threshold, preventing division by zero and excessive enhancement; This is a truncation function that restricts pixel values ​​to the range [0,1].

[0149] In step S221, the background light and pixel-wise transmittance of the color-corrected image are estimated based on the channel statistics of the color-corrected image. The entire estimation process does not involve neighborhood filtering and can estimate the two most important parameters in the physical model at a very low computational cost, thus preparing for subsequent scene restoration.

[0150] Step S222: Substitute the background light and the pixel-by-pixel transmittance into the underwater imaging model for inverse operation to obtain the scene image after scattering correction.

[0151] It should be noted that the underwater imaging model is a physical equation describing the underwater image formation process. Its classic form is I(x) = J(x) * t(x) + B * (1 - t(x)), where I(x) is the observed image (color-corrected image), J(x) is the scatterless scene image to be recovered (scene image), t(x) is the transmittance, and B is the background light. The inverse operation is the process of solving for J based on the known I, t, and B.

[0152] In the specific calculation process, the calculation formula for the underwater imaging model is as follows:

[0153] In the formula, I cc,c ( x , y ) is spatial pixel ( x , y (Color correction at this point) R , G , B Component values ​​of the three channels; J c ( x , y ( ) represents the scatter-free scene image to be recovered. t ( x , y )for( x , y Transmittance at ) B c This represents the background light. The scene image can be obtained by substituting the numerical values ​​into the formula and performing the inverse operation. J c ( x , y ).

[0154] The inverse formula obtained by performing the above operation is as follows:

[0155] The meanings of the symbols in the formula after the inverse operation are consistent with the calculation formula of the underwater imaging model mentioned above.

[0156] In step S222, by substituting the background light and pixel-by-pixel transmittance into the underwater imaging model for inverse operation, a clear, scatter-free scene image is inverted from the degraded observation image through the inverse process of the physical model.

[0157] In this embodiment, firstly, background light is estimated using a method based on channel statistics, and transmittance is estimated using a pixel-by-pixel normalization and minimum value method. Both estimation methods avoid the computationally expensive neighborhood minimum filtering and guided filtering found in traditional dark channel prior methods, simplifying complex neighborhood operations to global statistics and pixel-by-pixel calculations, thus significantly reducing computational complexity. Then, by using the estimated background light and transmittance, inverse operations are performed on the underwater imaging model, precisely eliminating scattering effects at the physical level and restoring the true color and sharpness of the scene.

[0158] Overall, this embodiment provides a physically interpretable and computationally efficient lightweight descattering scheme. Through ingenious simplification, it reduces computational complexity to O(N) while maintaining descattering effects similar to traditional complex methods. Furthermore, all operations are pixel-wise or based on global statistics, naturally supporting parallel acceleration, making real-time descattering possible on embedded platforms such as underwater robots.

[0159] For example, to help understand the implementation flow of the underwater image enhancement method obtained by combining this embodiment with the above-described embodiment three, please refer to... Figure 6 , Figure 6 A simplified flowchart of an underwater image enhancement method is provided, specifically: First, the underwater degraded image, i.e. the original underwater image, is acquired and then input into the fusion enhancement algorithm.

[0160] Then, the four core processing algorithms in the fusion enhancement algorithm—adaptive channel compensation, lightweight descattering, dynamic range recovery, and RetinexGuI closed-loop enhancement—process the original underwater image in sequence, and finally output the enhanced image, i.e., the target image.

[0161] The computational complexity of the entire fusion enhancement algorithm is O(N). The calculation process mainly uses full pixel-by-pixel and global statistical operations, and there are no neighborhood operations in the entire calculation process. Furthermore, no training is required, which greatly reduces the computational cost of the fusion enhancement algorithm, making it particularly suitable for embedded platforms with limited computing resources.

[0162] also, Figure 7 The document also includes a comparison chart of the performance metrics and runtime of this scheme with other mainstream underwater image enhancement schemes; among them, Figure 7 (a) in the chart is a comparison chart of UCIQE indicators (i.e., a comparison chart of performance indicators). Figure 7 (b) in the figure is a runtime comparison chart. The rightmost bar in both the performance comparison chart and the runtime comparison chart represents the fusion enhancement algorithm of this scheme. From... Figure 7 As can be seen from the performance comparison chart, the proposed fusion enhancement algorithm achieves the best UCIQE score. At the same time, the proposed fusion enhancement algorithm uses relatively less runtime in the runtime comparison chart. Therefore, while ensuring excellent performance enhancement of underwater images, the proposed fusion enhancement algorithm can still maintain low computational complexity, so that the same computing platform can complete image enhancement processing with a lower runtime.

[0163] It should be noted that UCIQE (Underwater Colour Image Quality Evaluation) is an underwater color image quality assessment index. It belongs to the category of referenceless image quality assessment methods, meaning it can evaluate underwater image quality without requiring an original reference image. It is primarily used to quantify the balance of color, saturation, and contrast in underwater images.

[0164] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the underwater image enhancement method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0165] This application also provides an underwater image enhancement device; please refer to... Figure 8 The underwater image enhancement device includes: Image acquisition module 10 is used to acquire raw underwater images; Image enhancement module 20 is used to process the original underwater image using a fusion enhancement algorithm to obtain a target image; wherein the fusion enhancement algorithm includes at least adaptive channel compensation, lightweight descattering and Retinex GuI closed-loop solution enhancement.

[0166] The underwater image enhancement device provided in this application, employing the underwater image enhancement method described in the above embodiments, can solve the technical problem that current underwater image enhancement technologies struggle to balance enhancement effectiveness with low computational complexity. Compared with the prior art, the beneficial effects of the underwater image enhancement device provided in this application are the same as those of the underwater image enhancement method described in the above embodiments, and other technical features in the underwater image enhancement device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0167] This application provides an underwater image enhancement device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the underwater image enhancement method in Embodiment 1 above.

[0168] The following is for reference. Figure 9 The diagram illustrates a structural schematic suitable for implementing the underwater image enhancement device of the embodiments of this application. The underwater image enhancement device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), vehicle terminals (e.g., vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 9 The underwater image enhancement device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of this application.

[0169] like Figure 9As shown, the underwater image enhancement device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the underwater image enhancement device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the underwater image enhancement device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows an underwater image enhancement device with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0170] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0171] The underwater image enhancement device provided in this application, employing the underwater image enhancement method described in the above embodiments, can solve the technical problem that current underwater image enhancement technologies struggle to balance enhancement effectiveness with low computational complexity. Compared with the prior art, the beneficial effects of the underwater image enhancement device provided in this application are the same as those of the underwater image enhancement method described in the above embodiments, and other technical features of this underwater image enhancement device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0172] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0173] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0174] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to perform the underwater image enhancement method described in the above embodiments.

[0175] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0176] The aforementioned computer-readable storage medium may be included in the underwater image enhancement device; or it may exist independently and not assembled into the underwater image enhancement device.

[0177] The aforementioned computer-readable storage medium carries one or more programs that, when executed by the underwater image enhancement device, cause the underwater image enhancement device to: acquire a raw underwater image; process the raw underwater image using a fusion enhancement algorithm to obtain a target image; wherein the fusion enhancement algorithm includes at least adaptive channel compensation, lightweight descattering, and Retinex GuI closed-loop de-enhancement.

[0178] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0179] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0180] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0181] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described underwater image enhancement method. This solves the technical problem that current underwater image enhancement technologies struggle to balance enhancement effectiveness with low computational complexity. Compared to existing technologies, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the underwater image enhancement method provided in the above embodiments, and will not be elaborated upon here.

[0182] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the underwater image enhancement method described above.

[0183] The computer program product provided in this application can solve the technical problem that current underwater image enhancement technologies struggle to balance enhancement effectiveness with low computational complexity. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the underwater image enhancement methods provided in the above embodiments, and will not be repeated here.

[0184] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. An underwater image enhancement method, characterized in that, The method includes: Acquire raw underwater images; The original underwater image is processed using a fusion enhancement algorithm to obtain the target image; wherein the fusion enhancement algorithm includes at least adaptive channel compensation, lightweight descattering, and Retinex GuI closed-loop solution enhancement.

2. The method as described in claim 1, characterized in that, The step of processing the original underwater image using a fusion enhancement algorithm to obtain the target image includes: Adaptive channel compensation is performed on the original underwater image to obtain a color-corrected image; Lightweight descattering is performed on the color-corrected image to obtain a scatter-corrected scene image; The scene image is enhanced using Retinex GuI closed-form decoding to obtain the target image.

3. The method as described in claim 2, characterized in that, Before the step of performing Retinex GuI closed-form enhancement processing on the scene image to obtain the target image, the method further includes: The scene image is dynamically restored to obtain a dynamically restored image; Correspondingly, the step of performing Retinex GuI closed-form enhancement on the scene image to obtain the target image includes: The target image is obtained by performing Retinex GuI closed-form enhancement on the dynamically restored image.

4. The method as described in claim 3, characterized in that, The step of performing Retinex GuI closed-form enhancement on the dynamically restored image to obtain the target image includes: The dynamically restored image is converted from the RGB color space to the HSV color space to obtain the initial HSV image; The luminance channel of the initial HSV image is cascaded enhanced by applying the Retinex GuI closed-form solution formula to obtain a cascaded enhanced image; Linear enhancement and gamma correction are performed on the saturation channel of the cascaded enhanced image to obtain the enhanced HSV image; The enhanced HSV image is converted to the RGB color space to obtain the target image.

5. The method as described in claim 4, characterized in that, The step of applying the Retinex GuI closed-form formula to the luminance channel of the initial HSV image for cascade enhancement to obtain a cascaded enhanced image includes: Calculate the mean luminance value of the luminance channel of the initial HSV image; The number of cascaded enhancement stages is adaptively determined based on the average brightness value of the brightness channel. Take the natural logarithm of the luminance channel of the initial HSV image to obtain its logarithmic domain representation; The logarithmic domain representation is cascaded and calculated K times using the Retinex GuI closed-form solution to obtain the cascaded enhanced logarithmic domain luminance component; where K is the number of cascaded enhancement stages. The cascaded enhanced image is obtained by performing an exponential operation on the logarithmic domain luminance component.

6. The method according to any one of claims 2 to 5, characterized in that, The step of performing adaptive channel compensation on the original underwater image to obtain a color-corrected image includes: The mean value of each color channel in the original underwater image is calculated; wherein, the original underwater image is an RGB three-channel image; The global mean of all channels of the original underwater image is calculated; The compensation gain of each color channel is calculated based on the channel mean of each color channel and the global mean of all channels. For each color channel of each pixel in the original underwater image, a multiplication operation is performed using the compensation gain of the corresponding color channel to obtain the color-corrected image.

7. The method according to any one of claims 2 to 5, characterized in that, The step of performing lightweight descattering on the color-corrected image to obtain a scatter-corrected scene image includes: Based on the channel statistics of the color-corrected image, the background light and pixel-wise transmittance of the color-corrected image are estimated; The background light and the pixel-by-pixel transmittance are substituted into the underwater imaging model for inverse operation to obtain the scene image after scattering correction.

8. An underwater image enhancement device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the underwater image enhancement method as described in any one of claims 1 to 7.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the underwater image enhancement method as described in any one of claims 1 to 7.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the underwater image enhancement method as described in any one of claims 1 to 7.