Adaptive thin cloud removal method and system for remote sensing images based on hierarchical supervision
By performing super-pixel segmentation on remote sensing images and convolutional neural network to identify cloud cover, the hierarchical adaptive cloud removal processing of remote sensing images is realized, which solves the shortcomings of cloud removal methods in the existing technology when processing different cloud areas, and improves the image quality. clarity and cloud removal effect.
Patent Information
- Application Number
- CN202410309510.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-19
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-03-19
AI Technical Summary
Existing remote sensing image cloud removal methods cannot avoid thick cloud and cloud-free areas when processing areas that contain clouds, thin clouds, and thick clouds at the same time, and use the same hyperparameters when different cloud concentrations are used, resulting in problems such as color cast in the picture.
A method based on hierarchical supervision is used to perform super-pixel segmentation on remote sensing images, and a convolutional neural network is used to identify the cloud cover of different super-pixel blocks. The method determines whether to perform cloud removal operations based on the probability of containing clouds to avoid processing thick cloud areas and uses convolution. The neural network model outputs the cloud-containing probability of each superpixel block, and performs adaptive cloud removal processing based on the probability.
It improves the visibility of remote sensing images, avoids inaccurate cloud removal and color cast, and improves the cloud removal effect.
Smart Images

Figure CN118229582B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a remote sensing image adaptive thin cloud removal method and system based on hierarchical supervision. Background Art
[0002] With the expansion of the application scope of remote sensing technology in environmental monitoring, resource exploration, disaster assessment and other fields, the application value of remote sensing images has been further explored. However, optical remote sensing images are inevitably affected by weather conditions. Due to cloud cover, it brings great challenges to the extraction and analysis of surface information. Optical remote sensing images can be divided into cloudless areas, thin cloud areas and thick cloud areas according to the cloud cover. No processing is required for cloudless areas; declouding operations can be performed for thin cloud areas; for thick cloud areas, since the ground object information below the cloud layer cannot be obtained during remote sensing observation, further enhancement processing operations cannot be performed.
[0003] In the existing technology, the commonly used cloud removal methods are mainly based on dark channel priors and deep learning models. The existing methods are effective in removing uniform thin clouds, but when faced with remote sensing images that contain cloudless, thin cloud, and thick cloud areas, the existing methods will process all areas at the same time and cannot avoid thick cloud areas and cloudless areas. In addition, the existing methods usually use the same hyperparameters when processing clouds of different densities, and cannot adaptively remove clouds according to the cloud amount, which may cause problems such as color cast.
[0004] Therefore, how to provide an adaptive cloud removal method for remote sensing images based on hierarchical supervision is a technical problem that technicians in this field urgently need to solve. Summary of the invention
[0005] The purpose of the present invention is to provide a remote sensing image adaptive thin cloud removal method and system based on hierarchical supervision, so as to solve the problems of weak adaptability and insufficient precision of remote sensing image declouding methods in the prior art.
[0006] In a first aspect, the present invention provides a remote sensing image adaptive thin cloud removal method based on hierarchical supervision, comprising the following steps:
[0007] S1: Perform super-pixel segmentation on the remote sensing image to be processed to obtain multiple super-pixel blocks;
[0008] S2: Input each superpixel block into the convolutional neural network model and output the probability of each superpixel block containing clouds;
[0009] S3: Determine whether the cloud probability is greater than a preset threshold. If so, it means that the superpixel block contains thick clouds. Otherwise, it means that the superpixel block contains thin clouds or no clouds.
[0010] S4: For superpixel blocks containing thick clouds, no de-clouding operation is performed, and the corresponding area in the original remote sensing image is directly used to perform de-clouding operation on superpixel blocks containing thin clouds or no clouds;
[0011] S5: Reassemble the processed superpixel blocks to generate a complete declouding result.
[0012] Preferably, in S2, a simple linear iterative clustering algorithm is used to perform superpixel segmentation on the remote sensing image to be processed, comprising the following steps:
[0013] S21: Initialize K superpixel center points based on uniform sampling;
[0014] S22: Calculate the gradient values of all pixels in the neighborhood of each superpixel center point, and set the pixel point with the smallest gradient value as the new superpixel center point;
[0015] S23: For each pixel Q, calculate the color and spatial distance D(Q,C) between it and the K new superpixel centers;
[0016] S24: assigning pixels to the superpixel center point closest to them according to the distance D(Q,C) to form a superpixel block;
[0017] S25: Update the center point of each superpixel block;
[0018] S26: Repeat S23 to S25 until the center point of each superpixel block no longer changes.
[0019] Preferably, performing a cloud removal operation on a superpixel block containing thin clouds or no clouds in S4 comprises the following steps:
[0020] S41: Calculating a cloud removal coefficient of each super-pixel block according to the cloud-containing probability of each super-pixel block;
[0021] S42: comparing the cloud probability of each superpixel block, taking all pixels in the superpixel block with the highest cloud probability and calculating the R channel mean, G channel mean and B channel mean of all pixels;
[0022] S43: Calculate the bias item of each super pixel block based on the R channel mean, the G channel mean and the B channel mean;
[0023] S44: calculating a transfer function of each super pixel block based on the R channel mean, the G channel mean, and the B channel mean;
[0024] S45: Using the grayscale image of each superpixel block as a guide image, and performing guide filtering on the transfer function of the corresponding superpixel block based on the bias term of each superpixel block to obtain a filtered transfer function t′ i ;
[0025] S46: Calculate the pixel channel value in each super pixel block based on the filtered transfer function.
[0026] Preferably, the color and spatial distance D(Q,C) between pixel Q and the center points of K superpixels is calculated as follows:
[0027]
[0028] Where D(Q,C) is the distance between pixel Q and superpixel center C, Δl, Δa, Δb are the color component differences between pixel Q and superpixel center C, l, a, b represent the brightness, red-green difference, and blue-yellow difference of the image in LAB color space, Δx and Δy are the horizontal and vertical coordinate differences between pixel Q and superpixel center C, N represents the total number of pixels, m is the weight factor used to control the relative weight of color distance and spatial distance, and K represents the total number of superpixel centers.
[0029] Preferably, the calculation formula for the cloud removal coefficient of the superpixel block is:
[0030]
[0031] Among them, P ci represents the probability of the i-th superpixel containing thin clouds or no clouds, Ω i represents the declouding coefficient of the i-th superpixel block.
[0032] Preferably, the bias term calculation formula is:
[0033]
[0034] Among them, ε i is the bias term of the i-th superpixel block with thin clouds or no clouds, P ci is the cloud probability of the i-th superpixel containing thin clouds or no clouds, M R is the mean value of R channel, M G is the mean value of G channel, M B is the mean of channel B, and e represents the natural base;
[0035] The transfer function calculation formula is:
[0036]
[0037] Among them, t i represents the transfer function of the ith superpixel block, A Rj ,A Gj ,A Bj Respectively represent the RGB three-channel values of the j-th pixel in the super pixel block, Ω i represents the declouding coefficient of the i-th superpixel block;
[0038] The calculation formula for pixel channel value is:
[0039]
[0040] Among them, A kj is the k-channel value of the j-th pixel of the superpixel block before cloud removal, A′ kj Represents the k-channel value t′ of the j-th pixel of the superpixel block after cloud removal i is the transfer function after the guide filter, M k Represents the k-channel mean, including the R, G, and B channels.
[0041] In a second aspect, the present invention provides a remote sensing image adaptive thin cloud removal system based on hierarchical supervision, comprising:
[0042] Superpixel segmentation module: performs superpixel segmentation on the remote sensing image to be processed to obtain multiple superpixel blocks;
[0043] Deep learning module: input each superpixel block into the convolutional neural network model and output the probability of each superpixel block containing clouds;
[0044] Judgment module: judges whether the probability of containing clouds is greater than a preset threshold. If so, it means that the superpixel block contains thick clouds; otherwise, it means that the superpixel block contains thin clouds or no clouds;
[0045] De-clouding operation module: For super-pixel blocks containing thick clouds, no de-clouding operation is performed. Instead, the corresponding area in the original remote sensing image is directly used to perform de-clouding operation on super-pixel blocks containing thin clouds or no clouds.
[0046] Superpixel reconstruction module: Recombines the processed superpixel blocks to generate a complete declouding result.
[0047] In a third aspect, the present invention provides a computer device, comprising:
[0048] Memory for storing computer programs;
[0049] A processor is used to implement the steps of the remote sensing image adaptive thin cloud removal method based on hierarchical supervision when executing the computer program.
[0050] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for adaptive thin cloud removal from remote sensing images based on hierarchical supervision.
[0051] Through the technical solution of the present invention, the following technical effects can be obtained:
[0052] By dividing the remote sensing images into blocks and using convolutional neural networks to identify the cloud cover of different superpixel blocks, the areas with different cloud cover are declouded in a graded manner, thereby improving the visibility of remote sensing images. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0054] Figure 1 It is a flow chart of a specific implementation method of the present invention;
[0055] Figure 2 is a system block diagram of the present invention;
[0056] Figure 3a is the original remote sensing image to be processed;
[0057] Figure 3b This is the result of the traditional dark channel prior de-clouding algorithm.
[0058] Figure 3c This is the processing result of the traditional feature fusion attention cloud removal algorithm (FFA-Net);
[0059] Figure 3d This is the processing result of the method of the present invention.
[0060] Figure 4 This is a block diagram of a computer device according to the present invention. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention is described clearly and completely below. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] The embodiment of the present invention provides a remote sensing image adaptive thin cloud removal method based on hierarchical supervision, such as Figure 1 As shown, the following steps are included:
[0063] S1: Perform superpixel segmentation on the remote sensing image to be processed to obtain multiple superpixel blocks for subsequent processing, wherein the simple linear iterative clustering (SLIC) algorithm can be used to perform superpixel segmentation on the remote sensing image to be processed, and the remote sensing image to be processed is a three-channel color remote sensing image;
[0064] S2: For each superpixel block, it is input into a pre-trained convolutional neural network (CNN) model, and the model outputs the probability that each superpixel block contains clouds;
[0065] S3: Determine whether the probability of containing clouds is greater than a preset threshold. If so, it means that the superpixel block contains thick clouds. Otherwise, it means that the superpixel block contains thin clouds or no clouds. The preset threshold is generally 0.8, which can also be changed according to actual conditions and is not limited here.
[0066] S4: For superpixel blocks containing thick clouds, no cloud removal operation is performed, and the corresponding area in the original remote sensing image is directly used. For superpixel blocks containing thin clouds or no clouds, a cloud removal operation is performed to extract clear surface information;
[0067] S5: Reassemble the processed superpixel blocks to generate the complete declouding result.
[0068] Based on the above embodiment, in this embodiment, a simple linear iterative clustering algorithm is used to perform superpixel segmentation on the remote sensing image to be processed, which includes the following steps:
[0069] S21: Initialize K superpixel center points using uniform sampling. In general, Among them, Size represents the number of pixels of the remote sensing image to be processed;
[0070] S22: Calculate the gradient values of all pixels in the neighborhood of each superpixel center point, and set the pixel point with the smallest gradient value as the new superpixel center point;
[0071] S23: For each pixel Q, calculate the color and spatial distance D(Q,C) between it and the K new superpixel centers. The calculation formula is as follows:
[0072]
[0073] Where D(Q,C) is the distance between pixel Q and superpixel center C, Δl, Δa, Δb are the color component differences between pixel Q and superpixel center C, l, a, b represent the brightness, red-green difference, and blue-yellow difference of the image in LAB color space, Δx and Δy are the horizontal and vertical coordinate differences between pixel Q and superpixel center C, N represents the total number of pixels, and m is a weight factor used to control the relative weight of color distance and space distance. In general, m can be 10.
[0074] S24: assigning pixels to the superpixel center point closest to them according to D(Q,C) to form a superpixel block;
[0075] S25: Update the center point of each superpixel block;
[0076] S26: Repeat S23 to S25 until the center point of each superpixel block no longer changes.
[0077] Based on the above embodiment, in this embodiment, the cloud removal operation is performed on the superpixel block containing thin clouds or no clouds, comprising the following steps:
[0078] S41: Calculate the cloud removal coefficient of each superpixel block according to the cloud probability of each superpixel block: P ci represents the probability of the i-th superpixel containing thin clouds or no clouds, Ω i represents the declouding coefficient of the i-th superpixel block;
[0079] S42: Compare the cloud probabilities of all superpixel blocks, take all pixels in the superpixel block with the largest cloud probability and calculate the R channel mean M of all pixels R , G channel mean M G , B channel mean M B ;
[0080] S43: Calculate the bias term of each super pixel block, and the calculation formula is:
[0081]
[0082] Among them, ε i is the bias term of the i-th superpixel block with thin clouds or no clouds, P ci is the cloud probability of the i-th superpixel containing thin clouds or no clouds, and e represents the natural base;
[0083] S44: Calculate the transfer function t of each superpixel block i :
[0084]
[0085] Among them, A Rj ,A Gj ,A Bj Respectively represent the RGB three-channel values of the j-th pixel in the super pixel block;
[0086] S45: Take the grayscale image of each superpixel block as the guided image, perform guided filtering on the transfer function of the corresponding superpixel block based on the bias item of each superpixel block, with a window size of r=15, and obtain the filtered transfer function t′ i ;
[0087] S46: Calculate the pixel channel value in each superpixel block based on the filtered transfer function. The recovery formula is as follows:
[0088]
[0089] Among them, A kj is the k-channel value of the j-th pixel in the original superpixel block, A′ kj represents the k-channel value of the j-th pixel in the superpixel block after cloud removal, t′ i is the transfer function after the guide filter, M k Represents the k-channel mean, including the three channels of R, G, and B. .
[0090] It should be noted that the processing of super pixel blocks in this embodiment is the processing of super pixel blocks containing thin clouds or no clouds.
[0091] In other optional embodiments, in order to further improve the visibility of the foggy remote sensing image, the clarity and sharpness of the remote sensing image may be increased. For example, the details of the remote sensing image may be enhanced by increasing the pixels of the shooting device.
[0092] The experimental results of the present invention are as follows Figure 3a-3d As shown, Figure 3a is the original remote sensing image to be processed. Through qualitative comparison, the best defogging effect is achieved by using the method of the present invention. Figure 3d , Figure 3b The thin cloud layer was not completely removed, and the visibility of remote sensing images in some areas was poor. Figure 3c The processed image has color cast at the boundary of thick clouds. Compared with other cloud removal methods, the cloud removal method proposed in the present invention can completely remove thin clouds in the image and restore a clear image.
[0093] In summary, the present invention avoids problems such as inaccurate cloud removal and color cast of the image by performing hierarchical adaptive processing on areas with different cloud contents in remote sensing images, thereby improving the cloud removal effect of remote sensing images.
[0094] This embodiment provides a remote sensing image adaptive thin cloud removal system based on hierarchical supervision. Figure 2 As shown, including:
[0095] Superpixel segmentation module: performs superpixel segmentation on the remote sensing image to be processed to obtain multiple superpixel blocks;
[0096] Deep learning module: input each superpixel block into the convolutional neural network model and output the probability of each superpixel block containing clouds;
[0097] Judgment module: judges whether the probability of containing clouds is greater than a preset threshold. If so, it means that the superpixel block contains thick clouds; otherwise, it means that the superpixel block contains thin clouds or no clouds;
[0098] De-clouding operation module: For super-pixel blocks containing thick clouds, no de-clouding operation is performed. Instead, the corresponding area in the original remote sensing image is directly used to perform de-clouding operation on super-pixel blocks containing thin clouds or no clouds.
[0099] Superpixel reconstruction module: Recombines the processed superpixel blocks to generate a complete declouding result.
[0100] For a detailed introduction to a remote sensing image adaptive thin cloud removal system based on hierarchical supervision provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here.
[0101] The present invention provides a computer device, such as Figure 4 As shown, including:
[0102] Memory 101, used for storing computer programs;
[0103] The processor 102 is used to implement the steps of the above-mentioned remote sensing image adaptive thin cloud removal method based on hierarchical supervision when executing the computer program.
[0104] For an introduction to a computer device provided by the present invention, please refer to the above method embodiment, and the present invention will not be described in detail here.
[0105] The computer readable storage medium in the present invention stores a computer program, and when the computer program is executed by the processor, the steps of the remote sensing image adaptive thin cloud removal method based on hierarchical supervision are implemented. The storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0106] For an introduction to the computer-readable storage medium provided by the present invention, please refer to the above method embodiment, and the present invention will not be repeated here.
[0107] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features may be replaced by equivalents, and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
[0108] It should be understood that the size of the serial numbers of each step in the content of the invention and the embodiments of the present invention does not absolutely mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
Claims
1. An adaptive thin cloud removal method for remote sensing images based on hierarchical supervision, characterized in that: The following steps are involved: S1: Perform super-pixel segmentation on the remote sensing image to be processed to obtain multiple super-pixel blocks; S2: Input each superpixel block into the convolutional neural network model and output the probability of each superpixel block containing clouds; S3: Determine whether the cloud probability is greater than a preset threshold. If so, it means that the superpixel block contains thick clouds. Otherwise, it means that the superpixel block contains thin clouds or no clouds. S4: For superpixel blocks containing thick clouds, no de-clouding operation is performed, and the corresponding area in the original remote sensing image is directly used to perform de-clouding operation on superpixel blocks containing thin clouds or no clouds; S5: Recombine the processed superpixel blocks to generate a complete declouding result; The declouding operation for superpixel blocks with thin clouds or no clouds in S4 includes the following steps: S41: Calculating a cloud removal coefficient of each super-pixel block according to the cloud-containing probability of each super-pixel block; S42: comparing the cloud probability of each superpixel block, taking all pixels in the superpixel block with the highest cloud probability and calculating the R channel mean, G channel mean and B channel mean of all pixels; S43: Calculate the bias item of each super pixel block based on the R channel mean, the G channel mean and the B channel mean; S44: calculating a transfer function of each super pixel block based on the R channel mean, the G channel mean, and the B channel mean; S45: Using the grayscale image of each superpixel block as a guide image, and performing guide filtering on the transfer function of the corresponding superpixel block based on the bias term of each superpixel block to obtain the filtered transfer function t i ′; S46: Calculate the pixel channel value in each super pixel block based on the filtered transfer function; The calculation formula of the cloud removal coefficient of the superpixel block is: Among them, P ci represents the probability of the i-th superpixel containing thin clouds or no clouds, Ω i represents the declouding coefficient of the i-th superpixel block; The bias term calculation formula is: Among them, ε i is the bias term of the i-th superpixel block with thin clouds or no clouds, P ci is the cloud probability of the i-th superpixel containing thin clouds or no clouds, M R is the mean value of R channel, M G is the mean value of G channel, M B is the mean of channel B, and e represents the natural base; The transfer function calculation formula is: Among them, t i represents the transfer function of the ith superpixel block, A Rj ,A Gj ,A Bj Respectively represent the RGB three-channel values of the j-th pixel in the super pixel block, Ω i represents the declouding coefficient of the i-th superpixel block; The calculation formula for pixel channel value is: Among them, A kj is the k-channel value of the j-th pixel of the superpixel block before cloud removal, A′ kj represents the k-channel value of the j-th pixel in the superpixel block after cloud removal, t′ i is the transfer function after the guide filter, M k Represents the k-channel mean, including the R, G, and B channels.
2. The method for adaptive thin cloud removal from remote sensing images based on hierarchical supervision according to claim 1 is characterized in that: S1 uses a simple linear iterative clustering algorithm to perform superpixel segmentation on the remote sensing image to be processed, which includes the following steps: S21: Initialize K superpixel center points based on uniform sampling; S22: Calculate the gradient values of all pixels in the neighborhood of each superpixel center point, and set the pixel point with the smallest gradient value as the new superpixel center point; S23: For each pixel Q, calculate the color and spatial distance D(Q,C) between it and the K new superpixel centers; S24: assigning pixels to the superpixel center point closest to them according to the distance D(Q,C) to form a superpixel block; S25: Update the center point of each superpixel block; S26: Repeat S23 to S25 until the center point of each superpixel block no longer changes.
3. The method for adaptive thin cloud removal from remote sensing images based on hierarchical supervision according to claim 2 is characterized in that: The color and spatial distance D(Q,C) between pixel Q and K new superpixel centers is calculated as follows: Where D(Q,C) is the distance between pixel Q and superpixel center C, Δl, Δa, Δb are the color component differences between pixel Q and superpixel center C, l, a, b represent the brightness, red-green difference, and blue-yellow difference of the image in LAB color space, Δx and Δy are the horizontal and vertical coordinate differences between pixel Q and superpixel center C, N represents the total number of pixels, m is the weight factor used to control the relative weight of color distance and spatial distance, and K represents the total number of superpixel centers.
4. A remote sensing image adaptive thin cloud removal system based on hierarchical supervision, the system is used to implement any method of claims 1-3, characterized in that: include: Superpixel segmentation module: performs superpixel segmentation on the remote sensing image to be processed to obtain multiple superpixel blocks; Deep learning module: input each superpixel block into the convolutional neural network model and output the probability of each superpixel block containing clouds; Judgment module: judges whether the probability of containing clouds is greater than a preset threshold. If so, it means that the superpixel block contains thick clouds; otherwise, it means that the superpixel block contains thin clouds or no clouds; De-clouding operation module: For super-pixel blocks containing thick clouds, no de-clouding operation is performed. Instead, the corresponding area in the original remote sensing image is directly used to perform de-clouding operation on super-pixel blocks containing thin clouds or no clouds. Superpixel reconstruction module: Recombines the processed superpixel blocks to generate a complete declouding result.
5. A computer device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the remote sensing image adaptive thin cloud removal method based on hierarchical supervision as described in any one of claims 1 to 3 when executing the computer program.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the remote sensing image adaptive thin cloud removal method based on hierarchical supervision as claimed in any one of claims 1 to 3.
Citation Information
Patent Citations
Remote sensing image cloud detection method based on convolution nerve network
CN105844228A
