Method, apparatus, electronic device and storage medium for repairing satellite remote sensing images

Through the multi-cycle repair technology and random sorting method, satellite remote sensing images are repaired, solving the problems of large calculations, slow processing speed and complex data preparation in traditional methods, and achieving efficient and fast image repair effects.

CN119313594BActive Publication Date: 2025-06-24CHINESE PEOPLES LIBERATION ARMY UNIT 61741 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411452547.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-06-24
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

Traditional satellite remote sensing image repair methods have large calculations, slow processing speed, and complex data preparation.

Method used

The multi-cycle repair technology is used to randomly sort the pixels to be repaired, and the pixels to be repaired are generated that are cycled multiple times, and the effective pixels within the preset radius are determined based on the position coordinates of the current pixel to be repaired as the repair source pixel, and the pixel value of the target repaired source pixel with the smallest difference is calculated for filling.

Benefits of technology

Reduces computational volume, improves processing speed, avoids the complexity of data preparation, has good repair results and no additional samples and external images are required.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313594B_ABST
    Figure CN119313594B_ABST
Patent Text Reader

Abstract

The present invention provides a method, apparatus, electronic device, and storage medium for repairing satellite remote sensing images, belonging to the technical field of image processing. This method adopts a cyclic multiple repair technique (because pixels to be repaired are generated cyclically multiple times), and has a good repair effect. Moreover, when performing the repair, it is achieved based on the difference degree between the current pixel to be repaired and each repair source pixel. The data volume of the repair source pixels is relatively small compared to the data volume of the entire satellite remote sensing image to be repaired. Therefore, the computational amount is small, and the processing speed is fast. In addition, the repair source pixels are derived from the satellite remote sensing image to be repaired itself, and no additional samples and external images are required.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method, device, electronic equipment and storage medium for repairing satellite remote sensing images. Background Art

[0002] Image restoration refers to restoring the pixel features of the missing parts of a damaged image. Commonly used image restoration methods include optimal matching, fusion, and deep network methods. However, these methods have certain shortcomings for the restoration of satellite remote sensing images. For example, the optimal matching method involves calculating the matching value pixel by pixel, which requires a large amount of calculation and is difficult to meet the requirements of processing timeliness; the fusion method requires multiple images or images taken by different sensors in the same area, which has high requirements for external data sources; the deep network method requires a large number of data samples for model training and learning.

[0003] In summary, traditional satellite remote sensing image restoration methods have technical problems such as large computational complexity, slow processing speed, and complex data preparation. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a method, device, electronic device and storage medium for repairing satellite remote sensing images to alleviate the technical problems of existing satellite remote sensing image repair methods, such as large amount of calculation, slow processing speed and complex data preparation.

[0005] In a first aspect, an embodiment of the present invention provides a method for repairing a satellite remote sensing image, comprising:

[0006] Acquire a satellite remote sensing image to be repaired, and determine pixels to be repaired and valid pixels in the satellite remote sensing image to be repaired, wherein the pixels to be repaired include: signal saturated pixels and missing pixels;

[0007] Randomly sorting the pixels to be repaired to obtain randomly sorted pixels to be repaired, and generating pixels to be repaired that are cycled multiple times based on the randomly sorted pixels to be repaired;

[0008] Traversing each current pixel to be repaired among the pixels to be repaired that have been cycled multiple times, determining a first repair source pixel that is located within a preset radius of the position coordinates and belongs to the valid pixel according to the position coordinates of the current pixel to be repaired in the satellite remote sensing image to be repaired, and randomly selecting a preset number of pixels from the valid pixels as second repair source pixels, and then using the first repair source pixel and the second repair source pixel as repair source pixels of the current pixel to be repaired, wherein the second repair source pixel is different from the first repair source pixel;

[0009] Calculate the difference degree between the current pixel to be repaired and each of the repair source pixels, and fill the pixel value of the target repair source pixel with the minimum difference degree as the pixel value of the current pixel to be repaired at the position coordinates, and update the valid pixels until each current pixel to be repaired in the pixels to be repaired that are looped multiple times is traversed, so as to obtain the repaired image corresponding to the satellite remote sensing image to be repaired.

[0010] Further, generating the pixels to be repaired that are looped multiple times according to the randomly sorted pixels to be repaired includes:

[0011] Determine the pixels to be repaired in the current loop according to the randomly sorted pixels to be repaired, where the pixels to be repaired in the current loop are the first (1 / 2) n of the randomly sorted pixels to be repaired, and n represents the number of loops;

[0012] Append the pixels to be repaired in the current loop to the tail of the pixels to be repaired obtained in the previous loop to obtain the pixels to be repaired obtained in the current loop until the number of the pixels to be repaired in the current loop is 1, and use the pixels to be repaired obtained in the last loop as the pixels to be repaired that are looped multiple times.

[0013] Further, calculating the difference degree between the current pixel to be repaired and each of the repair source pixels includes:

[0014] According to the difference degree calculation formula Calculate the difference degree between the current pixel to be repaired and each of the repair source pixels, where g represents the difference degree between the current pixel to be repaired and one of the repair source pixels, Nb represents the set of valid pixels within the preset radius range of the current pixel to be repaired, and w i represents the weight value of the two-dimensional Gaussian distribution, a i represents the pixel value of the valid pixels within the preset radius range of the current pixel to be repaired, b i represents the pixel value of the valid pixels within the preset radius range of the repair source pixel, dx and dy represent the relative positions of the position coordinates of the valid pixels within the preset radius range of the repair source pixel relative to the position coordinates of the current pixel to be repaired, and σ = R 2 , and R represents within the preset radius range.

[0015] Further, the preset radius range and the preset quantity are related to the size of the satellite remote sensing image to be repaired.

[0016] Further, the satellite remote sensing image to be repaired is a satellite remote sensing observation image in the unsigned 16-bit integer pixel format.

[0017] In a second aspect, an embodiment of the present invention further provides a satellite remote sensing image restoration device, including:

[0018] An acquisition and determination unit, configured to acquire a satellite remote sensing image to be restored and determine the pixels to be restored and valid pixels in the satellite remote sensing image to be restored, where the pixels to be restored include: signal saturation pixels and missing measurement pixels;

[0019] A random sorting and generation unit, configured to randomly sort the pixels to be restored to obtain the randomly sorted pixels to be restored, and generate the pixels to be restored that are cycled multiple times according to the randomly sorted pixels to be restored;

[0020] A determination unit, configured to traverse each current pixel to be restored in the pixels to be restored that are cycled multiple times, determine a first restoration source pixel that is located within a preset radius range of the position coordinates in the satellite remote sensing image to be restored and belongs to the valid pixels, and randomly select a preset number of pixels from the valid pixels as second restoration source pixels, and then use the first restoration source pixel and the second restoration source pixels as the restoration source pixels of the current pixel to be restored, where the second restoration source pixels are different from the first restoration source pixels;

[0021] A calculation and filling unit, configured to calculate the difference degree between the current pixel to be restored and each of the restoration source pixels, and fill the pixel value of the target restoration source pixel with the smallest difference degree as the pixel value of the current pixel to be restored to the position coordinates, and update the valid pixels until each current pixel to be restored in the pixels to be restored that are cycled multiple times is traversed, so as to obtain a restored image corresponding to the satellite remote sensing image to be restored.

[0022] Further, the random sorting and generation unit is further configured to:

[0023] Determine the pixels to be restored in the current cycle according to the randomly sorted pixels to be restored, where the pixels to be restored in the current cycle are the first (1 / 2)^n of the randomly sorted pixels to be restored, and n represents the number of cycles; n of the randomly sorted pixels to be restored, and n represents the number of cycles;

[0024] Append the pixels to be restored in the current cycle to the tail of the pixels to be restored obtained in the previous cycle to obtain the pixels to be restored obtained in the current cycle until the number of the pixels to be restored in the current cycle is 1, and use the pixels to be restored obtained in the last cycle as the pixels to be restored that are cycled multiple times.

[0025] Further, the calculation and filling unit is further configured to:

[0026] According to the difference calculation formula Calculate the difference between the current pixel to be repaired and each of the repair source pixels. Among them, g represents the difference between the current pixel to be repaired and one of the repair source pixels, Nb represents the set of valid pixels within the preset radius range of the current pixel to be repaired, and w i represents the weight value of the two-dimensional Gaussian distribution, and a i represents the pixel value of the valid pixels within the preset radius range of the current pixel to be repaired, and b i represents the pixel value of the valid pixels within the preset radius range of the repair source pixel, dx and dy represent the relative positions of the position coordinates of the valid pixels within the preset radius range of the repair source pixel relative to the position coordinates of the current pixel to be repaired, and σ = R 2 , and R represents within the preset radius range.

[0027] In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the method according to any one of the above first aspects are implemented.

[0028] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and run by a processor, the machine-executable instructions cause the processor to run the method according to any one of the above first aspects.

[0029] In an embodiment of the present invention, a method for repairing satellite remote sensing images is provided, including: obtaining a satellite remote sensing image to be repaired, and determining the pixels to be repaired and valid pixels in the satellite remote sensing image to be repaired, where the pixels to be repaired include: signal saturation pixels and missing measurement pixels; randomly sorting the pixels to be repaired to obtain the randomly sorted pixels to be repaired, and generating the pixels to be repaired that are cycled multiple times according to the randomly sorted pixels to be repaired; traversing each current pixel to be repaired in the pixels to be repaired that are cycled multiple times, determining a first repair source pixel that is located within a preset radius range of the position coordinates in the satellite remote sensing image to be repaired and belongs to the valid pixels, and randomly selecting a preset number of pixels from the valid pixels as the second repair source pixels, and then using the first repair source pixel and the second repair source pixels as the repair source pixels of the current pixel to be repaired, where the second repair source pixels are different from the first repair source pixels; calculating the difference degree between the current pixel to be repaired and each repair source pixel, and filling the pixel value of the target repair source pixel with the smallest difference degree into the position coordinates as the pixel value of the current pixel to be repaired, and updating the valid pixels until each current pixel to be repaired in the pixels to be repaired that are cycled multiple times is traversed, so as to obtain a repaired image corresponding to the satellite remote sensing image to be repaired. From the above description, it can be seen that the method for repairing satellite remote sensing images of the present invention adopts a technology of repairing multiple times in a cycle (because the pixels to be repaired that are cycled multiple times are generated), and the repair effect is good. Moreover, when repairing, it is realized according to the difference degree between the current pixel to be repaired and each repair source pixel. The data volume of the repair source pixels is relatively small compared to the data volume of the entire satellite remote sensing image to be repaired. Therefore, the calculation amount is small, the processing speed is fast. In addition, the repair source pixels are derived from the satellite remote sensing image to be repaired itself, and no additional samples and external images are required, which alleviates the technical problems of large calculation amount, slow processing speed, and complex data preparation in the traditional method for repairing satellite remote sensing images. Description of the Drawings

[0030] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0031] Figure 1 It is a flowchart of a method for repairing a satellite remote sensing image provided by an embodiment of the present invention;

[0032] Figure 2 It is a schematic diagram of a satellite remote sensing image to be repaired provided by an embodiment of the present invention;

[0033] Figure 3Schematic diagram of the restored image corresponding to the satellite remote sensing image to be restored provided by the embodiment of the present invention;

[0034] Figure 4 Schematic diagram of a satellite remote sensing image restoration device provided by the embodiment of the present invention;

[0035] Figure 5 Schematic diagram of an electronic device provided by the embodiment of the present invention. Detailed implementation manners

[0036] Next, the technical solutions of the present invention will be described clearly and completely in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0037] Traditional methods for restoring satellite remote sensing images have large computational amounts, slow processing speeds, and complex data preparation.

[0038] Based on this, the satellite remote sensing image restoration method of the present invention adopts a cyclic multiple restoration technique (because multiple cyclic pixels to be restored are generated), and the restoration effect is good. Moreover, during the restoration process, it is realized based on the difference degree between the current pixel to be restored and each restoration source pixel. The data volume of the restoration source pixels is relatively small compared to the data volume of the entire satellite remote sensing image to be restored. Therefore, the computational amount is small and the processing speed is fast. In addition, the restoration source pixels are derived from the satellite remote sensing image to be restored itself, and no additional samples and external images are required.

[0039] To facilitate the understanding of this embodiment, first, a satellite remote sensing image restoration method disclosed in the embodiment of the present invention will be introduced in detail.

[0040] Embodiment 1:

[0041] According to the embodiment of the present invention, an embodiment of a satellite remote sensing image restoration method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0042] Figure 1 is a flowchart of a satellite remote sensing image restoration method according to the embodiment of the present invention. As Figure 1 shown, the method includes the following steps:

[0043] Step S102: Obtain the satellite remote sensing image to be repaired, and determine the pixels to be repaired and the valid pixels in the satellite remote sensing image to be repaired. Among them, the pixels to be repaired include saturated signal pixels and missing measurement pixels.

[0044] In the embodiments of the present invention, the above satellite remote sensing image to be repaired is a satellite remote sensing observation image in the unsigned 16-bit integer pixel format. The above pixels to be repaired include two categories: saturated signal pixels and missing measurement pixels caused by imaging instrument problems. If the satellite remote sensing image to be repaired is not in the unsigned 16-bit integer pixel format, the satellite remote sensing image to be repaired is converted into the unsigned 16-bit integer pixel format for storage. Then, the saturated signal pixels and the missing measurement pixels are uniformly marked as pixels to be repaired with the pixel value of 65535, and the pixels corresponding to other pixel values are valid pixels.

[0045] When implemented, the data provider will give the descriptions corresponding to the pixel values in each range in the satellite remote sensing image to be repaired. For example, the pixels corresponding to the pixel values in the range of A1 - A2 are saturated signal pixels, the pixels corresponding to the pixel values in the range of A2 - A3 are valid pixels, and the pixels corresponding to the pixel values in the range of A3 - A4 are missing measurement pixels.

[0046] In the above process, the saturated signal pixels and the missing measurement pixels are uniformly marked as pixels to be repaired with the pixel value of 65535, so that it is possible to judge whether each pixel of the image is a pixel to be repaired (judge whether it is a pixel to be repaired according to whether it is the pixel value of 65535. When implemented, start scanning row by row from the pixel in the first row and the first column until the pixel in the last row and the last column is scanned). If it is a pixel to be repaired, record the row and column position information (x, y) of the pixel in the satellite remote sensing image to be repaired, that is, the position coordinates. These pixels are used as the set N of pixels to be repaired. For the valid pixels, record their row and column position information in the satellite remote sensing image to be repaired as well. These pixels are used as the set S of valid pixels.

[0047] Step S104: Randomly sort the pixels to be repaired to obtain the randomly sorted pixels to be repaired, and generate the pixels to be repaired that loop multiple times according to the randomly sorted pixels to be repaired.

[0048] Specifically, the pixels to be repaired obtained in the above process have a certain order information because they are obtained by scanning row by row. In order to reduce the obvious sequential repair traces in the repair result, the pixels to be repaired are randomly sorted to obtain the randomly sorted pixels to be repaired, that is, the randomly sorted set N0 of pixels to be repaired.

[0049] The local texture features of the image are an important basis for image repair. When performing image repair, it can be repaired by one pixel or by a small piece of image. The present invention adopts one-pixel repair.

[0050] The inventor considered that each time a to-be-repaired pixel A was selected in sequence from the randomly sorted to-be-repaired pixels, and the pixel closest to the texture features around the position of A was found from the set S of valid pixels as the optimal matching pixel for filling. In the initial stage of the algorithm, since there were few or no surrounding pixels of A, the optimal pixel selected from the valid pixels could not produce good results. Therefore, in the present invention, the first part of the to-be-repaired pixels in the randomly sorted to-be-repaired pixels (i.e., the to-be-repaired pixels in the front part of the randomly sorted to-be-repaired pixels) were repeatedly added to the tail of the randomly sorted to-be-repaired pixels to obtain the to-be-repaired pixels that were cycled multiple times, so as to realize multiple repairs of these first part of the to-be-repaired pixels. This process will be described in detail below and will not be elaborated here.

[0051] Step S106: Traverse each current to-be-repaired pixel in the to-be-repaired pixels that are cycled multiple times, determine the first repair source pixel that is located within the preset radius range of the position coordinates in the to-be-repaired satellite remote sensing image and belongs to the valid pixels, and randomly select a preset number of pixels from the valid pixels as the second repair source pixel. Then, use the first repair source pixel and the second repair source pixel as the repair source pixels of the current to-be-repaired pixel, where the second repair source pixel is different from the first repair source pixel.

[0052] Specifically, there are two ways for the traditional image repair method to obtain the repair source pixels. One is the to-be-repaired satellite remote sensing image, and the other is the sample image. The problem with the former is that the global search for the optimal matching point causes a large amount of calculation and low processing efficiency; the problem with the latter is that it is necessary to find suitable samples or provide a large number of samples for training, resulting in more time required for sample preparation and model training.

[0053] To avoid the deficiencies of the above methods, the present invention uses the to-be-repaired satellite remote sensing image as the source of the repair source pixels, that is, the set S of valid pixels mentioned above. This avoids the work of constructing samples. At the same time, the single observation and imaging geometry and sunshine conditions of the satellite remote sensing image have a large relationship. Searching for the repair source pixels from the image itself (i.e., the to-be-repaired satellite remote sensing image) can minimize the differences brought by external samples. On the other hand, to avoid the time-consuming operation of global searching for the optimal matching point, the present invention adopts the method of neighborhood (i.e., the first repair source pixel) and random finite global sample set (i.e., the second repair source pixel) to reduce the calculation time of matching sample points. That is, according to the position coordinates of the current to-be-repaired pixel in the to-be-repaired satellite remote sensing image, the first repair source pixel that is located within the preset radius range of the position coordinates and belongs to the valid pixels is determined, and a preset number of pixels (and pixels different from the first repair source pixel) are randomly selected from the valid pixels as the second repair source pixel. Then, the first repair source pixel and the second repair source pixel are used as the repair source pixels of the current to-be-repaired pixel.

[0054] The specific method is as follows: (1) Select the pixels within the range of radius R (i.e., the preset radius range) around the position coordinates (x, y) of the pixel A to be repaired and in the effective pixel set S as the first repair source pixel set SUB1; (2) Randomly select M pixels from the effective pixel set S (here S refers to the S except SUB1, aiming to ensure that there are no duplicate pixels between SUB1 and SUB2) as the second repair source pixel set SUB2. SUB1 and SUB2 together form the repair source pixel set SUB for the pixel A to be repaired. The specific values of R and M need to be adjusted according to the size of the satellite remote sensing image to be repaired. Taking a 1200x1200 satellite remote sensing image to be repaired as an example, R = 6 and M = 144 can achieve better results.

[0055] In step S108, calculate the difference degree between the current pixel to be repaired and each repair source pixel, and fill the pixel value of the target repair source pixel with the smallest difference degree into the position coordinates as the pixel value of the current pixel to be repaired, and update the effective pixels until each current pixel to be repaired in the pixels to be repaired that are looped through multiple times is traversed, obtaining the repaired image corresponding to the satellite remote sensing image to be repaired.

[0056] Specifically, after the current pixel to be repaired is repaired, it is placed in the effective pixel set as an effective pixel (that is, the next repair is based on the result of the previous repair), and then the repair source pixel of the next pixel to be repaired is determined, and the subsequent repair process is executed.

[0057] In an embodiment of the present invention, a method for repairing satellite remote sensing images is provided, including: obtaining a satellite remote sensing image to be repaired, and determining the pixels to be repaired and valid pixels in the satellite remote sensing image to be repaired, where the pixels to be repaired include: signal saturation pixels and missing measurement pixels; randomly sorting the pixels to be repaired to obtain the randomly sorted pixels to be repaired, and generating the pixels to be repaired that are cycled multiple times according to the randomly sorted pixels to be repaired; traversing each current pixel to be repaired in the pixels to be repaired that are cycled multiple times, determining a first repair source pixel that is located within a preset radius range of the position coordinates in the satellite remote sensing image to be repaired and belongs to the valid pixels, and randomly selecting a preset number of pixels from the valid pixels as the second repair source pixels, and then using the first repair source pixel and the second repair source pixels as the repair source pixels of the current pixel to be repaired, where the second repair source pixel is different from the first repair source pixel; calculating the difference degree between the current pixel to be repaired and each repair source pixel, and filling the pixel value of the target repair source pixel with the smallest difference degree into the position coordinates as the pixel value of the current pixel to be repaired, and updating the valid pixels until each current pixel to be repaired in the pixels to be repaired that are cycled multiple times is traversed, so as to obtain a repaired image corresponding to the satellite remote sensing image to be repaired. It can be seen from the above description that the method for repairing satellite remote sensing images of the present invention adopts a repair technology that cycles multiple times (because the pixels to be repaired that are cycled multiple times are generated), and the repair effect is good. Moreover, when performing the repair, it is realized according to the difference degree between the current pixel to be repaired and each repair source pixel. The data volume of the repair source pixels is relatively small compared to the data volume of the entire satellite remote sensing image to be repaired. Therefore, the calculation amount is small, the processing speed is fast. In addition, the repair source pixels are derived from the satellite remote sensing image to be repaired itself, and no additional samples and external images are required, which alleviates the technical problems of large calculation amount, slow processing speed, and complex data preparation in the traditional method for repairing satellite remote sensing images.

[0058] The above content briefly introduces the method for repairing satellite remote sensing images of the present invention, and the following will describe the specific content involved in detail.

[0059] In an optional embodiment of the present invention, generating the pixels to be repaired that are cycled multiple times according to the randomly sorted pixels to be repaired specifically includes the following steps:

[0060] (1) Determine the pixels to be repaired in the current cycle according to the randomly sorted pixels to be repaired, where the pixels to be repaired in the current cycle are the first (1 / 2) n of the randomly sorted pixels to be repaired, and n represents the number of cycles;

[0061] (2) Append the pixels to be repaired in the current loop to the end of the pixels to be repaired obtained in the previous loop to obtain the pixels to be repaired in the current loop until the number of pixels to be repaired in the current loop is 1, and use the pixels to be repaired obtained in the last loop as the pixels to be repaired after multiple loops.

[0062] Specifically, according to the order of the pixels to be repaired in the set N0 of pixels to be repaired after random sorting, select the first half of the pixels to be repaired in N0, and then append them to the end of N0 in order to form the set N1 of pixels to be repaired after one loop. Then select the first quarter of the pixels to be repaired in N0 and append them to the end of N1 in order to form the set N2 of pixels to be repaired after two loops, and so on. Each time, take the first half of the pixels appended in the previous time and append them to the data to be repaired until there is only one appended pixel. Form the final set (NN) of pixels to be repaired after multiple loops according to the above operations.

[0063] In an alternative embodiment of the present invention, calculating the difference degree between the current pixel to be repaired and each repair source pixel specifically includes the following steps:

[0064] According to the difference degree calculation formula Calculate the difference degree between the current pixel to be repaired and each repair source pixel, where g represents the difference degree between the current pixel to be repaired and a repair source pixel, Nb represents the set of valid pixels within the preset radius range of the current pixel to be repaired, w i represents the weight value of the two-dimensional Gaussian distribution, a i represents the pixel value of the valid pixels within the preset radius range of the current pixel to be repaired, b i represents the pixel value of the valid pixels within the preset radius range of the repair source pixel, dx and dy represent the relative positions of the position coordinates of the valid pixels within the preset radius range of the repair source pixel relative to the position coordinates of the current pixel to be repaired, σ = R 2 and R represents within the preset radius range.

[0065] For better understanding of this process, the following is an example for illustration:

[0066] Assume that the current pixel to be repaired is A, the preset radius range is 1, and there are 8 valid pixels within one pixel radius range of the current pixel to be repaired A, which are located above, below, left, right, upper left, upper right, lower left, and lower right of the current pixel to be repaired A. The number of valid pixels randomly selected from the valid pixels is 144, so there are a total of 152 repair source pixels for the current pixel to be repaired A.

[0067] a iThese are 8 valid pixels within the pixel radius of the current pixel A to be repaired, b i These are 8 valid pixels (above, below, left, right, upper left, upper right, lower left, and lower right) within the pixel radius of a repair source pixel among 152 repair source pixels. Calculate the above a i and b i Calculate the square of the difference between the pixel values at the corresponding positions (for example, calculate the square of the difference between the pixel value above and the pixel value above, the square of the difference between the pixel value below and the pixel value below, etc., and finally find their weighted sum). Finally, find their weighted sum to obtain the difference degree between the current pixel A to be repaired and a repair source pixel. Then, solve the difference degrees between the current pixel A to be repaired and other repair source pixels. In this way, 152 difference degrees can be solved.

[0068] The present invention proposes technical methods such as random sampling, repairing based on the characteristics of the image itself, and repairing in multiple cycles, achieving relatively good effects in terms of processing efficiency and processing effect. The above process has a small amount of calculation, a fast processing speed, and the repair source pixels are from the satellite remote sensing image to be repaired itself, without the need for additional samples and external images. Figure 2 Figure shows a schematic diagram of the satellite remote sensing image to be repaired. Figure 3 Figure shows a schematic diagram of the repaired image corresponding to the satellite remote sensing image to be repaired. It can be seen that the method of the present invention has a good repair effect.

[0069] Embodiment 2:

[0070] The embodiment of the present invention also provides a repair device for satellite remote sensing images. The repair device for satellite remote sensing images is mainly used to execute the method for repairing satellite remote sensing images provided in Embodiment 1 of the present invention. The following is a specific introduction to the repair device for satellite remote sensing images provided in the embodiment of the present invention.

[0071] Figure 4 is a schematic diagram of a repair device for satellite remote sensing images according to an embodiment of the present invention. As Figure 4 shown, the device mainly includes: an acquisition and determination unit 10, a random sorting and generation unit 20, a determination unit 30, and a calculation and filling unit 40, where:

[0072] The acquisition and determination unit is used to acquire the satellite remote sensing image to be repaired and determine the pixels to be repaired and valid pixels in the satellite remote sensing image to be repaired. Among them, the pixels to be repaired include: signal saturation pixels and missing measurement pixels;

[0073] The random sorting and generation unit is used to randomly sort the pixels to be repaired to obtain the randomly sorted pixels to be repaired, and generate the pixels to be repaired in multiple cycles according to the randomly sorted pixels to be repaired;

[0074] A determination unit is configured to traverse each current pixel to be repaired among the pixels to be repaired that are looped multiple times, determine a first repair source pixel that is located within a preset radius range of the position coordinates and belongs to valid pixels according to the position coordinates of the current pixel to be repaired in the satellite remote sensing image to be repaired, and randomly select a preset number of pixels from the valid pixels as second repair source pixels. Furthermore, the first repair source pixel and the second repair source pixels are used as the repair source pixels of the current pixel to be repaired, wherein the second repair source pixel is different from the first repair source pixel.

[0075] A calculation and filling unit is configured to calculate the difference degree between the current pixel to be repaired and each repair source pixel, and fill the pixel value of the target repair source pixel with the smallest difference degree as the pixel value of the current pixel to be repaired into the position coordinates, and update the valid pixels until each current pixel to be repaired among the pixels to be repaired that are looped multiple times is traversed, so as to obtain a repaired image corresponding to the satellite remote sensing image to be repaired.

[0076] In an embodiment of the present invention, a repair device for a satellite remote sensing image is provided, including: obtaining a satellite remote sensing image to be repaired, and determining the pixels to be repaired and valid pixels in the satellite remote sensing image to be repaired, wherein the pixels to be repaired include: signal saturation pixels and missing measurement pixels; randomly sorting the pixels to be repaired to obtain the randomly sorted pixels to be repaired, and generating the pixels to be repaired that are looped multiple times according to the randomly sorted pixels to be repaired; traversing each current pixel to be repaired among the pixels to be repaired that are looped multiple times, determining a first repair source pixel that is located within a preset radius range of the position coordinates and belongs to valid pixels according to the position coordinates of the current pixel to be repaired in the satellite remote sensing image to be repaired, and randomly selecting a preset number of pixels from the valid pixels as second repair source pixels. Furthermore, the first repair source pixel and the second repair source pixels are used as the repair source pixels of the current pixel to be repaired, wherein the second repair source pixel is different from the first repair source pixel; calculating the difference degree between the current pixel to be repaired and each repair source pixel, and filling the pixel value of the target repair source pixel with the smallest difference degree as the pixel value of the current pixel to be repaired into the position coordinates, and updating the valid pixels until each current pixel to be repaired among the pixels to be repaired that are looped multiple times is traversed, so as to obtain a repaired image corresponding to the satellite remote sensing image to be repaired. It can be seen from the above description that the repair device for the satellite remote sensing image of the present invention adopts a repair technology of looping multiple times (because the pixels to be repaired that are looped multiple times are generated), and the repair effect is good. Moreover, when performing repair, it is realized according to the difference degree between the current pixel to be repaired and each repair source pixel. The data volume of the repair source pixels is relatively small compared with the data volume of the entire satellite remote sensing image to be repaired. Therefore, the calculation amount is small, the processing speed is fast. In addition, the repair source pixels are derived from the satellite remote sensing image to be repaired itself, and no additional samples and external images are required, alleviating the technical problems of large calculation amount, slow processing speed, and complex data preparation in the traditional repair method of satellite remote sensing images.

[0077] Optionally, the random sorting and generating unit is further configured to: determine the pixels to be repaired in the current cycle according to the pixels to be repaired after random sorting, where the pixels to be repaired in the current cycle are the first (1 / 2) n of the pixels to be repaired after random sorting, and n represents the number of cycles; append the pixels to be repaired in the current cycle to the end of the pixels to be repaired obtained in the previous cycle to obtain the pixels to be repaired obtained in the current cycle until the number of the pixels to be repaired in the current cycle is 1, and use the pixels to be repaired obtained in the last cycle as the pixels to be repaired after multiple cycles.

[0078] Optionally, the calculating and filling unit is further configured to: calculate the difference degree between the current pixel to be repaired and each repair source pixel according to the difference degree calculation formula where g represents the difference degree between the current pixel to be repaired and a repair source pixel, Nb represents the set of valid pixels within the preset radius range of the current pixel to be repaired, and w i represents the weight value of the two-dimensional Gaussian distribution, a i represents the pixel value of the valid pixels within the preset radius range of the current pixel to be repaired, b i represents the pixel value of the valid pixels within the preset radius range of the repair source pixel, dx and dy represent the relative positions of the position coordinates of the valid pixels within the preset radius range of the repair source pixel relative to the position coordinates of the current pixel to be repaired, and σ = R 2 where R represents within the preset radius range.

[0079] Optionally, the preset radius range and the preset quantity are related to the size of the satellite remote sensing image to be repaired.

[0080] Optionally, the satellite remote sensing image to be repaired is a satellite remote sensing observation image in unsigned 16-bit integer pixel format.

[0081] The device provided in the embodiments of the present invention has the same implementation principle and the same technical effects as those of the foregoing method embodiments. For the sake of brief description, for the parts not mentioned in the device embodiments, reference may be made to the corresponding contents in the foregoing method embodiments.

[0082] As Figure 5 shown, an electronic device 600 provided in an embodiment of the present application includes: a processor 601, a memory 602, and a bus. The memory 602 stores machine-readable instructions executable by the processor 601. When the electronic device runs, the processor 601 communicates with the memory 602 through the bus, and the processor 601 executes the machine-readable instructions to perform the steps of the method for repairing a satellite remote sensing image as described above.

[0083] Specifically, the above-mentioned memory 602 and processor 601 can be general-purpose memory and processor, which are not specifically limited here. When the processor 601 runs the computer program stored in the memory 602, it can execute the above-mentioned satellite remote sensing image restoration method.

[0084] The processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor 601 or instructions in the form of software. The above-mentioned processor 601 can be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it can also be a digital signal processor (DSP for short), an application specific integrated circuit (ASIC for short), a field-programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed by the hardware decoding processor, or executed by a combination of the hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. This storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602 and combines its hardware to complete the steps of the above method.

[0085] Corresponding to the above-mentioned satellite remote sensing image restoration method, the embodiments of the present application also provide a computer-readable storage medium, which stores machine-executable instructions. When the computer-executable instructions are called and run by the processor, the computer-executable instructions cause the processor to run the steps of the above-mentioned satellite remote sensing image restoration method.

[0086] The satellite remote sensing image restoration device provided by the embodiments of the present application can be specific hardware on the device, or software or firmware installed on the device, etc. The device provided by the embodiments of the present application has the same implementation principle and technical effects as those of the foregoing method embodiments. For the sake of brief description, for the parts not mentioned in the device embodiments, reference can be made to the corresponding content in the foregoing method embodiments. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the foregoing described systems, devices, and units can all refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0087] In the embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling, direct coupling, or communication connection between each other can be through some communication interfaces. The indirect coupling or communication connection of the devices or units can be in electrical, mechanical, or other forms.

[0088] For another example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of the devices, methods, and computer program products according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementation manners, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of the blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0089] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0090] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, may exist physically alone for each unit, or two or more units may be integrated into one unit.

[0091] If the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this 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 for causing an electronic device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the satellite remote sensing image restoration method described in each embodiment of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.

[0092] It should be noted that: similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. In addition, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0093] Finally, it should be noted that: the above-mentioned embodiments are only specific implementation manners of the present application, used to illustrate the technical solutions of the present application, rather than limiting them. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed in the present application can still modify the technical solutions recorded in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes, or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application. All should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for repairing satellite remote sensing images, characterized in that: include: Acquire a satellite remote sensing image to be repaired, and determine pixels to be repaired and valid pixels in the satellite remote sensing image to be repaired, wherein the pixels to be repaired include: signal saturated pixels and missing pixels; Randomly sorting the pixels to be repaired to obtain randomly sorted pixels to be repaired, and generating pixels to be repaired that are cycled multiple times based on the randomly sorted pixels to be repaired; Traversing each current pixel to be repaired among the pixels to be repaired that have been cycled multiple times, determining a first repair source pixel that is located within a preset radius of the position coordinates and belongs to the valid pixel according to the position coordinates of the current pixel to be repaired in the satellite remote sensing image to be repaired, and randomly selecting a preset number of pixels from the valid pixels as second repair source pixels, and then using the first repair source pixel and the second repair source pixel as repair source pixels of the current pixel to be repaired, wherein the second repair source pixel is different from the first repair source pixel; Calculate the difference between the current pixel to be repaired and each of the repair source pixels, and use the pixel value of the target repair source pixel with the smallest difference as the pixel value of the current pixel to be repaired to fill the position coordinate, and update the valid pixels until each current pixel to be repaired in the pixels to be repaired of the multiple cycles is traversed to obtain a repaired image corresponding to the satellite remote sensing image to be repaired; The method of generating pixels to be repaired for multiple cycles according to the randomly sorted pixels to be repaired includes: Determine the pixels to be repaired in the current cycle according to the randomly sorted pixels to be repaired, wherein the pixels to be repaired in the current cycle are the first (1 / 2) of the pixels to be repaired in the randomly sorted pixels. n The pixels to be repaired after random sorting, n represents the number of cycles; The pixels to be repaired in the current cycle are appended to the end of the pixels to be repaired obtained in the previous cycle to obtain the pixels to be repaired in the current cycle, until the number of pixels to be repaired in the current cycle is 1, and the pixels to be repaired obtained in the last cycle are used as the pixels to be repaired in the multiple cycles.

2. The method according to claim 1, characterized in that Calculating the difference between the current pixel to be repaired and each of the repair source pixels includes: Calculation formula based on difference Calculate the difference between the current pixel to be repaired and each of the repair source pixels, where g represents the difference between the current pixel to be repaired and one of the repair source pixels, Nb represents the set of valid pixels within a preset radius of the current pixel to be repaired, and w i Represents the weight value of the two-dimensional Gaussian distribution, a i represents the pixel value of the valid pixel within the preset radius of the current pixel to be repaired, b i represents the pixel value of the valid pixel within the preset radius of the repair source pixel, dx and dy represent the relative positions of the position coordinates of the effective pixels within the preset radius of the repair source pixel relative to the position coordinates of the current pixel to be repaired, σ=R 2 , R represents the preset radius range.

3. The method according to claim 1, characterized in that The preset radius range and the preset number are related to the size of the satellite remote sensing image to be restored.

4. The method according to claim 1, characterized in that The satellite remote sensing image to be repaired is a satellite remote sensing observation image in an unsigned 16-bit integer pixel format.

5. A satellite remote sensing image restoration device, characterized in that: include: An acquisition and determination unit, used for acquiring a satellite remote sensing image to be repaired, and determining pixels to be repaired and valid pixels in the satellite remote sensing image to be repaired, wherein the pixels to be repaired include: signal saturated pixels and missing pixels; A random sorting and generating unit, used for randomly sorting the pixels to be repaired to obtain randomly sorted pixels to be repaired, and generating pixels to be repaired for multiple cycles based on the randomly sorted pixels to be repaired; a determining unit, configured to traverse each current pixel to be repaired among the pixels to be repaired that have been circulated multiple times, determine, according to the position coordinates of the current pixel to be repaired in the satellite remote sensing image to be repaired, a first repair source pixel that is located within a preset radius of the position coordinates and belongs to the valid pixel, and randomly select a preset number of pixels from the valid pixels as second repair source pixels, and then use the first repair source pixel and the second repair source pixel as repair source pixels of the current pixel to be repaired, wherein the second repair source pixel is different from the first repair source pixel; A calculation and filling unit, used for calculating the difference between the current pixel to be repaired and each of the repair source pixels, and filling the position coordinate with the pixel value of the target repair source pixel with the smallest difference as the pixel value of the current pixel to be repaired, and updating the valid pixels, until each current pixel to be repaired in the pixels to be repaired of the multiple cycles is traversed, so as to obtain a repaired image corresponding to the satellite remote sensing image to be repaired; Wherein, the random sorting and generating unit is also used for: Determine the pixels to be repaired in the current cycle according to the randomly sorted pixels to be repaired, wherein the pixels to be repaired in the current cycle are the first (1 / 2) of the pixels to be repaired in the randomly sorted pixels. n The pixels to be repaired after random sorting, n represents the number of cycles; The pixels to be repaired in the current cycle are appended to the end of the pixels to be repaired obtained in the previous cycle to obtain the pixels to be repaired in the current cycle, until the number of pixels to be repaired in the current cycle is 1, and the pixels to be repaired obtained in the last cycle are used as the pixels to be repaired in the multiple cycles.

6. The device according to claim 5, characterized in that The calculation and filling unit is also used for: Calculation formula based on difference Calculate the difference between the current pixel to be repaired and each of the repair source pixels, where g represents the difference between the current pixel to be repaired and one of the repair source pixels, Nb represents the set of valid pixels within a preset radius of the current pixel to be repaired, and w i Represents the weight value of the two-dimensional Gaussian distribution, a i represents the pixel value of the valid pixel within the preset radius of the current pixel to be repaired, b i represents the pixel value of the valid pixel within the preset radius of the repair source pixel, dx and dy represent the relative positions of the position coordinates of the effective pixels within the preset radius of the repair source pixel relative to the position coordinates of the current pixel to be repaired, σ=R 2 , R represents the preset radius range.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Image processing method and device, terminal and storage medium

    CN111062924A

  • Pixel repairing method and device, electronic equipment and computer readable storage medium

    CN112651897A