A cloud detection method based on optical remote sensing images combining spectral and texture features
By combining the spectral characteristics and texture characteristics of optical remote sensing image cloud detection methods, the problems of missed detection and false detection in cloud detection in polar ice and snow environments are solved, efficient and accurate cloud detection is achieved, and labor costs are reduced.
Patent Information
- Application Number
- CN202411222258.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-09-02
AI Technical Summary
In polar ice and snow environments, traditional cloud detection algorithms based on spectral features are prone to missed detections or false detections. Cloud detection methods based on machine learning and deep learning have poor versatility, high labor costs, and long calculation times.
An optical remote sensing image cloud detection method that combines spectral and texture features gradually improves the accuracy and efficiency of cloud detection through initial cloud detection, texture feature extraction, radiometric calibration, and feature threshold setting, including the use of Fmask program, gray-level co-occurrence matrix, and image block processing techniques.
It improves the accuracy of cloud detection, reduces misclassification errors, reduces labor costs, and eliminates the need for supervised learning and sample training, thereby improving detection efficiency.
Smart Images

Figure CN119206526B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, 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 primary sources of noise in terrestrial optical satellite data, and their detection is the prerequisite and foundation for most quantitative remote sensing analyses. This is especially true in icy environments, where the similar spectral properties of clouds and snow often lead to missed or false detections. Polar regions are sensitive to global climate change, with phenomena such as ice sheet melting, glacier movement, and changes in interglacial waterways crucial for understanding and predicting global climate change. The harsh climatic and geographical conditions of the polar regions make the construction and maintenance of ground-based observation stations difficult, making satellite remote sensing the primary means of observing these regions.
[0003] With the development of satellite remote sensing technology, cloud detection techniques using optical remote sensing satellite imagery are primarily divided into three categories: spectral-based cloud detection, machine learning-based cloud detection, and deep learning-based cloud detection. Traditional spectral-based cloud detection algorithms perform well in low- and mid-latitude regions, but 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, however, is less versatile due to limited training samples. Changing scenes requires retraining the model, which is labor-intensive and time-consuming. Summary of the Invention
[0004] In view of this, the main purpose of the embodiments of the present invention is to provide an optical remote sensing image cloud detection method that combines spectral characteristics and texture characteristics, 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 objectives, an embodiment of the present invention provides a cloud detection method for optical remote sensing images combining spectral features and texture features, the method comprising the following steps:
[0006] Based on 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 based on 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 based on 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 obtaining 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] 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;
[0022] The row data and 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 includes the following steps:
[0024] Obtaining a gray level co-occurrence matrix of each of the image blocks;
[0025] Obtaining energy features and correlation features of each of the image blocks according to the gray-level co-occurrence matrix;
[0026] The texture features include the energy features and the correlation features.
[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 based on 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, performing radiometric calibration on the remote sensing image to obtain reflectivity includes the following steps:
[0035] Obtaining cirrus cloud band data of the remote sensing image;
[0036] Radiometric calibration is performed on the cirrus cloud band data to obtain the reflectivity of the cirrus cloud band data.
[0037] In some embodiments, obtaining a cirrus cloud extraction result based on 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 a target cloud detection result based on the common cloud extraction result and the cirrus cloud extraction result includes the following steps:
[0040] Merging the ordinary 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 intermediate cloud detection result is expressed as:
[0043] Cloud=(CDBTexture cirrus (B6)∩Cirrus(B9))U(CDBTexture(B6)∩Fmask)
[0044] Where Cloud represents the intermediate cloud detection result; CDBTexture cirrus (b6) represents the secondary cirrus cloud detection result; Cirrus (B9) represents the primary cirrus cloud detection result; CDBTexture (B6) represents the secondary normal cloud detection result; Fmask represents the primary normal cloud detection result; ∩ represents the intersection operation; ∪ represents the union operation.
[0045] To achieve the above objectives, another aspect of the present invention provides an optical remote sensing image cloud detection device that combines 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 characteristics and 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 configured to set a first feature threshold and obtain a secondary common cloud detection result based on the texture feature and the first feature threshold;
[0049] A fourth module is configured to obtain a common cloud extraction result based on 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, configured to set a second characteristic threshold, and obtain an initial cirrus cloud detection result based on the second characteristic threshold and the reflectivity;
[0052] a seventh module, configured to obtain a secondary cirrus cloud detection result based on the texture feature and the second feature threshold;
[0053] An eighth module is configured to obtain a cirrus cloud extraction result based on the initial cirrus cloud detection result and the secondary cirrus cloud detection result;
[0054] The ninth module is used to obtain a target cloud detection result based on 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 aforementioned optical remote sensing image cloud detection method that combines spectral characteristics and texture characteristics.
[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 aforementioned optical remote sensing image cloud detection method that combines spectral features and texture features.
[0057] To achieve the above objectives, another aspect of an embodiment of the present invention provides a computer program product or computer program, comprising 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 execute the computer instructions, causing the computer device to perform the aforementioned optical remote sensing image cloud detection method combining spectral and texture features.
[0058] 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 that combines spectral features and texture features. The scheme performs primary cloud detection on remote sensing images based on spectral features to obtain a primary ordinary cloud detection result; obtains texture features of the remote sensing image according to a gray-level co-occurrence matrix; sets a first feature threshold, and obtains a secondary ordinary cloud detection result according to the texture features and the first feature threshold; obtains an ordinary cloud extraction result according to the primary ordinary cloud detection result and the secondary ordinary cloud detection result; performs radiometric calibration on the remote sensing image to obtain reflectivity; sets a second feature threshold, and obtains a secondary cirrus cloud detection result according to the texture features and the second feature threshold; obtains a cirrus cloud extraction result according to the reflectivity, the second feature threshold, and the secondary cirrus cloud detection result; and obtains a target cloud detection result according to the ordinary cloud extraction result and the cirrus cloud extraction result. The present invention extracts clouds based on spectral features and extracts texture feature clouds based on the gray-level co-occurrence matrix, which reduces cloud misclassification errors and improves the accuracy of cloud detection. In addition, the present invention does not require supervised learning, sample division, advance training and other steps, which can improve the efficiency of cloud detection and reduce 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 following briefly introduces the drawings required for use in the description of the embodiments. 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 any creative work.
[0060] Figure 1 This 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 This is an overall flow chart of common cloud extraction and cirrus cloud extraction provided by the embodiments of the present application;
[0062] Figure 3a-Figure 3b Schematic diagram of the comparison of Fmask detection results provided in the embodiment of the present application;
[0063] Figure 4a-4b The image segmentation results with different blockSize values provided in the embodiments of the present application are as follows;
[0064] Figure 5 Schematic diagram of grayscale formula matrix calculation provided in the embodiment of the present application;
[0065] Figure 6a-6b This is a statistical graph of cloud-snow energy texture features and cloud-snow correlation texture features provided by the embodiments of the present application;
[0066] Figure 7a-7d Schematic diagram of the comparison of cloud detection results provided by the embodiment of the present application;
[0067] Figure 8a-8c Schematic diagram of the detection results of ordinary clouds and cirrus clouds provided by the 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] Figure 10 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for the purpose of explaining 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. They are merely examples of devices and methods consistent with some aspects of the embodiments of the present invention as detailed in the appended claims.
[0071] It should be noted that although the functional modules are divided in the system schematic and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100" and "second / S200" in the specification and claims and the above-mentioned figures may be used herein to describe various concepts, 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 embodiments 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 a determination".
[0072] The terms "at least one", "plurality", "each", "any", etc. used in the present invention include at least one, two or more, multiple, 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 commonly understood by those skilled in the art to which the present invention pertains. The terms used herein are for the purpose of describing embodiments of the present invention only and are not intended to limit the present invention.
[0074] Before explaining the embodiments of the present application in detail, some of the nouns and terms involved in the embodiments of the present application are first explained. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0075] Spectral signatures refer to the absorption, reflection, and emission characteristics of solar radiation by different substances on the Earth's surface or in the atmosphere. Because different substances have unique absorption and reflection properties of sunlight, they exhibit distinct characteristic reflection or absorption patterns 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 condition of the surface environment.
[0076] Texture features refer to the irregular, repetitive, or regular spatial structures and details of objects or surface cover in images. The spatial distribution of these structures and details can be used to describe and distinguish different types of objects.
[0077] Currently, 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 algorithms based on machine learning and deep learning, however, are less versatile due to limited training samples. Changing scenarios requires retraining the model, which is labor-intensive and time-consuming.
[0078] In view of this, if Figure 1 As shown, the present invention provides an optical remote sensing image cloud detection method that combines 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 the gray level co-occurrence matrix;
[0081] Step S300: setting a first feature threshold, and obtaining a secondary common cloud detection result based on the texture feature and the first feature threshold;
[0082] Step S400, obtaining a common cloud extraction result based on 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 based on the second characteristic threshold and the reflectivity;
[0085] Step S700, obtaining a secondary cirrus cloud detection result based on the texture feature and the second feature threshold;
[0086] Step S800, obtaining a cirrus cloud extraction result based on the initial cirrus cloud detection result and the secondary cirrus cloud detection result;
[0087] Step S900: Obtain a target cloud detection result based on 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 according to the target band data through the Fmask program to obtain the primary common cloud detection result.
[0091] In steps S110 to S120 of some embodiments, Figure 2 As shown in Figure 1, in common cloud extraction, the target band data of the remote sensing image is read in and the remote sensing image is subjected to an initial cloud mask using the Fmask program to obtain 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, using Landsat 8 as an example, data from bands B1 to B6 of the Landsat 8 image can be read in. Bands B2-B4 represent visible light, band B5 represents the near-infrared band, and band B6 represents the shortwave infrared band. Based on the data from bands B1 to B6, the Fmask program is used to assign cloud pixels a value of 1 and non-cloud pixels a value of 0, thereby obtaining the initial normal cloud detection result. The Fmask program is open source code, and Envi 5.3 and above can also be used to run the Fmask3.2 algorithm using the "Calculate Cloud Mask Using Fmask Algorithm" function. Cloud masking is a technique used to identify and remove cloud effects from remote sensing imagery, improving data quality and usability. The initial cloud mask in this embodiment combines data from multiple bands and uses an algorithm to analyze the spectral characteristics of the image to identify clouds. 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 white areas represent clouds.
[0093] In some embodiments, before step S200, the optical remote sensing image cloud detection method combining spectral features and texture features further includes image segmentation. For example, the image segmentation 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: Obtain row data and column data of the image block, and record the row data and column data into an index matrix.
[0098] In some embodiments, in steps S910 to S940, first, the size (blocksize) of the segmented image blocks of the remote sensing image is determined. Generally, the size of the segmented image blocks can be set to 32 or 64. Then, the sizes of the horizontal and vertical boundaries of the remote sensing image are calculated. Based on the sizes of the horizontal and vertical boundaries, the boundary blocks of the remote sensing image boundary portion can be processed. Block processing is performed based on the size of the segmented image blocks, and the image boundary blocks are processed based on the sizes of the horizontal and vertical boundaries. Through a nested loop of these two layers of block processing, the remote sensing image is segmented. In each loop, an image block of the size (blocksize) of the segmented image block is taken, the row and column to which the image block belongs are calculated, and the row and column are recorded as indexes. In addition, two dimensions are added to each pixel in the image block: one dimension records the row index (i.e., the row number of the image block) of the image block in which the pixel is located, and the other dimension records the column index of the image block in which the pixel is located. These two dimensions together form an m*n*2 index matrix, where 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 for each block, 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 within the same image block, simplifying the complexity of subsequent programming.
[0099] In addition, for the boundary blocks in the boundary area whose size is less than blocksize, separate block processing is performed, that is, for the area where the boundary 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 is the image block result when blocksize=1024, Figure 4b This is the image block 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] The texture features include the energy features and the correlation features.
[0104] In step S210 of some embodiments, the texture features of the remote sensing image are calculated using the gray level co-occurrence matrix. For example, Figure 5 As shown in Figure 1, in calculating the gray-level co-occurrence matrix, starting from a pixel with gray-level value i, the probability of gray-level value j corresponding to a point at a distance d from a fixed position and at orientations of 0°, 45°, 90°, and 135° is p(i, j). All estimated values can be expressed as a matrix, resulting in the gray-level co-occurrence matrix. For images with slowly changing textures, the diagonal values of the gray-level co-occurrence matrix are large; for images with rapidly changing textures, the diagonal values of the gray-level co-occurrence matrix are small, with larger values on both sides of the diagonal. Due to the large amount of data in the gray-level co-occurrence matrix, it is generally not used directly to distinguish texture features. Instead, 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 moment. It is a measure of the uniformity of the grayscale change 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 includes an energy threshold 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 can be 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-6b As shown, Figure 6a is a statistical graph of cloud and snow energy texture characteristics, Figure 6b This is a statistical graph 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 are shown in Figure 2. White pixels represent clouds. 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, but due to the special texture characteristics of the coastal area, snow was still misclassified as clouds. The intersection of the initial ordinary cloud detection result and the secondary cloud detection result was obtained. 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, using Landsat 8 as an example, radiometric calibration can be 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 raw digital signals received by the remote sensing sensor into physical quantities by processing them.
[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 Based on 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, the cirrus cloud extraction result may be obtained by intersecting the initial cirrus cloud detection result with the secondary cirrus cloud detection result, and the following formula is used:
[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 normal cloud extraction result and the cirrus cloud extraction result to obtain an intermediate cloud detection result;
[0129] Step S920: Perform 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 expressed as:
[0131] Cloud=(CDBTexture cirrus ((B6)∩Cirrus(B9))∪(CDBTexture(B6)∩Fmask)
[0132] Where Cloud represents the intermediate cloud detection result; CDBTexture cirrus (B6) represents the secondary cirrus cloud detection result; Cirrus (B9) represents the primary cirrus cloud detection result; CDBTexture (B6) represents the secondary normal cloud detection result; Fmask represents the primary normal cloud detection result; ∩ represents the intersection operation; ∪ represents the union operation.
[0133] In step S920 of some embodiments, the intermediate cloud detection result is subjected to a closing operation 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, making the cloud area boundary 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 the structure element being set B is:
[0135]
[0136] In the formula, A and B represent the sets; x represents the elements 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 structuring element being set B is:
[0138]
[0139] Where, Represents the corrosion operator.
[0140] Exemplarily, the calculation process of the closing operation is:
[0141]
[0142] First, dilate set A, using set B as the structuring 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, again using set B as the structuring element. The erosion operation removes the edges expanded by the dilation operation but does 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. Figure 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. Figure 9e This is the original image of the Antarctic interior. Figure 9f This is the cloud detection result map for the inland area of Antarctica. Figure 9g This is the original image of the coastal area of Greenland. Figure 9h This is the cloud detection result map of the coastal area of Greenland. Figure 9b In the image, most of the snow is successfully classified, but a small part of the snow in the upper left corner is 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. This shows 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] Where Precision stands for precision; Recall stands for recall; Accuracy stands for accuracy; TP stands for true positive example, that is, an instance is in the positive class and is also judged as the positive class; FP stands for false positive example, that is, due to false positive, it is a false class but is judged as the positive class; FN stands for false negative example, that is, due to false negative, it is a positive class but is judged as the false class; TN stands for true negative example, that is, an instance is in the false class and is also judged as the false class.
[0147] Then we can obtain the quantitative accuracy evaluation of cloud detection 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% Figure 9c 、 Figure 9d 95.6% 97.4% 96.3% Figure 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 snowy 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] An embodiment of the present invention further provides an optical remote sensing image cloud detection device that combines spectral features and texture features, which can implement the above-mentioned optical remote sensing image cloud detection method that combines spectral features and texture features. The device includes:
[0157] The first module is used to perform initial cloud detection on remote sensing images based on spectral characteristics and 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 configured to set a first feature threshold and obtain a secondary common cloud detection result based on the texture feature and the first feature threshold;
[0160] A fourth module is configured to obtain a common cloud extraction result based on 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, configured to set a second characteristic threshold, and obtain an initial cirrus cloud detection result based on the second characteristic threshold and the reflectivity;
[0163] a seventh module, configured to obtain a secondary cirrus cloud detection result based on the texture feature and the second feature threshold;
[0164] An eighth module is configured to obtain a cirrus cloud extraction result based on the initial cirrus cloud detection result and the secondary cirrus cloud detection result;
[0165] The ninth module is used to obtain a target cloud detection result based on 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] An embodiment of the present invention further provides an electronic device comprising a processor and a memory, the memory storing a computer program. When the processor executes the computer program, it implements the aforementioned optical remote sensing image cloud detection method combining spectral and texture features. The electronic device can be any intelligent terminal, including a tablet computer and an in-vehicle computer.
[0168] It can be understood that the contents of the above method embodiments are 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 Figure 10 , Figure 10 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0170] The processor 1001 can be implemented as 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 solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called by the processor 1001 to execute the optical remote sensing image cloud detection method combining spectral characteristics and texture characteristics of the embodiments of this application;
[0172] Input / output interface 1003, used to implement information input and output;
[0173] Communication interface 1004, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0174] Bus 1005 , which transmits information between various components of the device (e.g., processor 1001 , memory 1002 , input / output interface 1003 , and 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. When the computer program is executed by a processor, the computer program 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 embodiment, the functions specifically implemented by the present storage medium embodiment 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] Embodiments of the present invention also provide a computer program product or computer program, comprising 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 execute the computer instructions, causing the computer device to perform the aforementioned optical remote sensing image cloud detection method combining spectral 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 cloud extraction based on texture features to avoid misclassifying snow as clouds, greatly reducing cloud misclassification errors and improving the accuracy of cloud detection.
[0181] 2. Compared with traditional support vector machines, random forest classification methods, machine learning and deep learning algorithms, the embodiments of the present invention do not require supervised learning, sample division, pre-training and other steps, reduce the steps of manual sample labeling and pre-training, improve cloud detection efficiency, and reduce labor costs.
[0182] In some optional 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 in an exemplary manner for the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are contemplated in which the order of the various operations is changed and the sub-operations described as a part of a larger operation are performed independently.
[0183] Furthermore, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise indicated, 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 will also be understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present invention. More specifically, given the properties, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the module will be understood within the ordinary skill of an engineer. Therefore, a person skilled in the art using ordinary skill will be able to implement the present invention set forth in the claims without undue experimentation. It will also be 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 and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0185] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0186] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be 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 processing in another suitable manner as necessary, and then stored in a computer memory.
[0187] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0188] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0189] While 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 invention, and that the scope of the 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 embodiments. Those skilled in the art can 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. A cloud detection method based on optical remote sensing images combining spectral and texture features, characterized in that: The following steps are involved: Based on 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 based on 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 based on 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 characteristics and texture characteristics according to claim 1 is 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 characteristics and texture characteristics according to claim 1 is 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; 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; The row data and 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 characteristics and texture characteristics according to claim 3 is 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 a gray level co-occurrence matrix of each of the image blocks; Obtaining energy features and correlation features of each of the image blocks according to the gray-level co-occurrence matrix; The texture features include the energy features and the correlation features.
5. The optical remote sensing image cloud detection method combining spectral characteristics and texture characteristics according to claim 4 is characterized in that: The expression of the energy characteristic is: The expression of the correlation feature is: Where, 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 characteristics and texture characteristics according to claim 1, characterized in that: Obtaining a common cloud extraction result based on the initial common cloud detection result and the secondary common cloud detection result includes 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 characteristics and texture characteristics according to claim 1, characterized in that: The radiometric calibration of the remote sensing image to obtain reflectivity comprises the following steps: Obtaining cirrus cloud band data of the remote sensing image; Radiometric calibration is performed on the cirrus cloud band data to obtain the reflectivity of the cirrus cloud band data.
8. The optical remote sensing image cloud detection method combining spectral characteristics and texture characteristics according to claim 1, characterized in that: Obtaining a cirrus cloud extraction result based on the initial cirrus cloud detection result and the secondary cirrus cloud detection result includes 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 characteristics and texture characteristics according to claim 1, characterized in that: Obtaining a target cloud detection result based on the common cloud extraction result and the cirrus cloud extraction result includes the following steps: Merging the ordinary 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 characteristics and texture characteristics 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) Where Cloud represents the intermediate cloud detection result; CDBTexture cirrus (B6) represents the secondary cirrus cloud detection result; Cirrus (B9) represents the primary cirrus cloud 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