CN112200787B - Cloud detection method, storage medium and system for optical remote sensing image - Google Patents

Cloud detection method, storage medium and system for optical remote sensing image Download PDF

Info

Publication number
CN112200787B
CN112200787B CN202011102510.1A CN202011102510A CN112200787B CN 112200787 B CN112200787 B CN 112200787B CN 202011102510 A CN202011102510 A CN 202011102510A CN 112200787 B CN112200787 B CN 112200787B
Authority
CN
China
Prior art keywords
image
cloud
cloud detection
remote sensing
optical remote
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011102510.1A
Other languages
Chinese (zh)
Other versions
CN112200787A (en
Inventor
郭擎
要旭东
李安
张洪群
陈勃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aerospace Information Research Institute of CAS
Original Assignee
Aerospace Information Research Institute of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aerospace Information Research Institute of CAS filed Critical Aerospace Information Research Institute of CAS
Priority to CN202011102510.1A priority Critical patent/CN112200787B/en
Publication of CN112200787A publication Critical patent/CN112200787A/en
Application granted granted Critical
Publication of CN112200787B publication Critical patent/CN112200787B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • G06V20/13Satellite images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10032Satellite or aerial image; Remote sensing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30181Earth observation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Astronomy & Astrophysics (AREA)
  • Remote Sensing (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a cloud detection method, a storage medium and a system of an optical remote sensing image, wherein the method comprises the following steps: image preprocessing: converting the digital quantization value on the optical remote sensing image into the atmospheric layer top reflectivity to obtain a preprocessed image; feature extraction: extracting features suitable for separating clouds and the underlying surface of the ground object from the preprocessed image from the visible light and the near infrared wave band; establishing a training sample set: selecting sample points representing different types of clouds and ground objects from an existing image data set to form a training sample set; constructing a random forest model: constructing a random forest cloud detection model through a training sample set; image cloud detection: and carrying out cloud detection on the optical remote sensing image to be detected by using a random forest cloud detection model, and carrying out fine processing by using guide filtering to obtain a cloud mask image. According to the scheme, the cloud detection model is established by selecting appropriate characteristics and combining a machine learning algorithm, the optical remote sensing image is subjected to cloud detection, and the accuracy is high.

Description

Cloud detection method, storage medium and system for optical remote sensing image
Technical Field
The invention relates to the technical field of image processing, in particular to a cloud detection method, a storage medium and a system for optical remote sensing images.
Background
The space above the earth is covered with a large amount of clouds, and the cloud coverage can cause information change or loss of optical remote sensing images, so that inconvenience is caused to the use of subsequent images, the cloud detection work of the optical remote sensing images is very important, the rapid and efficient cloud detection technology can judge or reject images with large cloud coverage, the pressure of processing system storage space, data transmission and product processing is reduced, and reference can be provided for the selection of the subsequent images.
The existing cloud detection method of the optical remote sensing image generally needs to analyze and determine a threshold value which is most suitable for separating cloud and ground objects according to the difference of visible light wave band reflectivity, infrared spectrum band brightness temperature and other normalization indexes of the cloud and most ground targets. In the process, more human participation is needed for setting the threshold, the subjectivity is strong, and the threshold can be different along with the change of seasons and geographic positions of the optical remote sensing image, so that the accuracy of the detection result is poor. In addition, because the wave band ranges of different remote sensing sensors are different from the spectral response function, the existing cloud detection method can only detect certain specific products and cannot be popularized to most sensors.
Disclosure of Invention
The invention aims to provide a cloud detection method, a storage medium and a system for optical remote sensing images, and aims to solve the technical problems of low accuracy and limited application scene of the conventional detection method.
Therefore, some embodiments of the present invention provide a cloud detection method for optical remote sensing images, which includes the following steps:
image preprocessing: converting the digital quantization value on the optical remote sensing image into the atmospheric layer top reflectivity to obtain a preprocessed image;
feature extraction: extracting features suitable for separating clouds and subsurface bedding surfaces of the ground objects from the preprocessed images from visible light and near infrared bands;
establishing a training sample set: selecting sample points representing different types of clouds and ground objects from an existing image data set to form a training sample set;
constructing a random forest model: constructing a random forest cloud detection model through the training sample set;
image cloud detection: and carrying out cloud detection on the optical remote sensing image to be detected by using the random forest cloud detection model, and carrying out fine processing by using guide filtering to obtain a cloud mask image.
Optionally, in the cloud detection method of the optical remote sensing image, in the image preprocessing step, the digital quantization value is converted into the atmospheric layer top reflectivity by the following method:
L λ =Gain*DN+Bias;
Figure BDA0002725865840000021
wherein DN is a digital quantization value, L λ Is the on-satellite radiance; gain is a calibration slope; bias is a calibration intercept; ρ is a unit of a gradient TOA Is the atmospheric layer top reflectivity; d is a unit distance of astronomy in the day and the earth; ESUN is the top solar irradiance of the atmospheric layer; theta is the solar zenith angle.
Optionally, in the above cloud detection method for optical remote sensing images, in the feature extraction step:
based on the different reflection and texture characteristics between the cloud and the terrain underlying surface, the features extracted from the pre-processed image include:
reflection spectrum characteristics: according to the characteristic that the cloud presents high brightness and continuous coverage on the optical remote sensing image, the spectral information of visible light and near infrared wave bands is used as characteristics to distinguish the cloud from the ground object underlying surface;
IHS spatial characteristics: after the RGB space of the preprocessed image is converted into an IHS space, the cloud and the ground object underlying surface are distinguished according to the characteristic that the pixel value of the cloud in a brightness channel I is higher than the ground object underlying surface and the pixel value of the cloud in a saturation S channel is lower than the ground object underlying surface; wherein, I represents brightness, H represents chroma, and S represents saturation;
dark channel characteristics: after the preprocessed image is processed by a dark channel, the cloud and the ground object underlying surface are separated according to the characteristic that the pixel value reduction of the ground object underlying surface is greater than that of the cloud area;
white index characterization: distinguishing the cloud from the ground object underlying surface according to the characteristic that the white index obtained by cloud pixel calculation is smaller than the white index of the ground object underlying surface;
gabor transform characteristics: and extracting texture features of the preprocessed image through filters with different scales and different directions, and selecting the feature parameter with the maximum separation degree as the feature.
Optionally, in the cloud detection method for optical remote sensing images, the IHS spatial features further include a base map feature, and the base map feature J' is constructed through the following steps:
the brightness and saturation are calculated by:
Figure BDA0002725865840000031
the base map feature J' was obtained by the following method:
Figure BDA0002725865840000032
wherein, I' represents the brightness value after normalization; s' represents a saturation value after normalization; tau is a buffer coefficient and takes a value between 0 and 1;
the extraction process of the dark channel features comprises the following steps
Figure BDA0002725865840000033
Band (x) represents the RGB components of the image;
the whiteness index feature w is obtained by the following method:
Figure BDA0002725865840000034
wherein m is the mean value of pixel values of three RGB wave bands, b 1 、b 2 、b 3 Pixel values of three bands of RGB, respectively.
Optionally, in the cloud detection method of the optical remote sensing image, in the training sample set establishing step:
the existing image data set comprises Landsat8 images of different places and different seasons in a certain area range, wherein the types of vegetation, urban areas, lakes, gobi, snow areas, deserts and ocean ground underlying surfaces are covered, and the types of clouds in different forms and different densities are also included.
Optionally, in the cloud detection method of the optical remote sensing image, in the step of constructing the random forest model, constructing the random forest cloud detection model through the training sample set specifically includes: defining parameters nTree and Mtry of the random forest, wherein nTree represents the number of decision trees, and Mtry represents the maximum characteristic number of the decision trees; performing playback resampling on the training sample set to obtain nTree sample subsets; for each sample subset, constructing a decision tree corresponding to the sample subset through randomly selecting features; each decision tree is divided by selecting the optimal attribute based on the minimum criterion of the kini coefficient, and nTree decision trees obtained by pruning the decision trees form a random forest together;
in the image cloud detection step, the output results of all decision trees are voted to obtain the initial cloud detection result of the optical remote sensing image to be detected.
Optionally, in the cloud detection method for optical remote sensing images, a process of sampling the training sample set with a playback resampling is performed, and a certain proportion of training samples which are not extracted are used as data outside the bag;
taking the out-of-bag data corresponding to each decision tree as test data, wherein the test data is used for calculating out-of-bag errors of the corresponding decision tree;
the mean of the out-of-bag errors of all decision trees was taken as the generalization error of the random forest.
Optionally, in the above optical remote sensing image cloud detection method based on visible light and near infrared band, the image cloud detection step includes:
putting the optical remote sensing image to be detected into the random forest cloud detection model to obtain an initial cloud detection result;
refining the initial cloud detection result by using guide filtering to obtain a cloud mask image; wherein the guided filtering is represented as:
Figure BDA0002725865840000041
where Y is the guide image, R is the input image, q is the output image, i and j are pixel labels, W ij Is a filter kernel defined as:
Figure BDA0002725865840000051
wherein, ω is k For the kth kernel window, | ω | is the number of pixels in the window, μ λ And σ λ 2 Respectively mean value and variance of the guide filtering, wherein epsilon is a regularization parameter, and epsilon is a value between 0 and 1.
The invention also provides a storage medium, wherein the storage medium is stored with program information, and a computer reads the program information and then executes the cloud detection method of the optical remote sensing image.
The invention also provides a cloud detection system of the optical remote sensing image, which comprises at least one processor and at least one memory, wherein program information is stored in the at least one memory, and the at least one processor reads the program information and then executes the cloud detection method of the optical remote sensing image.
Compared with the prior art, the technical scheme provided by the embodiment of the invention at least has the following beneficial effects: the method extracts and selects various spectral and textural features suitable for cloud detection based on the most common visible light and near infrared wave bands in the optical remote sensing sensor, makes up for the defect of single feature classification, and lays a foundation for the universality of an algorithm; the difficulty that a large amount of manual statistics is needed to determine the threshold value in the traditional threshold value method is avoided by adopting a machine learning classification mode; by utilizing the advantages of fewer random forest model parameters, stronger generalization capability and classification of high-dimensional data and small sample sets, an effective model is obtained through abundant sample training to carry out cloud detection, so that the accuracy is ensured, and a foundation is further laid for the universality of the algorithm; and the detection result is refined by using the guide filtering, so that the cloud boundary is effectively maintained, and the cloud detection precision is improved.
Drawings
Fig. 1 is a flowchart of a cloud detection method for optical remote sensing images according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a cloud detection process according to an embodiment of the present invention;
FIG. 3a is a visible light band image obtained by feature extraction according to an embodiment of the present invention;
FIG. 3b is a near infrared band image obtained by feature extraction according to an embodiment of the present invention;
FIG. 3c is a luminance channel map obtained by feature extraction according to an embodiment of the present invention;
FIG. 3d is a saturation channel map obtained by feature extraction according to an embodiment of the present invention;
FIG. 3e is a diagram of a substrate obtained by feature extraction according to an embodiment of the present invention;
FIG. 3f is a white index map obtained by feature extraction according to an embodiment of the present invention;
FIG. 3g is a diagram of dark channels obtained by feature extraction according to an embodiment of the present invention;
FIG. 3h is a graph of the Gabor filtering result obtained from feature extraction according to one embodiment of the present invention;
FIG. 4a is a diagram illustrating the relationship between the number of decision trees of a random forest model obtained by feature extraction and the out-of-bag error according to an embodiment of the present invention;
FIG. 4b is a diagram illustrating a relationship between the maximum feature number of the decision tree of the random forest model obtained by feature extraction and the out-of-bag error according to an embodiment of the present invention;
FIG. 5a is a visible image of a Landsat8 image according to the present invention;
FIG. 5b is a random forest cloud detection result of the visible light image of FIG. 5 a;
FIG. 6a is a visible image of a high-resolution first image according to the present invention;
FIG. 6b is a random forest cloud detection result of the visible light image of FIG. 6 a;
FIG. 7a is a visible image of a sentinel image II with the present invention in use;
FIG. 7b is a diagram of the result of the random forest cloud detection of the visible light image in FIG. 7 a.
Detailed Description
The embodiments of the present invention will be further described with reference to the accompanying drawings. In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only intended to simplify the description of the present invention, but do not indicate or imply that the device or component referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Wherein the terms "first position" and "second position" are two different positions.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two components can be directly connected or indirectly connected through an intermediate medium, and the two components can be communicated with each other. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In the following embodiments provided in the present application, unless mutually contradictory, different technical solutions may be mutually combined, and technical features thereof may be mutually replaced.
The embodiment provides a cloud detection method of an optical remote sensing image, as shown in fig. 1, including the following steps:
s1: image preprocessing: converting the digital quantization value on the optical remote sensing image into the atmospheric layer top reflectivity to obtain a preprocessed image; most optical remote sensing image data only contain Digital Number (DN) information and do not contain reflectivity data. In order to eliminate the error generated by the sensor, and determine the radiation value at the entrance pupil of the sensor, the DN value of the original wave band of the image needs to be converted into the top reflectivity of the atmosphere layer by radiometric calibration, and this process provides a normalization basis between each part of data in one scene image and different scene data. In particular, the digital quantization value can be converted into the atmospheric layer top reflectivity by the following method:
L λ =Gain*DN+Bias;
Figure BDA0002725865840000071
wherein DN is a digital quantization value, L λ Is the on-satellite radiance; gain is a calibration slope; bias is a calibration intercept; rho TOA Is the atmospheric layer top reflectivity; d is a unit distance of astronomy in the day and the earth; ESUN is the solar irradiance at the top of the atmospheric layer, namely the solar average spectral radiation at the top of the atmospheric layer; theta is the solar zenith angle, and the above parameters are usually included in the header file.
S2: characteristic extraction: extracting features suitable for separating clouds and subsurface bedding surfaces of the ground objects from the preprocessed images from visible light and near infrared bands; the spectral characteristics are the most intuitive characteristics on the remote sensing image, and the ground features on the image can be interpreted and analyzed through the characteristics. Specifically, based on the difference of reflection characteristics and texture characteristics between the cloud and the underlying surface, a series of new characteristics are extracted from the visible light and near-infrared four wave bands to distinguish the cloud and the underlying surface of the ground object, so that the data dimension is increased, and the classification accuracy is improved to a certain extent.
S3: establishing a training sample set: and selecting sample points representing different kinds of clouds and ground objects from the existing image data set to form a training sample set. Abundant training samples are the premise of ensuring the random forest classification performance, so the establishment of a training sample set is an important step in the method. The existing image data set comprises Landsat8 images of different places and different seasons in a certain area range, wherein the types of vegetation, urban areas, lakes, gobi, snow areas, deserts and ocean ground underlying surfaces are covered, and the types of clouds in different forms and different densities are also included. For example, when 30 Landsat8 images in different seasons in the range of China are selected, and sample points which can typically represent different types of clouds and ground features are selected from the Landsat8 images, in order to enable the model to obtain the best classification effect, the number of the sample points of each type is distributed according to the area proportion, namely, the type occupying a large area needs more samples than the type occupying a small area.
S4: constructing a random forest model: constructing a random forest cloud detection model through the training sample set; a Random Forest (Random Forest) is a machine learning algorithm, combines an integrated learning idea and a Random subspace method, and is an integrated classifier based on a decision tree. The random forest can construct a classification model through training of a small number of samples, overfitting can be effectively inhibited, the method has the advantages of being high in classification performance, few in manual intervention, high in operation speed and the like, and good in robustness on noise data.
S5: image cloud detection: and carrying out cloud detection on the optical remote sensing image to be detected by using the random forest cloud detection model, and carrying out fine processing by using guide filtering to obtain a cloud mask image.
Referring to fig. 2, the cloud detection process mainly includes two parts, a training phase and a testing phase. Wherein the training phase comprises the steps S1 to S4, and the testing phase, i.e., the detection phase, is step S5, and specifically comprises:
s11, preprocessing a test image;
s12: extracting corresponding features; the method for processing the test image in the above two steps is the same as the method adopted in step S1 and step S2.
Step S13: and inputting the processed test image into the detection model obtained in the step S4.
S14: and carrying out cloud detection on the test image by using the cloud detection model to obtain an initial cloud detection result.
S15: and performing refinement processing by using the guide filtering to obtain a refined cloud detection mask image.
Preferably, in the above scheme, in step S2, as shown in fig. 3a to 3h, the features extracted from the preprocessed image include, based on reflection characteristics and texture characteristics different between clouds and underlying surfaces of the terrain:
reflection spectrum characteristics: according to the characteristic that the cloud presents high brightness and continuous coverage on the optical remote sensing image, the spectral information of visible light and near infrared wave bands is used as characteristics to distinguish the cloud from the ground object underlying surface; in the remote sensing image interpretation process, each type of ground object is generally considered to have a spectral characteristic curve corresponding to the ground object in each wave band range, so that the reflection characteristics of the ground object in each wave band can be used as a main basis for ground object interpretation. Due to the special reflection characteristic of the cloud, the optical remote sensing image often has the characteristics of high brightness and continuous coverage, so that the cloud and the ground objects can be distinguished by taking the spectral information of visible light and near infrared bands as characteristics.
IHS spatial characteristics: after the RGB space of the preprocessed image is converted into an IHS space, the cloud and the ground object underlying surface are distinguished according to the characteristic that the pixel value of the cloud in a brightness channel I is higher than the ground object underlying surface and the pixel value of the cloud in a saturation S channel is lower than the ground object underlying surface; where I denotes luminance, H denotes chromaticity, and S denotes saturation. In the RGB space, the difference between the thick clouds and the underlying surface is large, but the detection effect is often poor because the thin clouds are usually darker and contain certain underlying surface information. In IHS space, both thick and thin clouds can exhibit significant characteristics. The cloud is whitish in the RGB space, the reflectivity of each wave band is large and close, after the color space is converted into the IHS space, the pixel value of the cloud in the brightness channel I is obviously larger than that of the underlying surface, and the pixel value of the cloud in the saturation channel S is obviously smaller than that of the underlying surface, so that the cloud and the ground objects can be distinguished based on the characteristic. Further, the IHS space feature further includes a base map feature, and the base map feature J' is constructed by the following steps:
the brightness and saturation are calculated by:
Figure BDA0002725865840000091
the base map feature J' was obtained by the following method:
Figure BDA0002725865840000092
wherein, I' represents the brightness value after normalization; s' represents a saturation value after normalization; τ is a buffer coefficient, and the value of τ is between 0 and 1, so as to prevent the value of J' from being too large, which may be set to 0.05 in this embodiment; and stretching the calculated J' to a corresponding gray level to obtain a base map.
Dark channel characteristics: after the preprocessed image is processed by a dark channel, the cloud and the ground object underlying surface are distinguished according to the characteristic that the pixel value reduction of the ground object underlying surface is greater than that of the cloud area; after the remote sensing image is processed by a dark channel, the pixel values of ground feature areas with single colors are reduced a lot, even the positions of the ground feature areas tend to 0, the pixel values of the processed cloud areas can still be maintained at a high level, the change is not large, and the cloud and the ground features can be distinguished based on the characteristic. Wherein the extraction process of the dark channel features is
Figure BDA0002725865840000101
Band (x) represents the RGB components of the image;
the whiteness index feature w is obtained by the following method:
Figure BDA0002725865840000102
wherein the content of the first and second substances,m is the mean value of the pixel values of the three RGB bands, b 1 、b 2 、b 3 Pixel values of three bands of RGB, respectively.
White index characterization: distinguishing the cloud from the ground object underlying surface according to the characteristic that the white index obtained by the cloud pixel calculation is smaller than the white index of the ground object underlying surface; the cloud has flat reflectivity in a visible light wave band and is generally displayed as white, so that the cloud attribute can be represented by the ratio of the sum of difference values between different wave bands to the overall brightness, the white index is applied to Landsat image cloud detection, a large number of non-cloud pixels are effectively eliminated, the white index value obtained by cloud area pixel calculation is small in general value, the colors of ground objects are rich, the reflectivity change of each wave band is large, the corresponding white index value is large, and the cloud and the ground objects can be distinguished based on the characteristics.
Gabor transform characteristics: and extracting texture features of the preprocessed image through filters with different scales and different directions, and selecting the feature parameter with the maximum separation degree as the feature. The Gabor transform is a local Fourier transform, which divides a signal into a plurality of intervals, and performs Fourier transform in each interval to obtain the local characteristics of the signal. The two-dimensional Gabor filter is similar to the visual stimulus response of human visual cells, is sensitive to edges and insensitive to illumination change, can well extract local space and frequency domain information of a target, and is very suitable for texture analysis. Gabor transformation provides good direction and scale selection characteristics, but the cloud area has no obvious directionality, and filters with different scales and directions are adopted for feature extraction, so that the obtained results have higher redundancy, and only one feature with higher separability can be selected through comparative analysis among the features, so that the feature redundancy is simplified.
Preferably, in the above scheme, in step S3, constructing the random forest cloud detection model by using the training sample set specifically includes: defining parameters nTree and Mtry of the random forest, wherein nTree represents the number of decision trees, and Mtry represents the maximum characteristic number of the decision trees; performing playback resampling on the training sample set to obtain nTree sample subsets; for each sample subset, constructing a decision tree corresponding to the sample subset through randomly selecting features; each decision tree is divided by selecting the optimal attribute based on the minimum criterion of the kini coefficient, and nTree decision trees obtained by pruning the decision trees form a random forest together; in step S5, the initial cloud detection result of the optical remote sensing image to be detected is obtained according to the output result voting of all the decision trees. In the random forest construction process, two parameters, namely the number nTree of the decision trees and the maximum characteristic number Mtry of the decision trees, are defined. With the increase of the nTree value, the classification performance and generalization capability of the random forest are gradually improved, but the calculation complexity is also greatly improved; the larger the Mtry value is, the more the information content of a single decision tree is, the easier the overfitting is, the smaller the Mtry value is, the stronger the randomness of the single decision tree is, and the prediction precision is reduced. In remote sensing applications, it is most common to set nTree to 500 and Mtry to the square root of the number of input features. In this embodiment, in order to find the optimal nTree and Mtry values, the out-of-bag error of a random forest is used as an evaluation criterion, and the influence of the two parameters on the algorithm performance is analyzed. The relationship between the out-of-bag error of the random forest model and the nTree is shown in fig. 4a (in the figure, the out-of-bag error is represented by OOB (out of bag)), and the value range of the nTree is controlled to be 1-500, which is commonly used. As can be seen from the figure, when the number of the decision trees is between 100 and 500, the OOB error value basically tends to be stable without obvious change, which indicates that the performance of the random forest model algorithm tends to be stable at this time. Similarly, the number of the decision trees is set to 100, and the maximum feature number of the model decision tree is adjusted to perform an experiment to obtain the relationship between the OOB error and the maximum feature number. As shown in fig. 4b, the OOB error value is the smallest when the maximum feature number of the decision tree is 4, which also substantially conforms to the conclusion that Mtry is set as the square root of the input feature number. And comprehensively considering two parameters, and finally selecting the optimal parameter set of the random forest model to be nTree =100 and mtry =4.
In the scheme, each decision tree is split by selecting the optimal attribute based on the minimum criterion of the kini coefficient, so that the correlation among the decision trees can be effectively reduced, the prediction capability of a single decision tree is enhanced, and the generalization capability and the classification precision of the whole random forest are improved.
Further, in the above scheme, a process of putting back and resampling is performed on the training sample set, and a certain proportion (about 30%) of non-extracted training samples are used as data outside the bag; taking the out-of-bag data corresponding to each decision tree as test data, wherein the test data is used for calculating out-of-bag errors, namely OOB errors, of the corresponding decision trees; and taking the average value of the out-of-bag errors of all the decision trees as the generalization error of the random forest. The random forest does not need to use an independent test set to obtain unbiased estimation of errors, on the contrary, the unbiased estimation can be established for the errors in the generation process, namely OOB errors are calculated in the random forest construction process, the method is different from cross validation required by other mode identification methods, the validation method is high in operation efficiency, small in occupied resources and similar to cross validation results. In subsequent experiments, the OOB error is also used as an evaluation index of the random forest algorithm, and the smaller the OOB error is, the better the performance of the algorithm is.
Preferably, in the above scheme, the image cloud detection step in step S5 includes: placing the optical remote sensing image to be detected into the random forest cloud detection model to obtain an initial cloud detection result; refining the initial cloud detection result by using guide filtering to obtain a cloud mask image; wherein the guided filtering is represented as:
Figure BDA0002725865840000121
where Y is the guide image, R is the input image, q is the output image, i and j are pixel labels, W ij Is a filter kernel defined as:
Figure BDA0002725865840000122
wherein, ω is k For the kth kernel window, | ω | is the number of pixels in the window, μ λ And σ λ 2 The mean value and the variance of the guided filtering are respectively, epsilon is a regularization parameter, and epsilon is a value between 0 and 1 to prevent the denominator from being too small.
In the scheme, the dark channel characteristics obtained by selecting the minimum value in the RGB space comprise the boundary information of the cloud and the underlying surface, in order to enable the output image to keep the boundary information, the random forest cloud detection result is used as an input image, the dark channel characteristics are used as a guide image, the output image is obtained through guide filtering calculation, the window radius is set to be 30, and epsilon is set to be 0.09 in the filtering implementation process. The output image of the pilot filtering is not a binary image, and therefore a threshold value is set to the image to obtain a binary cloud detection result, where the threshold value is set to 80. The guide filtering can effectively remove most misjudgment areas, and semi-transparent cloud pixels are added at the cloud edge, so that misdetection and missed detection are reduced to a certain extent. In addition, some cloud gaps with small areas have clear sky image elements, but generally do not have complete scenes, and the gaps can be brought into the cloud range through guiding filtering processing. The cloud in the remote sensing image is usually presented in a continuous covering mode instead of appearing in the form of isolated cloud pixel points, but due to the influence of factors such as illumination and the like, a small number of holes can appear in the cloud area in the detection result obtained by the model, or some misjudgment points can appear in the non-cloud area in a scattered mode. And the detection result is post-processed by using the guide filtering, so that isolated noise points can be effectively removed, the precision of a cloud detection algorithm is further improved, and the integrity of a cloud area is ensured.
In order to verify the feasibility and the effectiveness of the method, the multi-scene optical remote sensing image is subjected to cloud detection by using the scheme of the invention. Referring to the Landsat8 image and the cloud detection result thereof in fig. 5a and 5b, in the detection result diagram, the cloud is white, and the ground surface is black, from the specific detection effect, the method can detect thick cloud, thin cloud and scattered broken cloud, and can also effectively remove some confusable water bodies, snow with complex texture, and the like, and the scheme of the invention can obtain a more ideal result in the Landsat8 image cloud detection. Fig. 6a and 6b show a high resolution one number and a cloud detection result thereof, where the high resolution one number carries two optical observation cameras, namely, 2 high resolution PMS cameras and 4 medium resolution WFV cameras, and PMS data with a spatial resolution of 8m is selected for an experiment in this embodiment. Fig. 7a and 7b show a sentinel second image and cloud detection results thereof, in the detection result diagram, a random forest method can achieve a good detection effect, and most of thick clouds, thin clouds and broken clouds in the image are detected without obvious missing judgment and erroneous judgment. Therefore, the method provided by the invention can obtain ideal effects in cloud detection of Landsat8, gaoshao I and sentinel II images.
In some embodiments of the present invention, a storage medium is further provided, where the storage medium stores program information, and a computer reads the program information and executes any one of the above methods for detecting optical remote sensing image cloud based on visible light and near infrared bands.
The invention further provides an optical remote sensing image cloud detection system based on visible light and near infrared bands, which comprises at least one processor and at least one memory, wherein program information is stored in at least one memory, and after the at least one processor reads the program information, the at least one processor executes any one of the above optical remote sensing image cloud detection methods based on visible light and near infrared bands.
According to the scheme in the embodiment of the invention, cloud detection is carried out based on the most common visible light and near infrared wave bands in the optical remote sensing sensor, so that a foundation is laid for the universality of the algorithm; various spectral and textural features suitable for cloud detection are extracted and selected from the original wave band, so that the defect of single feature classification is overcome, and the detection precision is improved; random forests are used as classifiers, and a machine learning classification idea is introduced, so that the problem that a large amount of manual statistics is needed to determine a threshold value in a traditional threshold value method is solved; the random forest model has fewer parameters, can evaluate the importance of different classification characteristics, and has certain interpretability; by utilizing the strong generalization capability of random forests and the advantages of the random forests in the classification of high-dimensional data and small sample sets, an effective model is obtained through rich sample training to carry out cloud detection, so that the accuracy is ensured, and a foundation is laid for enhancing the universality of the algorithm; in a refinement processing link, the detection result is processed according to the characteristic of guiding the edge maintenance of the filtering image, so that the cloud boundary can be effectively maintained, and the cloud detection precision is improved.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A cloud detection method of an optical remote sensing image is characterized by comprising the following steps:
image preprocessing: converting the digital quantization value on the optical remote sensing image into the atmospheric layer top reflectivity to obtain a preprocessed image;
feature extraction: extracting features suitable for separating clouds and subsurface bedding surfaces of the ground objects from the preprocessed images from visible light and near infrared bands;
establishing a training sample set: selecting sample points representing different types of clouds and ground objects from an existing image data set to form a training sample set;
constructing a random forest model: constructing a random forest cloud detection model through the training sample set;
image cloud detection: carrying out cloud detection on an optical remote sensing image to be detected by using the random forest cloud detection model, and carrying out fine processing by using guide filtering to obtain a cloud mask image;
in the feature extraction step: based on the different reflection and texture characteristics between the cloud and the terrain underlying surface, the features extracted from the pre-processed image include:
reflection spectrum characteristics: according to the characteristic that the cloud presents high brightness and continuous coverage on the optical remote sensing image, the spectral information of visible light and near infrared wave bands is used as characteristics to distinguish the cloud from the ground object underlying surface;
IHS space characteristics: after the RGB space of the preprocessed image is converted into an IHS space, the cloud and the ground object underlying surface are distinguished according to the characteristic that the pixel value of the cloud in a brightness channel I is higher than the ground object underlying surface and the pixel value of the cloud in a saturation S channel is lower than the ground object underlying surface; wherein, I represents brightness, H represents chroma, and S represents saturation;
dark channel characteristics: after the preprocessed image is processed by a dark channel, the cloud and the ground object underlying surface are distinguished according to the characteristic that the pixel value reduction of the ground object underlying surface is greater than that of the cloud area;
white index characterization: distinguishing the cloud from the ground object underlying surface according to the characteristic that the white index obtained by cloud pixel calculation is smaller than the white index of the ground object underlying surface;
gabor transform characteristics: and extracting texture features of the preprocessed image through filters with different scales and different directions, and selecting the feature parameter with the maximum separation degree as the feature.
2. The cloud detection method for optical remote sensing images according to claim 1, wherein in the image preprocessing step, the digital quantization value is converted into the atmospheric layer top reflectivity by:
L λ =Gain*DN+Bias;
Figure FDA0003878142340000021
wherein DN is a digital quantization value, L λ Is the on-satellite radiance; gain is a calibration slope; the Bias is a calibration intercept; ρ is a unit of a gradient TOA Is the atmospheric layer top reflectance; d is a unit distance of astronomy in the day and the earth; ESUN is the top solar irradiance of the atmospheric layer; theta is the solar zenith angle.
3. The cloud detection method for optical remote sensing images according to claim 1, characterized in that:
the IHS space features also comprise base map features, and the base map features J' are constructed by the following steps:
the brightness and saturation are calculated by:
Figure FDA0003878142340000022
the base map feature J' was obtained by the following method:
Figure FDA0003878142340000023
wherein, I' represents the brightness value after normalization; s' represents a saturation value after normalization; tau is a buffer coefficient and takes a value between 0 and 1;
the extraction process of the dark channel features comprises the following steps
Figure FDA0003878142340000024
Band (x) represents the RGB components of the image;
the whiteness index feature w is obtained by the following method:
Figure FDA0003878142340000031
wherein m is the mean value of pixel values of RGB three wave bands, b 1 、b 2 、b 3 Pixel values of three bands of RGB, respectively.
4. The cloud detection method for optical remote sensing images according to any one of claims 1 to 3, wherein in the training sample set establishing step:
the existing image data set comprises Landsat8 images of different places and different seasons in a certain area range, wherein the types of vegetation, urban areas, lakes, gobi, snow areas, deserts and ocean ground underlying surfaces are covered, and the types of clouds in different forms and different densities are also included.
5. The cloud detection method for optical remote sensing images according to any one of claims 1 to 3, characterized in that:
in the step of constructing the random forest model, constructing the random forest cloud detection model through the training sample set specifically comprises the following steps: defining parameters nTree and Mtry of a random forest, wherein nTree represents the number of decision trees, and Mtry represents the maximum characteristic number of the decision trees; performing playback resampling on the training sample set to obtain nTree sample subsets; for each sample subset, constructing a decision tree corresponding to the sample subset through randomly selecting features; each decision tree is divided by selecting the optimal attribute based on the minimum criterion of the Kini coefficient, and pruning is carried out on the decision trees to obtain nTree decision trees which jointly form a random forest;
in the image cloud detection step, the initial cloud detection result of the optical remote sensing image to be detected is obtained by voting the output results of all the decision trees.
6. The cloud detection method for the optical remote sensing image according to claim 5, wherein:
performing a process of putting back and resampling on the training sample set, wherein a certain proportion of training samples which are not drawn are used as data outside the bag;
taking the out-of-bag data corresponding to each decision tree as test data, wherein the test data is used for calculating out-of-bag errors of the corresponding decision trees; and taking the average value of the out-of-bag errors of all the decision trees as the generalization error of the random forest.
7. The cloud detection method for optical remote sensing images according to any one of claims 1 to 3, wherein the image cloud detection step includes:
putting the optical remote sensing image to be detected into the random forest cloud detection model to obtain an initial cloud detection result;
refining the initial cloud detection result by using guide filtering to obtain a cloud mask image; wherein the guided filtering is represented as:
Figure FDA0003878142340000041
where Y is the guide image, R is the input image, q is the output image, i and j are pixel labels, W ij Is a filter kernel defined as:
Figure FDA0003878142340000042
wherein, ω is k For the kth kernel window, | ω | is the number of pixels in the window, μ λ And σ λ 2 Respectively, mean value and variance of the guiding filtering, wherein epsilon is a regularization parameter, and epsilon is a value between 0 and 1.
8. A storage medium having program information stored therein, wherein a computer reads the program information and executes the method for cloud detection of an optical remote sensing image according to any one of claims 1 to 7.
9. A cloud detection system of optical remote sensing images is characterized by comprising at least one processor and at least one memory, wherein program information is stored in at least one memory, and the at least one processor reads the program information and then executes the cloud detection method of the optical remote sensing images according to any one of claims 1 to 7.
CN202011102510.1A 2020-10-15 2020-10-15 Cloud detection method, storage medium and system for optical remote sensing image Active CN112200787B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011102510.1A CN112200787B (en) 2020-10-15 2020-10-15 Cloud detection method, storage medium and system for optical remote sensing image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011102510.1A CN112200787B (en) 2020-10-15 2020-10-15 Cloud detection method, storage medium and system for optical remote sensing image

Publications (2)

Publication Number Publication Date
CN112200787A CN112200787A (en) 2021-01-08
CN112200787B true CN112200787B (en) 2022-12-02

Family

ID=74010104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011102510.1A Active CN112200787B (en) 2020-10-15 2020-10-15 Cloud detection method, storage medium and system for optical remote sensing image

Country Status (1)

Country Link
CN (1) CN112200787B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112949726B (en) * 2021-03-11 2024-05-14 易天气(北京)科技有限公司 ISCCP cloud classification method, system, medium and terminal based on FY-4A satellite
CN113096129B (en) * 2021-06-08 2021-09-10 自然资源部国土卫星遥感应用中心 Method and device for detecting cloud cover in hyperspectral satellite image
CN113449788B (en) * 2021-06-24 2023-04-28 湖南大学 Cloud detection method for visible light and near infrared remote sensing images
CN113240208B (en) * 2021-06-25 2023-06-30 国网浙江省电力有限公司双创中心 Photovoltaic power generation output power prediction method, device and computer readable storage medium
KR102656333B1 (en) * 2021-12-01 2024-04-11 한국항공우주연구원 Machine learning-based optical satellite image automatic cloudiness analysis system and automatic cloudiness analysis method
CN116385818B (en) * 2023-02-09 2023-11-28 中国科学院空天信息创新研究院 Training method, device and equipment of cloud detection model

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109740639A (en) * 2018-12-15 2019-05-10 中国科学院深圳先进技术研究院 A kind of wind and cloud satellite remote-sensing image cloud detection method of optic, system and electronic equipment
CN109974665A (en) * 2019-04-04 2019-07-05 东北师范大学 It is a kind of for the aerosol remote sensing inversion method and system that lack short-wave infrared data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109740639A (en) * 2018-12-15 2019-05-10 中国科学院深圳先进技术研究院 A kind of wind and cloud satellite remote-sensing image cloud detection method of optic, system and electronic equipment
CN109974665A (en) * 2019-04-04 2019-07-05 东北师范大学 It is a kind of for the aerosol remote sensing inversion method and system that lack short-wave infrared data

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Cloud detection for Landsat imagery by combining the random forest and superpixels extracted via energy-driven sampling segmentation approaches;Jing Wei et al.;《Remote Sensing of Environment》;20200724;第2-4节 *
CLOUD DETECTION FOR NIGHT-TIME PANCHROMATIC VISIBLE AND NEAR-INFRARED SATELLITE IMAGERY;L. Joachim et al.;《ISPRS》;20200803;全文 *
Introducing two Random Forest based methods for cloud detection in remote sensing images;Nafiseh Ghasemian et al.;《Advances in Space Research》;20180502;全文 *
Jing Wei et al..Cloud detection for Landsat imagery by combining the random forest and superpixels extracted via energy-driven sampling segmentation approaches.《Remote Sensing of Environment》.2020,第2-4节. *

Also Published As

Publication number Publication date
CN112200787A (en) 2021-01-08

Similar Documents

Publication Publication Date Title
CN112200787B (en) Cloud detection method, storage medium and system for optical remote sensing image
CN107610114B (en) optical satellite remote sensing image cloud and snow fog detection method based on support vector machine
Khazai et al. An approach for subpixel anomaly detection in hyperspectral images
CN110309781B (en) House damage remote sensing identification method based on multi-scale spectrum texture self-adaptive fusion
Uezato et al. A novel endmember bundle extraction and clustering approach for capturing spectral variability within endmember classes
Le Moan et al. Saliency for spectral image analysis
CN113176211B (en) Day cloud detection method based on HSV color space model transformation
CN113744191A (en) Automatic cloud detection method for satellite remote sensing image
CN110516648B (en) Ramie plant number identification method based on unmanned aerial vehicle remote sensing and pattern identification
CN108492288A (en) The high score satellite image change detecting method of multiple dimensioned stratified sampling based on random forest
Zhang et al. Salient target detection based on the combination of super-pixel and statistical saliency feature analysis for remote sensing images
CN117575953B (en) Detail enhancement method for high-resolution forestry remote sensing image
CN109376719B (en) Camera light response non-uniformity fingerprint extraction and comparison method based on combined feature representation
CN117576564B (en) Disease and pest identification early warning method and system for tea planting
Huynh et al. Hyperspectral imaging for skin recognition and biometrics
Kar et al. Classification of multispectral satellite images
Ozdil et al. Representative signature generation for plant detection in hyperspectral images
CN114792322A (en) Method for detecting cloud and cloud shadow of mountain domestic high-resolution satellite image
Huang et al. Morphological building index (MBI) and its applications to urban areas
Huang et al. Classification of very high spatial resolution imagery based on the fusion of edge and multispectral information
Tamilselvi et al. Color based K-Means Clustering For Image Segmentation to Identify the Infected Leaves
Clark et al. Finding a good segmentation strategy for tree crown transparency estimation
Kanda et al. Watershed segmentation and classification of tree species using high resolution forest imagery
CN114937038B (en) Usability-oriented remote sensing image quality evaluation method
CN111695503B (en) Coral reef bottom material classification method based on dual-band radiance

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant