Underwater image restoration method, device, equipment and medium based on multi-scale fusion
Through multi-scale fusion technology, the problems of high cost and low accuracy of traditional underwater image repair are solved, and high-precision underwater image repair is achieved, especially the recovery of the colors of rocks and sand, improving image quality.
Patent Information
- Application Number
- CN202011099019.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-14
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2040-10-14
AI Technical Summary
Traditional underwater image repair techniques are expensive and cannot recover the colors of rocks and sand exposed to light, resulting in low image accuracy.
Using a multi-scale fusion method, the original underwater image is acquired for scaling and blur removal, the weighted image is determined, and the output image is generated through image pyramid fusion, without hardware equipment and lighting assistance.
Significantly improves the accuracy of underwater images, restores the color of rocks and sand, improves signal-to-noise ratio, chromaticity, saturation and contrast, and edge information, which is superior to traditional methods.
Smart Images

Figure CN112330548B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an underwater image restoration method, device, equipment and medium based on multi-scale fusion. Background Art
[0002] Traditional underwater image restoration technology generally requires the use of hardware lighting devices, which is costly. In addition, traditional underwater image restoration technology cannot restore the colors of rocks and sand exposed to light contained in underwater images, resulting in low image accuracy of underwater images. Summary of the invention
[0003] In view of this, the embodiments of the present invention provide an underwater image restoration method, device, equipment and medium based on multi-scale fusion with high image accuracy.
[0004] A first aspect of the present invention provides an underwater image restoration method based on multi-scale fusion, comprising:
[0005] Acquire original underwater images;
[0006] The original underwater image is scaled in multiple color spaces to obtain a first image to be fused;
[0007] Deblurring the original underwater image using an underwater imaging model to obtain a second image to be fused;
[0008] Determine a first weight image according to the first image to be fused;
[0009] determining a second weight image according to the second image to be fused;
[0010] An output image is obtained by image pyramid fusion according to the first image to be fused, the second image to be fused, the first weight image and the second weight image.
[0011] In some embodiments, in the step of scaling the original underwater image in multiple color spaces to obtain the first image to be fused, the image scaling formula is:
[0012]
[0013] C new (x,y)=K C *C ori (x,y),
[0014] Among them, K c Represents the pixel gain before and after stretching, R ave , G ave , B aveRepresents the mean of the three channels R, G, and B in the RGB space. ave represents the mean of the channel to be processed, C ori (x, y) represents the pixel value of the original image at (x, y), C new (x,y) represents the pixel value of the original image at (x,y) after stretching;
[0015] The image stretching formula is:
[0016]
[0017] Where a and b are the minimum and maximum pixel values of 0 and 255 for 8-bit color images, respectively, and d and c are the maximum and minimum pixel values of the image to be stretched, respectively. i (x, y) is the pixel value of the image to be stretched at (x, y), P o (x,y) is the pixel value at (x,y) of the stretched image.
[0018] In some embodiments, the blurring of the original underwater image is removed by using an underwater imaging model to obtain a second image to be fused, including:
[0019] Calculate the difference between the maximum value of the R channel of the image and the maximum value of the BG channel of the image;
[0020] Determine the atmospheric background light value of channel C according to the difference;
[0021] Determining the attenuation degree of light from the scene of the original underwater image to the camera according to the atmospheric background light value;
[0022] According to the attenuation degree and the original underwater image, a defogged image is determined as a second image to be fused.
[0023] In some embodiments, determining the first weight image according to the first image to be fused includes:
[0024] Downsampling the first image to be fused in steps to obtain a Laplacian image pyramid;
[0025] Acquire four weighted images through the first image to be fused;
[0026] The four weight images are normalized to obtain a first weight image.
[0027] In some embodiments, determining the second weight image according to the second image to be fused includes:
[0028] Down-sampling the second image to be fused in steps to obtain a Laplacian image pyramid;
[0029] Acquire four weighted images through the second image to be fused;
[0030] The four weight images are normalized to obtain a second weight image.
[0031] In some embodiments, in the step of obtaining an output image by fusing the first image to be fused, the second image to be fused, the first weight image, and the second weight image through an image pyramid, the fusion formula is:
[0032]
[0033] Among them, l represents the pyramid level; G{W} represents the Gaussian pyramid of the weight image; L{Input} represents the Laplacian pyramid of the fused image.
[0034] A second aspect of the present invention provides an underwater image restoration device based on multi-scale fusion, comprising:
[0035] An acquisition module, used for acquiring original underwater images;
[0036] A scaling processing module, used for scaling the original underwater image in multiple color spaces to obtain a first image to be fused;
[0037] A blur removal module, used for removing blur from the original underwater image by using an underwater imaging model to obtain a second image to be fused;
[0038] A first determining module, configured to determine a first weight image according to the first image to be fused;
[0039] A second determining module, used to determine a second weight image according to the second image to be fused;
[0040] The fusion module is used to obtain an output image through image pyramid fusion according to the first image to be fused, the second image to be fused, the first weight image and the second weight image.
[0041] A third aspect of the present invention provides an electronic device, comprising a processor and a memory;
[0042] The memory is used to store programs;
[0043] The processor executes the program to implement the method described in the first aspect of the present invention.
[0044] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described in the first aspect of the present invention.
[0045] The embodiment of the present invention obtains the first image to be fused and the second image to be fused respectively through scaling processing and blur elimination, and then determines the first weight image and the second weight image, and finally fuses them to obtain the output image. The embodiment of the present invention does not require the aid of hardware equipment and lighting assistance, and only needs to obtain the original underwater image to obtain the output image. It has a significant effect on restoring the color of rocks and sand exposed to light contained in the underwater image, and the image accuracy is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0047] Figure 1 The present invention provides an overall step flow chart of the embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] In view of the problems existing in the prior art, Figure 1 The embodiment of the present invention provides an underwater image restoration method based on multi-scale fusion, comprising:
[0050] Acquire original underwater images;
[0051] The original underwater image is scaled in multiple color spaces to obtain a first image to be fused;
[0052] Deblurring the original underwater image using an underwater imaging model to obtain a second image to be fused;
[0053] Determine a first weight image according to the first image to be fused;
[0054] determining a second weight image according to the second image to be fused;
[0055] An output image is obtained by image pyramid fusion according to the first image to be fused, the second image to be fused, the first weight image and the second weight image.
[0056] Specifically, the embodiment of the present invention first stretches and scales an underwater image in multiple color spaces to generate an underwater image with chromatic aberration eliminated as the first image to be fused. Based on the underwater imaging model, the image is restored to obtain an underwater image with scattering effects eliminated as the second image to be fused. Two images are decomposed into two Laplace image pyramids. Then, four weighted images are obtained based on the two images to be fused, and each of the four weighted images is normalized into one weighted image. The obtained two weighted images are decomposed into two Gaussian image pyramids. Finally, the pyramids originating from the same image are fused in pairs and then added to obtain a fused pyramid, and then the fused image is obtained according to the inverse process of the image pyramid generation.
[0057] The embodiment of the present invention does not rely on any hardware equipment or lighting assistance, but only uses one underwater image to solve two typical problems existing in underwater images: chromatic aberration caused by different attenuation of light of different wavelengths underwater and image blur caused by light scattering by suspended particles in the water.
[0058] Compared with the prior art, the embodiment of the present invention does not require any hardware equipment and lighting assistance, and can effectively solve the color difference and blur problem of underwater images, especially the color restoration of rocks and sand exposed to light contained in underwater images.
[0059] In some embodiments, in the step of scaling the original underwater image in multiple color spaces to obtain the first image to be fused, the image scaling formula is:
[0060]
[0061] C new (x,y)=K C *C ori (x,y),
[0062] Among them, K c Represents the pixel gain before and after stretching, R ave , G ave , B ave Represents the mean of the three channels R, G, and B in the RGB space. ave represents the mean of the channel to be processed, C ori (x, y) represents the pixel value of the original image at (x, y), C new (x,y) represents the pixel value of the original image at (x,y) after stretching;
[0063] The image stretching formula is:
[0064]
[0065] Where a and b are the minimum and maximum pixel values of 0 and 255 for 8-bit color images, respectively, and d and c are the maximum and minimum pixel values of the image to be stretched, respectively. i (x, y) is the pixel value of the image to be stretched at (x, y), P o (x,y) is the pixel value at (x,y) of the stretched image.
[0066] In some embodiments, the blurring of the original underwater image is removed by using an underwater imaging model to obtain a second image to be fused, including:
[0067] Calculate the difference between the maximum value of the R channel of the image and the maximum value of the BG channel of the image;
[0068] Determine the atmospheric background light value of channel C according to the difference;
[0069] Determining the attenuation degree of light from the scene of the original underwater image to the camera according to the atmospheric background light value;
[0070] According to the attenuation degree and the original underwater image, a defogged image is determined as a second image to be fused.
[0071] In some embodiments, determining the first weight image according to the first image to be fused includes:
[0072] Downsampling the first image to be fused in steps to obtain a Laplacian image pyramid;
[0073] According to the Laplacian image pyramid, four weight images are obtained through the first image to be fused;
[0074] The four weight images are normalized to obtain a first weight image.
[0075] In some embodiments, determining the second weight image according to the second image to be fused includes:
[0076] Down-sampling the second image to be fused in steps to obtain a Laplacian image pyramid;
[0077] Acquire four weighted images through the second image to be fused;
[0078] The four weight images are normalized to obtain a second weight image.
[0079] In some embodiments, in the step of obtaining an output image by fusing the first image to be fused, the second image to be fused, the first weight image, and the second weight image through an image pyramid, the fusion formula is:
[0080]
[0081] Among them, l represents the pyramid level; G{W} represents the Gaussian pyramid of the weight image; L{Input} represents the Laplacian pyramid of the fused image.
[0082] The overall steps of the present invention are described in detail below:
[0083] Scaling is based on the following formula in RGB color space:
[0084]
[0085] C new (x,y)=K C *C ori (x,y)
[0086] Among them, R ave , G ave , B ave Indicates the mean value of each channel in RGB space. ave represents the mean of the channel to be processed, C ori (x, y) represents the pixel value of the original image at (x, y), C new (x,y) represents the pixel value of the original image at (x,y) after stretching.
[0087] The S and V channels are stretched in the HSV color space based on the following formula:
[0088]
[0089] Where a and b are the minimum and maximum pixel values of 0 and 255 for 8-bit color images, respectively, and d and c are the maximum and minimum pixel values of the image to be stretched, respectively. i (x, y) is the pixel value of the image to be stretched at (x, y), P o (x,y) is the pixel value at (x,y) of the stretched image.
[0090] Based on the underwater imaging model, the restored image is used to obtain an underwater image without scattering effects, which is used as the second image to be fused.
[0091]
[0092]
[0093]
[0094]
[0095]
[0096] Where D(x) is the difference between the maximum value of the R channel of the image and the maximum value of the BG channel of the image. c represents the atmospheric background light value of channel C, t(x) reflects the attenuation of light from the scene to the camera. I(x) represents the input image, that is, the underwater image to be processed, and J(x) is the defogging image.
[0097] The two images are downsampled in steps to obtain two Laplacian image pyramids with the same level. Then, four weight images are obtained based on the two images to be fused, and each of the four weight images is normalized into one weight image. The obtained two weight images are decomposed into two Gaussian image pyramids.
[0098] The weight normalization of the embodiment of the present invention is based on the following formula:
[0099]
[0100] Among them, W Li , W LCi , W Si , W Ei They are the Laplace weighted image, local contrast weighted image, salient feature weighted image, and exposure weighted image obtained from the i-th fused image. The Laplace weighted image is obtained by Laplace filtering the image. The salient feature weighted image is obtained by the dominant feature algorithm. The local contrast weighted image and the exposure weighted image are obtained in turn according to the following formulas:
[0101]
[0102] Among them, I k represents the brightness channel of the input image, For the low-pass filtered image of the luminance channel, ωhc represents the upper cutoff frequency π / 2.75.
[0103]
[0104] Among them, I k (x,y) is the input image I k The pixel value at (x, y), σ is the standard deviation, and its value is 0.25.
[0105] The embodiment of the present invention downsamples the two weighted images in steps to obtain two Gaussian image pyramids with the same level, in which the low-resolution image is in the upper layer and the high-resolution image is in the lower layer. Downsampling means that the image of the upper layer is 1 / 4 of the size of the image of the lower layer, that is, the length and width of the image of the upper layer are 1 / 2 of the image of the lower layer.
[0106] Finally, the pyramids from the same image are fused two by two and then added together to obtain the fused pyramid according to the following formula:
[0107]
[0108] Among them, l represents the pyramid level, G{W} represents the Gaussian pyramid of the weight image, and L{Input} represents the Laplacian pyramid of the fused image.
[0109] Then, according to the inverse process generated by the image pyramid, the image is reconstructed upwards in sequence. Upsampling means starting from the topmost image with the lowest resolution. The length and width of the next layer of image are both twice that of the previous layer, and the reconstructed next layer of image is the previous layer image plus the upsampled image of the previous layer. The last layer of image restored is the fused image.
[0110] The present invention does not require any hardware equipment or lighting assistance, and only uses one underwater image to significantly improve the signal-to-noise ratio, chroma, saturation, contrast, and edge information of the underwater image. Experimental comparisons and data show that the present invention is superior to many traditional and similar latest methods in improving the above image characteristics. As shown in Table 1:
[0111] Table 1
[0112] method Entropy PSNR UCIQE UIQM Dark Channel 14.1745 25.8167 0.4470 0.4219 Bianco 15.3430 18.8167 0.4604 0.4023 Marques 8.325 10.816 0.0579 -5.4560 The present invention 13.9 26.9746 0.4880 0.5100
[0113] In Table 1, the indicator UCIQE is an indicator that comprehensively reflects the image chroma, saturation, and contrast, and the indicator UIQM is an indicator that comprehensively reflects the image color distribution, contrast, and edge information. The larger the value, the better the image. Entropy is information entropy; PSNR is peak signal-to-noise ratio.
[0114] Dark channel, Bianco, and Marques represent two classic image processing methods and a newest image processing method respectively. From the data in the table, it can be seen that the present invention has a good improvement effect in restoring the signal-to-noise ratio, chroma, saturation, contrast, edge information and other characteristics of the image.
[0115] A second aspect of the present invention provides an underwater image restoration device based on multi-scale fusion, comprising:
[0116] An acquisition module, used for acquiring original underwater images;
[0117] A scaling processing module, used for scaling the original underwater image in multiple color spaces to obtain a first image to be fused;
[0118] A blur removal module, used for removing blur from the original underwater image by using an underwater imaging model to obtain a second image to be fused;
[0119] A first determining module, configured to determine a first weight image according to the first image to be fused;
[0120] A second determining module, used to determine a second weight image according to the second image to be fused;
[0121] The fusion module is used to obtain an output image through image pyramid fusion according to the first image to be fused, the second image to be fused, the first weight image and the second weight image.
[0122] A third aspect of the present invention provides an electronic device, comprising a processor and a memory;
[0123] The memory is used to store programs;
[0124] The processor executes the program to implement the method described in the first aspect of the present invention.
[0125] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described in the first aspect of the present invention.
[0126] The embodiment of the present invention also discloses a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes Figure 1 The method shown.
[0127] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0128] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0129] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0130] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0131] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0132] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0133] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0134] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0135] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. An underwater image restoration method based on multi-scale fusion, characterized in that: include: Acquire original underwater images; The original underwater image is scaled in multiple color spaces to obtain a first image to be fused; Deblurring the original underwater image using an underwater imaging model to obtain a second image to be fused; Determine a first weight image according to the first image to be fused; determining a second weight image according to the second image to be fused; Obtaining an output image by image pyramid fusion according to the first image to be fused, the second image to be fused, the first weight image, and the second weight image; The step of removing blur from the original underwater image by using an underwater imaging model to obtain a second image to be fused includes: Calculate the difference between the maximum value of the R channel of the image and the maximum value of the BG channel of the image; Determine the atmospheric background light value of channel C according to the difference; Determining the attenuation degree of light from the scene of the original underwater image to the camera according to the atmospheric background light value; Determining, according to the attenuation degree and the original underwater image, a defogged image as a second image to be fused; The formula for determining the attenuation degree of light from the scene to the camera of the original underwater image is: Wherein, t(x) represents the attenuation degree of light from the scene of the original underwater image to the camera; t represents the original value of the attenuation degree of light.
2. The underwater image restoration method based on multi-scale fusion according to claim 1 is characterized in that: In the step of scaling the original underwater image in multiple color spaces to obtain the first image to be fused, the image scaling formula is: C new (x,y)=K C *C ori (x,y), Among them, K c Represents the pixel gain before and after stretching, R ave , G ave , B ave Represents the mean of the three channels R, G, and B in the RGB space; C ave represents the mean of the channel to be processed, C ori (x, y) represents the pixel value of the original image at (x, y), C new (x, y) represents the pixel value of the original image at (x, y) after stretching; The image pulling formula is: Where a and b are the minimum and maximum pixel values of 0 and 255, respectively, for an 8-bit color image, and d and c are the maximum and minimum pixel values of the image to be stretched, respectively. i (x, y) is the pixel value of the image to be stretched at (x, y), P o (x, y) is the pixel value at (x, y) in the stretched image.
3. The underwater image restoration method based on multi-scale fusion according to claim 1 is characterized in that: The determining a first weight image according to the first image to be fused includes: Downsampling the first image to be fused in steps to obtain a Laplacian image pyramid; Acquire four weighted images through the first image to be fused; The four weight images are normalized to obtain a first weight image.
4. The underwater image restoration method based on multi-scale fusion according to claim 1 is characterized in that: The determining the second weight image according to the second image to be fused includes: Down-sampling the second image to be fused in steps to obtain a Laplacian image pyramid; Acquire four weighted images through the second image to be fused; The four weight images are normalized to obtain a second weight image.
5. The underwater image restoration method based on multi-scale fusion according to claim 1, characterized in that: In the step of obtaining an output image by fusing the first image to be fused, the second image to be fused, the first weight image and the second weight image through an image pyramid, the fusion formula is: Among them, l represents the pyramid level; G{W} represents the Gaussian pyramid of the weight image; L{Input} represents the Laplacian pyramid of the fused image.
6. An underwater image restoration device based on multi-scale fusion, characterized in that: include: An acquisition module, used for acquiring original underwater images; A scaling processing module is used to scale the original underwater image in multiple color spaces. Obtaining a first image to be fused; a blur removal module, used to remove blur from the original underwater image using an underwater imaging model, Obtaining a second image to be fused; A first determining module, configured to determine a first weight image according to the first image to be fused; A second determining module, used to determine a second weight image according to the second image to be fused; A fusion module, configured to obtain an output image by fusing the first image to be fused, the second image to be fused, the first weight image, and the second weight image through an image pyramid; The step of removing blur from the original underwater image by using an underwater imaging model to obtain a second image to be fused includes: Calculate the difference between the maximum value of the R channel of the image and the maximum value of the BG channel of the image; Determine the atmospheric background light value of channel C according to the difference; Determining the attenuation degree of light from the scene of the original underwater image to the camera according to the atmospheric background light value; Determining, according to the attenuation degree and the original underwater image, a defogged image as a second image to be fused; The formula for determining the attenuation degree of light from the scene to the camera of the original underwater image is: Wherein, t(x) represents the attenuation degree of light from the scene of the original underwater image to the camera; t represents the original value of the attenuation degree of light.
7. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 5.
