A multi-module cascade underwater image enhancement method

Underwater images are processed through a multi-module cascade enhancement network, which solves the problems of light scattering, noise and color distortion, achieves comprehensive improvement of underwater images, and improves image clarity and visual effects.

CN117974490BActive Publication Date: 2024-09-13GUANGZHOU MARITIME INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410150484.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-02
Publication Date
2024-09-13
Estimated Expiration
2044-02-02

AI Technical Summary

Technical Problem

Underwater images cause brightness distribution imbalance, color distortion, and noise interference due to light absorption, scattering effects, and dispersion. Existing technologies are difficult to comprehensively solve these problems and lack an overall solution.

Method used

Design a multi-module cascade enhancement network, including noise suppression, color restoration, scattering effect correction, local feature enhancement, edge sharpening and three-dimensional restoration, and color saturation enhancement modules. Underwater images are processed through neural networks to remove noise and balance colors. , reduce the effect of scattering, strengthen edges and details, and restore color vividness.

Benefits of technology

Significantly improves the clarity and signal-to-noise ratio of underwater images, restores real visual effects, enhances the contrast and saturation of images, makes images more vivid, and is suitable for image processing in complex underwater environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117974490B
    Figure CN117974490B
Patent Text Reader

Abstract

The present application provides a multi-module cascade underwater image enhancement method, comprising: performing data standardization on an underwater image data set and constructing a multi-module cascade enhancement network; removing random noise and inherent scattering noise of a water body in an underwater image through a noise suppression module in the multi-module cascade enhancement network; performing color balance correction on an underwater image through a color restoration module in the multi-module cascade enhancement network; simulating and reducing the influence of light scattering on an underwater image through a scattering effect correction module in the multi-module cascade enhancement network; enhancing object edges and internal texture details of an underwater image through a local feature enhancement module in the multi-module cascade enhancement network; enhancing edge information of an underwater image and improving scene depth perception through an edge sharpening and stereoscopic restoration module in the multi-module cascade enhancement network; and encoding and verifying an underwater image and associating the enhanced underwater image with a label through the multi-module cascade enhancement network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of information technology, and in particular to a multi-module cascade underwater image enhancement method. Background Art

[0002] In the field of underwater image processing, the main challenges faced come from the complexity and variability of the underwater environment. Due to the significant differences in the propagation characteristics of light in water and in air, such as light absorption, scattering effects and dispersion phenomena, these factors work together to cause serious quality degradation problems in underwater images. First, the uneven lighting conditions make the overall brightness distribution of the image unbalanced, and the contrast between deep and shallow areas is significantly reduced, resulting in blurred visual effects. At the same time, color distortion is an important feature of underwater images. Due to the different attenuation rates of light of different wavelengths in water, the originally rich and bright colors have been seriously deviated when transmitted to the camera sensor, making it difficult to truly reflect the color information of the underwater scene. Secondly, the scattering effect of water on light not only weakens the expression of image details, but also blurs the edges of the image, which is not conducive to the accurate identification and analysis of object boundaries. In addition, random noise and inherent scattering noise caused by water structure also seriously affect the quality of the image, reduce the image signal-to-noise ratio, and further increase the difficulty of subsequent image analysis and recognition. Existing technical means are often stretched when dealing with these problems. Although traditional image enhancement algorithms can optimize certain aspects of the problem, such as removing some noise through filtering methods or using histogram equalization to improve local contrast, a single processing strategy often seems to be inadequate when facing the comprehensive degradation problem unique to underwater images. It is usually impossible to take all influencing factors into account, and there is a lack of an overall solution that can comprehensively solve the color distortion, low contrast, noise suppression, and scattering effect correction of underwater images. Summary of the invention

[0003] The present invention provides a multi-module cascade underwater image enhancement method, which mainly includes:

[0004] The underwater image dataset is standardized and a multi-module cascade enhancement network is constructed;

[0005] The noise suppression module in the multi-module cascade enhancement network is used to remove random noise and inherent scattering noise in underwater images.

[0006] The color balance correction of underwater images is performed by using the color restoration module in the multi-module cascade enhancement network;

[0007] The influence of light scattering on underwater images is simulated and reduced by enhancing the scattering effect correction module in the multi-module cascade network.

[0008] Through the local feature enhancement module in the multi-module cascade enhancement network, the object edges and internal texture details of the underwater image are enhanced;

[0009] Through the edge sharpening and stereo restoration modules in the multi-module cascade enhancement network, the edge information of underwater images is strengthened and the depth perception of the scene is improved;

[0010] Through the color saturation enhancement module in the multi-module cascade enhancement network, the saturation of underwater images is increased and the color vividness of underwater images lost due to water absorption is restored;

[0011] Through a multi-module cascade enhancement network, the underwater images are encoded and verified, and the enhanced underwater images are associated with labels.

[0012] In one embodiment, the underwater image dataset is normalized to construct a multi-module cascade enhancement network, including:

[0013] Obtain original images of underwater objects and environments; perform image normalization according to the underwater images to be processed, scale the pixel values ​​of the images to within the threshold range, and obtain standardized underwater images; design the architecture of the neural network, determine the structure and function of each submodule in the neural network, and select convolutional layers, pooling layers, activation functions, and other layers; randomly initialize the parameters in the network according to the network architecture; use the prepared standardized data and the designed neural network to train the network; define the loss function for training to measure the difference between the images before and after enhancement; calculate the gradient of the loss function with respect to the network parameters, and back-propagate the gradient to update the parameters; train the network in an iterative manner, and in each iteration, update the parameters to minimize the loss function; evaluate the model performance during the training process through a test set or a cross-validation set; check whether the network can correctly enhance new underwater images; adjust and improve the network architecture and parameter settings based on the test and verification results; after training the neural network, connect the output of each submodule to form a multi-module cascade enhancement network.

[0014] In one embodiment, the noise suppression module in the multi-module cascade enhancement network is used to remove random noise and inherent scattering noise of water in the underwater image, including:

[0015] Acquire standardized underwater image data; input the standardized underwater image data into the noise suppression module in the convolutional neural network to perform image enhancement operations; analyze the random noise in the underwater image and the inherent scattering noise characteristics of the water body, including point noise, patch noise and the diffusion effect caused by light propagating in the water body; according to the noise characteristics, convert the image to the frequency domain, identify and separate the noise components, and use the frequency domain filtering method to remove the noise; while suppressing the noise, use the edge-preserving filtering technology to protect the edge information and details; output the processed low-noise underwater image.

[0016] In one embodiment, the color balance correction of the underwater image is performed by enhancing the color restoration module in the multi-module cascade network, including:

[0017] Obtain processed low-noise underwater images; calculate correction parameters for color compensation of each RGB channel based on known water depth information and ambient lighting conditions; convert the image from the original RGB color space to a space for color balance adjustment; perform color balance adjustment on the image in the new color space based on the correction parameters to restore the true color of the underwater scene; during the color correction process, ensure that the image edges and details are not over-smoothed and enhance the texture features of the image; map the corrected color information back to the original RGB color space and process it; perform quality assessment on the color balance corrected image and dynamically adjust the parameters in the color restoration module; output the color-corrected underwater image.

[0018] In one embodiment, the scattering effect correction module in the multi-module cascade enhancement network is used to simulate and reduce the influence of light scattering on underwater images, including:

[0019] Acquire color-corrected underwater images and conduct a preliminary analysis of the light scattering characteristics in the images; estimate and quantify the light distribution distortion and detail blur caused by water scattering in the images through inverse calculation methods; infer the depth of each area of ​​the image through the texture and color information of the underwater image; use an adaptive dehazing algorithm to simulate and remove the scattering effect at different depths, and restore the image contrast and color realism weakened by scattering; smooth the edge jagged phenomenon that may appear after scattering correction, and enhance the texture details blurred by scattering; conduct real-time quality evaluation, and optimize the scattering correction module parameters according to the evaluation results to ensure that the visual effect and objective evaluation indicators of the output image are optimal; output the underwater image after scattering effect correction.

[0020] In one embodiment, the method of enhancing the object edges and internal texture details of the underwater image by using the local feature enhancement module in the multi-module cascade enhancement network includes:

[0021] Acquire an underwater image after scattering effect correction; divide the entire image into multiple small blocks or sub-areas, and perform independent contrast optimization processing on each local block; calculate the histogram distribution and average gray value of each local block, and analyze the local contrast of the local block; according to the histogram characteristics of the local block, adopt a contrast-limited adaptive histogram equalization algorithm to enhance the contrast difference of each local block; extract and strengthen the edge information of the object in the local block, maintain the edge clarity, highlight and enhance the texture details inside the image; reintegrate the results of contrast optimization and edge texture enhancement of each local block into a complete image to ensure a natural transition between adjacent blocks; perform quality evaluation on the enhanced local features, and adjust the contrast optimization and texture enhancement parameters according to the evaluation results; output the underwater image after local feature enhancement.

[0022] In one embodiment, the edge sharpening and stereo restoration modules in the multi-module cascade enhancement network are used to enhance the edge information of the underwater image and improve the scene depth perception, including:

[0023] Acquire underwater images after local feature enhancement and extract edge information; locate edge features in underwater images, enhance detected edges, and improve visual clarity of underwater images by contrast enhancement; estimate relative distances between different objects based on color, texture, and occlusion relationships of underwater images; adjust image lighting effects, shadow simulation, and local contrast to simulate stereoscopic parallax effects and enhance the three-dimensional sense of the image; check and optimize enhanced stereo information to ensure continuity and consistency of different parts of the same object in depth space and reduce artifacts; fuse enhanced edge information and images of three-dimensional restoration results and smooth over-sharpened edges; output underwater images after edge sharpening and three-dimensional restoration.

[0024] In one embodiment, the method of increasing the saturation of underwater images and restoring the color vividness of underwater images lost due to water absorption by using a color saturation enhancement module in a multi-module cascade enhancement network includes:

[0025] Acquire an underwater image after edge sharpening and stereo restoration; convert the image from the RGB color space to a color space for saturation adjustment; analyze the saturation level of the current image and identify areas where the color is faded due to water absorption; adaptively increase the saturation according to the image content and characteristics to avoid color distortion caused by oversaturation; retain the original color information in the process of increasing the saturation; adopt different saturation enhancement strategies for underwater image content of different levels and types; fuse the enhanced saturation information with the original image for a smooth transition; continuously adjust parameters through iterative optimization; evaluate the enhanced image, and adjust the color saturation enhancement module according to the evaluation results; output the underwater image with color saturation enhanced.

[0026] In one embodiment, encoding and verifying the underwater image and associating the enhanced underwater image with the label through a multi-module cascade enhancement network includes:

[0027] The quality of underwater images with enhanced color saturation is corrected and optimized through a multi-module cascade enhancement network; the processed image data is checked, and if it meets the predetermined quality and format requirements, the processed underwater image data is finally verified and corrected; if not, the network parameters are automatically adjusted until the predetermined quality and format requirements are met; the format of the verified and corrected underwater images is determined according to business needs and application scenarios; the underwater image data is compressed according to the characteristics and requirements of the image data; the color space of the underwater image is determined according to the characteristics and application requirements of the image data; and the color space of the underwater image is determined according to the image quality, compression, and other factors. The H.264 encoding algorithm is used to encode the image by taking into account the compression effect and color space factors; the encoded underwater image data is verified; the multi-module cascade enhancement network extracts and classifies the enhanced underwater image through the convolution layer and pooling layer of the convolutional neural network algorithm; the label data of the underwater image is obtained, and the association analysis of the underwater image and the label data is performed through the multi-module cascade enhancement network; if the association accuracy of the underwater image and the label reaches the association threshold, the underwater image and the label data are analyzed to obtain the parameters and characteristics of each type of data; according to the parameters and characteristics of each type of data, the data is classified and indexed.

[0028] The technical solution provided by the embodiment of the present invention may have the following beneficial effects:

[0029] The present invention discloses an underwater image enhancement method based on multi-module cascade, which realizes comprehensive enhancement and improvement of underwater images by standardizing underwater image data sets and constructing a multi-module cascade enhancement network. The network contains multiple specially designed modules, each of which targets a specific problem in underwater image processing.

[0030] First, the technology uses a noise suppression module to remove random noise and inherent scattering noise in underwater images, which significantly improves the clarity and usability of the image. Then, through the color restoration module, the image is color-balanced to compensate for the color distortion problem in the underwater environment.

[0031] To further improve image quality, the scattering effect correction module is designed to simulate and reduce the impact of light scattering on underwater images, which helps to restore the true visual effect of the image. In addition, the local feature enhancement module strengthens the edges and internal texture details of objects in underwater images, making objects clearer and easier to identify. To enhance the visual effect of the image, the edge sharpening and stereo restoration modules are used to strengthen the edge information of underwater images and improve the depth perception of the scene, so that the observer can better understand the three-dimensional structure of the underwater environment. At the same time, the color saturation enhancement module increases the saturation of underwater images, restores the color vividness lost due to water absorption, and makes the image look more vivid.

[0032] Finally, the multi-module cascade enhancement network not only improves the quality of underwater images, but also encodes and verifies the enhanced underwater images and associates them with labels, which greatly facilitates the management and subsequent applications of underwater images. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 The present invention is a flowchart of a multi-module cascade underwater image enhancement method.

[0034] Figure 2 It is a schematic diagram of a multi-module cascade underwater image enhancement method of the present invention.

[0035] Figure 3 It is another schematic diagram of a multi-module cascade underwater image enhancement method of the present invention. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0037] In this embodiment, a multi-module cascade underwater image enhancement method may specifically include:

[0038] Step S101, standardize the underwater image data set and construct a multi-module cascade enhancement network.

[0039] Get the original images of underwater objects and environments. Normalize the images according to the underwater images to be processed, scale the pixel values ​​of the images to the threshold range, and obtain the standardized underwater images. Design the architecture of the neural network, determine the structure and function of each submodule in the neural network, and select the convolution layer, pooling layer, activation function, and other layers. Randomly initialize the parameters in the network according to the network architecture. Train the network using the prepared standardized data and the designed neural network. Define the loss function for training to measure the difference between the image before and after enhancement. Calculate the gradient of the loss function with respect to the network parameters and back-propagate the gradient to update the parameters. Train the network in an iterative manner, and in each iteration, update the parameters to minimize the loss function. Evaluate the model performance during the training process through the test set or cross-validation set. Check whether the network can correctly enhance the new underwater images. Adjust and improve the network architecture and parameter settings based on the test and validation results. After training the neural network, connect the output of each submodule to form a multi-module cascade enhancement network.

[0040] For example, an original image is obtained from an underwater camera with a resolution of 640x480 pixels. The pixel values ​​of the image are normalized to the range of [0,1], so that the brightest pixel value is 1 and the darkest is 0. If the pixel value range of the original image is [0,255], each pixel value will be divided by 255. For example, a neural network consisting of 3 convolutional layers, 2 pooling layers, and 2 fully connected layers is designed. Convolutional layer 1 uses 32 3x3 filters, convolutional layer 2 uses 64 3x3 filters, convolutional layer 3 uses 128 3x3 filters, and both pooling layers are 2x2 maximum pooling. The weights in the neural network are randomly initialized using a normal distribution with a mean of 0 and a standard deviation of 0.1. The network is trained using 1000 normalized underwater images. The cross entropy loss function and Adam optimizer are used, and the learning rate is set to 0.01. If the loss function value of a certain iteration is 25, the gradient with respect to the weight is calculated, and this gradient is used to update the network parameters through the back propagation algorithm. The number of iterations is set to 50, and all 1000 images are used in each round. After the 25th iteration, the loss function value is reduced to 1. Using 200 images as the test set, the average loss of the trained network on the test set is reduced to 0.5, and the accuracy is 95%. By analyzing the test results, it is found that adding regularization terms can reduce overfitting. After training the neural network, the output of each submodule is connected to form a multi-module cascade enhancement network. On the cascade network, for a new underwater image, noise suppression is first performed through the first module, and then color restoration is performed by the second module, and the processing is performed in sequence to output the final enhanced image.

[0041] Step S102, removing random noise and inherent scattering noise of water in the underwater image through the noise suppression module in the multi-module cascade enhancement network.

[0042] Obtain standardized underwater image data. Input the standardized underwater image data into the noise suppression module in the convolutional neural network for image enhancement. Analyze the random noise and inherent scattering noise characteristics of the underwater image, including point noise, patch noise, and the diffusion effect caused by light propagating in the water. According to the noise characteristics, convert the image to the frequency domain, identify and separate the noise components, and use the frequency domain filtering method to remove the noise. While suppressing the noise, use the edge-preserving filtering technology to protect the edge information and details. Output the processed low-noise underwater image.

[0043] For example, a batch of image data from an underwater camera is obtained, which contains 1,000 images with a resolution of 1920x1080 pixels. These images are interfered by noise to varying degrees, including random noise and scattered noise. After the images are standardized, they are input into the designed multi-module cascade enhancement network. In the noise suppression module of the multi-module cascade enhancement network, the standard deviation of random noise is about 20 gray levels through the analysis of 10 sample images. The patch noise is mainly concentrated in the areas with more suspended matter in the water in the image, causing local uneven brightness. The diffusion effect of light in water leads to a decrease in image contrast, with an average contrast reduction of 15%. The affected images are converted to the frequency domain, and it is found that in the spectrum, the noise is mainly concentrated in the high-frequency area. Through the Gaussian low-pass filter, the cutoff frequency is set to 3 times the Nyquist frequency, which effectively suppresses most of the high-frequency noise. While processing the noise, the edge and detail information of underwater objects are protected. Finally, the processed low-noise underwater image output shows a significantly improved visual effect. The signal-to-noise ratio of the image increased from 15dB before processing to 30dB, and the edge sharpness score of the image increased from 35 to 65, indicating that the image quality has been significantly improved.

[0044] Step S103, performing color balance correction on the underwater image through the color restoration module in the multi-module cascade enhancement network.

[0045] Obtain processed low-noise underwater images. Calculate the correction parameters for color compensation of each RGB channel based on known water depth information and ambient lighting conditions. Convert the image from the original RGB color space to the space for color balance adjustment. According to the correction parameters, adjust the color balance of the image in the new color space to restore the true color of the underwater scene. During the color correction process, ensure that the image edges and details are not over-smoothed and enhance the texture features of the image. Map the corrected color information back to the original RGB color space and process it. Evaluate the quality of the color balance corrected image and dynamically adjust the parameters in the color restoration module. Output the color-corrected underwater image.

[0046] For example, an underwater image with a depth of 10 meters is obtained. Due to the influence of blue-green light filtering, the red channel of the image is significantly weakened. Field measurement data show that at this water depth, the light attenuation coefficient of the red wavelength is 9, green is 7, and blue is 5. First, the correction parameters are calculated to enhance the signal of the red channel to a level equivalent to that of the blue channel. According to the difference in attenuation coefficients, the compensation coefficient that needs to be increased for the red channel can be calculated. Compensation coefficient = blue light attenuation coefficient / red light attenuation coefficient compensation coefficient = 5 / 9≈0.56. Therefore, each pixel value of the red channel will be multiplied by 0.56 to compensate for the light attenuation. Next, the image is converted from the original RGB color space to a space that can perform color balance adjustment, the LAB color space. In the LAB space, L represents brightness, while A and B represent color opposition channels from green to red and from blue to yellow, respectively. After converting the image to the LAB space, the color and brightness can be adjusted independently, which helps to perform color correction more accurately. After color balance adjustment in the LAB space, the A channel value is increased by 56 times to restore the true appearance of red. During this process, attention is paid to preserving image edges and details and enhancing local contrast and sharpness. Next, the image is mapped back from the LAB color space to the RGB color space. In order to evaluate the effect of color balance correction, the difference between the color histogram distribution of the image before and after restoration is calculated. By comparing the color histograms of the image before and after correction, it is found that the distribution of the red channel has expanded from being concentrated in lower brightness values ​​to medium brightness values, which indicates that the visibility of red has been improved. At the same time, the sharpness analysis of the image shows that the contrast has been improved by 15% in areas with rich textures, indicating that the details are preserved and highlighted. Finally, the parameters in the color restoration module are dynamically adjusted according to the evaluation results. If it is observed that the blue channel is still too strong, the compensation for the blue channel can be appropriately reduced, or if the image is too sharp, the intensity parameter of the sharpening algorithm can be reduced. The color-corrected underwater image is output, and its color is close to the real scene, while retaining the edge and detail characteristics of the image.

[0047] Step S104, simulating and reducing the influence of light scattering on the underwater image through the scattering effect correction module in the multi-module cascade enhancement network.

[0048] Obtain color-corrected underwater images and conduct a preliminary analysis of the light scattering characteristics in the images. Estimate and quantify the light distribution distortion and detail blur caused by water scattering in the image through the reverse calculation method. Infer the depth of each area of ​​the image through the texture and color information of the underwater image. Use an adaptive dehazing algorithm to simulate and remove the scattering effect at different depths, and restore the image contrast and color reality weakened by scattering. Smooth the edge jagged phenomenon that may appear after scattering correction, and enhance the texture details blurred by scattering. Perform real-time quality evaluation, and optimize the scattering correction module parameters according to the evaluation results to ensure that the visual effect and objective evaluation indicators of the output image are optimal. Output the underwater image after scattering effect correction.

[0049] For example, a batch of underwater images were obtained, which were taken in a coral reef area at a depth of 20 meters. First, the image color was adjusted based on the known absorption and scattering characteristics of the water body. In this process, the known underwater spectral data was used to adjust the gain of the RGB channels, among which the red channel gain was increased by 5 times to compensate for the severe absorption of red light in the underwater environment. Next, the light scattering characteristics were preliminarily analyzed. The intensity of the background light in the image due to water scattering was estimated, and it was found that the average background light accounted for about 30% of the total brightness of the image. Through reverse calculation, the degree of detail blurring caused by scattering was estimated, and the quantitative results showed that the blurring of the edge of the object at a distance of 5 meters from the camera increased by about 15%. In order to infer the depth of each area of ​​the image, the texture and color information of the underwater image were analyzed. By calculating the local contrast of the image, it was inferred that the depth error of the area 5 meters away from the camera was about ±5 meters. An adaptive dehazing algorithm was used to simulate and remove the scattering effect at different depths. During the dehazing process, the local contrast enhancement parameters of the algorithm were adjusted, so that the image contrast at a depth of 10 meters was increased by 20%, while maintaining a more natural color balance. In order to solve the jagged edge phenomenon that may occur after scattering correction, the image is processed by Gaussian blur and edge detection technology, which reduces the jagged edges and enhances the clarity of detailed textures, improving the visual effect of texture details by about 10%. Finally, the real-time quality evaluation of the scattering corrected image is carried out, and it is found that the PSNR of the scattering corrected image is improved from 20dB to 30dB, and the SSIM is improved from 65 to 85. According to these evaluation results, the parameters in the scattering correction module are fine-tuned to ensure that the output image reaches the best level in terms of visual effects and objective evaluation indicators. The output underwater image after scattering effect correction is closer to the natural color and clarity in the ideal state.

[0050] Step S105, enhancing the object edges and internal texture details of the underwater image through the local feature enhancement module in the multi-module cascade enhancement network.

[0051] Get an underwater image corrected for scattering effects. Divide the entire image into multiple small blocks or sub-regions, and perform independent contrast optimization on each local block. Calculate the histogram distribution and average grayscale value for each local block, and analyze the local contrast of the local block. According to the histogram characteristics of the local block, a contrast-limited adaptive histogram equalization algorithm is used to enhance the contrast difference of each local block. Extract and strengthen the edge information of the object in the local block, maintain edge clarity, and highlight and enhance the texture details inside the image. Reintegrate the results of contrast optimization and edge texture enhancement of each local block into a complete image to ensure a natural transition between adjacent blocks. Perform a quality assessment on the enhanced local features, and adjust the contrast optimization and texture enhancement parameters based on the assessment results. Output an underwater image with enhanced local features.

[0052] For example, there is an underwater image with a size of 1024×1024 pixels. In order to optimize the local contrast, the entire image is divided into small blocks of 128×128 pixels, so 64 sub-regions are obtained. Take one of the local blocks and calculate its histogram distribution and average grayscale value. Set the average grayscale value of this local block to 120, and its histogram shows that the majority of pixels are between grayscale levels 50-150. Next, use the contrast-limited adaptive histogram equalization algorithm to enhance the contrast of this local block. Before applying the contrast-limited adaptive histogram equalization algorithm, the set ClipLimit is 01, indicating that the maximum histogram height allowed during histogram equalization is 1% of the number of pixels in the local block. After applying the contrast-limited adaptive histogram equalization algorithm, it is found that the contrast in the local block is improved and the histogram distribution becomes more uniform, making the dark details more obvious. Then, extract the edge information of the object in this local block and calculate the average value of the edge strength. The average values ​​of the edge strength before and after application are 10 and 25 respectively, which shows that the edge information has been enhanced. Finally, all optimized local blocks are reassembled into a complete image. In order to avoid discontinuity at the edge, a weighted fusion method can be used to perform gradient fusion in the edge area of ​​adjacent blocks, and a 10-pixel wide transition band is used to ensure a natural transition. After integration, the quality evaluation of local feature enhancement is performed. The output underwater image will show higher local contrast and clearer object edge information.

[0053] Step S106, by enhancing the edge sharpening and stereoscopic restoration modules in the multi-module cascade enhancement network, the edge information of the underwater image is strengthened and the scene depth perception is improved.

[0054] Get the underwater image after local feature enhancement and extract the edge information. Locate the edge features in the underwater image, enhance the detected edges, and improve the visual clarity of the underwater image by contrast enhancement. Estimate the relative distance between different objects based on the color, texture, and occlusion relationship of the underwater image. Adjust the lighting effect, shadow simulation, and local contrast of the image to simulate the stereoscopic parallax effect and enhance the three-dimensional sense of the image. Check and optimize the enhanced stereo information to ensure the continuity and consistency of different parts of the same object in the depth space and reduce the generation of artifacts. Fuse the enhanced edge information and the image of the stereoscopic restoration result, and smooth the over-sharpened parts of the edge. Output the underwater image obtained after edge sharpening and stereoscopic restoration.

[0055] For example, a picture of an underwater coral reef is processed to enhance the visual effect and three-dimensional sense of the image. The underwater image after local feature enhancement is obtained and the edge information is extracted. The edge strength of each pixel in the image is calculated. The result of a pixel after applying the LoG operation is 255, while the average strength of the surrounding pixels is only 30, which indicates a significant edge feature. Next, the detected edges are evaluated to determine which edges are valid and need to be enhanced. After edge detection, it is evaluated that 80% of the edges are related to the coral reef structure, while 20% may be caused by noise or other interference factors. In order to improve visual clarity, the existing contrast is analyzed and it is decided to increase the contrast of the edge area by 50%. The average contrast of the coral reef edge area in the original image is 5, and the contrast of these areas is increased to 75. When estimating the relative distance between objects, the color difference and texture characteristics of each object in the image are statistically analyzed. For the two coral reefs, it is found that their color histograms have 40% overlap and their texture correlation is 0.7, which may indicate that they are at similar depth levels. To increase the sense of depth of the shadows, reduce the brightness of specific areas by 20% to simulate the shadow effect caused by light shining from above to enhance the three-dimensional effect. After enhancing the three-dimensional effect, check the continuity of the stereo information to ensure that there are no unnatural depth jumps. It was found that the difference in depth values ​​after stereo enhancement in different parts of a coral reef was 1, which is within the acceptable range, so no further adjustment is required. Finally, the enhanced edge information is fused with the results of stereo restoration. In areas where the edges are over-sharpened, Gaussian blur may be applied, using a 3x3 kernel to smooth the edges and reduce artifacts caused by sharpening. Output underwater images with sharpened edges and three-dimensional sense, and the visual effect of the image is significantly improved.

[0056] Step S107, using the color saturation enhancement module in the multi-module cascade enhancement network, the saturation of the underwater image is increased and the color vividness of the underwater image lost due to water absorption is restored.

[0057] Get an underwater image after edge sharpening and stereo restoration. Convert the image from RGB color space to a saturation-adjusted color space. Analyze the saturation level of the current image and identify areas where the color is faded due to water absorption. Adaptively increase the saturation based on the image content and characteristics to avoid color distortion caused by oversaturation. In the process of increasing the saturation, retain the original color information. Use different saturation enhancement strategies for different levels and types of underwater image content. Fuse the enhanced saturation information with the original image for a smooth transition. Continuously adjust parameters through iterative optimization. Evaluate the enhanced image and adjust the color saturation enhancement module based on the evaluation results. Output the underwater image with enhanced color saturation.

[0058] For example, an underwater image obtained after edge sharpening and stereo restoration is obtained. Originally, a colorful coral reef is displayed, but due to the absorption of water, the colors become less vivid, and the edges and stereoscopic sense of the image are also affected. First, the image is edge sharpened to emphasize the edges of the image to improve its clarity. After that, for the conversion of color space, the image is converted from RGB color space to HSI color space, because HSI space makes the adjustment of saturation more intuitive and easy. By analyzing the S channel in HSI space, it is found that the average saturation level is 0.4, indicating that the image generally tends to be unsaturated. Through in-depth analysis of underwater images, it is identified that in areas with a depth of less than 5 meters, the color fade phenomenon is more serious, and the originally bright red and orange appear to be relatively dim. In these areas, since the absorption of red light is the strongest, the saturation of these colors is focused on. Combining depth information with the degree of color fade, the saturation is gradually increased by 10% to 30% for areas with a depth of less than 5 meters, while the increase is limited to 5% to 10% for shallower areas. While increasing the saturation, in order to avoid color distortion caused by over-saturation, the saturation value of any color is ensured not to exceed 8 to maintain the natural state of the color. After enhancement, the information of the S channel is fused with the original RGB image to make a smooth transition, ensuring that the color change does not produce unnatural mutations in space. The enhanced image is richer in color and has higher contrast. In qualitative and quantitative evaluations, the objective color difference index CIEDE2000 is reduced from an average of 5 to 3, showing the effectiveness of color restoration. The color saturation enhancement module is optimized to ensure that a reasonable increase in saturation can be achieved in different types of underwater image content. The output is an underwater image that is closer to the real world in color and more visually attractive.

[0059] Step S108, encoding and verifying the underwater image through a multi-module cascade enhancement network and associating the enhanced underwater image with the label.

[0060] The quality of underwater images with enhanced color saturation is corrected and optimized through a multi-module cascade enhancement network. The processed image data is checked. If it meets the predetermined quality and format requirements, the processed underwater image data is finally verified and corrected. If not, the network parameters are automatically adjusted until the predetermined quality and format requirements are met. According to business needs and application scenarios, the format of the verified and corrected underwater images is determined; according to the characteristics and requirements of the image data, the underwater image data is compressed; according to the characteristics of the image data and application requirements, the color space of the underwater image is determined; according to the image quality, compression effect and color space factors, the H.264 encoding algorithm is used for image encoding. The encoded underwater image data is verified. The multi-module cascade enhancement network extracts and classifies the enhanced underwater images through the convolution layer and pooling layer of the convolutional neural network algorithm. The label data of the underwater image is obtained, and the underwater image and label data are associated and analyzed through the multi-module cascade enhancement network. If the association accuracy of the underwater image and the label reaches the association threshold, the underwater image and label data are analyzed to obtain the parameters and characteristics of each type of data. Classify and index data according to the parameters and characteristics of each type of data.

[0061] For example, underwater images were processed by a multi-module cascade enhancement network. During the optimization process, the processed image data was sent to the quality assessment module to evaluate the image quality. Predetermined quality requirements were set, and the PSNR of the image must be higher than 30dB and the SSIM must be greater than 85. For images that do not meet these standards, their network parameters, convolution kernel size or learning rate are automatically adjusted until the image meets the quality standards. Business requirements require that the final output underwater image format be JPEG for easy web page loading and sharing. According to the characteristics and storage requirements of the image, a highly efficient compression strategy is adopted to compress the size of the original image data by 50% while maintaining the details of the image quality. Considering the impact of color space, it is determined to use sRGB color space because it is more suitable for Internet applications and the standard output of digital cameras. Then, based on image quality, compression effect and color space factors, the H.264 encoding algorithm is used to encode the image because H.264 provides good compression efficiency and compatibility. The encoded data will go through a verification process to ensure that no errors are introduced during the compression and encoding process. During the verification process, it was found that the integrity check of a data packet did not match the original data packet, indicating that an error occurred during the transmission process, and the retransmission mechanism was triggered. In the feature extraction and classification stage, the features of underwater images, such as the shape of corals and the outline of fish, are identified through its convolutional layer and pooling layer. Based on these features, the network generates label data for each image. For an image containing multiple fish, the network may label "tropical fish" and "coral reef" and give an association accuracy of 92%. If the association accuracy exceeds a predetermined threshold, such as 85%, the association between the underwater image and the label is considered reliable. Subsequently, data analysis is performed to obtain the parameters and characteristics of each type of data. By analyzing a set of underwater images, it is found that images of coral reefs usually have a high color diversity, with an average color entropy of 150 different colors. Based on these parameters and characteristics, the data can be further classified and indexed for future retrieval and analysis. All images associated with "tropical fish" are indexed in a separate database to facilitate marine biologists to study specific species.

[0062] The above is only a preferred embodiment of the present invention. It should be pointed out that ordinary technicians in this technical field can make several improvements and supplements without departing from the principle of the present invention. These improvements and supplements should also be regarded as the scope of protection of the present invention.

Claims

1. A multi-module cascade underwater image enhancement method, characterized in that: The method comprises: The underwater image dataset is standardized and a multi-module cascade enhancement network is constructed; The random noise and inherent scattering noise of the water body in the underwater image are removed by the noise suppression module in the multi-module cascade enhancement network; the input of the noise suppression module is the standardized underwater image data, and the output is the processed low-noise underwater image; The color balance correction of underwater images is performed through the color restoration module in the multi-module cascade enhancement network; the input of the color restoration module is the processed low-noise underwater image, and the output is the color-corrected underwater image; The influence of light scattering on underwater images is simulated and reduced by using the scattering effect correction module in the multi-module cascade enhancement network; the input of the scattering effect correction module is the underwater image after color correction, and the output is the underwater image after scattering effect correction; The object edges and internal texture details of the underwater image are enhanced through the local feature enhancement module in the multi-module cascade enhancement network; the input of the local feature enhancement module is the underwater image after scattering effect correction, and the output is the underwater image after local feature enhancement; The edge information of underwater images is enhanced and the depth perception of scenes is improved by using edge sharpening and stereo restoration modules in a multi-module cascade enhancement network. The input of the edge sharpening and stereo restoration module is the underwater image after local feature enhancement, and the output is the underwater image obtained after edge sharpening and stereo restoration. The color saturation enhancement module in the multi-module cascade enhancement network is used to increase the saturation of the underwater image and restore the color vividness of the underwater image lost due to water absorption; the input of the color saturation enhancement module is the underwater image obtained after edge sharpening and stereoscopic restoration, and the output is the underwater image with enhanced color saturation; Through a multi-module cascade enhancement network, the underwater image is encoded and verified and the enhanced underwater image is associated with the label; The underwater image dataset is normalized and a multi-module cascade enhancement network is constructed, including: Acquire raw images of underwater objects and environments; Performing image normalization according to the underwater image to be processed, scaling the pixel value of the image to a threshold range, and obtaining a standardized underwater image; Design the architecture of the neural network, determine the structure and function of each submodule in the neural network, and select convolutional layers, pooling layers, activation functions, and other layers; According to the network architecture, randomly initialize the parameters in the network; Use the prepared standardized data and designed neural network to train the network; Define a loss function for training that measures the difference between the image before and after enhancement; Calculate the gradient of the loss function with respect to the network parameters and back-propagate the gradient to update the parameters; Train the network in an iterative manner, and in each iteration, update the parameters to minimize the loss function; Evaluate the model performance during training using a test set or cross-validation set; Check whether the network can correctly enhance new underwater images; Adjust and improve the network architecture and parameter settings based on test and verification results; After training the neural network, the output of each submodule is connected to form a multi-module cascade enhancement network; The method of encoding and verifying the underwater image and associating the enhanced underwater image with the label through a multi-module cascade enhancement network includes: The quality of underwater images with enhanced color saturation is corrected and optimized through a multi-module cascade enhancement network. Check the processed image data, and if it meets the predetermined quality and format requirements, perform final verification and correction on the processed underwater image data; If not, the network parameters are automatically adjusted until the predetermined quality and format requirements are met; Determine the verified and corrected underwater image format based on business needs and application scenarios; According to the characteristics and requirements of the image data, the underwater image data is compressed; Determine the color space of underwater images based on the characteristics of image data and application requirements; Based on image quality, compression effect and color space factors, H.264 encoding algorithm is used for image encoding; Verifying the encoded underwater image data; The multi-module cascade enhancement network extracts features and classifies the enhanced underwater images through the convolutional layer and pooling layer of the convolutional neural network algorithm; Obtain the label data of the underwater image, and perform correlation analysis on the underwater image and the label data through a multi-module cascade enhancement network; If the association accuracy of the underwater image and the label reaches the association threshold, the underwater image and label data are analyzed to obtain the parameters and characteristics of each type of data; Classify and index data according to the parameters and characteristics of each type of data.

2. The method according to claim 1, wherein: The method of removing random noise and inherent scattering noise of water in underwater images by enhancing the noise suppression module in the multi-module cascade network includes: Acquire standardized underwater image data; The standardized underwater image data is input into the noise suppression module in the convolutional neural network to perform image enhancement operations; Analyze the random noise and inherent scattering noise characteristics of water bodies in underwater images, including point noise, patch noise, and the diffusion effect caused by light propagation in water bodies; According to the noise characteristics, the image is converted to the frequency domain, the noise components are identified and separated, and the frequency domain filtering method is used to remove the noise; While suppressing noise, edge-preserving filtering technology is used to protect edge information and details; Output the processed low-noise underwater image.

3. The method according to claim 1, wherein: The method of performing color balance correction on underwater images by using a color restoration module in a multi-module cascade enhancement network includes: Obtain processed low-noise underwater images; According to the known water depth information and ambient light conditions, the correction parameters for color compensation of each RGB channel are calculated; Convert the image from the original RGB color space to the space for color balance adjustment; According to the correction parameters, the color balance of the image is adjusted in the new color space to restore the true color of the underwater scene; During the color correction process, ensure that the image edges and details are not over-smoothed and enhance the image's texture features; Map the corrected color information back to the original RGB color space and process it; Perform quality assessment on the color balance corrected image and dynamically adjust the parameters in the color restoration module based on the assessment results; Output color-corrected underwater image.

4. The method according to claim 1, wherein: The scattering effect correction module in the multi-module cascade enhancement network is used to simulate and reduce the influence of light scattering on underwater images, including: Acquire color-corrected underwater images and conduct preliminary analysis of the light scattering characteristics in the images; The distortion of illumination distribution and the degree of detail blurring caused by water scattering in the image are estimated and quantified by the inverse calculation method. Infer the depth of each area of ​​the image through the texture and color information of the underwater image; Adopting adaptive dehazing algorithm to simulate and remove the scattering effect at different depths, and restore the image contrast and color reality weakened by scattering; Smooths out edge jaggedness that may occur after scatter correction, and enhances texture details that are blurred by scatter; Conduct real-time quality assessment and optimize the parameters of the scatter correction module based on the assessment results to ensure that the visual effect and objective evaluation indicators of the output image are optimal; Outputs an underwater image corrected for scattering effects.

5. The method according to claim 1, wherein: The method of enhancing the object edges and internal texture details of underwater images by using the local feature enhancement module in the multi-module cascade enhancement network includes: Acquire underwater images corrected for scattering effects; The whole image is divided into multiple small blocks or sub-regions, and each local block is subjected to independent contrast optimization processing; Calculate the histogram distribution and average gray value for each local block and analyze the local contrast of the local block; According to the histogram characteristics of local blocks, a contrast-limited adaptive histogram equalization algorithm is used to enhance the contrast difference of each local block; Extract and strengthen the edge information of objects in local blocks, maintain edge clarity, and highlight and enhance the texture details inside the image; Reintegrate the results of contrast optimization and edge texture enhancement of each local block into a complete image to ensure a natural transition between adjacent blocks; Perform quality assessment on the enhanced local features and adjust contrast optimization and texture enhancement parameters based on the assessment results; Output underwater images after local feature enhancement.

6. The method according to claim 1, wherein: The edge sharpening and stereo restoration modules in the multi-module cascade enhancement network are used to strengthen the edge information of the underwater image and improve the scene depth perception, including: Obtain underwater images after local feature enhancement and extract edge information; Locate edge features in underwater images, enhance detected edges, and improve visual clarity of underwater images by contrast enhancement; Estimate the relative distances between different objects based on the color, texture, and occlusion relationships of underwater images; Adjust the lighting effect, shadow simulation and local contrast of the image, simulate the stereoscopic parallax effect, and enhance the three-dimensional sense of the image; Check and optimize the enhanced stereo information to ensure the continuity and consistency of different parts of the same object in depth space and reduce artifacts; The enhanced edge information and the image of the stereoscopic restoration result are fused, and the over-sharpened edge parts are smoothed; Output underwater image after edge sharpening and stereo restoration.

7. The method according to claim 1, wherein: The method of increasing the saturation of underwater images and restoring the color vividness of underwater images lost due to water absorption by using a color saturation enhancement module in a multi-module cascade enhancement network comprises: Obtain an underwater image after edge sharpening and stereo restoration; Convert the image from RGB color space to color space for saturation adjustment; Analyzes the saturation level of the current image and identifies areas where color is faded due to absorption by water; Adaptively increase saturation based on image content and features to avoid color distortion caused by over-saturation; In the process of increasing saturation, the original color information is preserved; Different saturation enhancement strategies are used for different levels and types of underwater image content; The enhanced saturation information is fused with the original image to achieve a smooth transition; Continuously adjust parameters through iterative optimization; Evaluate the enhanced image and adjust the color saturation enhancement module according to the evaluation result; Output underwater images with enhanced color saturation.