Optical remote sensing image cloud detection method combining spectral features and texture features
The integration of spectral and texture features in cloud detection methods enhances accuracy and efficiency in polar regions by minimizing misclassifications and eliminating the need for retraining, thus addressing the limitations of traditional spectral-based and machine learning approaches.
Patent Information
- Application Number
- CN202411222258.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-02
AI Technical Summary
Traditional cloud detection algorithms based on spectral features fail in polar ice and snow environments due to similar spectral characteristics, while machine learning and deep learning methods require retraining and are labor-intensive, leading to missed detections or false positives, and are not versatile.
An optical remote sensing image cloud detection method combining spectral features and texture features, utilizing initial cloud detection based on spectral characteristics, texture feature extraction through a gray level co-occurrence matrix, and radiometric calibration to improve accuracy and efficiency.
Reduces cloud misclassification errors and improves detection accuracy by integrating spectral and texture features, eliminating the need for supervised learning and reducing labor costs.
Smart Images

Figure CN119206526A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an optical remote sensing image cloud detection method combining spectral features and texture features. Background Art
[0002] Clouds and cloud shadows are the main sources of noise in terrestrial optical satellite data, and their detection is the premise and basis for most quantitative remote sensing analysis. Especially in ice and snow environments, due to the similar spectral characteristics of clouds and snow, missed detection or false detection often occurs. The polar regions are sensitive areas for global climate change. The melting of ice sheets, movement of glaciers, changes in interglacial waterways and other phenomena are of great significance to the understanding and prediction of global climate change. The harsh climate and geographical conditions in the polar regions make it difficult to build and maintain ground observation stations, and satellite remote sensing has become the main means of observation in the polar regions.
[0003] With the development of satellite remote sensing technology, cloud detection technology for optical remote sensing satellite images is mainly divided into three categories: cloud detection based on spectral characteristics, cloud detection based on machine learning, and cloud detection based on deep learning. Traditional cloud detection algorithms based on spectral characteristics have good detection effects in mid- and low-latitude areas, but in polar ice and snow environments, due to the similar spectral characteristics of clouds and snow, missed detections or false detections often occur. However, cloud detection based on machine learning and deep learning has poor versatility due to the limitation of training samples. Model training needs to be re-performed when changing scenes, and the labor cost is high and the operation time is long. Summary of the invention
[0004] In view of this, the main purpose of an embodiment of the present invention is to provide an optical remote sensing image cloud detection method that combines spectral features and texture features, in order to solve at least one problem of the prior art. The present invention can improve the accuracy and efficiency of cloud detection and reduce labor costs.
[0005] To achieve the above object, an embodiment of the present invention provides an optical remote sensing image cloud detection method combining spectral features and texture features, the method comprising the following steps:
[0006] Based on the spectral characteristics, the remote sensing image is used for initial cloud detection, and the initial common cloud detection results are obtained;
[0007] Acquiring texture features of the remote sensing image according to a gray level co-occurrence matrix;
[0008] Setting a first feature threshold, and obtaining a secondary common cloud detection result according to the texture feature and the first feature threshold;
[0009] Obtaining a common cloud extraction result according to the initial common cloud detection result and the secondary common cloud detection result;
[0010] Performing radiometric calibration on the remote sensing image to obtain reflectivity;
[0011] Setting a second characteristic threshold, and obtaining an initial cirrus cloud detection result according to the second characteristic threshold and the reflectivity;
[0012] Obtaining a secondary cirrus cloud detection result according to the texture feature and the second feature threshold;
[0013] Obtaining a cirrus cloud extraction result according to the initial cirrus cloud detection result and the secondary cirrus cloud detection result;
[0014] A target cloud detection result is obtained according to the common cloud extraction result and the cirrus cloud extraction result.
[0015] In some embodiments, performing initial cloud detection on remote sensing images based on spectral features to obtain initial common cloud detection results includes the following steps:
[0016] Acquiring target band data of the remote sensing image;
[0017] According to the target band data, the remote sensing image is subjected to a primary cloud mask through the Fmask program to obtain the primary common cloud detection result.
[0018] In some embodiments, before the step of acquiring the texture features of the remote sensing image according to the gray level co-occurrence matrix, the following steps are included:
[0019] Get the size of the segmented image block;
[0020] Get the size of the horizontal border and the size of the vertical border;
[0021] According to the size of the segmented image block, the size of the horizontal boundary and the size of the vertical boundary, the remote sensing image is subjected to image block processing to obtain individual image blocks;
[0022] The row data and the column data of the image blocks are obtained, and the row data and the column data are recorded in an index matrix.
[0023] In some embodiments, obtaining the texture features of the remote sensing image according to the gray level co-occurrence matrix comprises the following steps:
[0024] Obtaining the gray level co-occurrence matrix of each of the image blocks;
[0025] According to the gray level co-occurrence matrix, energy characteristics and correlation characteristics of each of the image blocks are obtained;
[0026] Wherein, the texture feature includes the energy feature and the correlation feature.
[0027] In some embodiments, the energy characteristic is expressed as:
[0028]
[0029] The expression of the correlation feature is:
[0030]
[0031] In the formula, Engy represents energy feature; Corr represents correlation feature; p(i,j) represents grayscale probability; i represents the first grayscale value; j represents the second grayscale value; μ x Represents the average value of grayscale probability in the horizontal direction; μ y Represents the average value of grayscale probability in the vertical direction; σ x Represents the variance of grayscale probability in the horizontal direction; σ y Represents the variance of grayscale probability in the vertical direction.
[0032] In some embodiments, obtaining a common cloud extraction result according to the initial common cloud detection result and the secondary common cloud detection result comprises the following steps:
[0033] An intersection operation is performed on the initial common cloud detection result and the secondary common cloud detection result to obtain the common cloud extraction result.
[0034] In some embodiments, the radiometric calibration of the remote sensing image to obtain reflectivity comprises the following steps:
[0035] Acquiring cirrus cloud band data of the remote sensing image;
[0036] The cirrus cloud band data is calibrated by radiation to obtain the reflectivity of the cirrus cloud band data.
[0037] In some embodiments, obtaining a cirrus cloud extraction result according to the initial cirrus cloud detection result and the secondary cirrus cloud detection result comprises the following steps:
[0038] An intersection operation is performed on the initial cirrus cloud detection result and the secondary cirrus cloud detection result to obtain the cirrus cloud extraction result.
[0039] In some embodiments, obtaining the target cloud detection result according to the common cloud extraction result and the cirrus cloud extraction result comprises the following steps:
[0040] Combining the common cloud extraction result with the cirrus cloud extraction result to obtain an intermediate cloud detection result;
[0041] Performing dilation and erosion operations on the intermediate cloud detection result to obtain the target cloud detection result.
[0042] In some embodiments, the expression of the intermediate cloud detection result is:
[0043] Cloud=(CDBTexture cirrus (B6)∩Cirrus(B9))U(CDBTexture(B6)∩Fmask)
[0044] In the formula, Cloud represents the intermediate cloud detection result; CDBTexture cirrus (b6) represents the secondary cirrus detection result; Cirrus (B9) represents the primary cirrus detection result; CDBTexture (B6) represents the secondary common cloud detection result; Fmask represents the primary common cloud detection result; ∩ represents the intersection operation; ∪ represents the union operation.
[0045] To achieve the above object, another aspect of an embodiment of the present invention provides an optical remote sensing image cloud detection device combining spectral features and texture features, the device comprising:
[0046] The first module is used to perform initial cloud detection on remote sensing images based on spectral features to obtain initial common cloud detection results;
[0047] The second module is used to obtain the texture features of the remote sensing image according to the gray level co-occurrence matrix;
[0048] A third module is used to set a first feature threshold, and obtain a secondary common cloud detection result according to the texture feature and the first feature threshold;
[0049] A fourth module is used to obtain a common cloud extraction result according to the initial common cloud detection result and the secondary common cloud detection result;
[0050] The fifth module is used to perform radiometric calibration on the remote sensing image to obtain reflectivity;
[0051] A sixth module is used to set a second characteristic threshold, and obtain an initial cirrus cloud detection result according to the second characteristic threshold and the reflectivity;
[0052] A seventh module is used to obtain a secondary cirrus cloud detection result according to the texture feature and the second feature threshold;
[0053] An eighth module is used to obtain a cirrus cloud extraction result according to the initial cirrus cloud detection result and the secondary cirrus cloud detection result;
[0054] The ninth module is used to obtain the target cloud detection result according to the ordinary cloud extraction result and the cirrus cloud extraction result.
[0055] To achieve the above-mentioned purpose, another aspect of an embodiment of the present invention provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the optical remote sensing image cloud detection method combining spectral features and texture features as described above.
[0056] To achieve the above-mentioned purpose, another aspect of an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned optical remote sensing image cloud detection method combining spectral features and texture features.
[0057] To achieve the above object, another aspect of an embodiment of the present invention provides a computer program product or a computer program, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the aforementioned optical remote sensing image cloud detection method combining spectral features and texture features.
[0058] The embodiments of the present invention include at least the following beneficial effects: The present application provides a cloud detection method for optical remote sensing images combining spectral features and texture features, and the scheme performs primary cloud detection on remote sensing images based on spectral features to obtain primary common cloud detection results; obtains texture features of the remote sensing images according to a gray-level co-occurrence matrix; sets a first feature threshold, and obtains secondary common cloud detection results according to the texture features and the first feature threshold; obtains common cloud extraction results according to the primary common cloud detection results and the secondary common cloud detection results; performs radiation calibration on the remote sensing images to obtain reflectivity; sets a second feature threshold, and obtains secondary cirrus cloud detection results according to the texture features and the second feature threshold; obtains cirrus cloud extraction results according to the reflectivity, the second feature threshold and the secondary cirrus cloud detection results; obtains target cloud detection results according to the common cloud extraction results and the cirrus cloud extraction results. The present invention performs cloud extraction based on spectral features and performs texture feature cloud extraction based on the gray-level co-occurrence matrix, thereby reducing cloud misclassification errors and improving the accuracy of cloud detection. In addition, the present invention does not require supervised learning, sample division, advance training and other steps, thereby improving the efficiency of cloud detection and reducing labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0060] Figure 1 It is a flow chart of a cloud detection method for optical remote sensing images combining spectral features and texture features provided in an embodiment of the present application;
[0061] Figure 2 It is an overall flow chart of common cloud extraction and cirrus cloud extraction provided by the embodiment of the present application;
[0062] Figure 3a-Figure 3b It is a schematic diagram of the comparison of Fmask detection results provided in the embodiment of the present application;
[0063] Figure 4a-4b is the image segmentation result with different blockSize values provided in the embodiment of the present application;
[0064] Figure 5 It is a schematic diagram of grayscale formula matrix calculation provided in the embodiment of the present application;
[0065] Figure 6a-Figure 6b It is a statistical diagram of cloud snow energy texture features and cloud snow correlation texture features provided in the embodiments of the present application;
[0066] Figure 7a-7d is a schematic diagram of a comparison of cloud detection results provided in an embodiment of the present application;
[0067] Figure 8a-8c is a schematic diagram of the detection results of ordinary clouds and cirrus clouds provided in an embodiment of the present application;
[0068] Figure 9a-9h is a schematic diagram of the final cloud detection result provided by an embodiment of the present application;
[0069] Fig.10 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present invention, and they are only examples of devices and methods consistent with some aspects of the embodiments of the present invention as detailed in the attached claims.
[0071] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the flow chart. The terms "first / S100" and "second / S200" in the specification and claims and the above-mentioned drawings may be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiment of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determination".
[0072] The terms "at least one", "multiple", "each", "any", etc. used in the present invention, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0073] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.
[0074] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0075] Spectral characteristics refer to the characteristics of absorption, reflection and radiation of solar radiation by different substances on the surface or in the atmosphere. Since different substances have unique absorption and reflection properties of sunlight, they show different characteristic reflections or absorptions in the spectrum. Therefore, using remote sensing technology to capture and analyze these characteristic spectral data can assist in identifying and classifying surface cover and inferring the nature and conditions of the surface environment.
[0076] Texture features refer to the irregular, repetitive or regular spatial structures and details of objects or surface covers in images. The spatial distribution of such structures and details can be used to describe and distinguish different types of objects.
[0077] At present, traditional cloud detection algorithms based on spectral features often miss or misdetect in polar ice and snow environments due to the similar spectral characteristics of clouds and snow. Cloud detection based on machine learning and deep learning has poor versatility due to the limitation of training samples. Changing the scene requires retraining of the model, which has high labor costs and long computing time.
[0078] In view of this, if Figure 1 As shown, the present invention provides an optical remote sensing image cloud detection method combining spectral features and texture features. Figure 1 The method may include but is not limited to steps S100 to S800:
[0079] Step S100, performing initial cloud detection on the remote sensing image based on spectral characteristics to obtain initial common cloud detection results;
[0080] Step S200, obtaining texture features of the remote sensing image according to a gray level co-occurrence matrix;
[0081] Step S300, setting a first feature threshold, and obtaining a secondary common cloud detection result according to the texture feature and the first feature threshold;
[0082] Step S400, obtaining a common cloud extraction result according to the initial common cloud detection result and the secondary common cloud detection result;
[0083] Step S500, performing radiometric calibration on the remote sensing image to obtain reflectivity;
[0084] Step S600, setting a second characteristic threshold, and obtaining an initial cirrus cloud detection result according to the second characteristic threshold and the reflectivity;
[0085] Step S700, obtaining a secondary cirrus cloud detection result according to the texture feature and the second feature threshold;
[0086] Step S800, obtaining a cirrus cloud extraction result according to the initial cirrus cloud detection result and the secondary cirrus cloud detection result;
[0087] Step S900, obtaining a target cloud detection result according to the common cloud extraction result and the cirrus cloud extraction result.
[0088] In some embodiments, step S100 may include but is not limited to steps S110 to S120:
[0089] Step S110, obtaining target band data of the remote sensing image;
[0090] Step S120, performing a primary cloud mask on the remote sensing image through the Fmask program according to the target band data to obtain the primary common cloud detection result.
[0091] In steps S110 to S120 of some embodiments, Figure 2 As shown, in the common cloud extraction, the target band data of the remote sensing image is read in, and the remote sensing image is subjected to the initial cloud mask through the Fmask program, thereby obtaining the initial common cloud detection result, which is recorded as Fmask. The target band data may include but is not limited to visible light band data, near infrared band data, and short-wave infrared band data.
[0092] For example, taking Landsat 8 as an example, the B1 band data to the B6 band data of the Landsat 8 image can be read in, wherein the B2-B4 bands are visible light bands, the B5 band is a near infrared band, and the B6 band is a short-wave infrared band. According to the B1 band data to the B6 band data, the Fmask program is used to assign cloud pixels to 1 and non-cloud pixels to 0, and the initial ordinary cloud detection result is obtained. Among them, the Fmask program is an open source code, and Envi 5.3 and above can also be used to run the Fmask3.2 algorithm through "Calculate Cloud Mask Using Fmask Algorithm". Cloud mask is a technology used to identify and remove the influence of clouds in remote sensing images. The cloud mask can improve the quality and availability of data. The initial cloud mask in the embodiment of the present invention combines data from multiple bands and identifies clouds by analyzing the spectral characteristics of the image through an algorithm. For example, the high reflectivity of the B1 band can be used to identify clouds, while the B2 and B3 bands can be used to confirm the presence of clouds and rule out other possible false identifications. In addition, other bands such as B4, B5, and B6 can be combined to improve the accuracy and robustness of the initial cloud mask. Figure 3a-Figure 3b The Fmask detection results shown are: Figure 3a It illustrates the RGB combination of remote sensing images; Figure 3b This figure shows the initial detection results of common clouds using the Fmask program, where the white parts represent clouds.
[0093] Before step S200 in some embodiments, the optical remote sensing image cloud detection method combining spectral features and texture features further includes image block processing. Exemplarily, the image block processing steps may include but are not limited to steps S910 to S940:
[0094] Step S910, obtaining the size of the segmented image block;
[0095] Step S920, obtaining the size of the horizontal boundary and the size of the vertical boundary;
[0096] Step S930, performing image block processing on the remote sensing image according to the size of the segmented image block, the size of the horizontal boundary and the size of the vertical boundary to obtain individual image blocks;
[0097] Step S940, obtaining row data and column data of the image block, and recording the row data and the column data into an index matrix.
[0098] In steps S910 to S940 of some embodiments, first, determine the size blocksize of the segmented image blocks of the remote sensing image, and generally set the size of the segmented image blocks to 32 or 64. Then, calculate the size of the horizontal and vertical boundaries of the remote sensing image, and process the boundary blocks of the boundary part of the remote sensing image by the size of the horizontal and vertical boundaries. Perform block processing according to the size of the segmented image blocks, and process the block of the image boundary part according to the size of the horizontal boundary and the size of the vertical boundary. Through the nested loop of the above two layers of block steps, perform image block processing on the remote sensing image. In each loop, take out an image block of the size blocksize of the segmented image block, calculate the row and column to which the image block belongs, and record the row and column as indexes, and add two dimensions to each pixel in the image block, wherein one dimension records the row index of the image block where the pixel is located (i.e., the number of rows of the image block), and the other dimension records the column index of the image block where the pixel is located, and these two dimensions together form an m*n*2 index matrix, wherein m is the number of image rows and n is the number of image columns. In the subsequent step of calculating the gray level co-occurrence matrix of the block, the pixels with the same index are considered to be in the same block, and the gray level co-occurrence matrix and texture features of each block are calculated accordingly. When the same index condition is met, the index matrix can be used to efficiently extract pixels in the same image block, thereby simplifying the complexity of subsequent programming work.
[0099] In addition, for the border blocks in the border area whose size is smaller than blocksize, separate block processing is performed, that is, for the area where the border part is not large enough to be divided into a whole block, separate block processing can be performed according to the specific situation. Figure 4a-4b Image segmentation results under different blocksize values, Figure 4a This is the image block result when blocksize=1024. Figure 4b This is the image segmentation result when blocksize=128.
[0100] In some embodiments, step S200 may include but is not limited to steps S210 to S220:
[0101] Step S210, obtaining the gray level co-occurrence matrix of each of the image blocks;
[0102] Step S220, obtaining energy features and correlation features of each of the image blocks according to the gray level co-occurrence matrix;
[0103] Wherein, the texture feature includes the energy feature and the correlation feature.
[0104] In step S210 of some embodiments, the texture features of the remote sensing image are calculated using the gray level co-occurrence matrix. Figure 5 As shown in the figure, in the calculation of the gray-level co-occurrence matrix, starting from the pixel point with gray-level value i, the probability of gray-level value j corresponding to the point with a distance d from a fixed position and an orientation of 0°, 45°, 90°, and 135° is p(i,j). All estimated values can be expressed in the form of a matrix to obtain the gray-level co-occurrence matrix. For images with slowly changing textures, the values on the diagonal of the gray-level co-occurrence matrix are large; for images with rapidly changing textures, the values on the diagonal of the gray-level co-occurrence matrix are small, and the values on both sides of the diagonal are large. Due to the large amount of data in the gray-level co-occurrence matrix, it is generally not used directly to distinguish texture features, but some statistics constructed based on it are used as texture classification features.
[0105] In step S220 of some embodiments, the gray level co-occurrence matrix is used to calculate the energy feature Energy (hereinafter uniformly abbreviated as Engy) and the correlation feature Correlation (hereinafter uniformly abbreviated as Corr) of each image block. Among them, the energy feature and the correlation feature are both texture features. The energy feature is the sum of the squares of the elements of the gray level co-occurrence matrix, also known as the angular second-order moment. It is a measure of the uniformity of the grayscale variation of the image texture, reflecting the uniformity of the image grayscale distribution and the coarseness of the texture. The correlation feature is used to measure the similarity of the grayscale of the image in the row or column direction. Then the expression of the energy feature is:
[0106]
[0107] The expression of the correlation feature is:
[0108]
[0109] In the formula, Engy represents energy feature; Corr represents correlation feature; p(i,j) represents grayscale probability; i represents the first grayscale value; j represents the second grayscale value; μ x Represents the average value of grayscale probability in the horizontal direction; μ y Represents the average value of grayscale probability in the vertical direction; σ x Represents the variance of grayscale probability in the horizontal direction; σy Represents the variance of grayscale probability in the vertical direction.
[0110] In step S300 of some embodiments, the first characteristic threshold comprises an energy threshold value Engy threshold And the first correlation threshold Corr threshold,1 , optionally, the energy threshold interval is [0.15, 0.4], and the correlation threshold interval is [0.7, 0.9]. The cloud detection goal can be achieved by selecting the threshold setting within the interval. The difference between different threshold settings lies in the difference in accuracy and running speed. Based on the experience gained from a large number of experiments, the energy threshold can be set to 0.15, the first correlation threshold can be set to 0.7, and then the image blocks with Corr>0.7 and Engy<0.15 are assigned a value of 1 to obtain the secondary common cloud detection result CDBTexture (B6). The source of the feature threshold is as follows Figure 6a-Figure 6b As shown, Figure 6a This is a statistical diagram of cloud and snow energy texture features. Figure 6b It is a statistical chart of cloud-snow correlation texture features, where Snow represents the texture feature statistics corresponding to snow, Cloud represents the texture feature statistics corresponding to cloud, threshold represents the critical value, and the ROI (Region of Interest) number represented by the horizontal axis is the experimental sample number.
[0111] In step S400 of some embodiments, the intersection of the initial common cloud detection result and the secondary common cloud detection result is taken to obtain the common cloud extraction result, which can be expressed as follows:
[0112] Cloud_normal=CDBTexture((B6)∩Fmask
[0113] Where Cloud_normal represents the normal cloud extraction result; CDBTexture(B6) represents the secondary normal cloud detection result; and Fmask represents the initial normal cloud detection result.
[0114] refer to Figure 7a-7d Comparison chart of cloud detection results, Figure 7a is the RGB combination of the original remote sensing image, Figure 7b is the initial cloud detection result, Figure 7c is the secondary common cloud detection result, Figure 7d The intersection and merging results of the first and second common cloud detections, where white pixels represent clouds. It can be obtained that Figure 7b The large area of snow in the upper left corner of the remote sensing image is mistakenly divided into clouds. After introducing texture feature extraction, we can get Figure 7c , Figure 7cA large number of misclassifications were successfully eliminated in the experiment. However, due to the special texture characteristics of the coastal area, snow was still misclassified as clouds. The first ordinary cloud detection result was intersected with the second cloud detection result to obtain Figure 7d Accurately detect clouds in images and avoid a large number of misclassifications.
[0115] In some embodiments, step S500 may include but is not limited to steps S510 to S520:
[0116] Step S510, obtaining cirrus cloud band data of the remote sensing image;
[0117] Step S520: performing radiometric calibration on the cirrus cloud band data to obtain the reflectivity of the cirrus cloud band data.
[0118] In steps S510 to S520 of some embodiments, radiometric calibration is performed on the cirrus cloud band data to obtain the reflectance of the cirrus cloud band data.
[0119] For example, taking Landsat 8 as an example, radiometric calibration is performed on the B9 band data of the Landsat 8 image to obtain the reflectivity of the B9 band data. Radiometric calibration refers to the process of converting the original digital signal received by the remote sensing sensor into a physical quantity by processing it.
[0120] In steps S600 to S700 of some embodiments, the second feature threshold includes a reflectivity threshold and a second correlation threshold Corr threshold,2 According to the experience gained from a large number of experiments, the reflectance threshold is set to 0.003, the second correlation threshold is set to 0.6, and then the result with reflectance>0.003 is recorded as the first cirrus detection result Cirrus(B9), and the result with Corr>0.6 is recorded as the second cirrus detection result CDBTexture cirrus (B6).
[0121] In some embodiments, step S800 may include but is not limited to step S810:
[0122] Step S810: performing an intersection operation on the initial cirrus cloud detection result and the secondary cirrus cloud detection result to obtain the cirrus cloud extraction result.
[0123] In step S810 of some embodiments, by intersecting the initial cirrus cloud detection result with the secondary cirrus cloud detection result, a cirrus cloud extraction result can be obtained, and the following formula is obtained:
[0124] Cloud_cirrus=CDBTexture cirrus(B6)∩Cirrus(B9)
[0125] Where Cloud_cirrus represents the cirrus extraction result; CDBTexture cirrus (B6) represents the secondary cirrus detection result; Cirrus (B9) represents the primary cirrus detection result.
[0126] refer to Figure 8a-8c , Figure 8a is the original remote sensing image, Figure 8b is the common cloud extraction result of the original remote sensing image. Figure 8c This is the cirrus cloud extraction result of the original remote sensing image.
[0127] In some embodiments, step S900 may include but is not limited to steps S910 to S920:
[0128] Step S910, merging the common cloud extraction result and the cirrus cloud extraction result to obtain an intermediate cloud detection result;
[0129] Step S920, performing dilation and erosion operations on the intermediate cloud detection result to obtain the target cloud detection result.
[0130] In step S910 of some embodiments, the ordinary cloud extraction result and the cirrus cloud extraction result are combined to obtain an intermediate cloud detection result expression as follows:
[0131] Cloud=(CDBTexture cirrus ((B6)∩Cirrus(B9))∪(CDBTexture(B6)∩Fmask)
[0132] In the formula, Cloud represents the intermediate cloud detection result; CDBTexture cirrus (B6) represents the secondary cirrus detection result; Cirrus (B9) represents the primary cirrus detection result; CDBTexture (B6) represents the secondary common cloud detection result; Fmask represents the primary common cloud detection result; ∩ represents the intersection operation; ∪ represents the union operation.
[0133] In step S920 of some embodiments, the intermediate cloud detection result is closed with a kernel size of 64 to eliminate holes. Exemplarily, the closing operation generally includes two steps: dilation and erosion. First, the cloud area boundary is expanded by dilation to fill small holes or cracks, and then the expanded boundary is reduced by erosion to eliminate irregular small areas, so that the cloud area boundary is smoother and continuous, thereby obtaining the final target cloud detection result.
[0134] In some embodiments, the calculation process of performing expansion of set A with a structure element of set B is:
[0135]
[0136] In the formula, A and B represent sets; x represents an element in the set; B x represents the set B with x as the structural element center; Represents the dilation operator.
[0137] In some embodiments, the calculation process of performing erosion on set A with the structural element being set B is:
[0138]
[0139] In the formula, Represents the corrosion operator.
[0140] Exemplarily, the calculation process of the closing operation is:
[0141]
[0142] First, dilate set A and use set B as the structural element. The dilation operation causes the elements in set A to expand outward according to the shape of set B. Then erode the dilated result and use set B as the structural element again. The erode operation will eliminate the boundaries expanded by the dilation operation, but will not affect the holes filled by the dilation operation.
[0143] like Figure 9a-9h The final cloud detection result is shown in Figure 2, where Figure 9a This is the original image of the Antarctic coast with few clouds. Figure 9b This is the cloud detection result map of the Antarctic coast with few clouds. Fig.9c This is the original image of the cloudy area along the Antarctic coast. Figure 9d This is the cloud detection result map of the cloudy area along the Antarctic coast. Fig.9e This is the original image of the Antarctic interior. Figure 9f This is the cloud detection result map of the inland area of Antarctica. Figure 9g This is the original image of the coastal area of Greenland. Figure 9h This is a cloud detection result map for the coastal area of Greenland. Figure 9b In the image above, most of the snow is successfully classified, but a small part of the snow in the upper left corner is still misclassified as cloud, while most of the pixels in the coastal area are correctly classified. Figure 9d In the figure, the broken cloud area in the lower right corner is correctly detected, and the pixels in the coastal area are correctly classified; Figure 9f In the middle, most of the cirrus clouds on the right side of the image are successfully detected; Figure 9hThe snow and sea ice in the image are correctly classified. It can be seen that most of the clouds in the final cloud detection results are successfully and correctly classified.
[0144] In some embodiments, Figure 9a-9h For example, for Figure 9a-9h The accuracy of the final cloud detection results can be evaluated by using precision, recall, and accuracy as indicators. The calculation formulas for precision, recall, and accuracy are:
[0145]
[0146] In the formula, Precision represents precision; Recall represents recall; Accuracy represents accuracy; TP represents a correct positive example, that is, an instance is a positive class and is also judged as a positive class; FP represents a false positive example, that is, due to a false positive, it is a false class but is judged as a positive class; FN represents a false negative example, that is, due to a false negative, it is a positive class but is judged as a false class; TN represents a correct negative example, that is, an instance is a false class and is also judged as a false class.
[0147] Then the quantitative accuracy evaluation of cloud detection can be obtained as shown in Table 1 below.
[0148] Table 1
[0149] Image number Recall Accuracy Accuracy Figure 9a 、 Figure 9b 76.1% 97.0% 95.6% Fig.9c 、 Figure 9d 95.6% 97.4% 96.3% Fig.9e 、 Figure 9f 91.9% 99.9% 94.4% Figure 9g 、 Figure 9h 97.4% 99.3% 98.8% average 90.3% 98.4% 96.3%
[0150] In addition, F-score is an indicator that comprehensively considers precision and recall. Its value range is between 0 and 1. The closer the value is to 1, the better the performance of the classifier. Its calculation formula is as follows:
[0151]
[0152] In the formula, F-score represents an indicator that comprehensively considers precision and recall.
[0153] The accuracy comparison of various cloud detection algorithms in ice and snow environments can be obtained as shown in Table 2 below.
[0154] Table 2
[0155] Algorithm Name Recall Accuracy Accuracy F-score cfmask 86.6% 75.7% 64.1% 0.81 cfmask-t-cirrus 94.3% 36.5% 45.1% 0.53 cfmask-nt-cirrus 99.2% 36.5% 48.4% 0.53 ACCA 99.3% 71.6% 67.9% 0.83 AT-ACCA 98.4% 69.5% 68.3% 0.81 Algorithm of the present invention 88.0% 94.2% 93.3% 0.91
[0156] The embodiment of the present invention further provides an optical remote sensing image cloud detection device combining spectral features and texture features, which can implement the above-mentioned optical remote sensing image cloud detection method combining spectral features and texture features, and the device includes:
[0157] The first module is used to perform initial cloud detection on remote sensing images based on spectral features to obtain initial common cloud detection results;
[0158] The second module is used to obtain the texture features of the remote sensing image according to the gray level co-occurrence matrix;
[0159] A third module is used to set a first feature threshold, and obtain a secondary common cloud detection result according to the texture feature and the first feature threshold;
[0160] A fourth module is used to obtain a common cloud extraction result according to the initial common cloud detection result and the secondary common cloud detection result;
[0161] The fifth module is used to perform radiometric calibration on the remote sensing image to obtain reflectivity;
[0162] A sixth module is used to set a second characteristic threshold, and obtain an initial cirrus cloud detection result according to the second characteristic threshold and the reflectivity;
[0163] A seventh module is used to obtain a secondary cirrus cloud detection result according to the texture feature and the second feature threshold;
[0164] An eighth module is used to obtain a cirrus cloud extraction result according to the initial cirrus cloud detection result and the secondary cirrus cloud detection result;
[0165] The ninth module is used to obtain the target cloud detection result according to the ordinary cloud extraction result and the cirrus cloud extraction result.
[0166] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0167] The embodiment of the present invention further provides an electronic device, which includes a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the optical remote sensing image cloud detection method combining spectral features and texture features is implemented. The electronic device can be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.
[0168] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0169] refer to Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0170] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0171] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes an optical remote sensing image cloud detection method combining spectral features and texture features in the embodiment of this application;
[0172] Input / output interface 1003, used to implement information input and output;
[0173] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0174] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );
[0175] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0176] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned optical remote sensing image cloud detection method combining spectral features and texture features.
[0177] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0178] The embodiment of the present invention also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the aforementioned optical remote sensing image cloud detection method combining spectral features and texture features.
[0179] In summary, the optical remote sensing image cloud detection method combining spectral features and texture features according to an embodiment of the present invention has the following advantages:
[0180] 1. The embodiment of the present invention introduces a method for secondary extraction of clouds based on texture features to avoid misclassifying snow as clouds, greatly reducing the cloud misclassification error and improving the accuracy of cloud detection.
[0181] 2. Compared with traditional support vector machines, random forest classification, machine learning and deep learning algorithms, the embodiments of the present invention do not require supervised learning, sample division, advance training and other steps, reduce the steps of manual labeling of samples and pre-training, improve cloud detection efficiency, and reduce labor costs.
[0182] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0183] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0184] 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 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 each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0185] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0186] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0187] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0188] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0189] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0190] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. An optical remote sensing image cloud detection method combining spectral features and texture features, characterized in that: The following steps are involved: Based on the spectral characteristics, the remote sensing image is used for initial cloud detection, and the initial common cloud detection results are obtained; Acquiring texture features of the remote sensing image according to a gray level co-occurrence matrix; Setting a first feature threshold, and obtaining a secondary common cloud detection result according to the texture feature and the first feature threshold; Obtaining a common cloud extraction result according to the initial common cloud detection result and the secondary common cloud detection result; Performing radiometric calibration on the remote sensing image to obtain reflectivity; Setting a second characteristic threshold, and obtaining an initial cirrus cloud detection result according to the second characteristic threshold and the reflectivity; Obtaining a secondary cirrus cloud detection result according to the texture feature and the second feature threshold; Obtaining a cirrus cloud extraction result according to the initial cirrus cloud detection result and the secondary cirrus cloud detection result; A target cloud detection result is obtained according to the common cloud extraction result and the cirrus cloud extraction result.
2. The optical remote sensing image cloud detection method combining spectral features and texture features according to claim 1, characterized in that: The method of performing initial cloud detection on remote sensing images based on spectral characteristics to obtain initial common cloud detection results includes the following steps: Acquiring target band data of the remote sensing image; According to the target band data, the remote sensing image is subjected to a primary cloud mask through the Fmask program to obtain the primary common cloud detection result.
3. The optical remote sensing image cloud detection method combining spectral features and texture features according to claim 1, characterized in that: Before the step of obtaining the texture features of the remote sensing image according to the gray level co-occurrence matrix, the following steps are included: Get the size of the segmented image block; Get the size of the horizontal border and the size of the vertical border; According to the size of the segmented image block, the size of the horizontal boundary and the size of the vertical boundary, the remote sensing image is subjected to image block processing to obtain individual image blocks; The row data and the column data of the image blocks are obtained, and the row data and the column data are recorded in an index matrix.
4. The optical remote sensing image cloud detection method combining spectral features and texture features according to claim 3, characterized in that: The step of obtaining the texture features of the remote sensing image according to the gray level co-occurrence matrix comprises the following steps: Obtaining the gray level co-occurrence matrix of each of the image blocks; According to the gray level co-occurrence matrix, energy characteristics and correlation characteristics of each of the image blocks are obtained; Wherein, the texture feature includes the energy feature and the correlation feature.
5. The optical remote sensing image cloud detection method combining spectral features and texture features according to claim 4, characterized in that: The expression of the energy characteristic is: The expression of the correlation feature is: In the formula, Engy represents the energy characteristic; Corr represents the correlation characteristic; p(i,j) represents the grayscale probability; i represents the first grayscale value; j represents the second grayscale value; μ x Represents the average value of grayscale probability in the horizontal direction; μ y Represents the average value of grayscale probability in the vertical direction; σ x Represents the variance of grayscale probability in the horizontal direction; σ y Represents the variance of grayscale probability in the vertical direction.
6. The optical remote sensing image cloud detection method combining spectral features and texture features according to claim 1, characterized in that: The obtaining of the common cloud extraction result according to the first common cloud detection result and the second common cloud detection result comprises the following steps: An intersection operation is performed on the initial common cloud detection result and the secondary common cloud detection result to obtain the common cloud extraction result.
7. The optical remote sensing image cloud detection method combining spectral features and texture features according to claim 1, characterized in that: The step of performing radiometric calibration on the remote sensing image to obtain reflectivity comprises the following steps: Acquiring cirrus cloud band data of the remote sensing image; The cirrus cloud band data is calibrated by radiation to obtain the reflectivity of the cirrus cloud band data.
8. The optical remote sensing image cloud detection method combining spectral features and texture features according to claim 1, characterized in that: The step of obtaining a cirrus cloud extraction result according to the initial cirrus cloud detection result and the secondary cirrus cloud detection result comprises the following steps: An intersection operation is performed on the initial cirrus cloud detection result and the secondary cirrus cloud detection result to obtain the cirrus cloud extraction result.
9. The optical remote sensing image cloud detection method combining spectral features and texture features according to claim 1, characterized in that: The step of obtaining a target cloud detection result according to the common cloud extraction result and the cirrus cloud extraction result comprises the following steps: Combining the common cloud extraction result with the cirrus cloud extraction result to obtain an intermediate cloud detection result; Performing dilation and erosion operations on the intermediate cloud detection result to obtain the target cloud detection result.
10. The optical remote sensing image cloud detection method combining spectral features and texture features according to claim 9, characterized in that: The expression of the intermediate cloud detection result is: Cloud=(CDBTexture cirrus (B6)∩Cirrus(B9))∪(CDBTexture(B6)∩Fmask) In the formula, Cloud represents the intermediate cloud detection result; CDBTexture cirrus (B6) represents the secondary cirrus detection result; Cirrus (B9) represents the primary cirrus detection result; CDBTexture (B6) represents the secondary common cloud detection result; Fmask represents the initial common cloud detection result; ∩ represents the intersection operation; ∪ represents the union operation.
Citation Information
Patent Citations
Cloud recognition method and device of remote sensing image, electronic equipment and readable storage medium
CN114581793A
Identifying targets within images
US20210012508A1
Cited By
Ice fracture identification method based on multi-source remote sensing data
CN120807562A
