A color correction method based on cloud-contaminated reference images
By repairing cloud-shadow-contaminated areas using methods such as Poisson mixing and Gaussian filtering, and combining this with a local linear model to correct image color differences, the problem of inconsistent image colors caused by cloud shadow interference was solved, achieving uniform color transition and consistency between images.
Patent Information
- Application Number
- CN202310886925.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-19
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-07-19
AI Technical Summary
Existing color correction algorithms are susceptible to interference from clouds and cloud shadows in reference images, making it difficult to balance the fidelity of ground feature colors with the uniform transition of colors between images, resulting in inconsistent colors in the final images.
The Poisson mixture method is used to repair cloud and cloud shadow pollution areas. High and low frequency information of the images is extracted by combining Gaussian filtering and bilateral filtering, and color differences between images are corrected by local linear model.
It effectively reduces the impact of cloud shadows on the resulting images, achieves color consistency and uniform transition between images, and improves the quality of the stitched images.
Smart Images

Figure CN116894784B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing technology, and specifically relates to a color correction method based on a reference image contaminated by clouds. Background Technology
[0002] Digital orthophotos (DOMs) play a crucial role in land cover classification, change detection, and geographic feature extraction. The creation of a DOM typically involves seamlessly stitching multiple images together to form a single image with a larger coverage area. However, remote sensing images are usually acquired by different sensors at different times, angles, and imaging conditions, leading to significant radiometric differences between images. Furthermore, color inconsistencies severely compromise the visual quality of the composite image. Summary of the Invention
[0003] One embodiment of this disclosure provides a color correction method based on a cloud-contaminated reference image. First, regions of the reference image contaminated by clouds and cloud shadows are repaired using Poisson mixing, and low-frequency information of the repaired reference image is extracted using Gaussian filtering. Second, the original image is downsampled using mean sampling to obtain a downsampled image with the same resolution as the reference image. Then, high-frequency information of the downsampled image is extracted using an edge smoothing strategy based on Gaussian filtering and bilateral filtering. Next, the aforementioned high and low-frequency information is superimposed to generate an optimized reference image. Finally, color differences between the images are corrected based on the optimized reference image and a constructed local linear model.
[0004] In this embodiment, the Poisson mixing strategy is applied to reference image inpainting using a uniform light and color method, effectively avoiding interference from clouds and cloud shadows on the reference image. Furthermore, a boundary smoothing strategy based on Gaussian filtering and bilateral filtering achieves uniform color transitions between images, eliminating obvious stitching artifacts. Attached Figure Description
[0005] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example and not limitation, wherein:
[0006] Figure 1 A schematic diagram of a reference image color correction method according to one embodiment of the present invention.
[0007] Figure 2 An example diagram showing a comparison of experimental results of the present disclosure with existing methods according to one embodiment of the present invention.
[0008] Figure 3 An example figure of experimental results on the ZY3-01 / 02 dataset according to one embodiment of the present disclosure.
[0009] in, Figure 2 In the image, 2-(a) is the input image, 2-(b) is the reference image, and 2-(c) and 2-(d) are the images generated by the existing method and the method of the present disclosure embodiment, respectively.
[0010] exist Figure 3 In the image, 3-(a) is the original image, 3-(b) and 3-(c) are images generated using BARN (block adjustment-based radiometric normalization) and GTA (global tilting adjustment), respectively, and 3-(d) is an image generated using the method of the embodiments of this disclosure. Detailed Implementation
[0011] To eliminate color differences between images and obtain seamless stitched data, external references have been proposed for image color correction. For example, one image color balancing method is based on a color reference library. This method calculates the local average values of the external reference image and the original image, and then performs gamma correction on the image. It also uses the low-frequency signal of a low-resolution external color reference to simulate the color distribution of ground features, employing a model combining dehazing and radiometric correction to achieve automatic image color correction. These existing methods fully utilize the advantages of color references, avoiding color error propagation and the two-body problem in traditional color balancing methods. However, these methods may fail when the color reference contains some interfering factors (clouds and cloud shadows). Furthermore, color balancing methods based on external color references are susceptible to interference or cloud contamination in the reference image, making it difficult to simultaneously maintain the fidelity of ground feature colors and ensure uniform color transitions between images. Therefore, a color correction method based on a cloud-contaminated reference image is needed.
[0012] This disclosure provides a color correction method based on cloud-contaminated reference images, which solves the problem that existing color correction algorithms are easily affected by clouds and cloud shadows in the reference image, making it difficult to balance the fidelity of ground feature colors and the uniform color transition between images, thereby improving the color consistency of the resulting image.
[0013] According to one or more embodiments, a color correction method based on a cloud-contaminated reference image includes the following steps:
[0014] First, the Poisson mixture method is used to repair areas of the reference image contaminated by clouds and cloud shadows, and Gaussian filtering is applied to extract low-frequency information from the repaired reference image. Second, the original image is downsampled by mean to obtain a downsampled image with the same resolution as the reference image. Then, an edge smoothing strategy based on Gaussian filtering and bilateral filtering is used to extract high-frequency information from the downsampled image. Next, the high and low-frequency information is superimposed to generate the optimized reference image. Finally, color differences between the images are corrected based on the optimized reference image and the constructed local linear model. Here, the reference image is a large-area image (e.g., a national map) with uniform illumination, moderate contrast, clear texture, and few or no clouds. The original image refers to the image that needs color correction, usually multiple overlapping images. Multiple original images and one reference image cover the same area. Here, low-frequency information corresponds to slowly changing gray-level components within the image, such as the color distribution information of objects within the image. High-frequency information corresponds to rapidly changing gray-level components within the image, such as the edges and texture information of objects within the image.
[0015] The Poisson mixing method includes the following steps:
[0016] (1) A convolution operation is performed on the reference image and the original image using a convolution kernel k1 = [0, -1, 1] to calculate the gradient distribution of the two images in the x-direction. Then, based on the convolution kernel... Calculate the gradient distribution of the two images in the y-direction in the same way.
[0017] (2) Extract clouds and cloud shadows from the reference image based on existing cloud and cloud shadow detection algorithms and generate a mask image. Then, find the contaminated areas on the reference image based on the mask image. After that, replace the gradient of the contaminated areas on the reference image with the gradient of the corresponding area on the original image to generate the gradient distribution map of the reference image to be reconstructed in the x and y directions.
[0018] (3) A convolution operation is performed on the gradient distribution map of the reference image to be reconstructed in the x-direction using a convolution kernel k2 = [-1, 1, 0] to obtain the partial derivative distribution map of the gradient of the reference image in the x-direction. Then, based on the convolution kernel... The partial derivative distribution of the gradient in the y-direction of the reference image is obtained in the same manner. Then, the partial derivative maps of the gradients in the two directions are superimposed to obtain the divergence of the reference image to be reconstructed.
[0019] (4) Based on the divergence in the contaminated area of the reference image to be reconstructed and the pixel value at the boundary of the contaminated area, establish and solve the following Poisson equation. The solution of the equation is the reconstructed pixel value.
[0020]
[0021] Where D represents the contaminated area within the reference image to be reconstructed, and its boundary is... Δ is the Laplace operator; f is a scalar function defined in D to be solved; divV represents the divergence of the known guiding vector field V(α,β) in region D, i.e. f* is a known scalar function defined outside the region D; These are Dirichlet boundary conditions.
[0022] Furthermore, the edge smoothing strategy based on Gaussian filtering and bilateral filtering includes the following steps:
[0023] (1) Modify the zero values (invalid values) around the downsampled image.
[0024] Suppose a remote sensing image is M×N in size. First, starting from row M / 2, iterate through each row of pixels in a bottom-up, left-to-right order, modifying the zero values in each row until the 0th row is reached. If all pixels in the i-th row are zero, replace the pixels in the i+1-th row with pixels from that row. Finally, starting from row M / 2, iterate through each row of pixels in a top-down, left-to-right order until the (M-1)-th row is reached. If all pixels in the j-th row are zero, replace the pixels in the j-1-th row with pixels from that row. When traversing each row of pixels, first record the column number of the first non-zero pixel as C1 and its value as V1; then, record the column number of the last non-zero pixel as C2 and its value as V2; finally, modify the values of the pixels with column numbers 0, 1, 2, ..., C1-1 to V1, and modify the values of the pixels with column numbers C2+1, C2+2, C2+3, ..., N-1 to V2.
[0025] (2) Extracting high-frequency information from the downsampled image. Gaussian filtering and bilateral filtering are applied to the downsampled image of size W×H to extract its high-frequency information. The convolution kernel size used in both filtering methods is k×k, and the calculation formula is as follows:
[0026]
[0027] In addition, the parameters sigmaSpace (spatial domain standard deviation) and sigmaColor (grayscale value domain standard deviation) of the bilateral filter are set to 50 and 12.5, respectively.
[0028] (3) Calculate the weight matrix.
[0029] First, initialize all values of the weight matrix of size W×H to 1; then, perform a convolution operation on the weight matrix using a convolution kernel of size k×k from step two, and use the result as the final weight matrix.
[0030] (4) Calculate the weighted high-frequency information H using the following formula. O .
[0031] H O =ω⊙H G +(1-ω)⊙H B (3)
[0032] Where ⊙ represents the dot product of matrices; H G and H B These represent the high-frequency information extracted by Gaussian filtering and bilateral filtering, respectively; ω is the weight matrix.
[0033] Furthermore, the method for constructing a locally linear model includes the following steps:
[0034] (1) Divide the target image and the original image into blocks and assume that the pixels in each w×h image block satisfy the linear model, then we have equation (4).
[0035]
[0036] in, and represents the mean brightness of the image blocks in the target image and the original image, respectively; a and b are the linear model parameters of the image blocks.
[0037] (2) When dark-toned features exist within an image patch, the brightness of the image patch mainly comes from diffused light. Theoretically, after color correction, the brightness of the image patch will not change significantly. That is, when I src When (r,c)→0, we have I dst (r,c)→0, thus leading to the conclusion that when Sometimes, Substituting into equation (4), we get b→0, therefore for the image block we have:
[0038]
[0039] (3) Due to downsampled image I srcdown It is obtained by downsampling the original image through mean, so its pixel values can be used as the mean of the image blocks of the original image. Based on formula (5), the optimized reference image I dstdown and downsampled image I srcdown By performing a ratio calculation on the pixel values at corresponding locations, the linear model gain coefficient 'a' for each image block can be calculated. To avoid brightness pops caused by stretching bright features and interference from outliers in the image, when calculating parameter 'a', if I... dstdown and I srcdownIf the pixel values at the corresponding positions all conform to the 3σ principle, then the parameter a is calculated according to formula (5); otherwise, the value of parameter a is set to 1. Then, the outliers in the calculated gain coefficient graph that do not conform to the 3σ principle are further changed to 1.
[0040] (4) The gain coefficient diagram and I are obtained by bilinear interpolation. dstdown and I srcdown Upsampled to the original image size, the results are A and L respectively. dst and L src Then, the color-corrected image I is calculated according to formula (6). dst .
[0041] I dst =A×(I src -L src )+L dst (6)
[0042] Among them, I src This is the original image. When processing color images, it is necessary to first convert the image from the RGB color space to the decorrelated YCbCr color space, and then correct the image band by band according to the above process.
[0043] According to one or more embodiments, a color correction method based on a cloud-contaminated reference image first uses Poisson mixing to repair areas contaminated by clouds and cloud shadows on the reference image and then uses Gaussian filtering to extract low-frequency information from the repaired reference image. Next, the original image is downsampled by mean to obtain a downsampled image with the same resolution as the reference image. Then, an edge smoothing strategy based on Gaussian filtering and bilateral filtering is used to extract high-frequency information from the downsampled image. Next, the aforementioned high- and low-frequency information is superimposed to generate an optimized reference image. Finally, color differences between the images are corrected based on the optimized reference image and a constructed local linear model.
[0044] Furthermore, areas on the reference image contaminated by clouds and cloud shadows are repaired based on Poisson hybridization. Step one involves convolving the reference and original images using kernel k1 to calculate the gradient distribution of the two images in the x-direction, and then applying the gradient based on the kernel... The gradient distributions of the two images in the y-direction are calculated in the same way. Step two, clouds and cloud shadows are extracted from the reference image using existing cloud and cloud shadow detection algorithms, and a mask image is generated. Then, contaminated areas on the reference image are identified based on the mask image. Next, the gradients of the corresponding areas in the original image are used to replace the gradients of the contaminated areas in the reference image to generate the gradient distribution maps of the reference image to be reconstructed in the x and y directions. Step three, a convolution operation is performed on the gradient distribution map of the reference image to be reconstructed in the x-direction using a convolution kernel k2 to obtain the partial derivative distribution map of the gradient of the reference image in the x-direction. Then, based on the convolution kernel... The partial derivative distribution map of the gradient in the y direction of the reference image is obtained in the same way. Then, the partial derivative maps of the gradient in the two directions are superimposed to obtain the divergence of the reference image to be reconstructed. Step four, based on the divergence in the contaminated area of the reference image to be reconstructed and the pixel value at the boundary of the contaminated area, the Poisson equation is established and solved. The solution of formula (1) is the reconstructed pixel value.
[0045] Furthermore, high-frequency information of the downsampled image is extracted based on edge smoothing strategies using Gaussian filtering and bilateral filtering. Step one: Modify the zero values around the edges of the downsampled image. Assume a remote sensing image is M×N in size. First, starting from row M / 2, traverse each row of pixels sequentially from bottom to top and from left to right, modifying the zero values in each row until the 0th row is traversed. If all pixels in the i-th row are zero, replace the pixels in the i+1-th row with pixels from the i-th row. Finally, starting from row M / 2, traverse each row of pixels sequentially from top to bottom and from left to right until the (M-1)-th row is traversed. If all pixels in the j-th row are zero, replace the pixels in the j-1-th row with pixels from the j-th row. When traversing each row of pixels, first record the column number of the first non-zero pixel as C1 and the value as V1; then, record the column number of the last non-zero pixel as C2 and the value as V2; finally, modify the value of the pixels with column numbers 0, 1, 2, ..., C1-1 to V1, and modify the value of the pixels with column numbers C2+1, C2+2, C2+3, ..., N-1 to V2. Step 2, perform Gaussian filtering and bilateral filtering on the downsampled image of size W×H to extract the high-frequency information of the image. The convolution kernel size used in the two filtering methods is k×k, and the value of k can be calculated by formula (2); in addition, the parameters sigmaSpace and sigmaColor of the bilateral filtering are set to 50 and 12.5 respectively. Step 3, initialize all values of the weight matrix of size W×H to 1; then, use the convolution kernel of size k×k in step 2 to perform convolution operation on the weight matrix, and use the result as the final weight matrix. Step 4: Calculate the weighted high-frequency information H using formula (3). O .
[0046] Furthermore, color differences between images are corrected based on optimized reference images and a constructed local linear model. Step one: The target image and the original image are divided into blocks, assuming that pixels within each w×h image block satisfy the linear model (Equation (4)). Step two: When dark-toned features exist within an image block, the brightness of the image block mainly comes from diffuse light; theoretically, the brightness change after color correction of the image block is minimal. That is, when I... src When (r,c)→0, we have I dst (r,c)→0, thus leading to the conclusion that when Sometimes, Substituting into equation (4), we get b→0, therefore for the image block, we have equation (5). Step 3, since the downsampled image I srcdown It is obtained by mean downsampling of the original image, so its pixel values can be used as the mean of the image blocks of the original image. Based on equation (5), the optimized reference image I dstdown and downsampled image I srcdown By performing a ratio calculation on the pixel values at corresponding locations, the linear model gain coefficient 'a' for each image block can be calculated. To avoid brightness pops caused by stretching bright features and interference from outliers in the image, when calculating parameter 'a', if I... dstdown and I srcdown If the pixel values at the corresponding positions all conform to the 3σ principle, then the parameter a is calculated according to formula (5); otherwise, the value of parameter a is set to 1. Then, outliers in the calculated gain coefficient map that do not conform to the 3σ principle are further changed to 1. Step four: Based on bilinear interpolation, the gain coefficient map and I... dstdown and I srcdown Upsampled to the original image size, the results are A and L respectively. dst and L src Then, the color-corrected image I is calculated according to formula (6). dst When processing color images, it is necessary to first convert the image from the RGB color space to the decorrelated YCbCr color space, and then correct the image band by band according to the above process.
[0047] The technical effects of the embodiments disclosed herein include:
[0048] 1) The proposed strategy for repairing contaminated areas and smoothing image edges can improve the quality of the resulting image and the color consistency between images, and effectively reduce the need for post-processing of the reference image.
[0049] 2) The Poisson blending strategy was used to repair areas in the reference image that were contaminated by clouds and their shadows. This effectively reduced the impact of clouds and their shadows on the resulting image and generated a corrected image with consistent color and brightness.
[0050] 3) The edge smoothing strategy based on Gaussian filtering and bilateral filtering effectively smooths the high-frequency information at the image junction by using a weighted approach, thus achieving a uniform color transition between images.
[0051] According to one or more embodiments, such as Figure 1 As shown, a color correction method based on a cloud-contaminated reference image first uses Poisson mixing to repair areas contaminated by clouds and cloud shadows in the reference image and then employs Gaussian filtering to extract low-frequency information from the repaired reference image. Next, the original image is downsampled using mean sampling to obtain a downsampled image with the same resolution as the reference image. Then, an edge smoothing strategy based on Gaussian filtering and bilateral filtering is used to extract high-frequency information from the downsampled image. Following this, the aforementioned high- and low-frequency information is superimposed to generate an optimized reference image. Finally, color differences between the images are corrected based on the optimized reference image and a constructed local linear model.
[0052] This color correction method uses a Poisson blending strategy to repair areas in the reference image contaminated by clouds and cloud shadows, effectively reducing the impact of clouds and cloud shadows on the resulting image. Furthermore, an edge smoothing strategy based on Gaussian filtering and bilateral filtering achieves a uniform color transition between images. The specific implementation steps are as follows:
[0053] Step 1: Perform a convolution operation on the reference image and the original image using convolution kernel k1 to calculate the gradient distribution of the two images in the x-direction. Then, based on the convolution kernel... Calculate the gradient distribution of the two images in the y-direction in the same way.
[0054] Step two involves extracting clouds and cloud shadows from the reference image using existing cloud and cloud shadow detection algorithms, and generating a corresponding mask image. Then, based on the mask image, contaminated areas in the reference image are identified. Finally, the gradients of the corresponding areas in the original image are used to replace the gradients of the contaminated areas in the reference image, generating a gradient distribution map of the reference image to be reconstructed in the x and y directions.
[0055] Step 3: Perform a convolution operation using kernel k2 on the gradient distribution map of the reference image to be reconstructed in the x-direction to obtain the partial derivative distribution map of the gradient of the reference image in the x-direction. Then, based on the convolution kernel... The partial derivative distribution of the gradient in the y-direction of the reference image is obtained in the same manner. Then, the partial derivative maps of the gradients in the two directions are superimposed to obtain the divergence of the reference image to be reconstructed.
[0056] Step 4: Based on the divergence in the contaminated area of the reference image to be reconstructed and the pixel value at the boundary of the contaminated area, establish and solve the Poisson equation. The solution of equation (1) is the reconstructed pixel value.
[0057] Step 5: Use Gaussian filtering to extract the low-frequency information L from the repaired reference image. O .
[0058] Step 6: Modify the zero values around the downsampled image. Then, perform Gaussian filtering and bilateral filtering on the downsampled image of size W×H to extract the high-frequency information of the image. The convolution kernel size used in the two filtering methods is k×k, and the value of k can be calculated by formula (2). In addition, the parameters sigmaSpace and sigmaColor of the bilateral filtering are set to 50 and 12.5 respectively.
[0059] Step 7: Initialize all values of the weight matrix of size W×H to 1; then, perform a convolution operation on the weight matrix using the k×k convolution kernel from step 6, and use the result as the final weight matrix. Then, calculate the weighted high-frequency information H using formula (3). O .
[0060] Step 8, transfer low-frequency information L O With high-frequency information H O Superimpose images to generate an optimized reference image I dstdown Then, based on equation (5), the optimized reference image I dstdown and downsampled image I srcdown The linear model gain coefficient 'a' for each image block is calculated by performing a ratio operation on the pixel values at corresponding locations. When calculating parameter 'a', if I... dstdown and I srcdown If the pixel values at the corresponding positions all conform to the 3σ principle, then the parameter a is calculated according to equation (5); otherwise, the value of parameter a is set to 1. Then, the outliers in the calculated gain coefficient graph that do not conform to the 3σ principle are further changed to 1.
[0061] Step nine, using bilinear interpolation, the gain coefficient map and I... dstdown and I srcdown Upsampled to the original image size, the results are A and L respectively. dst and L src Then, the color-corrected image I is calculated according to formula (6). dst .
[0062] When processing color images, it is necessary to first convert the image from the RGB color space to the decorrelated YCbCr color space, and then correct the image band by band according to the above process. The experimental results are as follows: Figure 3 As shown. To illustrate the color differences between the images, gray boxes in the image highlight areas of inconsistent color.
[0063] The evaluation metrics used in performance assessment include: OIE (One-dimensional Image Entropy), QCCED (Quality Considered Color Euclidean Distance), CED (Color Euclidean Distance), and SSIM (Structural Similarity).
[0064] By comparing with two existing color correction algorithms, it can be found that the method proposed in this disclosure has the best performance, as shown in the table below.
[0065]
[0066] It should be understood that in the embodiments of the present invention, the term "and / or" is merely a description of the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, the character " / " in this document generally indicates that the preceding and following associated objects have an "or" relationship.
[0067] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0068] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0069] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0070] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A method for color correction of a reference image, characterized in that, This includes optimizing the reference image, and then performing color correction on the original image based on the optimized reference image. Optimization of the reference image further includes the following steps: Obtain a reference image, repair areas on the reference image contaminated by clouds and / or cloud shadows using Poisson mixing, and extract low-frequency information from the repaired reference image using Gaussian filtering; The original image is downsampled to obtain a downsampled image with the same resolution as the reference image; Extract high-frequency information from downsampled images; High- and low-frequency information are superimposed to generate an optimized reference image. The step of repairing areas contaminated by clouds and / or cloud shadows on a Poisson hybrid inpainting reference image further includes: Step 1: Perform a convolution operation on the reference image and the original image using convolution kernel k1 to calculate the gradient distribution of the two images in the x-direction. Then, based on the convolution kernel... Calculate the gradient distribution of the two images in the y-direction in the same way; Step two: Extract clouds and cloud shadows from the reference image using existing cloud and cloud shadow detection algorithms and generate a mask image. Then, based on the mask image, the contaminated areas on the reference image are identified. Then, the gradient of the contaminated region on the reference image is replaced with the gradient of the corresponding region on the original image to generate a gradient distribution map of the reference image to be reconstructed in the x and y directions. Step 3: Perform a convolution operation on the gradient distribution map of the reference image to be reconstructed in the x-direction using convolution kernel k2 to obtain the partial derivative distribution map of the gradient of the reference image in the x-direction. Then based on the convolution kernel The partial derivative distribution of the gradient in the y-direction of the reference image is obtained in the same manner. Then, the partial derivative maps of the gradients in the two directions are superimposed to obtain the divergence of the reference image to be reconstructed. Step 4: Based on the divergence in the contaminated area of the reference image to be reconstructed and the pixel values at the boundary of the contaminated area, establish and solve the Poisson equation.
2. The method according to claim 1, characterized in that, The original image is downsampled by averaging to obtain a downsampled image with the same resolution as the reference image.
3. The method according to claim 1, characterized in that, High-frequency information of downsampled images is extracted using an edge smoothing strategy based on Gaussian filtering and bilateral filtering.
4. The method according to claim 1, characterized in that, Color correction of the original image based on the optimized reference image includes, The constructed local linear model; Color differences between the original images are corrected based on optimized reference images and a constructed local linear model.
5. The method according to claim 3, characterized in that, The step of extracting high-frequency information from the downsampled image using the edge smoothing strategy based on Gaussian filtering and bilateral filtering further includes the following steps: (1) Modify the zero values around the downsampled image. Assuming a remote sensing image is M×N in size, start from row M / 2 and iterate through each row of pixels sequentially from bottom to top and from left to right, modifying the zero values in each row of pixels until the 0th row of pixels has been traversed. If all pixels in the i-th row are zero, then replace the pixels in the i-th row with pixels from the (i+1)-th row. Finally, starting from row M / 2, visit each row of pixels sequentially from top to bottom and from left to right until all pixels in row M-1 have been traversed. If all pixels in row j are zero, replace the pixels in row j-1 with pixels from row j. When traversing each row of pixels, first record the column number of the first non-zero pixel as C1 and the value as V1; then, record the column number of the last non-zero pixel as C2 and the value as V2. Change the value of the pixel with column number 0, 1, 2, ..., C1-1 to V1, and change the value of the pixel with column number C2+1, C2+2, C2+3, ..., N-1 to V2; (2) Gaussian filtering and bilateral filtering are applied to the downsampled image of size W×H to extract the high-frequency information of the image, wherein the kernel size used in the two filtering methods is k×k; (3) Initialize all values of the weight matrix of size W×H to 1, perform convolution operation on the weight matrix using the k×k convolution kernel in step (2), and use the result as the final weight matrix. (4) Calculate the weighted high-frequency information H O .
6. A computer program product, comprising a computer program, characterized in that, The computer program is executed by a processor to implement the method according to any one of claims 1 to 5.