Underwater image color restoration method, device and storage medium based on ambient background light
Through the underwater image color restoration method based on ambient background light, using generative adversarial network and convolutional neural network, the problem of poor underwater image color restoration effect is solved, the image clarity and target detection accuracy are improved, and the accuracy of target detection is simplified. recovery process.
Patent Information
- Application Number
- CN202110341143.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-30
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-03-30
AI Technical Summary
When underwater images are taken, they are affected by ambient light refraction, absorption and suspended particles, resulting in color shift, blur, and low contrast. Existing computer vision methods are difficult to effectively restore their colors, affecting the accuracy of target detection and marine life recognition.
Using an underwater image color restoration method based on ambient background light, by obtaining a real underwater color distortion image data set and a real land image data set, a generative adversarial network model is constructed, and a statistical method and a convolutional neural network are combined to generate an underwater style Color restoration of images.
It improves the clarity of underwater images and the accuracy of target detection, simplifies the image recovery process, shortens recovery time, and eliminates the need for additional image format conversion operations.
Smart Images

Figure CN113191962B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of underwater image processing, and in particular to a method, a device and a storage medium for underwater image color restoration based on ambient background light. Background Art
[0002] When shooting underwater, due to the complex shooting environment, such as the refraction and absorption of underwater ambient light, suspended particles in the water, color distortion, etc., the underwater images collected by the imaging equipment often have image quality problems such as color shift, blur, low contrast, and distortion, which will reduce the effectiveness of computer vision applications such as underwater target detection, marine life identification and tracking.
[0003] Currently, when using computer vision methods to restore the color of underwater images, underwater images are usually simulated to obtain a training data set, and then the color restoration of the underwater images is completed.
[0004] However, since underwater images have their own style characteristics and are affected by many factors, which are different from land images, it is difficult to simulate images with a style close to that of underwater images, and the color restoration effect of underwater images is not good. Summary of the invention
[0005] In view of this, the present invention provides a method, device and storage medium for underwater image color restoration based on ambient background light, so as to realize color restoration of underwater distorted images and obtain clearer underwater images, thereby improving the accuracy of target detection when performing target detection based on underwater images.
[0006] To this end, the present invention provides the following technical solutions:
[0007] The present invention provides an underwater image color restoration method based on ambient background light, the method comprising:
[0008] Acquire a real underwater color distorted image dataset; the real underwater color distorted image dataset includes a plurality of real underwater color distorted images;
[0009] Using a statistical method to obtain the ambient background light of the real underwater color distorted image;
[0010] Acquire a land real image dataset; the land real image dataset includes several groups of land real images and their corresponding depth maps;
[0011] Constructing and training an underwater image synthesis model based on a generative adversarial network; the underwater image synthesis model is trained based on environmental background light, the real land image dataset, and the real underwater color distortion image dataset;
[0012] Inputting the noise, the ambient background light, the real land image, and the depth map corresponding to the real land image as a group of samples into a trained underwater image synthesis model to obtain a real land image with underwater style;
[0013] Establish an underwater image color restoration model based on convolutional neural network;
[0014] The real land image and its corresponding underwater style image are used as a group of training data, and the underwater image color restoration model is trained using a training set formed by several groups of training data;
[0015] An underwater image to be color restored is acquired, and the color of the underwater image to be color restored is restored using a trained underwater image color restoration model.
[0016] Furthermore, using a statistical method to obtain the ambient background light of the real underwater color distorted image includes:
[0017] Performing statistical analysis on the R, G, and B values of the real underwater color distorted image respectively to obtain a distribution model of the R, G, and B values of the real underwater color distorted image;
[0018] Derivation of R, G, B values of ambient background light according to the distribution model of R, G, B values;
[0019] The R, G, and B values of the ambient background light are combined into the same dimension as the RGB image to obtain the ambient background light.
[0020] Furthermore, the distribution model of the R, G, and B values is a normal distribution model.
[0021] Further, the underwater image synthesis model includes a generator and a discriminator;
[0022] The generator takes noise, the ambient background light, the real land image and its corresponding depth map, and the real underwater color distorted image as input, and takes a synthesized real land image with underwater image style as output;
[0023] The discriminator takes the real land image with underwater image style synthesized by the generator and the real underwater color distorted image as input, and takes the classification result of the real land image with underwater image style as output, and the classification result includes real or synthetic.
[0024] Further, the generator includes an attention mechanism and a backscattering mechanism;
[0025] Accordingly, the noise, the ambient background light, the real land image, and the depth map corresponding to the real land image are input as a group of samples into the trained underwater image synthesis model to obtain a real land image with underwater style, including:
[0026] The trained generator processes the real land image based on the attention mechanism to obtain the first image in the following manner:
[0027] ;
[0028] in, represents the real land image, represents the attenuation rate of light underwater, A depth map corresponding to the real land image;
[0029] The trained generator convolves the noise based on the backscattering mechanism and then combines it with the ambient background light to obtain a second image;
[0030] Based on the image imaging model, the first image and the second image are synthesized into a real land image with underwater image style.
[0031] Furthermore, the underwater image color restoration model includes 5 convolutional layers;
[0032] Accordingly, the underwater image to be color restored is restored using the trained underwater image color restoration model, including:
[0033] Using the five convolution layers, a five-layer convolution operation is performed on the underwater image to be color restored;
[0034] Connect the convolution results of each layer;
[0035] Performing a convolution operation on the connected convolution results again to obtain a residual having the same shape as the underwater image to be color restored;
[0036] The residual is added to the underwater image to be color restored to obtain a target underwater image after color restoration.
[0037] Furthermore, obtaining a real underwater color distorted image dataset includes: obtaining a real underwater color distorted image dataset using an underwater monocular camera.
[0038] Furthermore, obtaining the real land image dataset includes: obtaining the real land image dataset from the NYU dataset.
[0039] The present invention also provides an underwater image color restoration device based on ambient background light, the device comprising:
[0040] A first acquisition unit is used to acquire a real underwater color distorted image data set; the real underwater color distorted image data set includes a plurality of real underwater color distorted images;
[0041] A second acquisition unit, configured to acquire the ambient background light of the real underwater color distorted image acquired by the first acquisition unit by using a statistical method;
[0042] A third acquisition unit is used to acquire a land real image dataset; the land real image dataset includes a plurality of groups of land real images and their corresponding depth maps;
[0043] A first model unit is used to construct and train an underwater image synthesis model based on a generative adversarial network; the underwater image synthesis model is trained based on the ambient background light acquired by the second acquisition unit, the real land image dataset acquired by the third acquisition unit, and the real underwater color distortion image dataset acquired by the first acquisition unit;
[0044] an image synthesis unit, configured to input the noise, the ambient background light, the real land image, and the depth map corresponding to the real land image as a group of samples into the underwater image synthesis model trained by the first model unit, so as to obtain a real land image with an underwater style;
[0045] The second model unit is used to establish an underwater image color restoration model based on a convolutional neural network; the real land image and the image with underwater style synthesized by the image synthesis unit are used as a group of training data, and the underwater image color restoration model is trained using a training set formed by several groups of training data;
[0046] The color restoration unit is used to acquire the underwater image to be color restored, and perform color restoration on the underwater image to be color restored using the underwater image color restoration model trained by the second model unit.
[0047] The present invention also provides a computer-readable storage medium, in which a computer instruction set is stored. When the computer instruction set is executed by a processor, the underwater image color restoration method based on ambient background light as described above is implemented.
[0048] Advantages and positive effects of the present invention:
[0049] The present invention proposes an underwater image synthesis model based on ambient background light, and the underwater image synthesis model is based on Generative Adversarial Networks (GAN). Due to the lack of real radiation and depth map (depthmap) of the underwater environment, GAN is required to use real land images (groundtruth) and corresponding depthmaps, and the obtained underwater color distortion images are used as supervision during GAN training. After sufficient training, GAN can generate distorted images with a style similar to that of underwater distorted images. The generated underwater style image and groundtruth are used as a pair of data input into an underwater image color restoration model, and the groundtruth is used as supervision for training the underwater image color restoration model to perform color restoration of the distorted image. The trained underwater image color restoration model can be directly used for color restoration of underwater distorted images of corresponding styles. The obtained color restored image is clearer than the original image, and can be used for underwater target detection, thereby improving the accuracy of target detection.
[0050] In addition, after the underwater image color restoration model is used to restore the color, there is no need to perform any image format conversion or other operations. The time for restoring the color of the entire image is also short and the operation is simple. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0052] FIG1 is a flow chart of a method for underwater image color restoration based on ambient background light according to an embodiment of the present invention;
[0053] FIG2 is an example of an underwater color distorted image in an embodiment of the present invention;
[0054] FIG3 is a schematic diagram showing the distribution of B, G, and R values of an underwater image in an embodiment of the present invention;
[0055] FIG4 is a schematic diagram of the structure of an underwater image synthesis model according to an embodiment of the present invention;
[0056] FIG5 is a schematic diagram of the structure of an underwater image color restoration model according to an embodiment of the present invention;
[0057] FIG6 is a comparison diagram of underwater image color before and after restoration according to an embodiment of the present invention;
[0058] Figure 7Schematic diagram of the structure of an underwater image color restoration device based on ambient background light in an embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0060] See also Figure 1 , which shows a flow chart of a method for underwater image color restoration based on ambient background light in an embodiment of the present invention, the method comprising:
[0061] Step 1: Obtain a real underwater color distorted image dataset;
[0062] Wherein, the real underwater color distorted image data set includes a number of real underwater color distorted images;
[0063] Nearly 2,000 underwater color-distorted images were obtained using an underwater monocular camera. The image styles are as follows: Figure 2 shown.
[0064] Step 2: using a statistical method to obtain the ambient background light of the real underwater color distorted image;
[0065] The inventors analyzed more than 2,000 real underwater color distorted images and found that the R, G, and B values of these real underwater color distorted images roughly conform to a normal distribution model, such as Figure 3 As shown. The R, G, and B values of the ambient background light are derived from the obtained normal distribution model, and the R, G, and B values of the ambient background light are combined to have the same dimension as the RGB image, thereby obtaining the ambient background light. In a specific implementation, a statistical method can be used to count the pixel values of the three channels of R, G, and B, and it is found that they are normally distributed. The variance values of each channel are calculated to determine the confidence interval (value range), thereby extracting the pixel values of the three channels, and then expanding the three values to the same dimension as the RGB image and inputting them into the GAN network for training, and finally obtaining the optimal background light matrix for generating underwater style pictures.
[0066] Step 3: Obtain a real land image dataset;
[0067] The real land image dataset includes several groups of real land images and their corresponding depth maps;
[0068] The terrestrial real image dataset may use the NYU dataset, which includes terrestrial real images and their paired depth maps (a public dataset commonly used in depth-based image processing applications).
[0069] Step 4: construct and train a GAN-based underwater image synthesis model; the underwater image synthesis model is trained based on ambient background light, the real land image dataset, and the real underwater color distortion image dataset;
[0070] The obtained ambient background light is input into the GAN network model, and the underwater image synthesis model is trained using the groundtruth and its corresponding depthmap and a set of underwater images as samples.
[0071] The model structure of the underwater image synthesis model is as follows Figure 4 shown.
[0072] According to the image imaging model IFM: ,in The factors that affect underwater image imaging include depth d, light attenuation rate underwater , and the ambient background light B. The underwater image synthesis model in the present invention takes into account the depth d and the light attenuation rate underwater. At the same time, the ambient background light B corresponding to the underwater environment obtained by analyzing the data is added, which can generate pictures that are closer to the corresponding underwater style.
[0073] GAN consists of two networks, a generator and a discriminator, which are trained simultaneously. The input of the generator is a noise vector z, which is output as a synthetic image G(z) through projection, reshaping, propagation, a series of convolution and deconvolution layers. The discriminator takes the set of synthetic images generated by the generator and the set of real underwater color distortion images x as input, and classifies each synthetic image as real (real(1)) or synthetic (synthetic(0)).
[0074] The goal of the generator is to output synthetic images that the discriminator classifies as real. When optimizing the generator, the following formula is used:
[0075] (1)
[0076] The goal of the discriminator is to achieve high classification accuracy, minimize the above function, and maximize the total value function D(x):
[0077] (2)
[0078] The generator is mainly composed of two parts: the first part is the attention mechanism (Attenuation), and the second part is the backscatter mechanism (backscatter). This structure can make the synthesized image consistent with the original input land real image structure. The details are as follows:
[0079] Part 1: When light propagates in an underwater environment, it will be reflected by the particles in the water, which will have a certain impact on underwater image formation.
[0080] In this regard, the real land image is processed to obtain a first image, and the processing method is as follows:
[0081] (3)
[0082] in represents the real land image, represents the attenuation rate of light underwater, Represents the depth map it is paired with.
[0083] Part 2: Convolve the noise and combine it with the ambient background light B to obtain a second image.
[0084] According to IFM (Image Imaging Model):
[0085] (4)
[0086] The first image and the second image are combined into a real land image with underwater image style.
[0087] Step 5: input the noise, the ambient background light, the real land image, and the depth map corresponding to the real land image as a group of samples into the trained underwater image synthesis model to obtain a real land image with underwater style;
[0088] The obtained ambient background light B is input into GAN, thereby converting the style picture of the real land image into Figure 2 The underwater-style images shown, the generated underwater-style images and their real land images are used for training the underwater image color restoration model.
[0089] Step 6: Establish an underwater image color restoration model based on convolutional neural network;
[0090] In order to achieve color restoration of an underwater image of a certain style, a CNN network model for underwater image color restoration is used in the embodiment of the present invention, such as Figure 5 As shown in the figure, the model does not contain a fully connected layer and consists of only 5 convolutional layers. This lightweight model structure can make the network efficient and fast, reducing training and testing time.
[0091] Step 7: taking the real land image and its corresponding underwater style image as a set of training data, and using a training set formed by several sets of training data to train the underwater image color restoration model;
[0092] Step 8: Acquire an underwater image to be color restored, and use a trained underwater image color restoration model to perform color restoration on the underwater image to be color restored.
[0093] Assume that the relationship between the image J taken by the camera underwater and the real environment scene radiation I is:
[0094]
[0095] Obtained through a multi-layer convolutional network , in order to obtain the real radiation of the underwater scene, first in the first convolutional layer, there are:
[0096]
[0097] in is the result of the first layer of convolution and ReLU output, and is the residual value obtained in the first layer. The second layer is:
[0098]
[0099] There are four layers like this, and then a 3×3 convolution is performed on the underwater color decay image, recorded as z, and then concat and z. That is:
[0100]
[0101] Then, a 3×3×3 convolution is performed on the obtained R to obtain the residual r of the same shape as the original image. Finally, the residual is added to the underwater image to be color restored:
[0102]
[0103] Then the underwater image after color restoration can be obtained, such as Figure 6 shown.
[0104] In the embodiment of the present invention, an underwater image synthesis model based on ambient background light is proposed, which can generate an image closer to the corresponding underwater style than the existing GAN. The generated underwater style image and groundtruth are used as a pair of data to input into the underwater image color restoration model, and the groundtruth is used as the supervision for training the underwater image color restoration model to perform color restoration of the distorted image. The trained underwater image color restoration model can be directly used for color restoration of the corresponding style underwater distorted image. The obtained color restored image is clearer than the original image and can be used for underwater target detection, thereby improving the accuracy of target detection.
[0105] Table 1 provides the image quality evaluation of the same underwater image after being processed using the method of the present invention and using UDCP (Underwater Dark Channel Prior):
[0106] Table 1
[0107]
[0108] Among the image evaluation indicators such as PSNR (peak channel ratio), SSIM (structural similarity), UIQM (unreferenced underwater image quality evaluation index), and MSE (mean square error), the larger the first three indicators, the better, and the smaller the last indicator, the better. The results of the present invention are better than those obtained by UDCP in every indicator.
[0109] Corresponding to the underwater image color restoration method based on ambient background light in the present invention, the present invention also provides an underwater image color restoration device based on ambient background light. Figure 7 As shown, it shows a schematic structural diagram of an underwater image color restoration device based on ambient background light in an embodiment of the present invention, the device includes:
[0110] The first acquisition unit 701 is used to acquire a real underwater color distorted image dataset; the real underwater color distorted image dataset includes a plurality of real underwater color distorted images;
[0111] A second acquisition unit 702 is used to acquire the ambient background light of the real underwater color distorted image acquired by the first acquisition unit 701 by using a statistical method;
[0112] The third acquisition unit 703 is used to acquire a land real image dataset; the land real image dataset includes a plurality of groups of land real images and their corresponding depth maps;
[0113] The first model unit 704 is used to construct and train an underwater image synthesis model based on a generative adversarial network; the underwater image synthesis model is trained based on the ambient background light acquired by the second acquisition unit 702, the real land image dataset acquired by the third acquisition unit 703, and the real underwater color distortion image dataset acquired by the first acquisition unit 701;
[0114] An image synthesis unit 705 is used to input the noise, the ambient background light, the real land image, and the depth map corresponding to the real land image as a group of samples into the underwater image synthesis model trained by the first model unit 704 to obtain a real land image with an underwater style;
[0115] The second model unit 706 is used to establish an underwater image color restoration model based on a convolutional neural network; the real land image and the image with underwater style synthesized by the image synthesis unit 705 are used as a group of training data, and the underwater image color restoration model is trained using a training set formed by several groups of training data;
[0116] The color restoration unit 707 is used to obtain an underwater image to be color restored, and use the underwater image color restoration model trained by the second model unit 706 to perform color restoration on the underwater image to be color restored.
[0117] As for the underwater image color restoration device based on ambient background light in the embodiment of the present invention, since it corresponds to the underwater image color restoration method based on ambient background light in the above embodiment, the description is relatively simple. For the relevant similarities, please refer to the description of the above embodiment, which will not be described in detail here.
[0118] An embodiment of the present invention further discloses a computer-readable storage medium, in which a computer instruction set is stored. When the computer instruction set is executed by a processor, the method for restoring the color of an underwater image based on ambient background light as provided in any of the above embodiments is implemented.
[0119] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0120] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0121] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0122] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0123] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or 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, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for underwater image color restoration based on ambient background light, characterized in that: The method comprises: Acquire a real underwater color distorted image dataset; the real underwater color distorted image dataset includes a plurality of real underwater color distorted images; Using a statistical method to obtain the ambient background light of the real underwater color distorted image; Acquire a land real image dataset; the land real image dataset includes several groups of land real images and their corresponding depth maps; Constructing and training an underwater image synthesis model based on a generative adversarial network; the underwater image synthesis model is trained based on environmental background light, the real land image dataset, and the real underwater color distortion image dataset; Inputting the noise, the ambient background light, the real land image, and the depth map corresponding to the real land image as a group of samples into a trained underwater image synthesis model to obtain a real land image with underwater style; Establish an underwater image color restoration model based on convolutional neural network; The real land image and its corresponding underwater style image are used as a group of training data, and the underwater image color restoration model is trained using a training set formed by several groups of training data; Acquire an underwater image to be color restored, and use a trained underwater image color restoration model to perform color restoration on the underwater image to be color restored; and use a statistical method to acquire the ambient background light of the real underwater color distorted image, including: Performing statistical analysis on the R, G, and B values of the real underwater color distorted image respectively to obtain a distribution model of the R, G, and B values of the real underwater color distorted image; Derivation of R, G, B values of ambient background light according to the distribution model of R, G, B values; The R, G, and B values of the ambient background light are combined into the same dimension as the RGB image to obtain the ambient background light; the distribution model of the R, G, and B values is a normal distribution model; the underwater image synthesis model includes a generator and a discriminator; The generator takes noise, the ambient background light, the real land image and its corresponding depth map, and the real underwater color distorted image as input, and takes a synthesized real land image with underwater image style as output; The discriminator takes the real land image with underwater image style synthesized by the generator and the real underwater color distorted image as input, and takes the classification result of the real land image with underwater image style as output, wherein the classification result includes real or synthetic; the generator includes an attention mechanism and a backscattering mechanism; Accordingly, the noise, the ambient background light, the real land image, and the depth map corresponding to the real land image are input as a group of samples into the trained underwater image synthesis model to obtain a real land image with underwater style, including: The trained generator processes the real land image based on the attention mechanism to obtain the first image in the following manner: ; in, represents the real land image, represents the attenuation rate of light underwater, A depth map corresponding to the real land image; The trained generator convolves the noise based on the backscattering mechanism and then combines it with the ambient background light to obtain a second image; Based on the image imaging model, the first image and the second image are synthesized into a real land image with underwater image style; the underwater image color restoration model includes 5 convolution layers; Accordingly, the underwater image to be color restored is restored using the trained underwater image color restoration model, including: Using the five convolution layers, a five-layer convolution operation is performed on the underwater image to be color restored; Connect the convolution results of each layer; Performing a convolution operation on the connected convolution results again to obtain a residual having the same shape as the underwater image to be color restored; The residual is added to the underwater image to be color restored to obtain a target underwater image after color restoration.
2. The method for underwater image color restoration based on ambient background light according to claim 1, characterized in that: Acquiring a real underwater color distorted image dataset includes: acquiring a real underwater color distorted image dataset using an underwater monocular camera.
3. The method for underwater image color restoration based on ambient background light according to claim 1, characterized in that: Acquiring a real land image dataset includes: acquiring a real land image dataset from a NYU dataset.
4. An underwater image color restoration device based on ambient background light, characterized in that: The device comprises: A first acquisition unit is used to acquire a real underwater color distorted image data set; the real underwater color distorted image data set includes a plurality of real underwater color distorted images; A second acquisition unit, configured to acquire the ambient background light of the real underwater color distorted image acquired by the first acquisition unit by using a statistical method; A third acquisition unit is used to acquire a land real image dataset; the land real image dataset includes a plurality of groups of land real images and their corresponding depth maps; A first model unit is used to construct and train an underwater image synthesis model based on a generative adversarial network; the underwater image synthesis model is trained based on the ambient background light acquired by the second acquisition unit, the real land image dataset acquired by the third acquisition unit, and the real underwater color distortion image dataset acquired by the first acquisition unit; an image synthesis unit, configured to input the noise, the ambient background light, the real land image, and the depth map corresponding to the real land image as a group of samples into the underwater image synthesis model trained by the first model unit, so as to obtain a real land image with an underwater style; The second model unit is used to establish an underwater image color restoration model based on a convolutional neural network; the real land image and the image with underwater style synthesized by the image synthesis unit are used as a group of training data, and the underwater image color restoration model is trained using a training set formed by several groups of training data; A color restoration unit, used for acquiring an underwater image to be color restored, and performing color restoration on the underwater image to be color restored using the underwater image color restoration model trained by the second model unit; The second acquisition unit specifically includes: performing statistical analysis on the R, G, and B values of the real underwater color distorted image respectively to obtain a distribution model of the R, G, and B values of the real underwater color distorted image; deriving the R, G, and B values of the ambient background light according to the distribution model of the R, G, and B values; combining the R, G, and B values of the ambient background light into the same dimension as the RGB image to obtain the ambient background light; the distribution model of the R, G, and B values is a normal distribution model; The underwater image synthesis model includes a generator and a discriminator; the generator takes noise, the ambient background light, the real land image and its corresponding depth map, and the real underwater color distorted image as input, and takes a synthesized real land image with underwater image style as output; the discriminator takes the real land image with underwater image style synthesized by the generator and the real underwater color distorted image as input, and takes the classification result of the real land image with underwater image style as output, and the classification result includes real or synthetic; the generator includes an attention mechanism and a backscattering mechanism; accordingly, the image synthesis unit specifically includes: the trained generator processes the real land image based on the attention mechanism to obtain a first image, and the processing method is as follows: ;in, represents the real land image, represents the attenuation rate of light underwater, represents a depth map corresponding to the real land image; the trained generator convolves the noise based on the backscattering mechanism, and then combines the environmental background light to obtain a second image; based on the image imaging model, the first image and the second image are synthesized into a real land image with an underwater image style; The underwater image color restoration model includes 5 convolution layers; the color restoration unit specifically includes: using the 5 convolution layers to perform 5 convolution operations on the underwater image to be color restored; connecting the convolution results of each layer; performing a convolution operation on the connected convolution results again to obtain a residual of the same shape as the underwater image to be color restored; adding the residual to the underwater image to be color restored to obtain a target underwater image after color restoration.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer instruction set, and when the computer instruction set is executed by the processor, an underwater image color restoration method based on ambient background light as described in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Underwater image composition method of multi-style generative adversarial network and application thereof
CN108961198A
Underwater image defogging and color cast correction method based on bright channel transmissivity compensation
CN110322410A
Underwater image restoration method based on convolutional neural network
CN110838092A
Monocular underwater image depth estimation and color correction method based on deep neural network
CN111739077A
Underwater image restoration algorithm based on color compensation and color line prior
CN111968055A
