Underwater image enhancement method

By decomposing underwater images into foreground and background and combining contrast enhancement, ambient light estimation and adaptive color correction methods, the clarity and color distortion problems of underwater images in complex environments are solved, achieving high-quality image enhancement effects.

CN120655554AActive Publication Date: 2025-09-16NANTONG MARINE ADVANCED RESEARCH INSTITUTE SOUTHEAST UNIVERSITY +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510794396.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-16
Estimated Expiration
2045-06-13

AI Technical Summary

Technical Problem

Existing underwater image enhancement algorithms are not very effective in complex environments and cannot effectively solve the clarity and color distortion problems of underwater images.

Method used

The underwater image is decomposed into foreground and background sub-images. A percentile maximum-based contrast enhancement algorithm is used to improve the foreground clarity. The background is restored by combining ambient light estimation and multi-layer transmission map estimation methods. The two are fused through principal component analysis, and an adaptive color correction algorithm is used to correct local color cast.

Benefits of technology

It achieves high-quality enhancement of images in complex underwater environments, restores clarity and natural colors, and improves image visibility and detail fidelity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120655554A_ABST
    Figure CN120655554A_ABST
Patent Text Reader

Abstract

The invention discloses an underwater image enhancement algorithm based on foreground and background principal component fusion and adaptive color correction. Specifically, firstly, a contrast enhancement strategy based on a percentile maximum value is implemented on a foreground image of a degraded image to generate a foreground sub-image with enhanced contrast; secondly, estimating an ambient light candidate area in a background image of the degraded image through a novel scoring formula and estimating a defogging strategy through a multi-layer transmission image to generate a defogged background sub-image; and then, fusing a high-visibility underwater image by adopting a principal component analysis fusion method and combining the advantages of foreground contrast enhancement and background restoration and reconstruction. And finally, providing a color correction strategy guided by color balance, and performing further color correction on the fused image so as to improve the visual effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an underwater image enhancement method, in particular to an underwater image enhancement method for foreground and background principal component fusion and adaptive color correction, belonging to the technical field of image processing. Background Art

[0002] With the continuous growth of the global population and the increasing scarcity of land resources, the exploration and development of marine resources has become a focus of researchers and scholars. Underwater imaging technology, as an important tool for exploring marine resources, can help researchers obtain information about the underwater world and promote the exploration of underwater resources. However, the quality of underwater images is often affected by various factors, such as the absorption and scattering of underwater light, the refraction of light, and the complexity of the environment. As a result, the clarity and available information of underwater images are often insufficient, and they often suffer from color distortion, blurring, and other problems. Therefore, how to improve the quality of underwater images, especially image enhancement in low light and complex environments, has become a technical problem that needs to be solved urgently.

[0003] Traditional underwater image enhancement algorithms fall into two main categories: those based on visual priors and those based on physical models. These algorithms improve the image's visual quality by adjusting visual information such as brightness and contrast, making it appear clearer. Examples include MLLE (based on the grayscale world assumption) and ICSP (based on Retinex theory). However, due to the widespread presence of color casts and uneven illumination in underwater images, methods based on visual priors often struggle to achieve significant results in severely degraded underwater environments.

[0004] Another category of methods is enhancement algorithms based on physical models. These algorithms focus more on the physical properties of the underwater environment and attempt to restore the original image by simulating the underwater light propagation process. Underwater image degradation can often be modeled through the absorption and scattering effects of water. A common approach is to use image restoration methods based on the physical model of underwater imaging. These methods use various prior assumptions to calculate the physical model parameters and infer a clear image. Examples include the UDCP algorithm based on the dark channel prior and algorithms based on the diffusion prior. While these physical model methods can improve underwater image quality to a certain extent, they typically assume that image degradation is predictable, an assumption that is often difficult to fully establish in complex underwater environments. Therefore, while traditional methods provide effective means for underwater image enhancement, their limitations remain significant and require further optimization and improvement. Summary of the Invention

[0005] Purpose of the Invention: To address the problems and shortcomings of the prior art, the present invention provides an underwater image enhancement method that integrates foreground and background principal component fusion and adaptive color correction. The method first divides an underwater image into foreground and background sub-images. A contrast enhancement algorithm based on the maximum percentile method is used to improve the clarity of the foreground sub-image. A novel model ambient light estimation theory and a multi-layer transmission map estimation algorithm are then introduced to estimate the physical model parameters of the background sub-image of the underwater image, thereby restoring the background sub-image. Principal component analysis is then used to fuse the foreground and background sub-images to produce a clear underwater image. Finally, an adaptive color correction algorithm is employed to further correct local color casts in the underwater image, resulting in a final, clear image.

[0006] Technical solution: An underwater image enhancement method that combines foreground and background principal components and adaptive color correction, specifically including the following steps: Step 1: Input an underwater degraded image and decompose it into its foreground and background components. After this decomposition, a percentile maximum-based contrast enhancement method is applied to the foreground image to obtain a foreground contrast-enhanced sub-image. Step 2: A four-layer classification estimation method based on texture mean and standard deviation is used to estimate the ambient light candidate area of ​​the background image and select the pixel with the maximum color difference as the ambient light point; Step 3: Use a multi-layer transmission map estimation method to estimate the transmission map of the background image and restore the background sub-image by combining the ambient light points in the previous step; Step 4: Using the principal component analysis fusion method, combining the advantages of foreground contrast enhancement and background restoration and reconstruction, a high-visibility underwater image is fused; Step 5: The fused underwater image is further corrected for local color cast based on the principle of minimum color loss.

[0007] Step 1: Input an underwater picture image and enhance the foreground sub-image of the input image using a percentile maximum-based contrast enhancement method, including the following steps: Step 1-1: Define the image height as , and its separation critical value is expressed by the following formula:

[0008] in As a reference value for separating images; Indicates the location The pixel at . r, g, and b represent the red, green, and blue color channels respectively.

[0009] Step 1-2: Then the foreground image and background image , expressed as follows:

[0010]

[0011] Then the foreground image is contrast enhanced based on the percentile maximum contrast enhancement method to enhance the contrast and texture details of the image. The pixel values ​​of pixels whose image pixel values ​​are less than the first threshold are replaced by the first threshold, and the pixel values ​​of pixels whose pixel values ​​are greater than the second threshold are replaced by the second threshold to obtain the image. The purpose of this process is to enhance the contrast of the foreground image, which is expressed as:

[0012]

[0013] in Represents the total number of pixel values, is the percentile, set it to 0.1%, M[x] and M[x+1] both represent the foreground image array. and is the position of the image pixel corresponding to the percentile. yes Representative foreground image The threshold value corresponding to the array. The image below the threshold value is judged by the threshold value. The pixel value is updated to the threshold The operation for the second threshold can be expressed similarly:

[0014]

[0015] in is the percentile The corresponding threshold is set to 99.5% after analysis. The pixel value is updated to the threshold Afterwards, the contrast enhancement method based on the maximum percentile is used to obtain the enhanced image:

[0016] in and They are the contrast enhanced image and the foreground image after pixel value update. and are the maximum and minimum values ​​of the foreground image after the pixel value is updated.

[0017] Step 2: A four-layer classification estimation method based on texture mean and standard deviation is used to estimate the ambient light points of the background image, including the following steps: Step 2-1: The mathematical formula of the underwater imaging physical model can be expressed as:

[0018] in is the input image, is the model restored image, It's ambient light. is the transmission map. Since the ambient light area is usually evenly illuminated, without obvious details and complex textures, selecting the minimum sum of the texture mean and standard deviation as the candidate area can more accurately locate the potential background light area, which is expressed by the following formula:

[0019] in 、 represents the gray level, is the element of the gray-level co-occurrence matrix of the image, 、 Is grayscale 、 The mean of 、 Grayscale 、 The standard deviation of .

[0020] Step 2-2: Then for the background image Use a scoring formula based on texture mean and standard deviation A four-layer classification estimation method is used to select the ambient light candidate area. Indicates the area with the smallest score among the four areas. Repeat the above steps until The width and height of are both less than 20. Since red light decays faster than green or blue light in water, the pixel with the largest color difference among the remaining pixels in the candidate area is selected as the final ambient light. The formula is:

[0021]

[0022] in represents the ambient light candidate area, It is the ambient light point, Represents the difference between the red channel and the green channel, Represents the difference between the red channel and the blue channel. The sum of the two is used to represent the pixel with the largest color difference using the argmax function; d represents the position of the point with the largest color difference. Representing an image The pixel at position d on the image.

[0023] Step 3: Use the multi-layer transmission map estimation method to estimate the transmission map of the background image and combine it with the ambient light points in the previous step to restore the background sub-image. The specific steps are as follows: Step 3-1: Estimating the ambient light point After that, the restoration of the background image depends on , and the contrast of the restored image increases with This leads to finding the optimal , so that the restored image has maximum contrast. The optimal estimate is calculated as follows:

[0024] in is the initial transmission map, and 128 is a normalization coefficient that adjusts the pixel values ​​of the image to the appropriate range. For RGB images, the pixel values ​​are usually in [0, 255], and 128 is the middle range value. Scaling by 128 normalizes the pixel values ​​of the image.

[0025] Step 3-2: Use guided filtering to optimize the transmission map of the image to prevent artifacts that may appear in the image due to changes in the depth of the real-world scene. The formula is expressed as:

[0026]

[0027]

[0028] in Is the background image The maximum average pixel value in . It is the ratio of the maximum channel pixel average to the channel pixel average in the background image.

[0029] Step 3-3: Convert the calculated and The restored image can be obtained by applying the underwater imaging physical model to the calculation. The formula is: .

[0030] Step 4: Use the principal component analysis fusion method to combine the advantages of foreground contrast enhancement and background restoration and reconstruction to fuse a high-visibility underwater image. The specific steps are as follows: Step 4-1: Use the principal component analysis fusion strategy to obtain a clear underwater image by integrating the dominant features of the foreground contrast enhancement sub-image and the background restoration and reconstruction sub-image. The fusion weights are determined by analyzing the eigenvalues ​​and eigenvectors of the covariance matrix of the foreground image and the background image. Then, the eigenvalues ​​of the matrix are solved based on the calculated covariance matrix. and eigenvectors Select the eigenvector corresponding to the larger eigenvalue and divide it by the sum of the eigenvalues ​​to get the normalized weight. The formula is:

[0031]

[0032] in 、 is the eigenvector with the larger eigenvalue, 、 are the normalized weights, is the number of eigenvalues.

[0033] Step 4-2: The final image fusion can be defined as:

[0034] in Represents the final fused image.

[0035] Step 5: Further correct the local color cast of the fused underwater image based on the principle of minimum color loss. The specific steps are as follows: Step 5-1: First define image Z c The average value of the three color channels for: Where H and W are Z c The height and width of the three color channels are calculated, and the channel with the largest average value is selected as Z. m . Z c (x), Z c, Z c (x, y) These three are fused images, Z c (x, y) is used to indicate that x and y represent the horizontal and vertical coordinates of the image respectively.

[0036] Step 5-2: Since different color channels have different attenuation rates, in order to restore the attenuated colors of each channel, a linear transmission equation is used to define the dynamic boundary of the maximum color channel. The formula is expressed as:

[0037]

[0038] in 、 and Represents different color channels 、 and Color correction value.

[0039] Step 5-3: Then for each color channel , defining the upper and lower boundaries of saturation and :

[0040]

[0041] 0.002 is an empirical constant, which is mainly used to define the cropping ratio when defining the saturation boundary (upper and lower boundaries). Its function is to remove the extreme low-saturation and high-saturation pixel values ​​in the image histogram to obtain a new image. .

[0042] Step 5-4: Finally remap the image pixel values ​​to the range 0 to 255:

[0043] Step 5-5: Since image channels in natural colors usually have similar mean values ​​and histogram distributions, iterate the following formula to update each color channel until convergence is reached:

[0044] The threshold of the minimum color loss constraint is set to .

[0045] A computer device, characterized in that: the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the underwater image enhancement algorithm based on foreground and background principal component fusion and adaptive color correction as described above is implemented.

[0046] A computer-readable storage medium is characterized in that: the computer-readable storage medium stores a computer program for executing the underwater image enhancement algorithm based on foreground and background principal component fusion and adaptive color correction as described above.

[0047] Beneficial Effects: This method processes the foreground and background images of underwater images in separate steps, leveraging the advantages of contrast-enhanced images and physical model-restored images to produce clear underwater images. Finally, an adaptive color correction algorithm is used to further correct local color casts in the image, resulting in a high-quality enhanced image. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a detailed flow chart of an underwater image enhancement method based on foreground and background principal component fusion and adaptive color correction in an embodiment of the present invention; Figure 2 yes Figure 1 Detailed image of the ambient light estimation part in the physical reconstruction stage of the background image; Figure 3 This is a comparison chart of visual effects enhanced on images of blurred water scenes; Figure 4 This is a comparison chart of the visual effects of enhancing an image of a green water scene; Figure 5 This is a comparison chart of the visual effects of enhancing an image of a scene with blue water. DETAILED DESCRIPTION

[0049] The present invention is further illustrated below with reference to specific examples. It should be understood that these examples are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, modifications of various equivalent forms of the present invention made by those skilled in the art all fall within the scope defined by the claims attached to this application.

[0050] The detailed process of this embodiment is as follows Figure 1 As shown, by processing the foreground and background images of underwater images in steps, the advantageous features of the contrast-enhanced image and the physical model restoration image are fully utilized to obtain a clear underwater image. By introducing a percentile maximum-based contrast enhancement method and a multi-layer transmission map estimation method for the background image, a contrast-enhanced foreground image and a restored and reconstructed background image are obtained. Principal component analysis fusion is used to combine the advantageous features of the contrast-enhanced image and the restored and reconstructed image to obtain a clear, natural-looking underwater image. Finally, an adaptive color correction algorithm is used to further correct the local color cast of the image to obtain a high-quality enhanced image. The specific implementation of the scheme consists of the following four main stages: foreground image enhancement stage, background image restoration and reconstruction stage, foreground and background image fusion stage, and adaptive color correction stage.

[0051] The first stage: foreground image enhancement stage Input underwater degraded image, define image The height is Width is , whose separation critical value is , expressed as follows:

[0052] in As a reference value for separating images. 、 、 Represent the red, green and blue color channels respectively. Divide into foreground image and background image , expressed as follows:

[0053]

[0054] Then the foreground image is contrast enhanced based on the percentile maximum contrast enhancement method to enhance the contrast and texture details of the image. The three color channels are used to update the pixel values ​​in each channel. The pixel values ​​of the pixels whose image pixel values ​​are less than the first threshold are replaced by the first threshold, and the pixel values ​​of the pixels whose pixel values ​​are more significant than the second threshold are replaced by the second threshold. The purpose of this process is to enhance the contrast of the foreground image, which is expressed as:

[0055]

[0056] in Represents the total number of pixel values, is the percentile, set it to 0.1%. and is the position of the image pixel corresponding to the percentile. is the percentile and Represents the threshold value corresponding to the foreground image array. The image below the threshold value is judged by the threshold value. The pixel value is updated to the threshold The operation for the second threshold can be expressed similarly:

[0057]

[0058] in is the percentile The corresponding threshold is set to 99.5% after analysis. The pixel value is updated to the threshold Afterwards, the contrast enhancement method based on the maximum percentile is used to obtain the enhanced image:

[0059] in and They are contrast enhanced image and pixel value updated foreground image respectively. and are the maximum and minimum values ​​of the foreground image after the pixel value is updated.

[0060] Background image restoration and reconstruction stage: This stage requires the introduction of the underwater imaging physical model, which can be expressed as follows:

[0061] in is the input image, is the model restored image, It's ambient light. It is a transmission diagram.

[0062] Since ambient light areas are usually evenly illuminated and lack obvious details and complex textures, selecting the minimum sum of the texture mean and standard deviation as the candidate area can more accurately locate potential background light areas. Therefore, a four-layer classification estimation method based on the texture mean and standard deviation is used to estimate the ambient light points of the background image, including the following steps:

[0063] Where i and j represent gray levels, P(i, j) is the element of the gray-level co-occurrence matrix of the image, 、 is the mean of gray levels i and j, 、 The standard deviation of gray levels i and j. Figure 2 As shown, the background image Use a scoring formula based on texture mean and standard deviation A four-layer classification estimation method is used to select the ambient light candidate area. Indicates the area with the smallest score among the four areas. Repeat the above steps until The width and height of are both less than 20. Since red light decays faster than green or blue light in water, the pixel with the largest color difference among the remaining pixels in the candidate area is selected as the final ambient light. The formula is:

[0064]

[0065] Estimating ambient light The restoration of the background image depends on , and the contrast of the restored image increases with This leads to finding the optimal , so that the restored image has maximum contrast. The optimal estimate is calculated as follows:

[0066]

[0067]

[0068] in and E are the initial transmission map and the loss of the physical restoration process, FC is the cost function that evaluates the quality of the restored image associated with the iteratively updated current transmission map, represents the parameter that controls the balance between information loss and mean deviation, is the total number of pixels in the background image block, and Used to evaluate the contrast and brightness of an image. 128 is a normalization coefficient that adjusts the pixel values ​​of the image to an appropriate range. For RGB images, the pixel values ​​are usually in [0, 255], and 128 is the middle range value. Scaling by 128 normalizes the pixel values ​​of the image. Then, guided filtering is used to optimize the transmission map of the image block to prevent artifacts that may appear in the image due to changes in the real-world scene depth between different image blocks. The formula is expressed as:

[0069]

[0070]

[0071] in Is the background image The maximum average pixel value in . is the ratio of the maximum channel pixel average to the channel pixel average in the background image. T and is the transmission diagram after optimization and gain adjustment.

[0072] Finally, the calculated and The restored image can be obtained by applying the underwater imaging physical model to the calculation. The formula is:

[0073] Stage 3: Fusion of foreground image and background image A principal component analysis fusion strategy is used to obtain a clear underwater image by integrating the dominant features of the foreground contrast enhancement sub-image and the background restoration and reconstruction sub-image. The fusion weights are determined by analyzing the eigenvalues ​​and eigenvectors of the covariance matrix of the foreground image and the background image. The process of solving the covariance matrix is ​​defined as:

[0074] in is the covariance matrix, 、 is the average value of the image pixels. Then the eigenvalues ​​of the matrix are solved based on the calculated covariance matrix and eigenvectors Select the eigenvector corresponding to the larger eigenvalue and divide it by the sum of the eigenvalues ​​to get the normalized weight. The formula is:

[0075]

[0076] in 、 is the eigenvector with the larger eigenvalue, 、 are the normalized weights, is the number of eigenvalues. The final fused image It can be defined as:

[0077] Adaptive color correction stage: The fused underwater image is further corrected for local color cast based on the principle of minimum color loss. First, define The average of the three color channels for:

[0078] Where H and W are By calculating the average value of the three color channels, the channel with the largest average value is selected as .

[0079] Since different color channels have different attenuation speeds, in order to restore the attenuated colors of each channel, a linear transmission equation is used to define the dynamic boundary of the maximum color channel. The formula is expressed as follows:

[0080]

[0081] in 、 and Represents different color channels 、 and The color correction value of . Then for each color channel , defining the upper and lower boundaries of saturation and :

[0082]

[0083] 0.002 is an empirical constant, which is mainly used to define the cropping ratio when defining the saturation boundary (upper and lower boundaries). Its function is to remove the extreme low-saturation and high-saturation pixel values ​​in the image histogram to obtain a new image. . Finally, remap the image pixel values ​​to the range 0 to 255:

[0084] Since image channels in natural colors usually have similar mean values ​​and histogram distributions, we iterate and update each color channel using the following formula until convergence is reached:

[0085] The threshold of the minimum color loss constraint is set to .

[0086] The present invention can better solve the problem of image degradation in underwater scenes, correct the color of the image in water so that it appears to be the color under natural light. After the fusion of foreground and background images and local adaptive color correction, it can better restore color information and object details, providing assistance for downstream tasks.

[0087] Obviously, those skilled in the art will understand that the various steps of the underwater image enhancement algorithm based on foreground and background principal component fusion and adaptive color correction described in the above embodiments can be implemented using a general-purpose computing device. The algorithm can be executed centrally on a single computing device or distributed across a network consisting of multiple computing devices. Alternatively, the algorithm can be implemented using program code executable by a computing device, stored in a storage medium, and executed by the computing device. Furthermore, in some cases, the order of execution of the steps may differ from that described herein, or each step may be implemented as a separate integrated circuit module, or multiple steps may be integrated into a single integrated circuit module for implementation. Therefore, the embodiments of the present invention are not limited to a specific hardware or software combination.

Claims

1. An underwater image enhancement method with foreground and background principal component fusion and adaptive color correction, characterized in that: The following steps are involved: Step 1: Input an underwater degraded image and decompose the input image into a foreground image and a background image; A contrast enhancement method based on the maximum percentile value is applied to the foreground image to obtain a sub-image with enhanced foreground contrast; Step 2: A four-layer classification estimation method based on texture mean and standard deviation is used to estimate the ambient light candidate area of ​​the background image and select the pixel with the maximum color difference as the ambient light point; Step 3: Use a multi-layer transmission map estimation method to estimate the transmission map of the background image and restore the background sub-image by combining the ambient light points in the previous step; Step 4: For the foreground contrast enhanced sub-image and the background restored background sub-image, a principal component analysis fusion method is used to obtain a fused underwater image; Step 5: The fused underwater image is further corrected for local color cast based on the principle of minimum color loss.

2. The underwater image enhancement method of foreground and background principal component fusion and adaptive color correction according to claim 1, characterized in that: The step 1 comprises the following steps: Step 1-1: Define image I c The height is H and the width is W, and its separation critical value is k, which is expressed by the following formula: Where α is the reference value of the separated image; I c (x, y) represents the pixel at position (x, y); r, g, and b represent the red, green, and blue color channels respectively; Step 1-2: Foreground Image I F and background image I B , expressed as follows: I F =(1-k)×I c (x,y) I B =k×I c (x,y) Then the foreground image is contrast enhanced based on the percentile maximum contrast enhancement method; first, traverse I F The three color channels are used to update the pixel values ​​in each channel; the pixel values ​​of the pixels whose image pixel values ​​are less than the first threshold are replaced by the first threshold, and the pixel values ​​of the pixels whose pixel values ​​are greater than the second threshold are replaced by the second threshold to obtain the image. ; The enhanced image is obtained by using the maximum percentile-based contrast enhancement method: in and They are the contrast enhanced image and the foreground image after pixel value update; and are the maximum and minimum values ​​of the foreground image after the pixel value is updated.

3. The underwater image enhancement method of foreground and background principal component fusion and adaptive color correction according to claim 1, characterized in that: The step 2 comprises the following steps: Step 2-1: The mathematical formula of the underwater imaging physical model is expressed as: I c (x)=t c (x) J c (x)+(1-t c (x)) A c ,c∈{r,g,b} Among them I c (x) is the input image, J c (x) is the model restored image, A c is the ambient light, t c (x) is the transmission map; selecting the minimum value of the sum of the texture mean and standard deviation as the candidate region can more accurately locate the potential background light area, which is expressed by the following formula: Where i and j represent gray levels, P(i,j) is the element of the gray-level co-occurrence matrix of the image, μ i 、μ j is the mean of gray levels i and j, σ i , σ j The standard deviation of gray levels i and j; Step 2-2: Then for the background image I B A four-layer classification estimation method based on the scoring formula S of texture mean and standard deviation is used to select the ambient light candidate area I A ; Select the pixel with the largest color difference among the remaining pixels in the candidate area as the final ambient light; the formula is expressed as: in Represents the ambient light candidate area; Represents the difference between the red channel and the green channel, Represents the difference between the red channel and the blue channel. The sum of the two is used to represent the pixel with the largest color difference using the argmax function; A c is the ambient light point; d represents the position of the point with the maximum color difference, Representing an image The pixel at position d on the image.

4. The underwater image enhancement method of foreground and background principal component fusion and adaptive color correction according to claim 1, characterized in that: The step 3 comprises the following steps: Step 3-1: Estimating the ambient light point A c After that, the restoration of the background image depends on t c (x), the optimal estimate is calculated as follows: where t c (x) is the initial transmission image; Step 3-2: Use guided filtering to optimize the transmission map of the image. The formula is expressed as: Among them I Max Is the background image The maximum average pixel value in ; is the ratio of the maximum channel pixel average to the channel pixel average in the background image; Step 3-3: The calculated A c and t c (x) is brought into the underwater imaging physical model to calculate the restored image, which can be expressed as: 。 5. The underwater image enhancement method of foreground and background principal component fusion and adaptive color correction according to claim 1, characterized in that: The step 4 comprises the following steps: Step 4-1: Use the principal component analysis fusion method to obtain a clear underwater image by integrating the dominant features of the foreground contrast-enhanced sub-image and the background restored sub-image; determine the fusion weight by analyzing the eigenvalues ​​and eigenvectors of the covariance matrix of the foreground image and the background image; then solve the eigenvalue λ and eigenvector α of the matrix based on the calculated covariance matrix; select the eigenvector corresponding to the larger eigenvalue and divide it by the sum of the eigenvalues ​​to obtain the normalized weight, which is expressed as follows: Where α1 and α2 are the eigenvectors of the larger eigenvalues, ω1 and ω2 are the normalization weights, and N is the number of eigenvalues; Step 4-2: The final image fusion is defined as: where Z c (x) represents the final fused image, 、 They are the sub-image after foreground contrast enhancement and the sub-image after background image restoration, respectively.

6. The underwater image enhancement method of foreground and background principal component fusion and adaptive color correction according to claim 1, characterized in that: The step 5 comprises the following steps: Step 5-1: First define image Z c The average value of the three color channels for: Where H and W are Z c The height and width of the three color channels are calculated, and the channel with the largest average value is selected as Z. m ; Step 5-2: Use the linear transfer equation to define the dynamic boundary of the maximum color channel. The formula is expressed as: in and Represents the red, green, and blue channels Z respectively r , Z g and Z b Color correction value of Step 5-3: Then for each color channel Z c , define the upper and lower boundaries of saturation L c and U c : Among them, 0.002 is an empirical constant used to define the cropping ratio when defining the saturation boundary. Its function is to remove the extreme low-saturation and high-saturation pixel values ​​in the image histogram to obtain a new image ; Step 5-4: Finally remap the image pixel values ​​to the range 0 to 255: Step 5-5: Iterate and update each color channel using the following formula until convergence is reached: The threshold of the minimum color loss constraint is set to 10 -2 .

7. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the underwater image enhancement method based on foreground and background principal component fusion and adaptive color correction as described in any one of claims 1 to 6 is implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the underwater image enhancement method based on foreground and background principal component fusion and adaptive color correction as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Multi-layer multi-scale segmentation agricultural greenhouse type information extraction method and system

    CN115953685A

  • Underwater robot vision enhancement method based on foreground and background principal component fusion

    CN117726538A

  • CT image no-reference quality evaluation method based on feature fusion

    CN118735889A

  • Image enhancement algorithm based on adaptive filtering

    CN119741245A

  • Underwater image enhancement method based on retinex model

    WO2019019695A1