A method, system, electronic device and medium for repairing satellite images

By loading and analyzing the attribute parameters of satellite images, a mask is generated to cover the original picture, which solves the problems of color differences and high hardware requirements when stitching satellite images in the prior art, and achieves efficient and accurate image repair and stitching.

CN118379221BActive Publication Date: 2025-03-21BEIJING REALFLY AVIATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410149421.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-02
Publication Date
2025-03-21
Estimated Expiration
2044-02-02

AI Technical Summary

Technical Problem

The prior art has problems such as color differences in processing and splicing satellite images, resulting in poor results, high computer hardware requirements, time-consuming manual processing and large amount of AI model training data.

Method used

By loading the original and target satellite images, obtain relevant attribute parameters of the target image, determine its overall style, and generate a mask to cover the original image, thereby repairing the target image.

Benefits of technology

It realizes efficient repair of satellite images without a lot of manual energy and hardware resources, reduces computer performance requirements, improves splicing accuracy, and is simple and easy to learn.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118379221B_ABST
    Figure CN118379221B_ABST
Patent Text Reader

Abstract

The present invention relates to a method, system, electronic device and medium for repairing satellite images, the method comprising: loading an original satellite image and a target satellite image, and obtaining relevant attribute parameters of the target satellite image; using relevant attribute parameters to determine the overall style of the target satellite image; determining a mask covering the original image according to the overall style; using the mask to repair and restore the target image, thereby achieving the repair of the target satellite image. Compared with the prior art, the present invention does not require artists to spend a lot of energy on image processing; does not require a large amount of data and time to train AI generation models; has low requirements on computer hardware, only requires certain software processing capabilities, and has high accuracy, and can be adjusted by manually adjusting subtle parameters by personnel (even non-professional artists can easily learn and adjust).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] For earth simulation-related industries, a large number of images taken by satellites (referred to as satellite images) are needed in the process of scene construction. However, there may be errors in online resources or differences in the colors of satellite images of different regions, resulting in poor overall effects and basically unable to be used in combination.

[0003] The existing technology uses computer processing, but the amount of satellite image data is large (starting from tens of millions), and it takes a lot of time to manually find the problematic parts. In addition, processing a large number of satellite images at the same time places great demands on the computer's own memory and hard disk storage, which invisibly increases costs. It is difficult to adjust the image in reverse, and artists also need a lot of energy to process the image. Another approach is to train AI, but it requires a lot of data and time to generate a model, and the satellite images can only be processed one by one through the generated model, which will cause errors in the pictures that should be spliced ​​together, and ultimately lead to low accuracy. Summary of the invention

[0004] In order to overcome the problems existing in the prior art, the present invention provides a method, system, electronic device and medium for repairing satellite images, which are used to overcome the current defects.

[0005] A method for repairing satellite images, the method comprising the steps of:

[0006] S1. Load the original satellite image and the target satellite image, and obtain the relevant attribute parameters of the target satellite image;

[0007] S2. Determine the overall style of the target satellite image using relevant attribute parameters;

[0008] S3. Determine a mask covering the original satellite image according to the overall style;

[0009] S4. Use the mask to repair and restore the target satellite image, thereby achieving repair of the target satellite image.

[0010] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the target satellite image is an image having a color difference relative to the original satellite image.

[0011] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein S2 includes:

[0012] S21. Obtaining the style value of the vertical pixels of a row of the target satellite image according to the relevant attribute parameters;

[0013] S22. Sum the style values ​​of all vertical pixels to obtain a style value representing the overall style.

[0014] According to the above aspects and any possible implementation, an implementation is further provided, wherein S21 is specifically:

[0015]

[0016] ,in:

[0017] pixel xy It represents the pixel value at the coordinate [x, y], which is a quaternion;

[0018] image_x: is the horizontal pixel number of the target satellite image;

[0019] coefficient: color compensation coefficient, the value range is (0,1);

[0020] light: light compensation coefficient, the value range is [0,1];

[0021] compensation: image degree compensation coefficient, the value range is [0,1];

[0022] Style y : The style value of the pixels in the yth row, a coordinate system is established with the lower left corner of the entire image of the target satellite image as the origin, where the right direction is the positive x direction and the upward direction is the positive y direction.

[0023] According to the above aspects and any possible implementation, an implementation is further provided, further comprising: S22 specifically comprises: ,

[0024] Among them, image_y is the number of all horizontal pixels of the image of the target satellite image, is the final value.

[0025] According to the above aspects and any possible implementation, an implementation is further provided, wherein S3 specifically includes:

[0026] S31. Generate several masks;

[0027] S32. Superimposing or overlaying each mask onto the original satellite image to generate a new image;

[0028] S33. Calculate the final value of the new image, and calculate the square difference between the final value and the final value of the target satellite image. When the result is less than or equal to the set threshold, the corresponding mask is valid;

[0029] S34. Repeat steps S32 and S33 to obtain all valid masks.

[0030] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein the set threshold is 0.05.

[0031] The present invention also provides a system for repairing satellite images, wherein the system implements the method described above and comprises the following modules:

[0032] A loading module, used to load the original satellite image and the target satellite image, and obtain relevant attribute parameters of the target satellite image;

[0033] A style determination module, used to determine the overall style of the target satellite image using relevant attribute parameters;

[0034] A mask generation module, used for determining a mask to be covered on the original satellite image according to the overall style;

[0035] The repair and restoration module is used to use the mask to repair and restore the target satellite image, thereby realizing the repair of the target satellite image.

[0036] The present invention further provides an electronic device, comprising:

[0037] A memory storing executable instructions;

[0038] A processor is used to execute the executable instructions in the memory to implement the method.

[0039] The present invention also provides a computer storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method described.

[0040] Beneficial effects of the present invention

[0041] Compared with the prior art, the present invention has the following beneficial effects:

[0042] (1) There is no need for artists to spend a lot of energy processing pictures;

[0043] (2) It does not require a large amount of data and time to train AI to generate models;

[0044] (3) The computer hardware requirements are low, and only certain software processing capabilities are required;

[0045] (4) It has high accuracy and can be operated by personnel. Even non-professional artists can easily learn and manually adjust subtle parameters. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 Schematic diagram of a picture taken by a satellite of the present invention, wherein the left side is an original picture and the right side is a target picture;

[0047] Figure 2 This is a schematic diagram of the effect of the mask of the present invention covering the original picture;

[0048] Figure 3 It is a schematic diagram of the integration of the original image and the restored target image of the present invention;

[0049] Figure 4 It is a schematic diagram of the method flow of the present invention. DETAILED DESCRIPTION

[0050] In order to better understand the technical solution of the present invention, the content of the present invention includes but is not limited to the specific implementation methods described below, and similar technologies and methods should be considered to be within the scope of protection of the present invention. In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments.

[0051] It should be clear that the embodiments described in the present invention are only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] like Figure 4 As shown, the present invention provides a method for repairing satellite images, the method comprising the steps of:

[0053] S1. Load the original satellite image and the target satellite image, and obtain the relevant attribute parameters of the target satellite image;

[0054] S2. Determine the overall style of the target satellite image using relevant attribute parameters;

[0055] S3. Determine a mask covering the original satellite image according to the overall style;

[0056] S4. Use the mask to repair and restore the target satellite image, thereby achieving repair of the target satellite image.

[0057] Preferably, the target satellite image is an image having a color difference with respect to the original satellite image, the original satellite image is an available image, and the target satellite image is an unavailable image and needs to be repaired and adjusted, that is, a image that needs to be repaired.

[0058] Preferably, S2 includes:

[0059] S21. Obtain the style value of the vertical pixels of a row of the target satellite image according to the relevant attribute parameters, and obtain the formula as follows:

[0060]

[0061] ,in:

[0062] pixel xy It represents the pixel value at the coordinate [x, y], which is a quaternion;

[0063] image_x: is the horizontal pixel number of the target satellite image;

[0064] coefficient: color compensation coefficient, the value range is (0,1);

[0065] light: light compensation coefficient, the value range is [0,1];

[0066] compensation: image degree compensation coefficient, the value range is [0,1];

[0067] : The style value of the pixels in the yth row, also a quaternion, with the lower left corner of the entire image of the target satellite image as the original coordinate system, where the right direction is the positive x direction and the upper direction is the positive y direction;

[0068] S22. Sum the style values ​​of all vertical pixels to obtain a style value representing the overall style. The formula is:

[0069] Among them, image_y is the number of all horizontal pixels of the image of the target satellite image, is the final value.

[0070] Preferably, S3 specifically includes:

[0071] S31. Generate several masks;

[0072] S32. Superimposing or overlaying each mask onto the original satellite image to generate a new image;

[0073] S33. Calculate the final value of the new image, and calculate the square difference between the final value and the final value of the target satellite image. When the result is less than or equal to the set threshold, the corresponding mask is valid;

[0074] S34. Repeat steps S32 and S33 to obtain all valid masks.

[0075] Specifically, the implementation process of the present invention is as follows:

[0076] 1. Load the reference image (referred to as the original image or original image) and the image to be repaired (referred to as the target image or target image), such as Figure 1 As shown, the satellite image on the left is the original image or the original satellite image, or is called an available satellite image, and the satellite image on the right is an unavailable satellite image or is called a target image, that is, a target satellite image.

[0077] 2. Calculate the overall style of the target image. Calculate using the following formula (1):

[0078] (1)

[0079] The instructions are as follows:

[0080] The entire target image establishes a coordinate system with its lower left corner as the origin, where the right direction is the positive x direction and the upward direction is the positive y direction;

[0081] Pixel: is the pixel value, x and y represent the coordinates, pixel xy It represents the pixel value at [x,y], which is a quaternion, that is, a type composed of four numbers is also called a quaternion, composed of four numbers [r,g,b,a], representing the values ​​corresponding to the four channels of color respectively. The value of the pixel is obtained by directly reading the pixel value of the corresponding point in the image.

[0082] image_x: The number of horizontal pixels of the target image, which can be obtained by the image resolution itself. For example, if the image resolution is 256*256, image_x is 256;

[0083] coefficient: color compensation coefficient, the value range is (0,1);

[0084] light: light compensation coefficient, the value range is [0,1];

[0085] compensation: image degree compensation (or transparency compensation) coefficient, value range [0,1];

[0086] is the style value of the pixels in the yth row, the style value is a quaternion, The type is the same as pixel, the value range of y is [0, image_x), and y is an integer.

[0087] Light compensation: The final image of a picture is affected by the light intensity. For example, when you look at a picture outdoors, the effect is different on a sunny day and a cloudy day, and the effect is also different in the early morning and at noon. Color compensation: It is used to assist light compensation. The main difference between the two is that the adjustment range of light compensation is large, and the adjustment range of color compensation is small. Light compensation can quickly adjust the color of the picture to the specified range, and color compensation can be fine-tuned on the basis of light compensation. Influence compensation: The calculated mask has color and transparency, corresponding to the a channel in the pixel. Different values ​​of the a channel correspond to different display effects, just like the same black sunglasses, some sunglasses look darker, and some look lighter. To obtain the style value This is to calculate the final value, which is calculated using the following formula (2):

[0088] (2)

[0089] Among them, image_y is the number of vertical pixels of the target image, is the final value;

[0090] 3: Write a program to calculate the mask (overlay the mask on the original image). According to the compensation requirements, under normal circumstances, 256x256x256 masks are generated, which need to be manually generated through software such as Photoshop. Due to the huge workload, the manual operation is replaced by batch processing using a program. After that, the calculated mask is superimposed on the original image and the final value of the superimposed image is calculated. The mask is superimposed or covered on the image, just like covering the image with colored plastic cloth to obtain a new image. The final value is calculated by the above formulas (1) and (2). By writing a program, 256x256x256 masks are superimposed on the original image in turn, and then the final value of the image is calculated. The mask corresponding to the square difference of the final value of the target image is found by exhaustive method. In the calculation process, the coefficient, light, and compensation can be adjusted to change the final value calculated by the above formula to achieve the purpose of manual assistance. When the square difference between the final value calculated at this time and the final value of the target image is less than or equal to the set threshold, the mask is considered valid. This threshold is set to 0.05, and the mask is listed as a candidate. Less than or equal to 0.05 is a range. At this time, there may be multiple masks that meet this condition at the same time, and they are all listed as candidates and used in the following steps. The image output is generated by superimposing or covering a mask that meets the threshold condition on the original image. Figure 1 and Figure 2 As shown, this one of all the calculated masks has a mask image size of 256 pixels * 256 pixels, and the color value of each pixel is (255, 200, 186, 0.85). This mask is randomly selected from all the masks in the candidate, and each mask in the candidate has a certain size, pixel points and color values.

[0091] 4. Overlay the output mask with the original image in professional image processing software such as Photoshop to find a mask that matches the original image. The standard for compliance is that when the mask is superimposed on the original image and then spliced ​​with the target image, there is no obvious seam at the splicing point. At this time, the mask meets the requirements. If it does not meet the standard, it means that the mask is not suitable. Use other masks in the candidate in step 3 to perform this step again.

[0092] Using the above method, the output mask is superimposed on Figure 2 After the left satellite image shown, the effect is as follows Figure 2 As shown, this mask can be used.

[0093] 5. Then use the mask to restore the target image in a linear manner. The restoration coefficient b is calculated by the following formula

[0094] (3)

[0095] in

[0096] pix_b is the pixel value of the target image pixel, which is known, that is, the value of each pixel in the target image;

[0097] a is the image degree compensation, obtained by the a channel of each pixel in the mask;

[0098] b is the repair coefficient, which can be calculated by this formula , when b is determined first, pix_a and pix_b are taken as known numbers for calculation, and the equation of b and a can be obtained. After that, when b is substituted into the formula, there are three unknown numbers pix_a, pix_b, and b, and b can be calculated through a. At this time, pix_b is the value of the pixel point of the target image, which is a known value. Therefore, only pix_a is unknown in the formula, and pix_a can be calculated through this formula;

[0099] pix_a is the pixel color after restoration, that is, the value of the pixel at the corresponding position. After performing this calculation on each pixel in the target image, the new pixel values ​​of all pixels can be obtained, and the modified image is generated by all new pixel values, such as Figure 3As shown, an original image without problems and three target images with problems are used for illustration. The three target images with problems are processed through the above steps to obtain three modified new images, and then the four images of the original image and the three new images are spliced ​​together. A gap is reserved between the upper left corner image and the other images to facilitate observation of which three images they are. The upper left corner of the figure is the original image, and the rest are the repaired target images. In order to facilitate observation of the effect, three surrounding images are selected for confirmation, indicating that after the three problematic images are processed separately and then spliced, the splicing is normal without obvious seams, indicating that the method can be used to obtain images. In actual applications, a large amount of satellite image data will be processed at one time. The present invention uses processing of one satellite image to illustrate the specific method operation process, and the processing of all other satellite images can be achieved by the method of the present invention.

[0100] By adopting the restoration method of the present invention, the number of artists can be reduced to a minimum, thus saving a great deal of manpower, and the computer performance requirements in the whole process are low, thereby saving hardware costs; secondly, the professional ability requirements are low, and even no professional person who knows how to restore images is needed. Therefore, when other tasks are urgent, other departments that are not busy can be assisted in processing, and the same mask can be used to process the same problematic satellite image, so there will be no tearing during splicing.

[0101] As an embodiment disclosed by the present invention, the present invention further discloses a system for repairing satellite images. The system implements the method described, and includes the following modules:

[0102] A loading module, used to load the original satellite image and the target satellite image, and obtain relevant attribute parameters of the target satellite image;

[0103] A style determination module, used to determine the overall style of the target satellite image using relevant attribute parameters;

[0104] A mask generation module, used for determining a mask to cover the original image according to the overall style;

[0105] The repair and restoration module is used to use the mask to repair and restore the target image, thereby realizing the repair of the target satellite image.

[0106] As an embodiment disclosed in the present invention, the present invention further discloses an electronic device, the electronic device comprising:

[0107] A memory storing executable instructions;

[0108] A processor is used to execute the executable instructions in the memory to implement the method described in the present invention.

[0109] As an embodiment disclosed in the present invention, the present invention further discloses a computer storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method described in the present invention.

[0110] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0111] The above description shows and describes several preferred embodiments of the present invention, but as mentioned above, it should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the application concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not depart from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.

Claims

1. A method for repairing satellite images, characterized in that: The method comprises the steps of: S1. Load the original satellite image and the target satellite image, and obtain the relevant attribute parameters of the target satellite image; S2. Determine the overall style of the target satellite image using relevant attribute parameters, wherein S2 includes: S21. Obtain the style value of the vertical pixels of a row of the target satellite image according to the relevant attribute parameters, and obtain the formula as follows: in: pixel xy Represents the pixel value at the coordinate [x, y], which is a quaternion; image _x : is the horizontal pixel number of the target satellite image; coefficient: color compensation coefficient, the value range is (0,1); light: light compensation coefficient, the value range is [0,1]; compensation: image degree compensation coefficient, the value range is [0,1]; Style y : The style value of the pixels in the yth row, with the lower left corner of the entire image of the target satellite image as the origin to establish a coordinate system, where the right direction is the positive x direction and the upper direction is the positive y direction; S22. Sum the style values ​​of all vertical pixels to obtain a final value representing the overall style. The formula is: Among them, image _y is the number of all horizontal pixels of the target satellite image, and final is the final value; S3. Determine a mask covering the original satellite image according to the overall style; S4. Use the mask to repair and restore the target satellite image, thereby achieving repair of the target satellite image.

2. The method for repairing satellite images according to claim 1, characterized in that: The target satellite image is an image having a color difference with respect to the original satellite image.

3. The method for repairing satellite images according to claim 1, characterized in that: The S3 specifically includes: S31. generating a plurality of masks; S32. Superimposing or overlaying each mask onto the original satellite image to generate a new image; S33. Calculate the final value of the new image, and calculate the square difference between the final value and the final value of the target satellite image. When the result is less than or equal to the set threshold, the corresponding mask is valid; S34. Repeat steps S32 and S33 to obtain all valid masks.

4. The method for repairing satellite images according to claim 3, characterized in that: The threshold value is set to 0.

05.

5. A system for repairing satellite images, characterized in that: The system implements the method described in any one of claims 1 to 4, and comprises the following modules: a loading module, used to load the original satellite image and the target satellite image, and obtain the relevant attribute parameters of the target satellite image; A style determination module, used to determine the overall style of the target satellite image using relevant attribute parameters; A mask generation module, used for determining a mask to be covered on the original satellite image according to the overall style; The repair and restoration module is used to use the mask to repair and restore the target satellite image, thereby realizing the repair of the target satellite image.

6. An electronic device, characterized in that: The electronic device comprises: a memory storing executable instructions; A processor, wherein the processor runs the executable instructions in the memory to implement the method according to any one of claims 1 to 4.

7. A computer storage medium, characterized in that: The medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Image generation method and device, storage medium and electronic equipment

    CN111340745A

  • Image restoration method and device, equipment, medium and product

    CN113902649A