Combined optimization method for underwater image enhancement and restoration based on CNN

Through the CNN-based combined optimization method of underwater image enhancement and restoration, using the CIELab color model and dehazing network, combined with the CLAHE algorithm, the problems of underwater image blur and color cast are solved, the contrast and clarity of the image are improved, and the robustness and usability of the image are enhanced.

CN116612034BActive Publication Date: 2025-09-09FUZHOU UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310624162.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2025-09-09
Estimated Expiration
2043-05-30

AI Technical Summary

Technical Problem

The original images captured by underwater imaging equipment are of poor quality, with problems such as blurring, low contrast and color shift, which affect the accuracy and usability of image information.

Method used

A CNN-based combined optimization method for underwater image enhancement and restoration is adopted. Color correction and deblurring are performed through modules, including a dual-channel separation color correction algorithm based on the CIELab color model and a dehazing module based on a dehazing network, combined with a brightness equalization module of the CLAHE algorithm, to improve the contrast and clarity of the image.

Benefits of technology

It effectively corrects the color cast of underwater images, improves image contrast, enhances image quality, and improves image robustness and generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116612034B_ABST
    Figure CN116612034B_ABST
Patent Text Reader

Abstract

The present invention relates to a CNN-based underwater image enhancement and restoration combined optimization method, comprising the following steps: preparing a data set; training a CNN-based defogging network using the data set to obtain a trained defogging network, which serves as a fog defogging module in an underwater defogging module; inputting an underwater image to be processed into a color restoration module, processing the underwater image using a dual-channel separation color correction algorithm based on the CIELab color model to obtain a color-corrected first image; inputting the first image into the fog defogging module in the underwater defogging module, processing the image using the defogging network to obtain a defogged second image; inputting the second image into a brightness equalization module in the underwater defogging module, processing the brightness channel of the second image using a CLAHE algorithm, and obtaining a third image with more balanced brightness and better contrast, i.e., an image after underwater image enhancement and restoration. This method is advantageous for correcting color cast in underwater images and improving the contrast of underwater images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of underwater image enhancement and restoration, and in particular to a CNN-based underwater image enhancement and restoration combined optimization method. Background Art

[0002] In the process of using underwater robots for ocean exploration and development, underwater images, as a medium for storing information, are an important way to obtain ocean information. Currently, underwater robot underwater imaging methods are mainly divided into two categories: sonar imaging and low-light imaging. Low-light imaging uses a camera with the help of an auxiliary light source to generate images using light reflections. Compared to sonar imaging, low-light imaging can obtain images much faster, with higher resolution and richer information. However, low-light imaging has higher requirements for imaging distance and imaging environment. In recent years, the development of image enhancement and restoration technologies (such as deep learning) has reduced the dependence of low-light imaging on the underwater environment to a certain extent, which has led to the wider application of underwater robots using low-light imaging in military and marine engineering fields.

[0003] Therefore, acquiring clear underwater images is crucial for ocean exploration and research. However, the quality of raw underwater optical images captured by underwater imaging equipment is poor. When light propagates underwater, the light received by the imaging device primarily consists of three types of light: direct light, forward scattered light, and backscattered light. The presence of particles in the water causes light to scatter underwater, resulting in blurry and low-contrast images. Forward scattering deflects light reflected from the target, affecting image quality. Backscattering, on the other hand, occurs when refracted light reflects off particles in the water and enters the imaging device, resulting in image information that is not related to the target. Both forward and backscattered light reduce image contrast and suppress detail. Furthermore, the rapid attenuation of light in water causes severe color casts in underwater images. Because red light attenuates fastest in water, the blue-green tint in underwater images becomes more pronounced at deeper depths, significantly reducing or even distorting the information conveyed by the image. In order to obtain complete and correct underwater target information and make the obtained underwater original images convenient for subsequent further research such as target recognition, it is necessary to enhance and restore the degraded underwater images. Summary of the Invention

[0004] The purpose of the present invention is to provide a CNN-based underwater image enhancement and restoration combined optimization method, which is beneficial to correcting the color cast of underwater images and improving the contrast of underwater images.

[0005] To achieve the above objectives, the present invention adopts a technical solution: a CNN-based combined optimization method for underwater image enhancement and restoration, which improves the overall restoration quality of underwater images by performing color correction and deblurring in modules, including the following steps:

[0006] Step 1: Based on the outdoor training set deep database, extract and create a dataset for training the CNN-based dehazing network;

[0007] Step 2: Use the obtained dataset to train the constructed CNN-based defogging network to obtain the trained defogging network, which serves as the fog defogging module in the underwater defogging module;

[0008] Step 3: Inputting a to-be-processed underwater image into a color restoration module, processing the underwater image using a dual-channel separation color correction algorithm based on the CIELab color model to obtain a color-corrected first image;

[0009] Step 4: Input the first image obtained in step 3 into the fog defogging module in the underwater defogging module, and process it through the CNN-based defogging network to obtain a defogged second image;

[0010] Step 5: Input the second image obtained in step 4 into the brightness equalization module in the underwater defogging module. Process the brightness channel of the defogging second image using the CLAHE algorithm to obtain a third image with more balanced brightness and better contrast. The third image is the image after underwater image enhancement and restoration.

[0011] Furthermore, a fog defogging module based on a defogging network and a brightness equalization module using the CLAHE algorithm together constitute an underwater defogging module. The combined optimization method of underwater image enhancement and restoration is realized by combining a color restoration module based on a dual-channel separation color correction algorithm of the CIELab color model and an underwater defogging module.

[0012] Furthermore, in step 1, based on the outdoor training set depth database, different atmospheric light intensities Ac(x) and transmittances tc(x) are set to screen out images with excessively high background brightness in the outdoor training set to obtain a data set; the data set includes 36,400 images for training the defogging network, of which 32,760 images are used as a training set and the remaining 3,640 images are used as a validation set; the image size in the data set is unified into 320×320 RGB images to obtain the final data set for training the defogging network.

[0013] Furthermore, in step 2, the CNN-based defogging network constructed mainly consists of a main network and a secondary network. The secondary network is used to share the training workload to shorten the depth of the main network. The specific method of training the defogging network using the dataset is as follows:

[0014] Step 2-1: Input the images in the dataset into the dehazing network. The images are input into both the main network and the secondary network.

[0015] Step 2-2: For the image input to the secondary network, the secondary network first combines three depthwise separable convolutions of different sizes with the BMU module to obtain a larger receptive field and better learn the global information of the input image; then, the secondary network performs 3×3 depthwise separable convolution and uses the Sigmoid activation function to compress the results of the secondary network; finally, the obtained three-channel feature map is output to the main network and continues to participate in the training of the main network;

[0016] Step 2-3: The image input to the main network is first passed through a depth-wise separable convolution with a convolution kernel size of 7×7 and a basic attention module BAB to obtain features. Figure 1 , the features Figure 1 It is concatenated with the three-channel feature map obtained by the secondary network, and then the feature map is obtained by a depth-wise separable convolution with a convolution kernel size of 5×5 and the basic attention module BAB. Figure 2 , and then the obtained features Figure 2 With the previous features Figure 1 Spliced ​​together, the features are obtained through a depth-separable convolution with a convolution kernel size of 5×5 and the basic attention module BAB. Figure 3 , and then the obtained features Figure 3 With the previous features Figure 2 Spliced ​​together, and then sequentially passed through the channel attention module CA, the pixel attention module PA and a depth-separable convolution with a convolution kernel size of 3×3 to obtain the feature Figure 4 , and then the obtained features Figure 4 It is spliced ​​together with the original image features and then passed into the pyramid pooling module PPB to obtain the final result;

[0017] Steps 2-4: Calculate the expected value of the square of the difference between the final result and the original fog-free image to obtain the loss function used for network training, which is the mean square error; judge the degree of network training by observing the change in the MSE value. The larger the MSE value, the worse the processing effect that the network can achieve; learn the mapping relationship between the foggy image and the corresponding clear image by minimizing the loss between the final result and the corresponding fog-free real image; in order to avoid the deterioration of the generalization ability of the trained network and overfitting, a verification process is added after each Epoch; if the MSE increases during the verification process, the network will terminate the training even if continuing the network training can make the MSE value of the training process decrease, and save the trained network parameters to obtain a trained defogging network.

[0018] Furthermore, the pyramid pooling module (PPB) constructs a four-scale pooling pyramid by performing global average pooling of the incoming feature layer at scales of 4×4, 8×8, 16×16, and 32×32. After pooling at each scale, the feature map undergoes a 1×1 convolution operation to integrate information across inter-layer channels, and then undergoes an upsampling operation to restore the feature map to the original input size. Finally, the feature maps before and after pyramid pooling are spliced ​​together, and a 3×3 convolution is added to align the feature maps.

[0019] Furthermore, the step 3 specifically includes the following steps:

[0020] Step 3-1, convert the input image from RGB image to CIELab image;

[0021] Step 3-2, calculate the channel values ​​Ma and Mb of the median of channels a and b respectively;

[0022] Step 3-3: Calculate the difference between the channel values ​​Ma and Mb and the middle position of the correction point color channel to obtain the correction values ​​offset1 and offset2. The calculation formula is:

[0023] Offset1=128-Ma

[0024] Offset2=128-Mb

[0025] Step 3-4: Add the correction values ​​of their respective channels to the a-channel value f(a) and the b-channel value f(b) to obtain the processed a-channel value f(a') and b-channel value f(b'). The calculation formula is:

[0026] f(a')=f(a)+Offset1

[0027] f(b')=f(b)+Offset2

[0028] Steps 3-5: Convert the processed Lab image to an RGB image output to obtain a color-balanced image.

[0029] Furthermore, the step 5 specifically includes the following steps:

[0030] Step 5-1: Divide the input image into equal-sized and non-overlapping sub-images, each sub-image containing M×M pixels;

[0031] Step 5-2, draw the histogram of each sub-image;

[0032] Step 5-3: Determine the sub-image clipping threshold ClipLimit by using the contrast limit value ContrastLimit. The ClipLimit value is equal to the product of ContrastLimit and the mean grayscale value of the sub-image.

[0033] Step 5-4: for each sub-image, redistribute the pixels in the sub-image whose grayscale value exceeds the threshold ClipLimit;

[0034] Step 5-5, performing histogram equalization on each sub-image;

[0035] Step 5-6: Reconstruct the grayscale values ​​of the pixels in the sub-image.

[0036] Compared with the prior art, the present invention has the following beneficial effects: providing a CNN-based combined optimization method for underwater image enhancement and restoration, wherein the method corrects the color cast of the underwater original image through a color restoration module based on a dual-channel separation color correction algorithm of the CIELab color model, and then reduces the influence of light scattering on the underwater original image through an underwater defogging module composed of a foggy defogging module based on a defogging network and a brightness equalization module using a CLAHE algorithm, thereby improving the contrast of the image; the method combines multiple image enhancement and restoration technologies according to different causes leading to low underwater image quality, thereby improving the robustness and generalization ability of the method. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A flowchart of a method implementation of an embodiment of the present invention;

[0038] Figure 2 Schematic diagram of the framework of the defogging network in an embodiment of the present invention;

[0039] Figure 3 Schematic diagram of the components of the dehazing network in an embodiment of the present invention; (a) is the basic attention module (BAB), (b) is the channel attention module (CA), and (c) is the pixel attention module (PA);

[0040] Figure 4 Schematic diagram of a pyramid pooling module (PPB) in a dehazing network according to an embodiment of the present invention;

[0041] Figure 5 Schematic diagram of pixel redistribution using the CLAHE algorithm in an embodiment of the present invention;

[0042] Figure 6The results of the embodiment of the present invention are displayed in the figure; among them, (a) is the image to be processed, (b) is the image after passing through the color restoration module, (c) is the image after passing through the fog defogging module, and (d) is the image after passing through the brightness equalization module, that is, the final image optimized by this method. DETAILED DESCRIPTION

[0043] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0044] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present application belongs.

[0045] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.

[0046] like Figure 1 As shown, this embodiment provides a CNN-based combined optimization method for underwater image enhancement and restoration, which improves the overall restoration quality of underwater images by performing color correction and deblurring in modules, including the following steps:

[0047] Step 1: Based on the Outdoor Training Set (OTS) deep database, extract and create a dataset for training the CNN-based dehazing network.

[0048] This dataset is a synthetic foggy dataset based on a deep outdoor training dataset by varying the atmospheric light intensity Ac(x) and transmittance tc(x). Images with excessively high background brightness from the outdoor training dataset were removed. The dataset contains 36,400 images used for training the dehazing network, with 32,760 images serving as the training set and the remaining 3,640 images serving as the validation set. The images in the dataset were resized to 320×320 RGB images, resulting in the final dataset used for training the dehazing network.

[0049] Step 2: Use the obtained data set to train the constructed CNN-based defogging network to obtain a trained defogging network with good performance, which is used as the fog defogging module in the underwater defogging module.

[0050] like Figure 2-4As shown in the figure, the constructed CNN-based defogging network mainly consists of a main network and a secondary network. The secondary network is used to share the training workload to shorten the depth of the main network. The specific method of training the defogging network with the dataset is as follows:

[0051] Step 2-1: Input the images in the dataset into the dehazing network. The images are input into both the main network and the secondary network at the same time.

[0052] Step 2-2: For the image input to the secondary network, the secondary network first performs three different depthwise separable convolutions (kernel sizes of 11×11, 9×9, and 7×7) combined with the BMU module to obtain a larger receptive field and better learn the global information of the input image. The secondary network then performs a 3×3 depthwise separable convolution (DS_Conv4) and compresses the results using the Sigmoid activation function. Finally, the resulting three-channel feature map is output to the primary network and continues to participate in the primary network's training.

[0053] Step 2-3: The image input to the main network is first passed through a depth-wise separable convolution with a convolution kernel size of 7×7 and a basic attention module (BAB) to obtain features. Figure 1 , the features Figure 1 It is concatenated with the three-channel feature map obtained by the secondary network, and then the feature is obtained by a depth-wise separable convolution with a convolution kernel size of 5×5 and a basic attention module (BAB). Figure 2 , and then the obtained features Figure 2 With the previous features Figure 1 Spliced ​​together, the features are obtained by a depth-wise separable convolution with a convolution kernel size of 5×5 and a basic attention module (BAB) Figure 3 , and then the obtained features Figure 3 With the previous features Figure 2 The features are then stitched together and passed through the channel attention module (CA), pixel attention module (PA) and a depth-separable convolution with a convolution kernel size of 3×3 to obtain the features. Figure 4 , and then the obtained features Figure 4 It is concatenated with the original image features and then passed into the pyramid pooling module (PPB) to obtain the final result.

[0054] Among them, the pyramid pooling module PPB constructs a four-scale pooling pyramid by performing global average pooling of the incoming feature layer with scales of 4×4, 8×8, 16×16 and 32×32. After pooling at each scale, the feature map undergoes a 1×1 convolution operation to integrate information across inter-layer channels, and then undergoes an upsampling operation to restore the feature map to the original input size. Finally, the feature maps before and after pyramid pooling are spliced ​​together, and a 3×3 convolution is added to align the feature maps.

[0055] Steps 2-4: Calculate the expected value of the square of the difference between the final result and the original fog-free image to obtain the loss function used for network training, which is the mean square error (MSE); judge the degree of network training by observing the change in the MSE value. The larger the MSE value, the worse the processing effect that the network can achieve; learn the mapping relationship between the foggy image and the corresponding clear image by minimizing the loss between the final result and the corresponding fog-free real image; in order to avoid the deterioration of the generalization ability of the trained network and overfitting, a verification process is added after each epoch (the entire training set is trained once); if the MSE increases during the verification process, the network will terminate the training even if continuing the network training can make the MSE value of the training process decrease, and save the trained network parameters to obtain a trained defogging network.

[0056] The trained dehazing network is used as a foggy dehazing module, and together with a brightness equalization module using the CLAHE algorithm, it forms an underwater dehazing module. The combined optimization method for underwater image enhancement and restoration is implemented by combining a color restoration module using a dual-channel separation color correction algorithm based on the CIELab color model with the underwater dehazing module.

[0057] Step 3: Input a to-be-processed underwater image into a color restoration module. The underwater image is processed by a dual-channel separation color correction algorithm based on the CIELab color model to obtain a first image after color correction.

[0058] In this embodiment, step 3 specifically includes the following steps:

[0059] Step 3-1: Convert the input image from RGB image to CIELab image.

[0060] Step 3-2: Calculate the median channel values ​​Ma and Mb of channels a and b respectively.

[0061] Step 3-3: Calculate the difference between the channel values ​​Ma and Mb and the middle position of the correction point color channel to obtain the correction values ​​offset1 and offset2. The calculation formula is:

[0062] Offset1=128-Ma

[0063] Offset2=128-Mb

[0064] Step 3-4: Add the correction values ​​of their respective channels to the a-channel value f(a) and the b-channel value f(b) to obtain the processed a-channel value f(a') and b-channel value f(b'). The calculation formula is:

[0065] f(a')=f(a)+Offset1

[0066] f(b')=f(b)+Offset2

[0067] Steps 3-5: Convert the processed Lab image to an RGB image output to obtain a color-balanced image.

[0068] Step 4: Input the first image obtained in step 3 into the fog defogging module in the underwater defogging module, and process it through the CNN-based defogging network to obtain a defogged second image.

[0069] The fog defogging module uses the defogging network with the above-mentioned trained parameters, and then the image is passed through the defogging network to execute steps 2-1 to 2-3 to obtain the defogged image.

[0070] Step 5: Input the second image obtained in step 4 into the brightness equalization module in the underwater defogging module. The CLAHE algorithm used in this module processes the brightness channel (L channel in the CIELab color space) of the defogging second image to obtain a third image with more balanced brightness and better contrast. The third image is the image after underwater image enhancement and restoration. The principle of pixel redistribution by the CLAHE algorithm is as follows: Figure 5 shown.

[0071] In this embodiment, step 5 specifically includes the following steps:

[0072] Step 5-1: Divide the input image into equal-sized and non-overlapping sub-images, each sub-image containing M×M pixels (the size of M is determined according to actual needs).

[0073] Step 5-2: Draw the histogram of each sub-image.

[0074] Step 5-3: Determine the size of the sub-image clipping threshold ClipLimit by the contrast limit value ContrastLimit. The size of ClipLimit is equal to the product of ContrastLimit and the average grayscale value of the sub-image (the size of ContrastLimit is determined according to actual needs).

[0075] Step 5-4: For each sub-image, redistribute the pixels in the sub-image whose grayscale values ​​exceed the threshold ClipLimit.

[0076] Step 5-5: Perform histogram equalization on each sub-image.

[0077] Step 5-6: Reconstruct the grayscale values ​​of the pixels in the sub-image (usually using linear interpolation).

[0078] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0079] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0080] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0081] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0082] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other manner. Any person skilled in the art may utilize the above-disclosed technical content to modify or modify the present invention into equivalent embodiments. However, any simple modifications, equivalent variations, and modifications to the above embodiments that do not depart from the technical content of the present invention and are based on the technical essence of the present invention remain within the scope of protection of the present invention.

Claims

1. A CNN-based combined optimization method for underwater image enhancement and restoration, characterized in that: The overall restoration quality of underwater images is improved by performing color correction and deblurring in modules, including the following steps: Step 1: Based on the outdoor training set deep database, extract and create a dataset for training the CNN-based dehazing network; Step 2: Use the obtained dataset to train the constructed CNN-based defogging network to obtain the trained defogging network, which serves as the fog defogging module in the underwater defogging module; Step 3: Inputting a to-be-processed underwater image into a color restoration module, processing the underwater image using a dual-channel separation color correction algorithm based on the CIELab color model to obtain a color-corrected first image; Step 4: Input the first image obtained in step 3 into the fog defogging module in the underwater defogging module, and process it through the CNN-based defogging network to obtain a defogged second image; Step 5: Input the second image obtained in step 4 into the brightness equalization module in the underwater defogging module. The brightness channel of the defogging second image is processed using the CLAHE algorithm to obtain a third image with more balanced brightness and better contrast. The third image is the image after underwater image enhancement and restoration. The fog defogging module based on the defogging network and the brightness equalization module using the CLAHE algorithm together constitute the underwater defogging module. The combined optimization method of underwater image enhancement and restoration is achieved by combining the color restoration module using the dual-channel separation color correction algorithm based on the CIELab color model and the underwater defogging module. In step 1, based on the outdoor training set depth database, different atmospheric light intensities Ac(x) and transmittances tc(x) are set to filter out images with excessively high background brightness in the outdoor training set to obtain a data set; In step 2, the constructed CNN-based defogging network mainly consists of a main network and a secondary network. The secondary network is used to share the training workload to shorten the depth of the main network. The specific method of training the defogging network using the dataset is as follows: Step 2-1: Input the images in the dataset into the dehazing network. The images are input into both the main network and the secondary network. Step 2-2: For the image input to the secondary network, the secondary network first combines three depthwise separable convolutions of different sizes with the BMU module to obtain a larger receptive field and better learn the global information of the input image; then, the secondary network performs 3×3 depthwise separable convolution and uses the Sigmoid activation function to compress the results of the secondary network; finally, the obtained three-channel feature map is output to the main network and continues to participate in the training of the main network; Step 2-3, the image input to the main network first obtains feature map 1 through a depth-separable convolution with a convolution kernel size of 7×7 and a basic attention module BAB, and then concatenates feature map 1 with the three-channel feature map obtained by the secondary network. Then, feature map 2 is obtained through a depth-separable convolution with a convolution kernel size of 5×5 and a basic attention module BAB, and then concatenates the obtained feature map 2 with the previous feature map 1. Then, feature map 3 is obtained through a depth-separable convolution with a convolution kernel size of 5×5 and a basic attention module BAB, and then concatenates the obtained feature map 3 with the previous feature map 2. Then, feature map 4 is obtained through a channel attention module CA, a pixel attention module PA and a depth-separable convolution with a convolution kernel size of 3×3, and then concatenates the obtained feature map 4 with the original image features, and then passes it into the pyramid pooling module PPB to obtain the final result; Steps 2-4: Calculate the expected value of the square of the difference between the final result and the original fog-free image to obtain the loss function used for network training, which is the mean square error; judge the degree of network training by observing the change in the MSE value. The larger the MSE value, the relatively worse the processing effect that the network can achieve; learn the mapping relationship between the foggy image and the corresponding clear image by minimizing the loss between the final result and the corresponding fog-free real image; in order to avoid the deterioration of the generalization ability of the trained network and overfitting, add a verification process after each epoch; if the MSE increases during the verification process, even if the network continues to train to reduce the MSE value of the training process, the network will terminate the training and save the trained network parameters to obtain a trained defogging network; The pyramid pooling module (PPB) constructs a four-scale pooling pyramid by performing global average pooling of the incoming feature layer at scales of 4×4, 8×8, 16×16, and 32×32. After pooling at each scale, the feature map undergoes a 1×1 convolution operation to integrate information across inter-layer channels, and then undergoes an upsampling operation to restore the feature map to the original input size. Finally, the feature maps before and after pyramid pooling are concatenated, and a 3×3 convolution is added to align the feature maps. The step 3 specifically includes the following steps: Step 3-1, convert the input image from RGB image to CIELab image; Step 3-2, calculate the channel values ​​Ma and Mb of the median of channels a and b respectively; Step 3-3: Calculate the difference between the channel values ​​Ma and Mb and the middle position of the correction point color channel to obtain the correction values ​​offset1 and offset2. The calculation formula is: Offset1=128-Ma Ofset2=128-Mb Step 3-4: Add the correction values ​​of their respective channels to the a-channel value f(a) and the b-channel value f(b) to obtain the processed a-channel value f(a') and b-channel value f(b'). The calculation formula is: f(a′)=f(a)+Ofset1 f(b')=f(b)+Ofset2 Step 3-5: Convert the processed Lab image to RGB image output to obtain a color-balanced image; The step 5 specifically includes the following steps: Step 5-1: Divide the input image into equal-sized and non-overlapping sub-images, each sub-image containing M×M pixels; Step 5-2, draw the histogram of each sub-image; Step 5-3: Determine the sub-image clipping threshold ClipLimit by using the contrast limit value ContrastLimit. The ClipLimit value is equal to the product of ContrastLimit and the mean grayscale value of the sub-image. Step 5-4: for each sub-image, redistribute the pixels in the sub-image whose grayscale value exceeds the threshold ClipLimit; Step 5-5, performing histogram equalization on each sub-image; Step 5-6: Reconstruct the grayscale values ​​of the pixels in the sub-image.

2. The CNN-based underwater image enhancement and restoration combined optimization method according to claim 1, characterized in that: The dataset includes 36,400 images for training the dehazing network, of which 32,760 images are used as a training set and the remaining 3,640 images are used as a validation set. The image size in the dataset is unified into 320×320 RGB images to obtain the final dataset for training the dehazing network.

Citation Information

Patent Citations

  • Underwater image enhancement and restoration method based on convolutional neural network

    CN111462002A