Underwater image restoration method, device and storage medium based on correction model
By establishing a revised and simplified underwater imaging model and using monocular depth estimation calculation method and local light source estimation calculation method, the problem of poor underwater image restoration effect in the prior art is solved, and higher accuracy and stability are achieved, and suitable for a wide range of underwater shooting scenes.
Patent Information
- Application Number
- CN202111120277.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-24
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2041-09-24
AI Technical Summary
The existing underwater image restoration algorithm uses inaccurate and incomplete underwater imaging models, resulting in poor color restoration effect and unstable performance.
By establishing a revised and simplified underwater imaging model, the relationship between the attenuation coefficients and depth information of the direct signal and the backscattered signal is modeled separately, and the image restoration is performed using monocular depth estimation algorithm and local light source estimation algorithm.
Improves the accuracy and stability of underwater image restoration, allowing for more underwater shooting scenes and all existing data sets without the need for additional equipment.
Smart Images

Figure CN113888420B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of underwater image recognition, and in particular to an underwater image restoration method, device and storage medium based on a correction model. Background Art
[0002] Among the information collected by the seabed observation network, a large part is real-time fish images and video data. Adequate analysis and mining of these visual data can provide an important means for marine biological science and marine environmental science research, and further promote marine scientific and technological innovation. Although visual data processing technology has made great progress in the past few decades, how to effectively process and fully utilize marine fish visual data is still a challenging task. The main reason is that in the marine environment, due to the presence of seawater media, light will be affected by physical effects such as forward scattering, backscattering, and absorption during propagation, resulting in blurred visual images or videos, low contrast, color distortion, etc., which brings great challenges to the subsequent understanding and analysis of visual image data.
[0003] In response to the above challenges, domestic and foreign researchers have proposed a series of underwater image restoration algorithms, which can be divided into three categories according to the research ideas: image enhancement methods, methods based on prior knowledge, and data-driven methods. Among them, the methods based on prior knowledge and some data-driven methods usually need to rely on the underwater imaging physical model for solution. At present, they cannot achieve sufficiently satisfactory restoration effects, and have limitations such as poor color restoration effects and unstable performance. One of the reasons is that inaccurate and incomplete underwater imaging modeling equations are used, which introduces serious errors and uncertainties.
[0004] Specifically, the underwater image restoration algorithm based on prior knowledge is to estimate the scene depth, ambient light and other parameters through prior knowledge or special hardware, and then solve the underwater imaging physical model to achieve the underwater image restoration process. The basis of the underwater imaging physical model is usually the Jaffe-MaGlamery model, such as Figure 1 As shown, its expression is:
[0005] I c =D c +B c
[0006] Among them, c = R, G, B three color channels, I c represents the visual signal acquired by the underwater camera, i.e., the underwater image, D c represents the direct signal, that is, the signal reflected from the light to the camera lens after reaching the underwater target; B c It represents the amount of backscattered signal, that is, the amount of signal that reaches the camera lens after being scattered by particles suspended in the water.
[0007] Since atmospheric dehazing imaging and underwater imaging have a high degree of similarity, most existing underwater image restoration algorithms, including RCP published in Image Represent in 2015, DHL published in British Machine Vision Conference in 2017, and WaterGAN published in IEEE Robotics and Automation letters in 2018, generally adopt a deformation of the atmospheric dehazing equation. The dependence of the attenuation coefficient on the wavelength is added to the atmospheric dehazing equation, which is formalized as follows:
[0008] I(x)=J(x)*e -β(λ)d(x) +A(1-e -β(λ)d(x) )
[0009] Among them, A represents ambient light, J(x) represents the target image to be solved, β represents the attenuation coefficient of light passing through the ocean water body, which depends on the wavelength λ, and d(x) represents the scene depth, that is, the distance between the camera lens and the target.
[0010] In the modeling equation commonly used in the above existing methods, it is assumed that the attenuation coefficients of the direct signal and the backscattered signal are the same, and both are assumed to be uniform. However, in a study published in CVPR in 2018 by Derya Akkaynak and other researchers, it was pointed out that:
[0011] 1) The direct and backscattered signals of light in ocean water depend on different coefficients;
[0012] 2) The scattering coefficient of the signal in the seawater environment is not uniform, but depends on the target distance and reflectivity.
[0013] The above existing physical model-based methods cannot achieve satisfactory results due to the use of inaccurate and incomplete underwater imaging models, and have limitations such as poor color restoration and unstable performance. Summary of the invention
[0014] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide an underwater image restoration method, device and storage medium based on a correction model with high applicability and high precision.
[0015] The purpose of the present invention can be achieved by the following technical solutions:
[0016] According to a first aspect of the present invention, a method for underwater image restoration based on a correction model is provided, the method comprising the following steps:
[0017] Step S1: Based on the direct signal attenuation coefficient Backscatter signal attenuation coefficient High correlation with depth information z, establishing a corrected and simplified underwater imaging model;
[0018] Step S2: Based on the given RGB image, a monocular depth estimation algorithm is used to estimate the relative depth information of the scene target, and the depth information z is estimated by scaling it in combination with the underwater visibility;
[0019] Step S3: Based on the estimation of the depth information z, all pixels on the image are divided into N distance intervals according to the depth value, and the pixels in the black or completely shadowed area in each distance interval are screened to obtain the estimated value of the backscattered signal Thus, an image with the backscattering effect removed is obtained;
[0020] Step S4: For the image after removing the backscattering effect, the local light source estimation algorithm is used to estimate the direct signal attenuation coefficient And through exponential binomial modeling and depth information z to roughly estimate the value Perform fitting correction to obtain the restored image J c ;
[0021] Step S5: Restore the image J c Perform white balance processing to obtain the final restored image.
[0022] Preferably, the underwater imaging model after correction and simplification in step S1 is:
[0023]
[0024] Among them, I c D is the visual image obtained by the underwater camera. c is a direct semaphore, B c is the backscattered signal; J c represents the target image to be solved, represents ambient light, z is depth information, is the direct signal attenuation coefficient, is the backscatter signal attenuation coefficient.
[0025] Preferably, the underwater visibility in step S2 is the maximum visibility in meters, which is used to scale the relative depth to obtain an estimate of the absolute depth information z.
[0026] Preferably, step S3 comprises the following steps:
[0027] Step S31: Based on the estimated maximum and minimum values of the depth information z, all pixels of the image are divided into N sets of the same size according to the depth value span Ω = {ω1 ,ω 2 ,...ω N}, corresponding to N target pixels in different depth intervals;
[0028] Step S32: Select the pixel points whose mean values of the three channels R, G, and B are in the first t% interval from the N sets to form a set Φ = {φ 1 ,φ 2 , ...φ N},satisfy:
[0029]
[0030] Among them, r, g, b are the corresponding R, G, B pixel values respectively; ω i is the i-th set; the pixels in this set Φ satisfy the assumption that there is no reflected light;
[0031] Step S33: Take the direct reflection signal D of the pixel points in the set Φ c (Φ) will be close to 0 as the fitting target, combined with the backscattered signal B c The definition of (Φ) uses the pixels in the set Φ to perform nonlinear modeling fitting on the backscattered signal of the input image:
[0032]
[0033]
[0034] in, is the estimated value of the backscattered signal, represents ambient light, is the backscatter signal attenuation coefficient, z is the depth information estimation, I c (Φ) is the visual image acquired by the underwater camera.
[0035] Preferably,
[0036] In the modeling and estimation of the backscattered signal in step S3, if additional information of camera parameters and water body type can be obtained, Further fine-tuning is performed to obtain a more accurate model expression.
[0037] Preferably, step S4 comprises the following steps:
[0038] Step S41: Based on the image after removing the backscattering effect, use the local light source estimation algorithm to estimate the local light source mapping And Make an estimate to get a rough estimate of the direct signal attenuation coefficient Its expression is:
[0039]
[0040] Among them, z is the depth information estimation, Mapping for local light sources;
[0041] Step S42: Based on the estimated And depth information z are modeled and analyzed, and the binomial exponential model is used for fitting. The fitting goal is to make the modeling value With estimated value The error is minimized, and its expression is:
[0042]
[0043]
[0044] Wherein, a, b, c, d are the parameters of the binomial exponential model, satisfying b<0, d<0, and z is the depth information estimation.
[0045] Preferably, the local light source estimation algorithm in step S41 is specifically as follows: the direct signal attenuation The estimation problem is converted into a scene illumination estimation problem based on the Retinex model. The LSAC algorithm is used to estimate the scene illumination based on the known depth information to obtain the local light source mapping.
[0046] Preferably, the step S5 specifically comprises: using a gray world algorithm, a perfect reflection algorithm or a dynamic threshold algorithm to analyze the restored image J c Perform white balance processing.
[0047] According to a second aspect of the present invention, an electronic device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the above method is performed when the processor executes the program.
[0048] According to a third aspect of the present invention, there is provided a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above method is implemented.
[0049] Compared with the prior art, the present invention has the following advantages:
[0050] 1) Compared with the existing methods, the solution process is based on the premise that the direct signal and the backscattered signal depend on the same attenuation coefficient. The underwater image restoration method proposed in the present invention uses a modified underwater imaging model to model and estimate the attenuation coefficients of the direct signal and the backscattered signal respectively, which has higher accuracy and rationality in the physical model;
[0051] 2) Compared with the existing method, the solution process is based on the premise that the direct signal and the backscattered signal depend on a uniform attenuation coefficient. The method proposed in the present invention takes into account the dependence between the attenuation coefficient and the depth information. By using the modeling and fitting method, a relationship model between the attenuation coefficients of the direct signal and the backscattered signal and the distance information (depth information) between the target and the lens is established, thereby obtaining a more accurate attenuation coefficient, thereby obtaining a more accurate restoration result;
[0052] 3) The underwater image restoration method proposed in the present invention only needs to input an RGB color underwater image to realize the image restoration by applying the modified underwater imaging model. The existing methods need to rely on additional equipment such as ranging radar, underwater binocular camera, or need to take multiple consecutive images at different angles (such as the seathru method) to obtain the depth information required for solving the modified underwater imaging model, and can only be applied to a very small number of specific data sets; the method proposed in the present invention uses a monocular depth estimation method to obtain relative depth information, combines size information for scaling to obtain estimated absolute depth information, and completes underwater image restoration based on the estimated depth information. It has higher universality and can be applied to more underwater shooting scenes and all existing data sets. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a schematic diagram of the Jaffe-MaGlamery model;
[0054] Figure 2 It is a framework flow chart of the present invention;
[0055] Figure 3a -c are the R, G, and B channels of dataset 1 Correlation result graph with z;
[0056] Figure 4a -c are the R, G, and B channels of dataset 2 Correlation result graph with z;
[0057] Figure 5a -c are the R, G, and B channels of dataset 3 respectively Correlation result graph with z;
[0058] Figure 6a -b are comparison diagrams of the before and after results of the underwater image restoration method of Picture 1 of the present invention;
[0059] Figure 7a -b are comparison diagrams of the before and after results of picture 2 of the underwater image restoration method of the present invention;
[0060] Figure 8a-b are comparison diagrams of the before and after results of Picture 3 of the underwater image restoration method of the present invention. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0062] In view of the above-mentioned existing physical model-based methods, since they use inaccurate and incomplete underwater imaging models, they cannot achieve satisfactory results and have limitations such as poor color restoration effect and unstable performance. The present invention provides an underwater image restoration method based on a modified model, such as Figure 1 As shown, the method comprises the following steps:
[0063] Step S1: Based on the direct signal attenuation coefficient Backscatter signal attenuation coefficient High correlation with depth information z, establishing a corrected and simplified underwater imaging model;
[0064] Step S2: Based on the given RGB image, a monocular depth estimation algorithm is used to estimate the relative depth information of the scene target, and the depth information z is estimated by scaling it in combination with the underwater visibility;
[0065] Step S3: Based on the estimation of the depth information z, all pixels on the image are divided into N distance intervals according to the depth value, and the pixels in the black or completely shadowed area in each distance interval are screened to obtain the estimated value of the backscattered signal Thus, an image with the backscattering effect removed is obtained;
[0066] Step S4: For the image after removing the backscattering effect, the local light source estimation algorithm is used to estimate the direct signal attenuation coefficient And through exponential binomial modeling and depth information z to roughly estimate the value Perform fitting correction to obtain the restored image J c ;
[0067] Step S5: Restore the image J c Perform white balance processing to obtain the final restored image.
[0068] The above method is described in detail below with reference to the accompanying drawings.
[0069] 1. Processing of underwater imaging physical model
[0070] The imaging model adopted by the existing methods based on prior knowledge ignores the dependence of the attenuation coefficient on the environmental depth, and assumes that the direct signal and the backscattered signal depend on the same coefficient. The underwater image restoration algorithm proposed in the present invention adopts a revised imaging model to correct and supplement the relationship ignored by the existing methods. The model equation is as follows:
[0071]
[0072] Among them, I c represents the visual image acquired by the underwater camera, J c represents the target image to be solved, represents ambient light, v D and v B Represents the attenuation coefficient of the direct signal and the attenuation coefficient of the backscattered signal The factors that depend on v D ={z,ρ,E,S c ,β},v B = {E,S c , β, b}, the corresponding explanations are shown in Table 1 below:
[0073] Table 1
[0074] parameter meaning λ Light wavelength z Depth Information ρ Reflection coefficient E Environmental spectrum <![CDATA[S c ]]> Camera spectral response β Attenuation coefficient of light in water
[0075] Solve for J c It is obviously unrealistic to know or estimate all the above parameters, so it is necessary to make trade-offs between these parameters. According to the research work published by Akkaynak and Treibitz in 2017, compared with other parameters, the attenuation coefficient and The relevance of depth information z is more prominent. Based on this premise, kind The dependencies of the above multiple parameters are processed, and only the depth information z with more prominent dependencies is retained. The processed underwater imaging model can be formalized as follows:
[0076] It can be seen that compared with other parameters, and They all rely heavily on the depth information z. The processed underwater imaging model can be simplified as follows:
[0077]
[0078] 2. Estimation of depth information z
[0079] There are two ways to obtain depth information: the first is to directly obtain depth information with the help of specific equipment, such as underwater radar, underwater binocular camera, etc., or to estimate the depth information by continuously taking multiple pictures of the scene target from multiple angles and reconstructing the structural information; the second is to roughly estimate the scene depth information through a monocular depth estimation algorithm.
[0080] Although the first approach can provide higher accuracy in estimating the depth information z, it has too strict requirements on the equipment and technology at the shooting site, which will seriously limit the application of the algorithm. Compared with the first approach, the second approach can provide more application scenarios, and only requires one RGB underwater image as input to complete the restoration task.
[0081] Since there is currently no effective underwater monocular depth estimation method, the underwater image restoration method proposed in the present invention adopts the DenseDepth method to estimate relative depth information. This method uses transfer learning based on the standard Encoder-decoder structure. The encoder loads the weights of the pre-trained network, supplemented by data enhancement and training strategies, to achieve high-resolution depth estimation.
[0082] Since the existing depth estimation pre-training network is trained based on images collected indoors or street images, in order to make the model suitable for underwater scenes, the restoration method proposed in the present invention uses the public underwater datasets SQUID and seathru to fine-tune the pre-training model.
[0083] Since the underwater imaging model relies on absolute depth information, and the monocular depth estimation algorithm obtains relative depth information. Therefore, it is necessary to roughly estimate the absolute depth based on the estimated relative depth. Benefiting from the rapid attenuation of underwater ambient light in the water body, underwater visibility will drop rapidly with increasing distance. Therefore, the present invention defines a maximum visibility in meters (default is 10) to scale the relative depth and obtain a rough estimate of the absolute depth information.
[0084] 3. Estimation of backscatter
[0085] The estimation of the backscatter signal relies on an assumption that the image values corresponding to the black or completely shadowed areas in the scene are completely determined by the backscatter signal, because there is no reflected light from the scene itself in these areas. Based on this assumption, the algorithm for backscatter estimation can be summarized as the following process:
[0086] First, according to the maximum and minimum values of the estimated depth information, all pixels of the image are divided into 10 sets with equal span of depth value Ω={ω 1 ,ω 2 ,...ω10}, corresponding to 10 target pixels in different depth intervals;
[0087] Next, in each set, we select the pixels with the smallest 1% mean values of the three channels R, G, and B to form a set Φ = {φ 1 ,φ 2 , ...φ 10},satisfy:
[0088]
[0089] According to the assumption, there is no reflected light at the pixel points in the set Φ, that is, the direct reflection signal D of the pixel points in the set Φ c (Φ) will be as close to 0 as possible.
[0090] Taking this conclusion as the fitting target, the method proposed in the present invention is based on the backscattered signal B in formula (1): c The definition of (Φ) uses the pixels in the set Φ to perform nonlinear modeling fitting on the backscattered signal of the input image:
[0091]
[0092]
[0093] In the modeling estimation of the backscatter signal, the backscatter coefficient is not taken into account Dependence on depth information. If additional information such as camera parameters and water type is available, Further fine-tuning is performed to obtain a more accurate model expression.
[0094] 4. Attenuation coefficient Estimates
[0095] 4.1 A rough estimate of
[0096] According to formula (1), after completing the backscattering B c After the estimation, the problem is transformed into a direct signal Estimates:
[0097]
[0098] Among them, the direct signal D c is the reflected signal J after the light hits the target c (i.e., undistorted image signal) The light reaching the camera after transmission attenuation, considering the scene illumination estimation problem in the field of color consistency, the attenuation The estimation problem is converted into a scene illumination estimation problem based on the Retinex model, where the Retinex model can be defined as:
[0099]
[0100] Where I is the image captured by the camera, J is the reflected signal after the light hits the target (i.e. the image signal without the influence of light), which depends on the texture and color of the target object itself; P is illumination, which depends on the ambient light source when the image is taken. Symbols It is the element-wise product.
[0101] The main task of scene illumination estimation is to solve the accurate P to eliminate the influence of illumination on image color. This paper adopts LSAC (Local Space Average Color) algorithm and estimates illumination using known depth information. Its principle and process are as follows:
[0102] For a given pixel (x, y), estimate the Local Space Average Color l of its c color channel c (x, y), the first step is to find a set of pixels whose depth difference with the pixel point (x, y) is less than ∈ according to the given depth difference threshold ∈ value, as the neighbor pixel set N of the pixel point (x, y) e , which can be defined as:
[0103] N e (x, y)={(x′, y′)|||z(x, y)-z(x′, y′)||≤∈} (8)
[0104] In getting N e After that, c (x, y) can be estimated iteratively using the following formula:
[0105]
[0106] I c (x, y) = D c (x, y)*(1-p)+l′ c (x, y)*p (10)
[0107] Among them I c The initial values of (x, y) are all set to 0, and the parameter p represents the locality of the neighborhood;
[0108] definition for:
[0109]
[0110] Where f is a constant factor that depends on the geometry. In this example, f is set to 2.
[0111] The LSAC method is used to estimate the light source of the image after eliminating the backscattering effect, which can be used as Estimated value:
[0112]
[0113] Can get A rough estimate:
[0114]
[0115] 4.2 Fitting optimization
[0116] based on The conclusion of the correlation study between and z is that is a function of z, therefore, the present invention The rough estimate of the depth information z is modeled and fitted to further determine The relationship with z. As shown in Figures 3 to 5, we can see It basically conforms to the binomial exponential model with z, among which the B channel and G channel are more obvious.
[0117] Therefore, the present invention uses a logarithmic model to calculate the direct signal attenuation coefficient Fitting is performed with the depth information z, and the fitting goal is to make the modeling value With estimated value Minimize the error:
[0118]
[0119]
[0120] Wherein, parameter b<0, d<0. If fitting is still not possible (usually occurs in the red channel), the present invention can use a linear model to replace the relationship mode presented by the R channel to complete the fitting.
[0121] 5. White balance processing
[0122] Solve for J c The required key parameters have been estimated. In order to meet the visual effect of the human eye, the algorithm can solve the J obtained in the above steps at the end. c For white balance processing, a gray world algorithm, a perfect reflection algorithm, a dynamic threshold algorithm or the like may be used. In this embodiment, a gray world algorithm is used for white balance processing.
[0123] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0124] The electronic device of the present invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The CPU, ROM and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0125] Multiple components in the device are connected to the I / O interface, including: input units, such as keyboards, mice, etc.; output units, such as various types of displays, speakers, etc.; storage units, such as disks, optical disks, etc.; and communication units, such as network cards, modems, wireless communication transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunication networks.
[0126] The processing unit performs the various methods and processes described above, such as methods S1 to S5. For example, in some embodiments, methods S1 to S5 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via a ROM and / or a communication unit. When the computer program is loaded into the RAM and executed by the CPU, one or more steps of methods S1 to S5 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1 to S5 in any other appropriate manner (e.g., by means of firmware).
[0127] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip systems (SOCs), load programmable logic devices (CPLDs), and the like.
[0128] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0129] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0130] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. An underwater image restoration method based on a correction model, characterized in that: The method comprises the following steps: Step S1: Based on the direct signal attenuation coefficient Backscatter signal attenuation coefficient High correlation with depth information z, establishing a corrected and simplified underwater imaging model; Step S2: Based on the given RGB image, a monocular depth estimation algorithm is used to estimate the relative depth information of the scene target, and the depth information z is estimated by scaling it in combination with the underwater visibility; Step S3: Based on the estimation of the depth information z, all pixels on the image are divided into N distance intervals according to the depth value, and the pixels in the black or completely shadowed area in each distance interval are screened to obtain the estimated value of the backscattered signal. Thus, an image with the backscattering effect removed is obtained; Step S4: For the image after removing the backscattering effect, the local light source estimation algorithm is used to estimate the direct signal attenuation coefficient And roughly estimate the value through exponential binomial modeling and depth information z Perform fitting correction to obtain the restored image J c ; Step S5: Restore the image J c Perform white balance processing to obtain the final restored image; The underwater imaging model after correction and simplification in step S1 is: Among them, I c D is the visual image obtained by the underwater camera. c is a direct semaphore, B c is the backscattered signal; J c represents the target image to be solved, represents ambient light, z is depth information, is the direct signal attenuation coefficient, is the backscatter signal attenuation coefficient; The step S3 comprises the following steps: Step S31: Based on the estimated maximum and minimum values of the depth information z, all pixels of the image are divided into N sets of the same size according to the depth value span Ω = {ω1, ω2, ... ω N }, corresponding to N target pixels in different depth intervals; Step S32: Select the pixel points whose mean values of the three channels R, G, and B are in the first t% interval from the N sets to form a set Φ = {φ1, φ2, ...φ N },satisfy: Among them, r, g, b are the corresponding R, G, B pixel values respectively; ω i is the i-th set; the pixels in this set Φ satisfy the assumption that there is no reflected light; Step S33: Take the direct reflection signal D of the pixel points in the set Φ c (Φ) will be close to 0 as the fitting target, combined with the backscattered signal B c The definition of (Φ) uses the pixels in the set Φ to perform nonlinear modeling fitting on the backscattered signal of the input image: in, is the estimated value of the backscattered signal, represents ambient light, is the backscatter signal attenuation coefficient, z is the depth information estimation, I c (Φ) is the visual image acquired by the underwater camera; The step S4 comprises the following steps: Step S41: Based on the image after removing the backscattering effect, use the local light source estimation algorithm to estimate the local light source mapping And Make an estimate to get a rough estimate of the direct signal attenuation coefficient Its expression is: Among them, z is the depth information estimation, Mapping for local light sources; Step S42: Based on the estimated And depth information z are modeled and analyzed, and the binomial exponential model is used for fitting. The fitting goal is to make the modeling value With estimated value The error is minimized, and its expression is: Among them, a, b, c, d are the parameters of the binomial exponential model, satisfying b<0, d<0, and z is the depth information estimation.
2. The underwater image restoration method based on the correction model according to claim 1, characterized in that: The underwater visibility in step S2 is the maximum visibility in meters, which is used to scale the relative depth to obtain an estimate of the absolute depth information z.
3. The underwater image restoration method based on the correction model according to claim 1, characterized in that: In the modeling and estimation of the backscattered signal in step S3, if additional information of camera parameters and water body type can be obtained, Further fine-tuning is performed to obtain a more accurate model expression.
4. The underwater image restoration method based on the correction model according to claim 1, characterized in that: The local light source estimation algorithm in step S41 is specifically as follows: The estimation problem is converted into a scene illumination estimation problem based on the Retinex model. The LSAC algorithm is used to estimate the scene illumination based on the known depth information to obtain the local light source mapping.
5. The underwater image restoration method based on the correction model according to claim 1, characterized in that: The step S5 specifically includes: using the gray world algorithm, the perfect reflection algorithm or the dynamic threshold algorithm to analyze the restored image J c Perform white balance processing.
6. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 1 to 5 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.