A dual-scale nuclear power plant underwater image decolorization method based on neural enhancement
Through a dual-scale method based on neural enhancement, using atmospheric light and transmittance estimation, combined with the generative adversarial network and the Laplace pyramid, the color shift problem of underwater images of nuclear power plants is solved, the image quality is improved, and the equipment monitoring and maintenance needs are met.
Patent Information
- Application Number
- CN202411491080.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2044-10-24
AI Technical Summary
The underwater images of nuclear power plants have serious color cast problems due to increased depth, which affects the accuracy of equipment monitoring and maintenance. The existing methods do not work well in complex environments or have high computing resource requirements.
A dual-scale method based on neural enhancement is adopted to estimate the atmospheric light intensity and transmittance, combine the generation adversarial network and the Laplace pyramid to perform image color deflection and noise processing, and use the haze line averaging algorithm to reduce artifacts to construct a dual-scale nuclear power plant underwater image color deflection method.
It effectively solves the color shift problem of underwater images of nuclear power plants, improves image quality, meets equipment monitoring and maintenance needs, and has a fast convergence speed and excellent visual effects.
Smart Images

Figure CN119444634B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of color decolorization of underwater images of nuclear power plants, and in particular to a dual-scale color decolorization method for underwater images of nuclear power plants based on neural enhancement. Background Art
[0002] The unique optical properties of the underwater environment degrade the quality of underwater images. Water molecules and various suspended matter and sediments in the water absorb and scatter light, reducing the brightness and contrast of underwater images and causing blur and noise. Furthermore, artificial light sources added to meet specific shooting requirements can also affect image quality. Different wavelengths of light selectively attenuate when propagating through water, with longer-wavelength red light having the weakest penetration. As a result, underwater images often have a predominantly blue-green hue, exhibiting a noticeable color cast. This makes it difficult for the visual quality of raw underwater images to meet the requirements of practical applications in underwater scenes.
[0003] These issues are even more pronounced in the underwater environment of nuclear power plants. The water used to cool and store nuclear fuel in nuclear power plant pools has specific chemical properties such as high density and high purity, and is often doped with boric acid to absorb neutrons. While this high-purity water reduces some suspended particles, its high density and the addition of boric acid further affect light propagation, exacerbating image color shift. Furthermore, nuclear fuel pools typically require strong illumination to ensure safe and accurate operation. The scattering and reflection of these strong light sources in the water can increase image halos and noise. Furthermore, underwater nuclear power plants are often semi-enclosed, requiring the assistance of artificial light sources for image acquisition. These factors degrade image quality, resulting in blurring, distortion, and noise. This further exacerbates color shift in underwater images of nuclear power plants, making it difficult to accurately capture detailed information about equipment operation. Therefore, developing feasible and effective methods for decolorizing and enhancing underwater images is crucial to improving image quality, ensuring operational safety, and ensuring accurate monitoring in underwater nuclear power plant environments.
[0004] Existing methods for underwater image decolorization mainly include the following three categories: image processing-based methods, physical model-based methods, and data-driven methods. (1) Image processing-based decolorization methods mainly rely on traditional image processing techniques to remove color casts by adjusting the contrast, brightness, and color of the image. Common methods include histogram equalization, adaptive histogram equalization (CLAHE), color enhancement algorithms, etc. These methods do not consider the underwater optical transmission model and are relatively simple and computationally efficient, but they have some limitations: due to ignoring the unique optical properties of the underwater environment, these methods may cause color distortion, and the enhancement process may amplify the noise in the image, affecting the image quality; the color adjustment process may introduce unnatural colors, affecting the visual effect. (2) Physical model-based methods use prior information and underwater imaging models to estimate the parameters required for image decolorization. It usually includes steps such as atmospheric light estimation, transmittance calculation, and image restoration. Common methods include dark channel prior (DCP), etc. These methods obtain clear images by inverting the degradation process and can better restore the true color of the image. However, due to the reliance on underwater imaging parameter estimation, the applicability and stability are challenged in complex and changeable underwater environments. These methods are usually only applicable to specific underwater scenes and have high requirements for the accuracy of parameter estimation. (3) Data-driven methods use deep learning technology to train models with a large amount of underwater image data to achieve automatic decolorization. These methods mainly include generative adversarial networks (GANs) and convolutional neural networks (CNNs). These methods can generate high-quality decolorized images with good enhancement effects. However, this method has high data requirements and requires a large amount of underwater image data for training. In addition, the structure of the deep learning model is complex, the training time is long, and the demand for computing resources is high.
[0005] The above problems need to be solved urgently. To this end, a dual-scale nuclear power plant underwater image decolorization method based on neural enhancement is proposed. Summary of the Invention
[0006] The technical problem to be solved by the present invention is: how to solve the problem of severe color cast in underwater images of nuclear power plants as the depth increases, improve the quality of underwater images of nuclear power plants, and meet the requirements of tasks such as monitoring and maintenance operation of underwater equipment of nuclear power plants. A dual-scale decolorization method for underwater images of nuclear power plants based on neural enhancement is provided.
[0007] The present invention solves the above technical problems through the following technical solutions, which include the following steps:
[0008] S1: inputting an underwater degraded image of a nuclear power plant and preprocessing the image, wherein the underwater degraded image of the nuclear power plant is an underwater image of the nuclear power plant;
[0009] S2: Ignore the red channel and select the maximum value of the green and blue channels to estimate the initial value of the atmospheric light intensity;
[0010] S3: Traverse each pixel of the image and calculate the ratio of the blue and green channel values of the current pixel to the blue and green channel values of the atmospheric light, while also ignoring the red channel. Based on the exponential decay model, the propagation characteristics of light in the medium, and the Beer-Lambert law, define the calculation formula of the transmittance t, and calculate the initial value of the transmittance according to the calculation formula of the transmittance t, thereby obtaining the initial transmission map t0 corresponding to the image;
[0011] S4: Reduce the morphological artifacts of the initial transmission image t0 through the haze line averaging algorithm to generate the transmission image t m ;
[0012] S5: Use the guided filter based on the local weighted least squares error to transform the transmission map t m Perform smoothing and denoising to obtain the processed transmission map;
[0013] S6: Use generative adversarial networks to refine atmospheric light and transmission maps and reduce or remove noise in them.
[0014] S7: Construct a Laplacian pyramid for the underwater image of the nuclear power plant, a Gaussian pyramid for the transmission map, and a Laplacian pyramid for the enhanced image. Perform decolorization, denoising, and refinement on each level of the Laplacian pyramid of the enhanced image to form a Laplacian pyramid for the enhanced image. Reconstruct and enhance the details of each level of the Laplacian pyramid to obtain the final enhanced underwater image of the nuclear power plant.
[0015] S8: Perform global linear contrast stretching on the final nuclear power plant underwater enhanced image and convert the image from floating point format to unsigned 8-bit integer type to achieve color cast removal of the nuclear power plant underwater image.
[0016] Furthermore, in step S1, the specific process of preprocessing is as follows:
[0017] S11: Change the input image format to floating point format;
[0018] S12: Read the input image size and channel number information, and assign the height, width and channel number information to parameters w, h and c;
[0019] S13: Set the pyramid layer number parameter l.
[0020] Furthermore, in step S2, the specific process is as follows:
[0021] S21: Obtain information such as the height, width, and number of color channels of the input image, and extract the maximum value of a specific channel using the following formula:
[0022] max_blue=max(max(I(:,:,B)))
[0023] max_green=max(max(I(:,:,G)))
[0024] Among them, max_blue and max_green represent the maximum pixel values of the blue channel and the green channel respectively, I(:,:,B) and I(:,:,G) are the pixel values of the blue and green components of each pixel in the image respectively;
[0025] S22: Take the larger value as the initial value A of the global atmospheric light intensity and ensure that its value is within the valid range. The formula is as follows:
[0026] A=max(0,max_blue,max_green);
[0027] A=min(max(A,0),255).
[0028] Furthermore, in step S3, the calculation formula of the transmittance t is defined as follows:
[0029]
[0030] Where t(i,j) is the transmittance, that is, the transmittance value at the pixel position (i,j); β is the attenuation coefficient of light in water; I(i,j,G) and I(i,j,B) are the pixel values of the green and blue channels, respectively, and A(G) and A(B) are the green and blue components of the atmospheric light.
[0031] Furthermore, in step S4, the specific processing process is as follows:
[0032] S41: performing gamma correction on the input image;
[0033] S42: converting the coordinate system into a coordinate system centered on the atmospheric light, and calculating the distance of each pixel in the image relative to the atmospheric light;
[0034] S43: converting the coordinates of each pixel point in the image into the radius, elevation angle and azimuth angle in the spherical coordinate system;
[0035] S44: constructing a histogram in spherical coordinates, and counting the histogram bins and sub-bins to which each pixel belongs;
[0036] S45: Calculate the total number of sub-bins and record the first sub-bin index of each histogram bin;
[0037] S46: For all pixels, cumulatively calculate the transmittance and weight according to the sub-box to which they belong; for each sub-box, calculate its average transmittance using the accumulated transmittance and weight, and distribute the average to each pixel.
[0038] Furthermore, in step S5, the specific processing process of the guided filter based on the local weighted least squares error is as follows:
[0039] S51: Calculate the size, mean, and variance of the local window, and then calculate the linear coefficient and offset;
[0040] S52: The image is guided by the linear coefficient and the offset to obtain a filtered output image, that is, a processed transmission map.
[0041] Furthermore, in step S6, the generator and discriminator of the generative adversarial network are both constructed based on the Laplacian pyramid image model, and both are dual-scale structures.
[0042] Furthermore, in step S7, at the top level of the Laplacian pyramid of the enhanced image, derivation is performed based on the Koschmieder model, and the enhanced image corresponding to the underwater image of the nuclear power plant is:
[0043] I(x)=(J(x)-A) / t(x)+A
[0044] Where J(x) is the underwater degraded image of the nuclear power plant, I(x) is the corresponding enhanced image, A is the initial value of the atmospheric light intensity, and t(x) is the transmittance;
[0045] In the Laplacian pyramid of the enhanced image except the top layer, the enhanced image corresponding to the underwater image of the nuclear power plant is:
[0046]
[0047] Where l represents the level of the Gaussian pyramid of the underwater degraded image and transmission map of the nuclear power plant, J(l) represents the lth layer of the underwater degraded image of the nuclear power plant, and η is a constant.
[0048] Compared with the prior art, the present invention has the following advantages:
[0049] 1. Based on the principle of selective light attenuation, this method selects a specific background light intensity A and improves the calculation method of transmittance t, which is suitable for underwater environments of nuclear power plants. When combined with the Koschmieder model, it can effectively solve the color cast problem of underwater images and can adjust the calculation ratio of the blue and green channel light intensity according to different water depths, which has strong applicability.
[0050] 2. While considering image decolorization and refinement, we also consider the noise in the underwater images of the nuclear power plant and the morphological artifacts caused by calculation. The haze line averaging algorithm and the two-scale GAN network are used to remove artifacts and denoise the images.
[0051] 3. Combining model-based and data-driven approaches effectively preserves the high-quality visual properties of model-based approaches. Model-based estimation and data-driven refinement form neural enhancement. Theoretical analysis shows that the proposed neural enhancement framework converges faster than corresponding data-driven methods. Furthermore, the proposed algorithm outperforms existing data-driven underwater image decolorization algorithms in terms of evaluation metrics such as peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM). BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 1 is a flow chart of a method for decoloring a dual-scale underwater image of a nuclear power plant based on neural enhancement in the second embodiment of the present invention;
[0053] Figure 2 Schematic diagram of the structure of the generative adversarial network and related modules in Example 2 of the present invention, where (a) is the generative adversarial network, (b) is the dual attention module, (c) is the recursive residual group module, and (d) is the specific network structure of the G1, G2, and G3 modules in the generative adversarial network;
[0054] Figure 3 is the underwater degraded image of the nuclear power plant input in the second embodiment of the present invention;
[0055] Figure 4 This is the final underwater enhanced image of the nuclear power plant in the second embodiment of the present invention. DETAILED DESCRIPTION
[0056] The following is a detailed description of an embodiment of the present invention. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process. However, the protection scope of the present invention is not limited to the following embodiment.
[0057] Example 1
[0058] This embodiment provides a technical solution: a method for decoloring a dual-scale underwater image of a nuclear power plant based on neural enhancement, comprising the following steps:
[0059] S1: Estimate the initial value A of the global atmospheric light intensity, i.e. the intensity of the underwater background light, from the underwater degraded image of the nuclear power plant.
[0060] Based on the selective attenuation of light and the definition and estimation of atmospheric light, light propagation in water is affected by absorption and scattering, resulting in different attenuation levels for different wavelengths. Red light (long wavelength) attenuates most significantly in water and has the weakest penetration. Green and blue light (short wavelength) have stronger penetration. Therefore, these two colors of light dominate underwater environments. The initial atmospheric light intensity of the underwater image is estimated by selecting the maximum values of the green and blue channels. Since red light attenuates more rapidly underwater, the influence of the red channel is ignored, and the light intensity of the blue and green channels is primarily considered.
[0061] The estimation process of the initial value of intensity A is as follows:
[0062] Get the height, width, and number of color channels of the input image, and extract the maximum value of a specific channel by the following calculation:
[0063] max_blue=max(max(I(:,:,B)))
[0064] max_green=max(max(I(:,:,G)))
[0065] Among them, max_blue and max_green represent the maximum pixel values of the blue channel and the green channel respectively, I(:,:,B) and I(:,:,G) are the pixel values of the blue and green components of each pixel in the image respectively;
[0066] Then take the larger value as the initial value A of the global atmospheric light intensity, and ensure that its value is within the valid range:
[0067] A=max(0,max_blue,max_green);
[0068] A=min(max(A,0),255).
[0069] S2: Calculate the initial transmittance.
[0070] Traverse each pixel of the input image and calculate the ratio of the blue and green channel values of the current pixel to the blue and green channel values of the atmospheric light. Based on the exponential decay model, the propagation characteristics of light in the medium, and the Beer-Lambert law, the calculation formula for the transmittance t is defined as:
[0071]
[0072] Where t(i,j) is the transmittance, i.e., the transmittance value at pixel position (i,j); β is the attenuation coefficient of light in water; I(i,j,G) and I(i,j,B) are the pixel values of the green and blue channels, respectively, and A(G) and A(B) are the green and blue components of atmospheric light. Calculating according to this formula yields the initial transmission map t0 corresponding to the entire image.
[0073] S3: Reduce the morphological artifacts of the initial transmission image t0 through the haze line averaging algorithm to generate the transmission image t m .
[0074] The specific steps include: (1) image preprocessing: gamma correction is performed on the input underwater image of the nuclear power plant to correct uneven illumination and enhance image contrast; (2) distance calculation relative to atmospheric light: the coordinate system is converted to a coordinate system centered on atmospheric light, and the distance of each pixel in the image relative to atmospheric light is calculated; (3) conversion to spherical coordinate system: the coordinates of each pixel in the image are converted to the radius, elevation angle and azimuth angle in the spherical coordinate system; (4) histogram statistics: a histogram in spherical coordinates is constructed, and the histogram bins and sub-bins to which each pixel belongs are counted; (5) total sub-bin calculation: the total number of sub-bins is calculated, and the first sub-bin index of each histogram bin is recorded; (6) transmittance averaging: the transmittance is averaged according to the selected method to obtain a smoother and more reasonable transmittance estimate.
[0075] S4: Data-driven refinement architecture, using a generative adversarial network (GAN) to refine atmospheric light and transmittance maps. Both the generator and discriminator are dual-scale and based on a Laplacian pyramid image model. Because model-based estimates of atmospheric light and transmittance maps often rely on specific assumptions and are often noisy due to interference from complex scenes and potential noise in the input image itself, a dual-scale refinement method is proposed to reduce / remove noise.
[0076] S5: Construct the Laplacian pyramid of the underwater image, the Gaussian pyramid of the transmission image, and the Laplacian pyramid of the enhanced image, and perform calculations such as decolorization, denoising, and refinement on each level of the Laplacian pyramid of the enhanced image. Based on the Koschmieder model:
[0077] J(x)=I(x)t(x)+A(1-t(x))
[0078] Where J(x) is the underwater degraded image of the nuclear power plant, I(x) is the corresponding enhanced image, A is the intensity of atmospheric light (here, the intensity of underwater background light), and t(x) is the transmittance, which reflects the attenuation of light when propagating through water. It indicates the degree of light absorption and scattering by water, which usually varies with the depth and color of the water. According to the inversion degradation process, we can obtain:
[0079] I(x)=(J(x)-A) / t(x)+A
[0080] The corresponding enhanced image calculation method can be obtained from this. In the top layer of the Laplacian pyramid, the corresponding enhanced image can be obtained according to the above formula and used as the top layer of the enhanced image Laplacian pyramid. In other layers except the top layer, the enhanced image calculation formula is:
[0081]
[0082] Where l represents the level of the Gaussian pyramid of the degraded underwater image and transmission map of the nuclear power plant, J(l) represents the lth level of the degraded underwater image of the nuclear power plant, and η is a constant that adapts to varying degrees of image degradation and decreases as the degradation increases. Here, 1 / 4 is suitable for low levels of degradation, and 1 / 8 is often used for high levels of degradation. The top layer of the Laplacian pyramid of the enhanced image is combined with the other layers to form a complete Laplacian pyramid of the enhanced image. The Laplacian pyramid is then used to reconstruct and enhance the details of the image, resulting in the final enhanced underwater image of the nuclear power plant.
[0083] Example 2
[0084] like Figure 1 As shown, the present invention provides a dual-scale nuclear power plant underwater image decolorization method based on neural enhancement, and the specific steps of the method are as follows:
[0085] S1: Input underwater image I of the nuclear power plant, i.e., underwater degraded image of the nuclear power plant, see Figure 3 ;
[0086] S2: Preprocess the underwater image I and convert it into double-precision floating-point format. Obtain the height, width, and number of channels of the preprocessed underwater image I and assign them to parameters w, h, and c. Set the pyramid layer parameter l.
[0087] S3: Select the maximum value of the green and blue channels to estimate the initial value A of the global atmospheric light of the underwater image, ignoring the influence of the red channel to adapt to the special underwater environment of the nuclear power plant;
[0088] S4: Traverse each pixel of the input image and calculate the ratio of the blue and green channel values of the current pixel to the blue and green channel values of the atmospheric light, while also ignoring the red channel. Based on the exponential decay model, the propagation characteristics of light in the medium, and the Beer-Lambert law, a calculation formula for the transmittance t applicable to underwater environments is defined:
[0089]
[0090] Where t(i, j) is the transmittance, that is, the transmittance value at the pixel position (i, j); β is the attenuation coefficient of light in water; I(i, j, G) and I(i, j, B) are the pixel values of the green and blue channels, respectively, and A(G) and A(B) are the green and blue components of the atmospheric light. According to this formula, the initial transmission map t0 corresponding to the entire image is calculated.
[0091] S5, reduce the morphological artifacts of the initial transmission image t0 through the haze line averaging algorithm to generate a transmission image t m .
[0092] The specific steps include: (1) image preprocessing: gamma correction is performed on the input nuclear power plant underwater image to correct uneven illumination and enhance image contrast; (2) distance calculation relative to atmospheric light: the coordinate system is converted to a coordinate system centered on atmospheric light, and the distance of each pixel in the image relative to atmospheric light is calculated; (3) conversion to spherical coordinate system: the coordinates of each pixel in the image are converted to the radius, elevation angle and azimuth angle in the spherical coordinate system; (4) histogram statistics: a histogram in spherical coordinates is constructed, and the histogram bin and sub-bin to which each pixel belongs are counted; (5) total sub-bin calculation: the total number of sub-bins is calculated, and the first sub-bin index of each histogram bin is recorded; (6) average transmittance: the transmittance and weight of all pixels are accumulated according to the sub-bin to which they belong; for each sub-bin, the average transmittance is calculated using the accumulated transmittance and weight, and the average transmittance is assigned to each pixel. Through the accumulation and weighted average method, the transmittance estimation is effectively smoothed, local noise and artifacts are reduced, and the transmittance map is made smoother and more reasonable.
[0093] S6: Use the guided filter based on the local weighted least square error (WMSE) to filter the image (i.e., the transmission map t m ) for smoothing and denoising. The basic steps are: calculating the size, mean, and variance of the local window, then calculating the linear coefficient and offset. These linear coefficients and offsets are used to guide the image to obtain the filtered output image. This effectively removes noise while preserving image edges and details.
[0094] S7: Data-driven refinement of the structure, using generative adversarial networks (GAN) to refine atmospheric light and transmission maps. Figure 2 As shown in (a), a Generative Adversarial Network (GAN) is used to refine the atmospheric light and transmission maps. Due to the difficulty of refining the transmission map, the atmospheric light generator is simpler than the transmission map generator. Furthermore, a dual attention module (DAB) and a recursive residual group module (RRG) are added to the Generative Adversarial Network (GAN) to further refine the decolorized underwater image of the nuclear power plant.
[0095] The dual attention module (DAB) helps the network focus on important image areas and features more effectively by introducing spatial attention mechanism and channel attention mechanism, thereby improving the effect of image restoration. Figure 2 As shown in (b), the spatial attention mechanism performs global average pooling and global max pooling on the feature map to obtain two single-channel feature maps. These two feature maps are then concatenated and passed through a convolutional layer to generate a weight map. Finally, the input feature map is element-wise multiplied by the weight map to highlight key spatial regions. The channel attention mechanism performs global max pooling on the feature map in the spatial dimension. A 1×1 convolution adjusts the number of channels, a Prelu activation function is applied, and a second 1×1 convolution is performed to generate a channel attention weight vector. The weight values are fixed between [0, 1] using a Sigmoid function. Finally, the calculated channel weight vector is element-wise multiplied by the input feature map to enhance the feature responses of important channels while suppressing unimportant channels. Finally, the processed features of the two are concatenated. The resulting feature map not only focuses on important regions spatially but also highlights key features channel-wise, improving the network's image refinement capabilities.
[0096] The Recursive Residual Group Module (RRG) consists of multiple Dual Attention Modules (DABs), such as Figure 2 As shown in (c), skip connections are introduced to achieve more efficient gradient propagation. Feature extraction operations at different scales capture information at all levels of the image. Multi-level residual connections effectively combine global and local feature information, enhancing image contrast and restoring image details.
[0097] In this embodiment, both the generator and discriminator of the generative adversarial network are dual-scale and based on a Laplacian pyramid image model. Their primary function is to reduce or remove noise from the atmospheric light and transmission maps estimated by the model-based approach. Furthermore, during the network training phase, only 1,500 pairs of 256×256 decolorized images were used, including degraded underwater images of nuclear power plants and their corresponding decolorized and enhanced images. This significantly reduces the amount of training data compared to existing data-driven decolorization algorithms.
[0098] S8: Construct the Laplacian pyramid of the nuclear power plant underwater image, the Gaussian pyramid of the transmission image, and the Laplacian pyramid of the enhanced image. Perform calculations such as decolorization, denoising, and refinement on each level of the Laplacian pyramid of the enhanced image. At the coarsest level (i.e., the top level of the Laplacian pyramid), based on the Koschmieder model:
[0099] J(x)=I(x)t(x)+A(1-t(x))
[0100] By deducing the model, the enhanced image corresponding to the underwater degraded image is obtained as follows:
[0101] I(x)=(J(x)-A) / t(x)+A
[0102] Where J(x) is the degraded underwater image of the nuclear power plant (i.e., the underwater image I of the nuclear power plant in step S1 above), I(x) is the corresponding enhanced image, A is the initial value of the atmospheric light intensity (here, the underwater background light intensity), and t(x) is the transmittance that describes how atmospheric light reaches the camera, reflecting the attenuation of light propagating through water. It represents the degree of light absorption and scattering by water, which usually varies with the depth and color of the water. At each pyramid level except the top level, the calculation method for the underwater enhanced image of the nuclear power plant is defined as:
[0103]
[0104] Where l represents the lth layer of the Gaussian pyramid of the underwater degraded image or transmission image, J(l) represents the lth layer of the underwater degraded image of the nuclear power plant, and η is a constant that adapts to different levels of image degradation and decreases as the degradation level increases. Here, it is set to 1 / 4. This equation has two important cases, as follows:
[0105] (1): When the transmittance t(l) is much smaller than the constant η, then is approximately equal to 1, then the above formula can be derived as:
[0106]
[0107] When l=1:
[0108] I(l)=J(l)
[0109] When l = 2:
[0110]
[0111] As the intensity of detail enhancement and noise processing gradually weakens from the bottom to the top of the pyramid, and gradually decreases from the top to the bottom Therefore, it can ensure the detailed processing of high-resolution layer noise and the smooth transition of low-resolution layer images to prevent noise amplification.
[0112] (2): When the transmittance t(l) is much larger than the constant η, then is approximately equal to 0, the above formula can be derived as:
[0113]
[0114] In this case, the underwater enhanced image of the nuclear power plant is close to Objects closer to the camera are better restored and have enhanced details due to their higher transmittance.
[0115] Finally, the enhanced image's Laplacian pyramid layers are merged layer by layer to generate the final enhanced underwater image of the nuclear power plant. This adaptive processing approach, combined with the spatial characteristics of the image, ensures that details in all regions are appropriately enhanced or preserved. Furthermore, based on the calculation of background light and transmittance, it effectively removes color casts from the underwater image of the nuclear power plant.
[0116] S9: Perform global linear contrast stretching on the enhanced underwater image of the nuclear power plant, and adjust the image by combining the set cropping ratio with the adjust function to improve the overall contrast of the image. Convert the image from floating point format to an unsigned eight-bit integer type (range 0-255), and compare it with the background light intensity value A, the transmission map t (i.e., the transmission map after the generative adversarial network refinement), and the enhanced image (see Figure 4 ) are saved together into the structure ouput_Mat and output.
[0117] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A dual-scale nuclear power plant underwater image decolorization method based on neural enhancement, characterized by: The following steps are involved: S1: inputting an underwater degraded image of a nuclear power plant and preprocessing the image, wherein the underwater degraded image of the nuclear power plant is an underwater image of the nuclear power plant; S2: Ignore the red channel and select the maximum value of the green and blue channels to estimate the initial value of the atmospheric light intensity; S3: Traverse each pixel of the image and calculate the ratio of the blue and green channel values of the current pixel to the blue and green channel values of the atmospheric light, while also ignoring the red channel. Based on the exponential decay model, the propagation characteristics of light in the medium, and the Beer-Lambert law, define the calculation formula of the transmittance t, and calculate the initial value of the transmittance according to the calculation formula of the transmittance t, thereby obtaining the initial transmission map t0 corresponding to the image; S4: Reduce the morphological artifacts of the initial transmission image t0 through the haze line averaging algorithm to generate the transmission image t m ; S5: Use the guided filter based on the local weighted least squares error to transform the transmission map t m Perform smoothing and denoising to obtain the processed transmission map; S6: Use generative adversarial networks to refine atmospheric light and transmission maps and reduce or remove noise in them. S7: Construct a Laplacian pyramid for the underwater image of the nuclear power plant, a Gaussian pyramid for the transmission map, and a Laplacian pyramid for the enhanced image. Perform decolorization, denoising, and refinement on each level of the Laplacian pyramid of the enhanced image to form a Laplacian pyramid for the enhanced image. Reconstruct and enhance the details of each level of the Laplacian pyramid to obtain the final enhanced underwater image of the nuclear power plant. S8: Perform global linear contrast stretching on the final nuclear power plant underwater enhanced image and convert the image from floating point format to unsigned 8-bit integer type to achieve color cast removal of the nuclear power plant underwater image.
2. The method for decolorization of underwater images of a nuclear power plant based on neural enhancement at two scales according to claim 1, characterized in that: In step S1, the specific process of pre-processing is as follows: S11: Change the input image format to floating point format; S12: Read the input image size and channel number information, and assign the height, width and channel number information to parameters w, h and c; S13: Set the pyramid layer number parameter l.
3. The method for decolorization of underwater images of a nuclear power plant based on neural enhancement at two scales according to claim 1, characterized in that: In step S2, the specific process is as follows: S21: Obtain the height, width, and number of color channels of the input image, and extract the maximum value of a specific channel using the following formula: max_blue=max(max(I(:,:,B))) max_green=max(max(I(:,:,G))) Among them, max_blue and max_green represent the maximum pixel values of the blue channel and the green channel respectively, I(:,:,B) and I(:,:,G) are the pixel values of the blue component and the green component of each pixel in the image respectively; S22: Take the larger value as the initial value A of the global atmospheric light intensity and ensure that its value is within the valid range. The formula is as follows: A=max(0,max_blue,max_green); A=min(max(A,0),255).
4. The method for decolorization of underwater nuclear power plant images based on neural enhancement at two scales according to claim 1, characterized in that: In step S3, the calculation formula of the transmittance t is defined as follows: Where t(i,j) is the transmittance, that is, the transmittance value at the pixel position (i,j); β is the attenuation coefficient of light in water; I(i,j,G) and I(i,j,B) are the pixel values of the green and blue channels, respectively, and A(G) and A(B) are the green and blue components of the atmospheric light.
5. The method for decolorization of underwater nuclear power plant images based on neural enhancement at two scales according to claim 1, characterized in that: In step S4, the specific processing process is as follows: S41: performing gamma correction on the input image; S42: converting the coordinate system into a coordinate system centered on the atmospheric light, and calculating the distance of each pixel in the image relative to the atmospheric light; S43: converting the coordinates of each pixel point in the image into the radius, elevation angle and azimuth angle in the spherical coordinate system; S44: constructing a histogram in spherical coordinates, and counting the histogram bins and sub-bins to which each pixel belongs; S45: Calculate the total number of sub-bins and record the first sub-bin index of each histogram bin; S46: For all pixels, cumulatively calculate the transmittance and weight according to the sub-box to which they belong; for each sub-box, calculate its average transmittance using the accumulated transmittance and weight, and distribute the average to each pixel.
6. The method for decolorization of underwater nuclear power plant images based on neural enhancement at two scales according to claim 1, characterized in that: In step S5, the specific processing process of the guided filter based on the local weighted least squares error is as follows: S51: Calculate the size, mean, and variance of the local window, and then calculate the linear coefficient and offset; S52: The image is guided by the linear coefficient and the offset to obtain a filtered output image, that is, a processed transmission map.
7. The method for decolorization of underwater nuclear power plant images based on neural enhancement at two scales according to claim 1, characterized in that: In step S6, the generator and discriminator of the generative adversarial network are both constructed based on the Laplacian pyramid image model, and both are dual-scale structures.
8. The method for decolorization of underwater nuclear power plant images based on neural enhancement at two scales according to claim 7, characterized in that: In step S7, at the top level of the Laplacian pyramid of the enhanced image, deduction is performed based on the Koschmieder model, and the enhanced image corresponding to the underwater image of the nuclear power plant is: I(x)=(J(x)-A) / t(x)+A Where J(x) is the underwater degraded image of the nuclear power plant, I(x) is the corresponding enhanced image, A is the initial value of the atmospheric light intensity, and t(x) is the transmittance; In the Laplacian pyramid of the enhanced image except the top layer, the enhanced image corresponding to the underwater image of the nuclear power plant is: Where l represents the level of the Gaussian pyramid of the underwater degraded image and transmission map of the nuclear power plant, J(l) represents the lth layer of the underwater degraded image of the nuclear power plant, and η is a constant.
Citation Information
Patent Citations
Nuclear power station underwater image enhancement method based on pixel multi-scale fusion
CN118261810A
Underwater image enhancement method and enhancement device
GB202006954D0