Method, device and equipment for automatic color uniformity processing of orthophoto based on classification

Through the automatic color equalization processing method of orthophotos based on classification, water bodies, clouds and cloud shadow areas are ignored for image color equalization processing, and buffer processing is performed in the edge areas to solve the problem of water bodies, clouds and other ground objects in low-quality orthophoto images. Issues affecting color balancing effects are eliminated, achieving more natural image colors and improved contrast.

CN118279415BActive Publication Date: 2024-09-24BEIJING AEROSPACE HONGTU INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410440480.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-12
Publication Date
2024-09-24
Estimated Expiration
2044-04-12

AI Technical Summary

Technical Problem

Existing image color equalization technology has poor color equalization effects when processing low-quality orthophotos containing a large number of water bodies, clouds and other ground objects, especially the shadow areas of water bodies and clouds, resulting in color abnormalities.

Method used

An automatic color equalization processing method for orthoimages based on classification is adopted. By obtaining the orthoimages to be equalized and the reference images, they are classified and processed separately to extract the target areas. Water bodies, clouds and cloud shadow areas are ignored, and only non-target areas are equalized. Color processing, and buffer processing in the edge area to reduce color difference.

Benefits of technology

Significantly improves the color uniformity processing effect of low-quality orthophotos, reduces color difference anomalies in water bodies, clouds and cloud shadow areas, and improves the overall color consistency and contrast of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118279415B
    Figure CN118279415B
Patent Text Reader

Abstract

The present invention provides a method, device and equipment for automatic color grading of orthophotos based on classification, including: obtaining an orthophoto to be graded and a reference image; performing classification processing on the orthophoto to be graded and the reference image respectively to extract a target area from the orthophoto to be graded and the reference image; performing color grading processing on the area except the target area in the orthophoto to be graded based on the area except the target area in the reference image to obtain a color grading area; performing buffer processing on the border area between the target area and the color grading area in the orthophoto to be graded to obtain a target orthophoto; wherein the buffer processing is used to reduce the color difference in the border area. The present invention can significantly improve the effect of color grading processing on low-quality orthophotos with a large number of water bodies, clouds and other objects.
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 classification-based automatic color-homogenizing method, device and equipment for orthophoto images. Background Art

[0002] The image color uniformity technology provided by related technologies, such as the satellite remote sensing optical image color uniformity method suitable for extremely low-lying areas, the image local color difference area automatic color uniformity processing method, the multi-source remote sensing satellite image geometric semantic integration processing method, etc., can achieve good color uniformity effect for high-quality satellite images. However, when there are a large number of water bodies, clouds and other land objects in the satellite images, such land objects will affect the color uniformity effect. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a classification-based orthophoto automatic color equalization processing method, device and equipment, which can significantly improve the effect of color equalization processing on low-quality orthophotos with a large amount of water bodies, clouds and other objects.

[0004] In a first aspect, an embodiment of the present invention provides a classification-based orthophoto automatic color homogenization processing method, comprising:

[0005] Obtain the orthophoto image to be homogenized and the reference image;

[0006] Classifying the orthophoto to be color-homogenized and the reference image respectively, so as to extract the target area from the orthophoto to be color-homogenized and the reference image;

[0007] Based on the area except the target area in the reference image, performing color homogenization processing on the area except the target area in the orthophoto image to be homogenized to obtain a homogenized area;

[0008] A buffer process is performed on the border region between the target region and the color-homogenized region in the orthophoto to be color-homogenized to obtain a target orthophoto; wherein the buffer process is used to reduce the color difference in the border region.

[0009] In one embodiment, the target area is a water area and / or a cloud and cloud shadow area, and the area other than the target area is a non-water area and / or a non-cloud and cloud shadow area.

[0010] In one embodiment, based on the area except the target area in the reference image, the step of performing color homogenization processing on the area except the target area in the orthophoto to be homogenized to obtain the homogenized area includes:

[0011] Determine a color uniformity parameter based on an image gray value corresponding to a first pixel in an area other than the target area in the reference image and an image gray value corresponding to a second pixel in an area other than the target area in the orthoimage to be uniformly colored; wherein the color uniformity parameter includes an additive coefficient and a multiplicative coefficient;

[0012] The image grayscale value corresponding to the second pixel in the area except the target area in the orthophoto to be uniformly colored is processed by using the uniformly colored parameters to obtain a uniformly colored area.

[0013] In one embodiment, the step of determining the color uniformity parameter based on the image grayscale values ​​corresponding to the pixels in the area excluding the target area in the reference image and the image grayscale values ​​corresponding to the pixels in the area excluding the target area in the orthoimage to be uniformly colored includes:

[0014] Based on the image grayscale value corresponding to the first pixel in the area other than the target area in the reference image, respectively determining a grayscale mean target value and a grayscale variance target value;

[0015] For each second pixel in the area excluding the target area in the orthoimage to be uniformly colored, determine a first neighborhood area centered on the second pixel, and determine an image grayscale mean and an image grayscale variance value corresponding to the second pixel based on an image grayscale value corresponding to each third pixel in the first neighborhood area;

[0016] Based on the grayscale variance target value and the image grayscale variance value corresponding to each second pixel, the multiplicative coefficient corresponding to each second pixel is determined; and based on the grayscale mean target value, the image grayscale mean corresponding to each second pixel and the multiplicative coefficient, the additive coefficient corresponding to each second pixel is determined.

[0017] In one embodiment, the step of determining the multiplicative coefficient corresponding to each second pixel based on the grayscale variance target value and the image grayscale variance value corresponding to each second pixel comprises:

[0018] The multiplicative coefficient corresponding to each of the second pixels is determined according to the following formula:

[0019] r1=(cv s ) / (cv c +v s / c);

[0020] Wherein, r1 is the multiplicative coefficient, c is the image contrast expansion constant, and v s is the grayscale variance target value, v c is the image grayscale variance value corresponding to the second pixel;

[0021] The step of determining the additive coefficient corresponding to each second pixel based on the grayscale mean target value, the image grayscale mean corresponding to each second pixel and the multiplicative coefficient comprises:

[0022] The additive coefficient corresponding to each of the second pixels is determined according to the following formula:

[0023] r0=bm s +(1-b-r1)m c ;

[0024] Among them, r0 is the additive coefficient, m s is the grayscale mean target value, m c is the grayscale mean of the image corresponding to the second pixel, b is the grayscale mean forcing constant, and when the value of b approaches 1, the grayscale mean of the image corresponding to the second pixel is forced to the grayscale mean target value.

[0025] In one embodiment, the step of performing color gradation processing on the image grayscale value corresponding to the second pixel in the area other than the target area in the orthoimage to be color gradation is performed using the color gradation parameter to obtain the color gradation area includes:

[0026] For each second pixel in the area other than the target area in the orthoimage to be homogenized, when the value of the multiplicative coefficient corresponding to the second pixel is greater than 1, high-pass filtering is performed on the image grayscale value corresponding to the second pixel, and the sum of the image grayscale value after high-pass filtering and the additive coefficient corresponding to the second pixel is used as the grayscale value of the homogenized image corresponding to the second pixel;

[0027] Alternatively, for each second pixel in the area other than the target area in the orthoimage to be homogenized, when the value of the multiplicative coefficient corresponding to the second pixel is less than 1, low-pass filtering is performed on the image grayscale value corresponding to the second pixel, and the sum of the image grayscale value after low-pass filtering and the additive coefficient corresponding to the second pixel is used as the grayscale value of the homogenized image corresponding to the second pixel;

[0028] A color-homogenized area is obtained based on the grayscale value of the color-homogenized image corresponding to each second pixel.

[0029] In one embodiment, the step of performing buffering on the border region between the target region and the color-homogenized region in the orthophoto to be color-homogenized to obtain the target orthophoto comprises:

[0030] Determine the edge pixels between the target area and the area after color homogenization in the orthophoto to be color homogenized;

[0031] Taking the edge pixel as the center, expanding outward according to the specified number of pixels to obtain the edge area between the target area and the color-homogenized area in the orthophoto to be color-homogenized;

[0032] The edge region is buffered using a mean filtering algorithm to obtain a target orthophoto based on the buffered edge region.

[0033] In one embodiment, the step of performing buffering on the edge region using a mean filtering algorithm includes:

[0034] For each fourth pixel in the edge area, a second neighborhood area centered on the fourth pixel is determined, and the average of the image grayscale values ​​corresponding to each fifth pixel in the second neighborhood is used as the buffered image grayscale value corresponding to the fourth pixel to achieve buffering of the edge area.

[0035] In a second aspect, an embodiment of the present invention further provides an automatic color-homogenizing device for orthophotos based on classification, comprising:

[0036] An image acquisition module is used to acquire the orthophoto image to be homogenized and the reference image;

[0037] An image classification module is used to classify the orthoimage to be homogenized and the reference image respectively, so as to extract a target area from the orthoimage to be homogenized and the reference image; wherein the target area is a ground feature area whose pixel brightness value is greater than a preset brightness threshold;

[0038] A color equalization module is used to perform color equalization processing on the area except the target area in the orthophoto to be color-equalized based on the area except the target area in the reference image to obtain a color-equalized area;

[0039] The buffer module is used to perform buffer processing on the border area between the target area and the color-homogenized area in the orthophoto to be color-homogenized to obtain the target orthophoto; wherein the buffer processing is used to reduce the color difference in the border area.

[0040] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement any one of the methods provided in the first aspect.

[0041] The embodiment of the present invention provides a classification-based automatic color-leveling method, device and equipment for orthophoto images. First, an orthophoto image to be color-leveled and a reference image are obtained, and the orthophoto image to be color-leveled and the reference image are classified and processed respectively to extract a target area from the orthophoto image to be color-leveled and the reference image; then, based on the area other than the target area in the reference image, the area other than the target area in the orthophoto image to be color-leveled is color-leveled to obtain a color-leveled area; finally, a buffering process is performed on the border area between the target area and the color-leveled area in the orthophoto image to be color-leveled to obtain a target orthophoto image, and the buffering process is used to reduce the color difference in the border area. The above method takes into account the color-leveling of the image with high or low brightness such as water bodies, clouds and cloud shadows, and introduces classification processing in the color-leveling process to extract the target area, and ignores such area of ​​the object in the color-leveling process, and only performs color-leveling processing on the area other than such area of ​​the object, and finally reduces the color difference in the border area between the target area and the color-leveled area in the orthophoto image to be color-leveled to achieve the purpose of improving the color-leveling effect.

[0042] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0043] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 A schematic diagram of a flow chart of an automatic color-homogenizing method for orthophotos based on classification provided by an embodiment of the present invention;

[0046] Figure 2 A schematic diagram of an orthophoto to be color-homogenized provided by an embodiment of the present invention;

[0047] Figure 3 A schematic diagram of a reference DOM image provided by an embodiment of the present invention;

[0048] Figure 4A schematic diagram of a classification result provided by an embodiment of the present invention;

[0049] Figure 5 A schematic diagram of an edge region provided by an embodiment of the present invention;

[0050] Figure 6 A schematic diagram of the overall process of an automatic color-homogenizing method for orthophotos based on classification provided by an embodiment of the present invention;

[0051] Figure 7 A schematic diagram of the structure of an automatic color-homogenizing device for orthophotos based on classification provided by an embodiment of the present invention;

[0052] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described in combination with the embodiments below. Obviously, the described embodiments are part of the embodiments of the present invention, 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.

[0054] At present, the relevant technology provides the following image color uniformity technology:

[0055] (1) A method for color grading satellite remote sensing optical images suitable for polar regions: This invention mainly introduces a reference mask into each channel of a single polar true color image to calculate a high-frequency image, outputs a brightness-corrected image after adding a light source, and performs a histogram equalization conversion, thereby solving the problem of visual distortion caused by excessive contrast in the mosaic color grading process of optical satellite images in polar regions.

[0056] (2) A method for automatically balancing the color of local color difference areas in an image: This invention obtains a balancing result by performing mean filtering on the edges between the uniform color area and the non-uniform color area. This method can be used to process the local color difference areas at the edges of color blocks, truly achieving the overall color consistency of the image.

[0057] (3) A method and system for geometric semantic integrated processing of multi-source remote sensing satellite images: This invention involves color uniformity processing. Specifically, first, a weak spectrum or texture quality mask map of a standard scene image is obtained. Secondly, when calculating the color uniformity error equation, the area falling into the weak spectrum or texture quality mask map is not included in the statistics. Finally, the color uniformity error equation is solved to obtain the color uniformity linear transformation coefficient of each image, and then the grayscale value of each channel of the image is transformed to achieve uniform light and color.

[0058] Existing image automatic color grading methods can achieve good results for high-quality satellite images. However, when there are a large number of water bodies, clouds and other objects in the image, the color grading effect will be disturbed. In addition, the image color grading technology provided in (3) above does not include the areas with weak spectrum or texture quality mask images in the statistics when performing color grading. This can effectively improve the color grading effect to a certain extent. However, the areas with clouds on the image are high-brightness areas. After participating in color grading, the color of the area may be abnormal, such as yellowing.

[0059] Based on this, the present invention provides a classification-based automatic color grading method, device and equipment for orthophoto images, which can significantly improve the effect of color grading for low-quality orthophoto images with a large amount of water bodies, clouds and other objects.

[0060] To facilitate understanding of this embodiment, firstly, a classification-based orthophoto automatic color uniformity processing method disclosed in an embodiment of the present invention is introduced in detail, see Figure 1 The flowchart of a method for automatic color balancing of orthophotos based on classification is shown, and the method mainly includes the following steps S102 to S108:

[0061] Step S102, obtaining the orthophoto image to be homogenized and the reference image.

[0062] The reference image is also a reference digital orthophoto map (DOM), which can also be called a reference DOM image. In one example, after obtaining the orthophoto to be homogenized and the reference DOM image, a project can be created. The project is the basis for subsequent processing, and mainly records the path information of the orthophoto to be homogenized, the reference DOM image, the path information of the output product, and the classification result. The output product is also the target orthophoto, and the classification result is the target area and the area other than the target area.

[0063] Step S104 , classifying the orthophoto image to be uniformly colored and the reference image respectively, so as to extract the target area from the orthophoto image to be uniformly colored and the reference image.

[0064] Among them, the target area is a ground object area with pixel brightness values ​​that are too high or too low, for example, a ground object area with pixel brightness values ​​greater than a first brightness threshold is a target area, or a ground object area with pixel brightness values ​​less than a second brightness threshold is a target area, such as a water area or a cloud and cloud shadow area. The area other than the target area (referred to as the non-target area) is a non-water area or a non-cloud and cloud shadow area.

[0065] In one embodiment, various techniques such as image processing techniques or neural network techniques may be used to classify the orthophoto to be homogenized and the reference image, respectively, to extract the target area and the non-target area from the orthophoto to be homogenized, and to extract the target area and the non-target area from the reference DOM image. For example, by using maximum likelihood classification, cloud and cloud shadow areas and non-cloud and cloud shadow areas are extracted from the orthophoto to be homogenized, and cloud and cloud shadow areas and non-cloud and cloud shadow areas are extracted from the reference DOM image.

[0066] Step S106 , based on the area except the target area in the reference image, the area except the target area in the orthophoto to be uniformly colored is uniformly colored to obtain a uniformly colored area.

[0067] In one example, when the orthophoto to be homogenized is processed, the target area, that is, the water area and the cloud and cloud shadow area are ignored, and only the non-water area and the non-cloud and cloud shadow area are processed to obtain the corresponding homogenized area. Optionally, a geographic template homogenization method based on the Wallis filter method is used to perform homogenization on the non-water area and the non-cloud and cloud shadow area to obtain the homogenized area.

[0068] Step S108, buffering is performed on the border area between the target area and the area after the color homogenization in the orthophoto to be homogenized, so as to obtain the target orthophoto.

[0069] The border area can also be called a buffer zone, which can be a region of multiple pixels between the target area and the uniformly colored area. Buffering is used to reduce the color difference in the border area, and mean filtering can be used. In one example, for the pixels in the border area, the mean of the grayscale values ​​of 3X3 images around the current pixel can be selected to replace the current image grayscale value to achieve buffering of the border area. After processing each border area, the target orthophoto can be obtained.

[0070] The automatic color-leveling method for orthophoto images based on classification provided by an embodiment of the present invention takes into account the effects of objects with too high or too low brightness, such as water bodies, clouds, and cloud shadows, on images to be color-leveled, and introduces classification processing in the color-leveling process to extract the target area object region, and ignore such object regions in the color-leveling process, and only perform color-leveling processing on the regions other than such object regions, and finally reduce the color difference existing in the border region between the target region and the color-leveled region in the orthophoto to be color-leveled, so as to achieve the purpose of improving the color-leveling effect.

[0071] For ease of understanding, an embodiment of the present invention provides a specific implementation of an automatic color uniformity processing method for orthophotos based on classification.

[0072] For the aforementioned step S102, first obtain the orthophoto to be homogenized and the reference DOM image, such as Figure 2 A schematic diagram of an orthophoto to be homogenized is shown, and Figure 3 The schematic diagram of a reference DOM image is shown in FIG. The band information of the orthophoto to be homogenized is shown in Table 1 below, and the band information of the reference DOM image is shown in Table 2 below:

[0073] Table 1

[0074] Mean variance Band 1 84.4 32.9 Band 2 120.1 24.6 Band 3 86.4 25.8

[0075] Table 2

[0076] Mean variance Band 1 70.6 36.2 Band 2 76.2 37 Band 3 102 37.4

[0077] In addition, after obtaining the orthophoto to be homogenized and the reference DOM image, you can create a project to mainly record the path information of the orthophoto to be homogenized, the reference DOM image, the path information of the output results, the classification results and other information.

[0078] For the aforementioned step S104, an embodiment of the present invention provides an implementation method of classifying the orthophoto image to be uniformly colored and the reference image respectively to extract a target area from the orthophoto image to be uniformly colored and the reference image, wherein the target area is a water area or a cloud and cloud shadow area, and the area other than the target area is a non-water area or a non-cloud and cloud shadow area.

[0079] Taking the cloud and cloud shadow area as an example, the cloud and cloud shadow area in the orthophoto to be homogenized and the reference DOM image are mainly identified. The classification result is not required in the automatic homogenization of images. It is sufficient to identify a large range of cloud and cloud shadow areas. For this reason, the classification method adopts the maximum likelihood classification in the supervised classification method. Maximum likelihood classification is an image classification method that uses a statistical method to establish a nonlinear discriminant function set based on the maximum likelihood ratio Bayesian decision criterion in two or more categories of judgments, assumes that each type of distribution function is a normal distribution, selects a training area, and calculates the belonging probability of each sample area to be classified. Maximum likelihood classification is simple and easy to implement. At the same time, this method is more suitable for multi-band data with fewer bands. Only two types of cloud and cloud shadow are selected for classification samples.

[0080] In order to facilitate subsequent applications, the classification results of the orthophoto to be homogenized are stored in a binary image with the same coordinates as the orthophoto to be homogenized, and the classification results of the reference DOM image are stored in a binary image with the same coordinates as the reference DOM image. Figure 4A schematic diagram of a classification result is shown, in which 1 represents cloud, 2 represents cloud shadow, and 0 represents other elements, wherein the cloud and cloud shadow area is the target area, and the area other than the target area is the non-cloud and cloud shadow area.

[0081] For the aforementioned step S106, the embodiment of the present invention provides an implementation method for performing color grading processing on the area except the target area in the orthophoto to be color-graded based on the area except the target area in the reference image to obtain the color-graded area. For details, see the following steps 1 to 2:

[0082] Step 1: Determine a color uniformity parameter based on the image grayscale value corresponding to the first pixel in the area excluding the target area in the reference image and the image grayscale value corresponding to the second pixel in the area excluding the target area in the orthoimage to be uniformed. The color uniformity parameter includes an additive coefficient and a multiplicative coefficient.

[0083] Optionally, a geographic template color grading method based on the Wallis filter method can be used. Calculating the color grading parameters is to calculate the Wallis filter coefficients. Wallis filtering can map the grayscale mean and variance of a local image to a given grayscale mean and variance. It is a local image transformation that makes the grayscale mean and variance at different locations of the image have approximately equal values, that is, the contrast of the area with small image contrast increases, and the contrast of the area with large image contrast decreases, so that the slight changes in grayscale in the image are enhanced.

[0084] In specific implementation, the additive coefficient and the multiplicative coefficient can be calculated according to the following steps 1.1 to 1.4:

[0085] Step 1.1, based on the image grayscale value corresponding to the first pixel in the area other than the target area in the reference image, determine the grayscale mean target value and the grayscale variance target value respectively.

[0086] Among them, the "first", "second", "third", "fourth" and "fifth" in the first pixel, the second pixel, the third pixel, the fourth pixel and the fifth pixel are only used to distinguish the pixels in different images and different areas, and have no actual meaning. Taking the cloud and cloud shadow area as an example, the first pixel is the pixel in the non-cloud and cloud shadow area in the reference DOM, the second pixel is the pixel in the non-cloud and cloud shadow area in the orthophoto to be homogenized, the third pixel is the pixel in the first neighborhood centered on the second pixel, the fourth pixel is the pixel in the border area between the cloud and cloud shadow area and the image after homogenization, and the fifth pixel is the pixel in the second neighborhood centered on the fourth pixel.

[0087] Continuing with the cloud and cloud shadow area as an example, the image grayscale value corresponding to each first pixel in the non-cloud and cloud shadow area in the reference DOM image is determined, so as to determine the grayscale mean target value m based on the image grayscale value corresponding to the first pixel.s And grayscale variance target value v s , where the grayscale mean target value m s You can select the median value of the image dynamic range and the grayscale variance target value v s The variance value of the image grayscale value corresponding to each first pixel.

[0088] Step 1.2, for each second pixel in the area excluding the target area in the orthoimage to be uniformly colored, determine the first neighborhood area centered on the second pixel, and based on the image grayscale value corresponding to each third pixel in the first neighborhood area, determine the image grayscale mean and image grayscale variance value corresponding to the second pixel.

[0089] Continuing with the example of cloud and cloud shadow area, for each second pixel in the non-cloud and cloud shadow area in the orthophoto to be homogenized, determine the first neighborhood area centered on the second pixel, and use the mean of the image grayscale values ​​corresponding to each third pixel in the first neighborhood area as the image grayscale mean corresponding to the second pixel, and use the variance of the image grayscale values ​​corresponding to each third pixel in the first neighborhood area as the image grayscale variance corresponding to the second pixel. By traversing each second pixel in the non-cloud and cloud shadow area in the orthophoto to be homogenized, the image grayscale mean and image grayscale variance corresponding to each second pixel can be obtained.

[0090] Step 1.3, based on the grayscale variance target value and the image grayscale variance value corresponding to each second pixel, determine the multiplicative coefficient corresponding to each second pixel.

[0091] Specifically, the multiplicative coefficient corresponding to each second pixel can be determined according to the following formula:

[0092] r1=(cv s ) / (cv c +v s / c);

[0093] Where r1 is the multiplicative coefficient. When r1>1, the transformation is a high-pass filter; when r1<1, the transformation is a low-pass filter. c is the image contrast expansion constant, and its value range is [0,1]. v s is the grayscale variance target value, v c is the image grayscale variance value corresponding to the second pixel, that is, the grayscale variance of a certain neighborhood of the second pixel;

[0094] Step 1.4, based on the grayscale mean target value, the image grayscale mean and the multiplicative coefficient corresponding to each second pixel, determine the additive coefficient corresponding to each second pixel.

[0095] Specifically, the additive coefficient corresponding to each second pixel can be determined according to the following formula:

[0096] r0=bm s +(1-b-r1)m c ;

[0097] Among them, r0 is the additive coefficient, m s is the grayscale mean target value, m c is the grayscale mean of the image corresponding to the second pixel, that is, the grayscale mean of a certain neighborhood of the second pixel, b is the grayscale mean forcing constant, and when the value of b approaches 1, the grayscale mean of the image corresponding to the second pixel is forced to the grayscale mean target value.

[0098] In summary, the general form of the Wallis filter is as follows:

[0099]

[0100] Among them, g c (x, y) is the gray value of the image after homogenization corresponding to the second pixel, and g(x, y) is the gray value of the image corresponding to the second pixel. The specific calculation process is to calculate the mean and variance of the non-cloud and cloud shadow area ranges in the orthophoto to be homogenized and the reference DOM image corresponding to the orthophoto to be homogenized, respectively, in combination with the classification results; the values ​​of c and v are both 1, and the additive coefficient r0 and multiplicative coefficient r1 are calculated according to the above formula.

[0101] Step 2: Using the color gradation parameters, the grayscale value of the image corresponding to the second pixel in the area except the target area in the orthophoto to be gradated is processed to obtain the gradated area.

[0102] In one implementation, the following method 1 or method 2 may be referred to:

[0103] Method 1: For each second pixel in the area other than the target area in the orthoimage to be homogenized, when the value of the multiplicative coefficient corresponding to the second pixel is greater than 1, the image grayscale value corresponding to the second pixel is high-pass filtered, and the sum of the image grayscale value after high-pass filtering and the additive coefficient corresponding to the second pixel is used as the grayscale value of the image after homogenization corresponding to the second pixel.

[0104] Method 2: For each second pixel in the area other than the target area in the orthophoto to be homogenized, when the value of the multiplicative coefficient corresponding to the second pixel is less than 1, the image grayscale value corresponding to the second pixel is low-pass filtered, and the sum of the image grayscale value after low-pass filtering and the additive coefficient corresponding to the second pixel is used as the grayscale value of the homogenized image corresponding to the second pixel;

[0105] Continuing with the example of the cloud and cloud shadow area, for each second pixel in the non-cloud and cloud shadow area in the orthophoto to be uniformly colored, if the value of the multiplicative coefficient r1 corresponding to the second pixel is greater than 1, high-pass filtering is used; if the value of the multiplicative coefficient r1 corresponding to the second pixel is less than 1, low-pass filtering is used, and then the sum of the grayscale value of the filtered image and the corresponding additive coefficient r0 is used as the grayscale value of the uniformly colored image, and the uniformly colored area can be obtained based on the grayscale value of the uniformly colored image corresponding to each second pixel; for the pixels in the cloud and cloud shadow area in the orthophoto to be uniformly colored, their original pixel grayscale values ​​are used.

[0106] Specifically, the expression for uniform color processing is as follows:

[0107] g c (x,y)=g(x,y)r1+r0;

[0108] Among them, r1 is the multiplicative coefficient, r0 is the additive coefficient, and g c (x, y) is the gray value of the image after color grading, and g(x, y) is the gray value of the image before color grading.

[0109] For the aforementioned step S108, the embodiment of the present invention provides an implementation method for performing buffer processing on the border area between the target area and the uniformly colored area in the uniformly colored orthophoto to obtain the target orthophoto, which can be specifically referred to in the following steps a to b:

[0110] Step a, determine the border pixels between the target area in the orthophoto to be uniformly colored and the uniformly colored area, take the border pixels as the center, and expand outward according to the specified number of pixels to obtain the border area between the target area in the orthophoto to be uniformly colored and the uniformly colored area. Figure 5 FIG. 1 is a schematic diagram of a junction area, wherein W0 is the cloud and cloud shadow area, W1 is the junction area, and the area outside W1 is the non-cloud and cloud shadow area. The junction area W1 is actually a buffer zone of H pixels between the cloud and cloud shadow area W0 and the uniformly colored area.

[0111] Step b: Buffering the butt joint area using a mean filtering algorithm to obtain a target orthophoto based on the butt joint area after the buffering process.

[0112] In practical applications, the non-cloud and shadow areas in the orthophoto to be homogenized are homogenized, resulting in color differences between the non-cloud and shadow areas after homogenization and the cloud and cloud shadow areas that have not been homogenized. Therefore, it is necessary to perform mean filtering on the edge areas of clouds and cloud shadows.

[0113] In one example, for each fourth pixel in the border region, a second neighborhood region centered on the fourth pixel is determined, and the average of the image grayscale values ​​corresponding to each fifth pixel in the second neighborhood is used as the buffered image grayscale value corresponding to the fourth pixel, so as to achieve buffering of the border region. The second neighborhood region may be a 3×3 pixel region, and for H fourth pixels in the border region, the average of the image grayscale values ​​corresponding to the fifth pixels in the 3×3 range around the fourth pixel is selected to replace the original image grayscale value of the fourth pixel.

[0114] See the band information of an unclassified color-leveling result shown in Table 3 below, and the band information of a classified color-leveling result shown in Table 4:

[0115] Table 3

[0116] Mean variance Band 1 78 38.7 Band 2 97.5 39.8 Band 3 93.2 28.4

[0117] Table 4

[0118] Mean variance Band 1 75 39.8 Band 2 83.5 40.4 Band 3 94.4 40.7

[0119] Comparing the classified and unclassified color-leveling results, it is found that after classification, the image in the cloud area is still white and does not turn yellow, and the brightness of other non-cloud areas is improved. At the same time, the contrast of the image is significantly improved, and the overall color is more natural. This shows that the image automation method based on classification proposed in the embodiment of the present invention can improve the effect of automatic color-leveling.

[0120] Further, the embodiments of the present invention provide Figure 6 The overall process diagram of an automatic color grading method for orthophotos based on classification is shown, including: obtaining the orthophoto to be graded and the reference DOM image; creating a project; image classification (specifically, see the aforementioned step S104); ignoring the cloud and cloud shadow areas to calculate the color grading parameters (specifically, see step 1 in the aforementioned step S106); ignoring the cloud and cloud shadow areas to apply the color grading parameters (specifically, see step 2 in the aforementioned step S106); processing the edge areas of clouds and cloud shadows (specifically, see the aforementioned step S108). The embodiment of the present invention proposes to add classification information on the basis of the existing geographic template color grading to improve the automatic color grading effect of the image. In order to verify the effect of the present invention, GF2 data with clouds is used, and tests are performed using conventional color grading processing and color grading processing with classification.

[0121] Based on the above embodiments, the present invention provides an automatic color grading device for orthophoto based on classification. Figure 7 The schematic diagram of the structure of a classification-based orthophoto automatic color processing device is shown, and the device mainly includes the following parts:

[0122] An image acquisition module 702 is used to acquire an orthophoto image to be homogenized and a reference image;

[0123] The image classification module 704 is used to classify the orthophoto image to be homogenized and the reference image respectively, so as to extract the target area from the orthophoto image to be homogenized and the reference image; wherein the target area is a ground feature area whose pixel brightness value is greater than a preset brightness threshold;

[0124] A color homogenization module 706 is used to perform color homogenization processing on the area except the target area in the orthophoto to be homogenized based on the area except the target area in the reference image to obtain a homogenized area;

[0125] The buffer module 708 is used to perform buffer processing on the border area between the target area and the color-homogenized area in the orthophoto to be homogenized to obtain the target orthophoto; wherein the buffer processing is used to reduce the color difference in the border area.

[0126] The automatic color-leveling device for orthophoto images based on classification provided by an embodiment of the present invention takes into account the effects of objects with too high or too low brightness, such as water bodies, clouds, and cloud shadows, on images to be color-leveled, and introduces classification processing in the color-leveling processing to extract target object areas. Such object areas are ignored during the color-leveling process, and color-leveling processing is performed only on areas other than such object areas. Finally, the color difference in the border area between the target area and the color-leveled area in the orthophoto to be color-leveled is reduced, so as to achieve the purpose of improving the color-leveling effect.

[0127] In one embodiment, the target area is a water area or a cloud and cloud shadow area, and the area other than the target area is a non-water area or a non-cloud and cloud shadow area.

[0128] In one embodiment, the color equalization module 706 is further used to:

[0129] Determine a color uniformity parameter based on an image gray value corresponding to a first pixel in an area other than the target area in the reference image and an image gray value corresponding to a second pixel in an area other than the target area in the orthoimage to be uniformly colored; wherein the color uniformity parameter includes an additive coefficient and a multiplicative coefficient;

[0130] By using the color-homogenizing parameters, the grayscale value of the image corresponding to the second pixel in the area except the target area in the orthophoto to be homogenized is processed to obtain the homogenized area.

[0131] In one embodiment, the color equalization module 706 is further used to:

[0132] Based on the image grayscale value corresponding to the first pixel in the area other than the target area in the reference image, respectively determine the grayscale mean target value and the grayscale variance target value;

[0133] For each second pixel in the area other than the target area in the orthoimage to be uniformly colored, a first neighborhood area centered on the second pixel is determined, and based on the image grayscale value corresponding to each third pixel in the first neighborhood area, an image grayscale mean value and an image grayscale variance value corresponding to the second pixel are determined;

[0134] Based on the grayscale variance target value and the image grayscale variance value corresponding to each second pixel, the multiplicative coefficient corresponding to each second pixel is determined; and based on the grayscale mean target value, the image grayscale mean corresponding to each second pixel and the multiplicative coefficient, the additive coefficient corresponding to each second pixel is determined.

[0135] In one embodiment, the color equalization module 706 is further used to:

[0136] Determine the multiplicative coefficient corresponding to each second pixel according to the following formula:

[0137] r1=(cv s ) / (cv c +v s / c);

[0138] Among them, r1 is the multiplicative coefficient, c is the image contrast expansion constant, and v s is the grayscale variance target value, v c is the image grayscale variance value corresponding to the second pixel;

[0139] The additive coefficient corresponding to each second pixel is determined according to the following formula:

[0140] r0=bm s +(1-b-r1)m c ;

[0141] Among them, r0 is the additive coefficient, m s is the grayscale mean target value, m c is the grayscale mean of the image corresponding to the second pixel, b is the grayscale mean forcing constant, and when the value of b approaches 1, the grayscale mean of the image corresponding to the second pixel is forced to the grayscale mean target value.

[0142] In one embodiment, the color equalization module 706 is further used to:

[0143] For each second pixel in the area other than the target area in the orthoimage to be homogenized, when the value of the multiplicative coefficient corresponding to the second pixel is greater than 1, high-pass filtering is performed on the image grayscale value corresponding to the second pixel, and the sum of the image grayscale value after high-pass filtering and the additive coefficient corresponding to the second pixel is used as the grayscale value of the image after homogenization corresponding to the second pixel;

[0144] Alternatively, for each second pixel in the area other than the target area in the orthoimage to be homogenized, when the value of the multiplicative coefficient corresponding to the second pixel is less than 1, a low-pass filter is performed on the image grayscale value corresponding to the second pixel, and the sum of the image grayscale value after the low-pass filter and the additive coefficient corresponding to the second pixel is used as the grayscale value of the image after homogenization corresponding to the second pixel;

[0145] The uniformly colored area is obtained based on the grayscale value of the uniformly colored image corresponding to each second pixel.

[0146] In one implementation, the buffer module 708 is further configured to:

[0147] Determine the border pixels between the target area in the orthophoto to be uniformly colored and the uniformly colored area;

[0148] Taking the edge pixel as the center, expand outward according to the specified number of pixels to obtain the edge area between the target area in the orthophoto to be uniformly colored and the uniformly colored area;

[0149] The mean filtering algorithm is used to perform buffering on the junction area, so as to obtain the target orthophoto based on the buffered junction area.

[0150] In one implementation, the buffer module 708 is further configured to:

[0151] For each fourth pixel in the junction area, a second neighborhood area centered on the fourth pixel is determined, and the average of the image grayscale values ​​corresponding to each fifth pixel in the second neighborhood is used as the buffered image grayscale value corresponding to the fourth pixel to achieve buffering of the junction area.

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

[0153] An embodiment of the present invention provides an electronic device. Specifically, the electronic device includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes the method described in any one of the above-mentioned implementation methods.

[0154] Figure 8 A structural diagram of an electronic device provided in an embodiment of the present invention, the electronic device 100 includes: a processor 80, a memory 81, a bus 82 and a communication interface 83, wherein the processor 80, the communication interface 83 and the memory 81 are connected via the bus 82; the processor 80 is used to execute an executable module stored in the memory 81, such as a computer program.

[0155] The memory 81 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 83 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0156] The bus 82 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0157] Among them, the memory 81 is used to store programs, and the processor 80 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiments of the present invention can be applied to the processor 80 or implemented by the processor 80.

[0158] The processor 80 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 hardware integrated logic circuit or software instructions in the processor 80. The above processor 80 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 81, and the processor 80 reads the information in the memory 81 and completes the steps of the above method in combination with its hardware.

[0159] The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be referred to the previous method embodiments, which will not be repeated here.

[0160] If the 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 this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Ran Access Memory), disk or optical disk, and other media that can store program codes.

[0161] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A classification-based automatic color processing method for orthophotos. It is characterized in that include: Obtain the orthophoto image to be homogenized and the reference image; Classifying the orthophoto to be color-homogenized and the reference image respectively, so as to extract the target area from the orthophoto to be color-homogenized and the reference image; Based on the area except the target area in the reference image, performing color homogenization processing on the area except the target area in the orthophoto image to be homogenized to obtain a homogenized area; Performing buffer processing on the border region between the target region and the color-homogenized region in the orthophoto to be color-homogenized to obtain a target orthophoto; wherein the buffer processing is used to reduce the color difference in the border region; The step of performing color grading processing on the area except the target area in the orthophoto to be color-graded based on the area except the target area in the reference image to obtain the color-graded area comprises: determining color grading parameters based on the image grayscale value corresponding to the first pixel in the area except the target area in the reference image and the image grayscale value corresponding to the second pixel in the area except the target area in the orthophoto to be color-graded; wherein the color grading parameters include additive coefficients and multiplicative coefficients; performing color grading processing on the image grayscale value corresponding to the second pixel in the area except the target area in the orthophoto to be color-graded using the color grading parameters to obtain the color-graded area; The step of determining the color uniformity parameter based on the image grayscale values ​​corresponding to the pixels in the area other than the target area in the reference image and the image grayscale values ​​corresponding to the pixels in the area other than the target area in the orthophoto to be color uniformed includes: determining a grayscale mean target value and a grayscale variance target value based on the image grayscale values ​​corresponding to the first pixels in the area other than the target area in the reference image; for each second pixel in the area other than the target area in the orthophoto to be color uniformed, determining a first neighborhood area centered on the second pixel, and determining an image grayscale mean and an image grayscale variance value corresponding to the second pixel based on the image grayscale values ​​corresponding to each third pixel in the first neighborhood area; determining a multiplicative coefficient corresponding to each second pixel based on the grayscale variance target value and the image grayscale variance value corresponding to each second pixel; and determining an additive coefficient corresponding to each second pixel based on the grayscale mean target value, the image grayscale mean corresponding to each second pixel and the multiplicative coefficient; The step of determining the multiplicative coefficient corresponding to each second pixel based on the grayscale variance target value and the image grayscale variance value corresponding to each second pixel comprises: determining the multiplicative coefficient corresponding to each second pixel according to the following formula: ;in, is the multiplicative coefficient, is the image contrast expansion constant, is the grayscale variance target value, is the image grayscale variance value corresponding to the second pixel; based on the grayscale mean target value, the image grayscale mean corresponding to each second pixel and the multiplicative coefficient, the step of determining the additive coefficient corresponding to each second pixel comprises: determining the additive coefficient corresponding to each second pixel according to the following formula: ;in, is the additive coefficient, is the grayscale mean target value, is the grayscale mean of the image corresponding to the second pixel, is the grayscale mean forced constant, When the value of approaches 1, the grayscale mean value of the image corresponding to the second pixel is forced to the grayscale mean target value; The step of performing color gradation processing on the image grayscale values ​​corresponding to the second pixels in the area except the target area in the orthoimage to be color gradation, and obtaining the color gradation area, by using the color gradation parameters, comprises: for each second pixel in the area except the target area in the orthoimage to be color gradation, when the value of the multiplicative coefficient corresponding to the second pixel is greater than 1, performing high-pass filtering on the image grayscale value corresponding to the second pixel, and taking the sum of the image grayscale value after high-pass filtering and the additive coefficient corresponding to the second pixel as the color gradation value of the image after color gradation corresponding to the second pixel; for each second pixel in the area except the target area in the orthoimage to be color gradation, when the value of the multiplicative coefficient corresponding to the second pixel is less than 1, performing low-pass filtering on the image grayscale value corresponding to the second pixel, and taking the sum of the image grayscale value after low-pass filtering and the additive coefficient corresponding to the second pixel as the color gradation value of the image after color gradation corresponding to the second pixel; and obtaining the color gradation area based on the color gradation value of the image after color gradation corresponding to each second pixel.

2. The automatic color-homogenizing method for orthophotos based on classification according to claim 1, It is characterized in that The target area is a water area and / or a cloud and cloud shadow area, and the area other than the target area is a non-water area and / or a non-cloud and cloud shadow area.

3. The automatic color balancing method for orthophoto images based on classification according to claim 1 or 2, It is characterized in that The step of performing buffering on the border area between the target area and the color-homogenized area in the orthophoto to be color-homogenized to obtain the target orthophoto comprises: Determine the edge pixels between the target area and the area after color homogenization in the orthophoto to be color homogenized; Taking the edge pixel as the center, expanding outward according to the specified number of pixels to obtain the edge area between the target area and the color-homogenized area in the orthophoto to be color-homogenized; The edge region is buffered using a mean filtering algorithm to obtain a target orthophoto based on the buffered edge region.

4. The automatic color uniformity processing method for orthophotos based on classification according to claim 3, It is characterized in that The step of performing buffering on the edge region by using a mean filtering algorithm comprises: For each fourth pixel in the edge area, a second neighborhood area centered on the fourth pixel is determined, and the average of the image grayscale values ​​corresponding to each fifth pixel in the second neighborhood is used as the buffered image grayscale value corresponding to the fourth pixel to achieve buffering of the edge area.

5. An automatic color-homogenizing device for orthophotos based on classification, It is characterized in that include: An image acquisition module is used to acquire the orthophoto image to be homogenized and the reference image; An image classification module, used for classifying the orthoimage to be uniformly colored and the reference image respectively, so as to extract a target area from the orthoimage to be uniformly colored and the reference image; A color equalization module is used to perform color equalization processing on the area except the target area in the orthophoto to be color-equalized based on the area except the target area in the reference image to obtain a color-equalized area; A buffer module is used to perform buffer processing on the border area between the target area and the color-homogenized area in the orthophoto to be color-homogenized to obtain a target orthophoto; wherein the buffer processing is used to reduce the color difference in the border area; The color-leveling module is specifically used to: determine a color-leveling parameter based on an image grayscale value corresponding to a first pixel in an area other than the target area in the reference image and an image grayscale value corresponding to a second pixel in an area other than the target area in the orthophoto to be color-leveled; wherein the color-leveling parameter includes an additive coefficient and a multiplicative coefficient; and perform color-leveling processing on the image grayscale value corresponding to the second pixel in an area other than the target area in the orthophoto to be color-leveled using the color-leveling parameter to obtain a color-leveled area; The color-homogenizing module is specifically used to: determine a grayscale mean target value and a grayscale variance target value based on the image grayscale value corresponding to the first pixel in the area excluding the target area in the reference image; determine a first neighborhood area centered on each second pixel in the area excluding the target area in the orthoimage to be color-homogenized, and determine the image grayscale mean and image grayscale variance value corresponding to the second pixel based on the image grayscale value corresponding to each third pixel in the first neighborhood area; determine the multiplicative coefficient corresponding to each second pixel based on the grayscale variance target value and the image grayscale variance value corresponding to each second pixel; and determine the additive coefficient corresponding to each second pixel based on the grayscale mean target value, the image grayscale mean and the multiplicative coefficient corresponding to each second pixel; The color equalization module is specifically used to determine the multiplication coefficient corresponding to each second pixel according to the following formula: ;in, is the multiplicative coefficient, is the image contrast expansion constant, is the grayscale variance target value, is the image grayscale variance value corresponding to the second pixel; based on the grayscale mean target value, the image grayscale mean corresponding to each second pixel and the multiplicative coefficient, the step of determining the additive coefficient corresponding to each second pixel comprises: determining the additive coefficient corresponding to each second pixel according to the following formula: ;in, is the additive coefficient, is the grayscale mean target value, is the grayscale mean of the image corresponding to the second pixel, is the grayscale mean forced constant, When the value of approaches 1, the grayscale mean value of the image corresponding to the second pixel is forced to the grayscale mean target value; The color-leveling module is specifically used for: for each second pixel in the area except the target area in the orthoimage to be color-leveled, when the value of the multiplicative coefficient corresponding to the second pixel is greater than 1, high-pass filtering is performed on the image grayscale value corresponding to the second pixel, and the sum of the image grayscale value after high-pass filtering and the additive coefficient corresponding to the second pixel is used as the grayscale value of the image after color-leveling corresponding to the second pixel; for each second pixel in the area except the target area in the orthoimage to be color-leveled, when the value of the multiplicative coefficient corresponding to the second pixel is less than 1, low-pass filtering is performed on the image grayscale value corresponding to the second pixel, and the sum of the image grayscale value after low-pass filtering and the additive coefficient corresponding to the second pixel is used as the grayscale value of the image after color-leveling corresponding to the second pixel; and a color-leveled area is obtained based on the grayscale value of the image after color-leveling corresponding to each second pixel.

6. An electronic device, It is characterized in that The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method according to any one of claims 1 to 4.