CN114049566B - A gradually refined method and device for detecting clouds and cloud shadows in Landsat images - Google Patents
A gradually refined method and device for detecting clouds and cloud shadows in Landsat images Download PDFInfo
- Publication number
- CN114049566B CN114049566B CN202111314693.8A CN202111314693A CN114049566B CN 114049566 B CN114049566 B CN 114049566B CN 202111314693 A CN202111314693 A CN 202111314693A CN 114049566 B CN114049566 B CN 114049566B
- Authority
- CN
- China
- Prior art keywords
- cloud
- pixel
- shadow
- initial
- image
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Processing (AREA)
Abstract
Description
技术领域technical field
本发明涉及遥感影像云和云阴影检测技术领域,特别涉及一种逐步细化的陆地卫星影像云和云阴影检测方法及装置。The invention relates to the technical field of remote sensing image cloud and cloud shadow detection, in particular to a gradually refined method and device for land satellite image cloud and cloud shadow detection.
背景技术Background technique
陆地卫星(Landsat)自发射以来已有40多年,积累了大量数据,是世界上最有价值的地球观测数据之一。由于陆地卫星数据所具有的高空间分辨率、高时间分辨率、免费数据访问、数据长期连续等特点,陆地卫星数据被广泛应用于土地利用分类、参数提取、变化检测等领域。但陆地卫星数据作为一种光学数据,其不可避免地受到云和云阴影的污染,遮盖了原始的地物目标,大大减少了影像的数量和可用性。此外,云和云阴影的存在会影响地物的原始光谱反射率信息,并直接影响后续基于这些数据的遥感应用的准确性和可靠性。因此,在利用陆地卫星数据进行分析和应用之前,必须去除影像中存在的云噪声,这是陆地卫星影像预处理中非常重要的基础。人工解译法是早期的一种利用人眼识别和手工勾画云和云阴影的方法,但人工解译影像的方法费时费力,只适用于有限的区域和少量的数据情况,不能满足大数据时代下的大规模、长时序的遥感应用需求。所以,自动化的云和云阴影检测方法是解决该问题的有效办法。Since its launch, Landsat has accumulated a large amount of data for more than 40 years and is one of the most valuable Earth observation data in the world. Due to the characteristics of high spatial resolution, high temporal resolution, free data access, and long-term data continuity, Landsat data is widely used in land use classification, parameter extraction, change detection and other fields. However, as an optical data, Landsat data is inevitably polluted by clouds and cloud shadows, obscuring the original ground objects, and greatly reducing the number and availability of images. In addition, the existence of clouds and cloud shadows will affect the original spectral reflectance information of ground objects, and directly affect the accuracy and reliability of subsequent remote sensing applications based on these data. Therefore, before using Landsat data for analysis and application, the cloud noise in the image must be removed, which is a very important basis in the preprocessing of Landsat imagery. The manual interpretation method is an early method that uses human eye recognition and manual delineation of clouds and cloud shadows. However, the method of manually interpreting images is time-consuming and labor-intensive, and is only suitable for limited areas and a small amount of data. large-scale, long-term remote sensing application requirements. Therefore, an automated cloud and cloud shadow detection method is an effective solution to this problem.
近年来,研究学者们发展了许多自动化的基于陆地卫星数据的云和云阴影检测算法。其中,应用最为广泛的是FMASK算法。In recent years, researchers have developed many automated algorithms for cloud and cloud shadow detection based on Landsat data. Among them, the most widely used is the FMASK algorithm.
FMASK算法是一种当前应用广泛的陆地卫星影像云和云阴影检测的方法。首先,FMASK算法通过直接条件约束的方式,基于云的物理性质进行云检测。这种直接约束的检测思路可能造成云像元的漏检,特别是薄云的漏检。其次,FMASK方法将云视为一个完整对象,从云对象出发,通过估计云高来构建三维立体模型,进行基于对象的云阴影匹配和检测。以往的云阴影检测算法多采用云和云阴影的几何匹配方法,都是从云像元出发进行云阴影的匹配。但实际上,有时候有云不一定有云阴影。如果从云像元出发匹配云阴影,则不论实际情况是否有云阴影,每个云都会匹配上一个云阴影。由于云高估计的不准确及“有云不一定有云阴影”的现实情况,采用基于对象的云和云阴影三维对象形状匹配可能造成云阴影的过检和错检。The FMASK algorithm is a widely used method for cloud and cloud shadow detection in Landsat images. First, the FMASK algorithm performs cloud detection based on the physical properties of the cloud by means of direct conditional constraints. This directly constrained detection idea may result in missed detection of cloud pixels, especially thin clouds. Secondly, the FMASK method regards the cloud as a complete object, and starts from the cloud object, constructs a 3D solid model by estimating the cloud height, and performs object-based cloud shadow matching and detection. The previous cloud shadow detection algorithms mostly use the geometric matching method of clouds and cloud shadows, and they all start from cloud pixels to match cloud shadows. But in fact, sometimes there are clouds and not necessarily cloud shadows. If cloud shadows are matched from cloud pixels, each cloud will match the previous cloud shadow regardless of whether there are actual cloud shadows. Due to the inaccuracy of cloud height estimation and the reality of "clouds may not necessarily have cloud shadows", the use of object-based cloud and cloud shadow 3D object shape matching may result in over-detection and mis-detection of cloud shadows.
发明内容SUMMARY OF THE INVENTION
本发明提供了一种逐步细化的陆地卫星影像云和云阴影检测方法及装置,以解决现有技术容易造成云像元的漏检以及云阴影的过检和错检的技术问题。The present invention provides a gradually refined method and device for detecting clouds and cloud shadows in land satellite images, so as to solve the technical problems that the prior art easily causes missed detection of cloud pixels and overdetection and wrong detection of cloud shadows.
为解决上述技术问题,本发明提供了如下技术方案:In order to solve the above-mentioned technical problems, the present invention provides the following technical solutions:
一方面,本发明提供了一种逐步细化的陆地卫星影像云和云阴影检测方法,该逐步细化的陆地卫星影像云和云阴影检测方法包括:In one aspect, the present invention provides a gradually refined Landsat image cloud and cloud shadow detection method, the gradually refined Landsat image cloud and cloud shadow detection method comprising:
基于云的物理性质,提取出待检测的陆地卫星影像中的亮像元,生成初始云图层;其中,所述亮像元为地表反射率大于第一预设值的像元;Based on the physical properties of the cloud, the bright pixels in the Landsat image to be detected are extracted to generate an initial cloud layer; wherein, the bright pixels are pixels whose surface reflectivity is greater than a first preset value;
基于云的时间和光谱特征,对所述初始云图层进行逐步细化,以从所述初始云图层中剔除非云的亮像元,并保留真实的云像元,得到云检测结果;Based on the temporal and spectral features of the cloud, the initial cloud layer is gradually refined, so as to remove the non-cloud bright pixels from the initial cloud layer, and retain the real cloud pixels to obtain a cloud detection result;
基于云阴影的物理性质,提取出待检测的陆地卫星影像中的暗像元,生成初始云阴影图层;其中,所述暗像元为地表反射率小于第二预设值的像元;Based on the physical properties of cloud shadows, dark pixels in the Landsat image to be detected are extracted to generate an initial cloud shadow layer; wherein, the dark pixels are pixels whose surface reflectivity is less than a second preset value;
基于云和云阴影之间的时间随机性、光谱特征、形状特征、几何关系以及“有云阴影则一定有云”的共存关系,对所述初始云阴影图层进行逐步细化,以从所述初始云阴影图层中剔除非云阴影的暗像元,并保留真实的云阴影像元,得到云阴影检测结果。Based on the temporal randomness, spectral features, shape features, geometric relationships between clouds and cloud shadows, and the coexistence relationship of "there must be clouds if there are cloud shadows", the initial cloud shadow layer is gradually refined, so that the In the initial cloud shadow layer, the dark pixels with non-cloud shadows are removed, and the real cloud shadow pixels are retained to obtain the cloud shadow detection result.
进一步地,所述亮像元为待检测的陆地卫星影像中满足以下条件的像元:Further, the bright pixel is a pixel that meets the following conditions in the Landsat image to be detected:
BBlue>0.05 and BSWIR1>0.03B Blue >0.05 and B SWIR1 >0.03
其中,BBlue表示像元的蓝光波段反射率,BSWIR1表示像元的短波红外波段反射率。Among them, B Blue represents the reflectivity of the blue light band of the pixel, and B SWIR1 represents the reflectivity of the short-wave infrared band of the pixel.
进一步地,所述基于云的时间和光谱特征,对所述初始云图层进行逐步细化,以从所述初始云图层中剔除非云的亮像元,并保留真实的云像元,包括:Further, based on the time and spectral features of the cloud, the initial cloud layer is gradually refined to remove non-cloud bright pixels from the initial cloud layer and retain the real cloud pixels, including:
对所述初始云图层进行第一次过滤,剔除满足以下条件的像元:The initial cloud layer is filtered for the first time, and the pixels that meet the following conditions are removed:
BBlue-0.5*BRed-0.08<0B Blue -0.5*B Red -0.08<0
其中,BBlue表示像元的蓝光波段反射率,BRed表示像元的红光波段反射率;Among them, B Blue represents the blue light band reflectance of the pixel, and B Red represents the red light band reflectance of the pixel;
对第一次过滤结果进行第二次过滤,剔除满足以下条件的像元:Perform a second filter on the results of the first filter to remove cells that meet the following conditions:
BT>23 and NBLI<-0.2 and Pcloud>90%BT>23 and NBLI<-0.2 and P cloud >90%
NBLI=BRed-BTIR/BRed+BTIR NBLI=B Red -B TIR /B Red +B TIR
Pcloud=Abright/NP cloud =A bright /N
其中,BT表示亮度温度换算得到的地表温度,单位为摄氏度,NBLI表示归一化裸地指数,Pcloud表示当前亮像元出现的频率,BTIR代表热红外波段亮度温度,Abright是该像元在所有影像初始检测中被判断为亮目标的次数,N是参与计算的所有影像总数;Among them, BT represents the surface temperature converted from the brightness temperature, in degrees Celsius, NBLI represents the normalized bare ground index, P cloud represents the frequency of the current bright pixel, B TIR represents the thermal infrared band brightness temperature, and A bright is the image The number of times that the element is judged as a bright target in the initial detection of all images, and N is the total number of all images involved in the calculation;
对第二次过滤结果进行第三次过滤,剔除满足以下条件的像元:Perform a third filter on the results of the second filter to remove cells that meet the following conditions:
NDSI>0.8NDSI>0.8
NDSI=BGreen-BSWIR1/BGreen+BSWIR1 NDSI=B Green -B SWIR1 /B Green +B SWIR1
其中,NDSI表示归一化积雪指数,BGreen表示像元的绿光波段反射率,BSWIR1表示像元的短波红外波段反射率;Among them, NDSI represents the normalized snow cover index, B Green represents the green light band reflectance of the pixel, and B SWIR1 represents the short-wave infrared band reflectance of the pixel;
对第三次过滤结果进行第四次过滤,剔除满足以下条件的像元:Perform a fourth filter on the results of the third filter to remove cells that meet the following conditions:
BSWIR1/BNIR>1.4B SWIR1 /B NIR >1.4
其中,BNIR表示像元的近红外波段反射率;Among them, B NIR represents the near-infrared band reflectance of the pixel;
对第四次过滤结果进行第五次过滤,剔除满足以下条件的像元:Perform the fifth filter on the results of the fourth filter, and remove the cells that meet the following conditions:
NDVI>0.8NDVI>0.8
NDVI=BNIR-BRed/BNIR+BRed NDVI=B NIR -B Red /B NIR +B Red
其中,NDVI表示归一化植被指数。Among them, NDVI represents the normalized vegetation index.
进一步地,所述暗像元为待检测的陆地卫星影像中满足以下条件的像元:Further, the dark pixel is a pixel that meets the following conditions in the Landsat image to be detected:
BGreen<0.08 and BNIR<0.25 and BSWIR1<0.11B Green <0.08 and B NIR <0.25 and B SWIR1 <0.11
其中,BGreen表示像元的绿光波段反射率,BNIR表示像元的近红外波段反射率,BSWIR1表示像元的短波红外波段反射率。Among them, B Green represents the green light band reflectance of the pixel, B NIR represents the near-infrared band reflectance of the pixel, and B SWIR1 represents the short-wave infrared band reflectance of the pixel.
进一步地,所述基于云和云阴影之间的时间随机性、光谱特征、形状特征、几何关系和“有云阴影则一定有云”的共存关系,对所述初始云阴影图层进行逐步细化,以从所述初始云阴影图层中剔除非云阴影的暗像元,并保留真实的云阴影像元,包括:Further, based on the temporal randomness, spectral features, shape features, geometric relationships between clouds and cloud shadows, and the coexistence relationship of "there must be clouds if there are cloud shadows", the initial cloud shadow layer is gradually refined. to cull non-cloud-shaded dark cells from the initial cloud-shadow layer and preserve true cloud-shadow cells, including:
对所述初始云阴影图层进行第一次过滤,剔除满足以下条件的像元:The initial cloud shadow layer is filtered for the first time, and the pixels that meet the following conditions are removed:
Pshadow>90%P shadow >90%
Pshadow=Adark/NP shadow =A dark /N
其中,Pshadow表示当前暗像元出现的频率,Adark表示该像元在所有影像初始检测中被判断为暗目标的次数,N是参与计算的所有影像总数;Among them, P shadow represents the frequency of the current dark pixel, A dark represents the number of times the pixel is judged as a dark target in the initial detection of all images, and N is the total number of all images involved in the calculation;
根据所述初始云阴影图层的第一次过滤结果,利用云和云阴影的“有云阴影则一定有云”的共存关系,以及太阳、云和云阴影的几何关系,基于方位角和高度角计算搜索方向,基于恒温递减率和影像的温度分位数计算确定搜索半径,从当前暗像元出发,在搜索半径内进行云像元的检索,判断是否有云像元存在;According to the first filtering result of the initial cloud shadow layer, the coexistence relationship between clouds and cloud shadows of "there must be cloud shadows", as well as the geometric relationship between the sun, clouds and cloud shadows, is based on azimuth and height. The search direction is calculated from the angle, and the search radius is determined based on the constant temperature decrement rate and the temperature quantile calculation of the image. Starting from the current dark pixel, the search for cloud pixels is carried out within the search radius to determine whether there are cloud pixels.
如果在搜索半径范围内没有找到云像元,则判断当前的暗像元不是一个真正的云阴影像元,将当前暗像元予以剔除;If no cloud pixel is found within the search radius, it is judged that the current dark pixel is not a real cloud shadow pixel, and the current dark pixel is eliminated;
如果在搜索半径范围内有云像元存在,则对当前暗像元和搜索到的云像元进行形态学判断,判断二者的形状指数是否满足相似性约束;If there is a cloud pixel within the search radius, perform morphological judgment on the current dark pixel and the searched cloud pixel to determine whether the shape indices of the two satisfy the similarity constraint;
如果不满足相似性约束条件,则将当前暗像元予以剔除。If the similarity constraint is not met, the current dark pixel is culled.
另一方面,本发明还提供了一种逐步细化的陆地卫星影像云和云阴影检测装置,该逐步细化的陆地卫星影像云和云阴影检测装置包括:On the other hand, the present invention also provides a gradually refined Landsat image cloud and cloud shadow detection device, the gradually refined Landsat image cloud and cloud shadow detection device includes:
云检测模块,用于基于云的物理性质,提取出待检测的陆地卫星影像中的亮像元,生成初始云图层;基于云的时间和光谱特征,对所述初始云图层进行逐步细化,以从所述初始云图层中剔除非云的亮像元,并保留真实的云像元,得到云检测结果;其中,所述亮像元为地表反射率大于第一预设值的像元;The cloud detection module is used to extract the bright pixels in the Landsat image to be detected based on the physical properties of the cloud, and generate an initial cloud layer; based on the time and spectral characteristics of the cloud, the initial cloud layer is gradually refined, The cloud detection result is obtained by removing the non-cloud bright pixels from the initial cloud layer and retaining the real cloud pixels; wherein, the bright pixels are pixels whose surface reflectivity is greater than a first preset value;
云阴影检测模块,用于基于云阴影的物理性质,提取出陆地卫星影像中的暗像元,生成初始云阴影图层;基于云和云阴影之间的时间随机性、光谱特征、形状特征、几何关系以及“有云阴影则一定有云”的共存关系,对所述初始云阴影图层进行逐步细化,以从所述初始云阴影图层中剔除非云阴影的暗像元,并保留真实的云阴影像元,得到云阴影检测结果;其中,所述暗像元为地表反射率小于第二预设值的像元。The cloud shadow detection module is used to extract dark pixels in Landsat images based on the physical properties of cloud shadows and generate an initial cloud shadow layer; based on the temporal randomness, spectral characteristics, shape characteristics, The geometric relationship and the coexistence relationship of "there must be cloud shadows", the initial cloud shadow layer is gradually refined to remove dark pixels without cloud shadows from the initial cloud shadow layer, and retain The real cloud shadow pixel is used to obtain the cloud shadow detection result; wherein, the dark pixel is the pixel whose surface reflectivity is less than the second preset value.
进一步地,所述亮像元为待检测的陆地卫星影像中满足以下条件的像元:Further, the bright pixel is a pixel that meets the following conditions in the Landsat image to be detected:
BBlue>0.05 and BSWIR1>0.03B Blue >0.05 and B SWIR1 >0.03
其中,BBlue表示像元的蓝光波段反射率,BSWIR1表示像元的短波红外波段反射率。Among them, B Blue represents the reflectivity of the blue light band of the pixel, and B SWIR1 represents the reflectivity of the short-wave infrared band of the pixel.
进一步地,所述云检测模块具体用于:Further, the cloud detection module is specifically used for:
对所述初始云图层进行第一次过滤,剔除满足以下条件的像元:The initial cloud layer is filtered for the first time, and the pixels that meet the following conditions are removed:
BBlue-0.5*BRed-0.08<0B Blue -0.5*B Red -0.08<0
其中,BBlue表示像元的蓝光波段反射率,BRed表示像元的红光波段反射率;Among them, B Blue represents the blue light band reflectance of the pixel, and B Red represents the red light band reflectance of the pixel;
对第一次过滤结果进行第二次过滤,剔除满足以下条件的像元:Perform a second filter on the results of the first filter to remove cells that meet the following conditions:
BT>23 and NBLI<-0.2 and Pcloud>90%BT>23 and NBLI<-0.2 and P cloud >90%
NBLI=BRed-BTIR/BRed+BTIR NBLI=B Red -B TIR /B Red +B TIR
Pcloud=Abright/NP cloud =A bright /N
其中,BT亮度温度换算得到的地表温度,单位为摄氏度,NBLI表示归一化裸地指数,Pcloud表示当前亮像元出现的频率,BTIR代表热红外波段亮度温度,Abright是该像元在所有影像初始检测中被判断为亮目标的次数,N是参与计算的所有影像总数;Among them, the surface temperature converted from the BT brightness temperature, in degrees Celsius, NBLI represents the normalized bare ground index, P cloud represents the frequency of the current bright pixel, B TIR represents the thermal infrared band brightness temperature, and A bright represents the pixel. The number of times that all images are judged as bright targets in the initial detection of all images, N is the total number of all images involved in the calculation;
对第二次过滤结果进行第三次过滤,剔除满足以下条件的像元:Perform a third filter on the results of the second filter to remove cells that meet the following conditions:
NDSI>0.8NDSI>0.8
NDSI=BGreen-BSWIR1/BGreen+BSWIR1 NDSI=B Green -B SWIR1 /B Green +B SWIR1
其中,NDSI表示归一化积雪指数,BGreen表示像元的绿光波段反射率,BSWIR1表示像元的短波红外波段反射率;Among them, NDSI represents the normalized snow cover index, B Green represents the green light band reflectance of the pixel, and B SWIR1 represents the short-wave infrared band reflectance of the pixel;
对第三次过滤结果进行第四次过滤,剔除满足以下条件的像元:Perform a fourth filter on the results of the third filter to remove cells that meet the following conditions:
BSWIR1/BNIR>1.4B SWIR1 /B NIR >1.4
其中,BNIR表示像元的近红外波段反射率;Among them, B NIR represents the near-infrared band reflectance of the pixel;
对第四次过滤结果进行第五次过滤,剔除满足以下条件的像元:Perform the fifth filter on the results of the fourth filter, and remove the cells that meet the following conditions:
NDVI>0.8NDVI>0.8
NDVI=BNIR-BRed/BNIR+BRed NDVI=B NIR -B Red /B NIR +B Red
其中,NDVI表示归一化植被指数。Among them, NDVI represents the normalized vegetation index.
进一步地,所述暗像元为待检测的陆地卫星影像中满足以下条件的像元:Further, the dark pixel is a pixel that meets the following conditions in the Landsat image to be detected:
BGreen<0.08 and BNIR<0.25 and BSWIR1<0.11B Green <0.08 and B NIR <0.25 and B SWIR1 <0.11
其中,BGreen表示像元的绿光波段反射率,BNIR表示像元的近红外波段反射率,BSWIR1表示像元的短波红外波段反射率。Among them, B Green represents the green light band reflectance of the pixel, B NIR represents the near-infrared band reflectance of the pixel, and B SWIR1 represents the short-wave infrared band reflectance of the pixel.
进一步地,所述云阴影检测模块具体用于:Further, the cloud shadow detection module is specifically used for:
对所述初始云阴影图层进行第一次过滤,剔除满足以下条件的像元:The initial cloud shadow layer is filtered for the first time, and the pixels that meet the following conditions are removed:
Pshadow>90%P shadow >90%
Pshadow=Adark/NP shadow =A dark /N
其中,Pshadow表示当前暗像元出现的频率,Adark表示该像元在所有影像初始检测中被判断为暗目标的次数,N是参与计算的所有影像总数;Among them, P shadow represents the frequency of the current dark pixel, A dark represents the number of times the pixel is judged as a dark target in the initial detection of all images, and N is the total number of all images involved in the calculation;
根据所述初始云阴影图层的第一次过滤结果,利用云和云阴影的“有云阴影则一定有云”的共存关系,以及太阳、云和云阴影的几何关系,基于方位角和高度角计算搜索方向,基于恒温递减率和影像的温度分位数计算确定搜索半径,从当前暗像元出发,在搜索半径内进行云像元的检索,判断是否有云像元存在;According to the first filtering result of the initial cloud shadow layer, the coexistence relationship between clouds and cloud shadows of "there must be cloud shadows", as well as the geometric relationship between the sun, clouds and cloud shadows, is based on azimuth and height. The search direction is calculated from the angle, and the search radius is determined based on the constant temperature decrement rate and the temperature quantile calculation of the image. Starting from the current dark pixel, the search for cloud pixels is carried out within the search radius to determine whether there are cloud pixels.
如果在搜索半径范围内没有找到云像元,则判断当前的暗像元不是一个真正的云阴影像元,将当前暗像元予以剔除;If no cloud pixel is found within the search radius, it is judged that the current dark pixel is not a real cloud shadow pixel, and the current dark pixel is eliminated;
如果在搜索半径范围内有云像元存在,则对当前暗像元和搜索到的云像元进行形态学判断,判断二者的形状指数是否满足相似性约束;If there is a cloud pixel within the search radius, perform morphological judgment on the current dark pixel and the searched cloud pixel to determine whether the shape indices of the two satisfy the similarity constraint;
如果不满足相似性约束条件,则将当前暗像元予以剔除。If the similarity constraint is not met, the current dark pixel is culled.
再一方面,本发明还提供了一种电子设备,其包括处理器和存储器;其中,存储器中存储有至少一条指令,所述指令由处理器加载并执行以实现上述方法。In another aspect, the present invention also provides an electronic device, which includes a processor and a memory; wherein, the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the above method.
又一方面,本发明还提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现上述方法。In yet another aspect, the present invention also provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, and the instruction is loaded and executed by a processor to implement the above method.
本发明提供的技术方案带来的有益效果至少包括:The beneficial effects brought by the technical solution provided by the present invention at least include:
1.本发明实现了云的准确检测,特别是薄云的检测,提高了检测效果和精度;1. The present invention realizes the accurate detection of clouds, especially the detection of thin clouds, and improves the detection effect and accuracy;
2.本发明避免了从云出发寻找云阴影带来的误差,实现了云阴影的范围和位置的准确检测;2. The present invention avoids the error caused by searching for cloud shadows from clouds, and realizes accurate detection of the range and position of cloud shadows;
3.本发明实现了云和云阴影的准确检测,完善了陆地卫星数据预处理流程,为陆地卫星数据的后续应用打下了坚实的基础。3. The present invention realizes accurate detection of clouds and cloud shadows, improves the preprocessing flow of Landsat data, and lays a solid foundation for the subsequent application of Landsat data.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.
图1为本发明实施例提供的逐步细化的陆地卫星影像云和云阴影检测方法的执行流程示意图;FIG. 1 is a schematic execution flow diagram of a gradually refined Landsat image cloud and cloud shadow detection method provided by an embodiment of the present invention;
图2为本发明实施例提供的逐步细化的陆地卫星影像云和云阴影检测方法与传统的FMASK算法的检测结果对比图;2 is a comparison diagram of the detection results of a gradually refined Landsat image cloud and cloud shadow detection method provided by an embodiment of the present invention and a traditional FMASK algorithm;
图3为本发明实施例提供的逐步细化的陆地卫星影像云和云阴影检测方法与传统的FMASK算法的另一检测结果对比图。FIG. 3 is a comparison diagram of another detection result between the gradually refined Landsat image cloud and cloud shadow detection method provided by the embodiment of the present invention and the traditional FMASK algorithm.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
第一实施例first embodiment
本实施例提供了一种逐步细化的陆地卫星影像云和云阴影检测方法,本方法可以由电子设备实现,该电子设备可以是终端或者服务器。本方法的总体思路是采用逐步细化的思想,先利用较为宽松的阈值约束,尽可能多地找到影像中的疑似云和云阴影像元,生成初始图层,避免在初始检测中就丢失可能的云和云阴影像元;再结合云和云阴影的随机性、形状相似等特征约束对初始图层进行逐步排除和细化,最终确定正确的云和云阴影检测结果。This embodiment provides a gradually refined method for detecting clouds and cloud shadows in Landsat images. The method may be implemented by an electronic device, and the electronic device may be a terminal or a server. The general idea of this method is to use the idea of gradual refinement, first use a relatively loose threshold constraint, find as many suspected clouds and cloud shadow pixels in the image as possible, and generate an initial layer to avoid possible loss in the initial detection. Then, the initial layer is gradually excluded and refined in combination with the randomness and shape similarity of clouds and cloud shadows, and finally the correct cloud and cloud shadow detection results are determined.
具体地,如图1所示,本方法主要包括云检测和云阴影检测两部分。其中,云检测的主要思想是根据云的物理性质,先利用较为宽松的阈值约束在图像中找到尽可能多的明亮目标,并生成初始云图层。然后基于云在时间和空间上的随机性以及温度低等特点,利用云的时间和光谱特征来对初始云层进行逐步排除和细化。从初始云层中逐步剔除非云的明亮像元,保留真实的云像元。。云阴影的检测与云检测相似,云阴影检测主要包括两个步骤:初始检测和细化检测。首先,利用云阴影的暗特征来检测初始的云阴影图层,在初始检测中先利用宽松的约束条件找到影像中尽可能多的暗目标,避免在初始检测中就遗漏可能的云阴影像元。其次,基于云阴影在时间和空间上的随机性,以及云和云阴影形状相似且“有云阴影则一定有云”的共存关系等特点,结合云阴影的时间随机性、光谱特征,以及云和云阴影之间的形状特征、几何关系和共存关系来逐步剔除初始图层中的非云阴影的暗像元,细化初始云阴影图层,在避免其他暗物体的干扰的同时尽可能地保留真实的云阴影像元。现详细说明如下:Specifically, as shown in FIG. 1 , the method mainly includes two parts: cloud detection and cloud shadow detection. Among them, the main idea of cloud detection is to find as many bright targets as possible in the image by using a relatively loose threshold constraint according to the physical properties of the cloud, and generate an initial cloud layer. Then, based on the temporal and spatial randomness and low temperature of the cloud, the temporal and spectral characteristics of the cloud are used to gradually exclude and refine the initial cloud layer. Gradually remove non-cloud bright pixels from the initial cloud layer, preserving true cloud pixels. . The detection of cloud shadows is similar to cloud detection. Cloud shadow detection mainly includes two steps: initial detection and refinement detection. First, use the dark features of cloud shadows to detect the initial cloud shadow layer. In the initial detection, use loose constraints to find as many dark objects in the image as possible to avoid missing possible cloud shadow pixels in the initial detection. . Secondly, based on the randomness of cloud shadows in time and space, and the coexistence relationship between clouds and cloud shadows that are similar in shape and "there must be cloud shadows", combined with the temporal randomness of cloud shadows, spectral characteristics, and cloud The shape characteristics, geometric relationship and coexistence relationship between cloud shadows and cloud shadows can gradually eliminate dark pixels that are not cloud shadows in the initial layer, refine the initial cloud shadow layer, and avoid the interference of other dark objects as much as possible. Preserves true cloud shadow cells. The details are as follows:
1.云检测1. Cloud detection
1.1初始云检测1.1 Initial cloud detection
在初始云检测阶段,以陆地卫星影像的地表反射率数据作为输入数据,基于云的物理性质提取影像中的亮像元,生成初始云图层。在初始检测中,采用较为宽松的约束条件,先将尽可能多的明亮目标找到,避免在初始检测中就遗漏可能的云像元。其原理为:相较于地表的大部分其他地物,云在几乎各个波段上都表现出很高的反射率,所以云在影像上以亮目标的形式存在。特别的,在地物的光谱波段表现中,云在蓝光波段和短波红外波段与其他晴空像元有更大的区分度。所以,本实施例利用蓝光和短波红外波段的反射率来提取影像中的亮目标,生成初始云图层。如下式:In the initial cloud detection stage, the surface reflectance data of the Landsat image is used as input data, and the bright pixels in the image are extracted based on the physical properties of the cloud to generate the initial cloud layer. In the initial detection, relatively loose constraints are adopted, and as many bright targets as possible are found first, so as to avoid missing possible cloud pixels in the initial detection. The principle is: compared with most other objects on the surface, clouds show high reflectivity in almost all bands, so clouds exist in the form of bright targets on the image. In particular, in the spectral band representation of ground objects, clouds have a greater degree of distinction from other clear sky pixels in the blue light band and the short-wave infrared band. Therefore, in this embodiment, the reflectivity of the blue light and the short-wave infrared band is used to extract bright objects in the image, and an initial cloud layer is generated. The formula is as follows:
BBlue>0.05 and BSWIR1>0.03B Blue >0.05 and B SWIR1 >0.03
式中,BBlue表示像元蓝光波段反射率,BSWIR1表示像元短波红外波段反射率。In the formula, B Blue represents the reflectance in the blue light band of the pixel, and B SWIR1 represents the reflectance in the short-wave infrared band of the pixel.
需要说明的是,初始云检测的目的为:先将尽可能多的潜在云像元都先检测出来,得到初始云图层,作为后续细化的基础。It should be noted that the purpose of initial cloud detection is to first detect as many potential cloud pixels as possible to obtain the initial cloud layer as the basis for subsequent refinement.
1.2云图层逐步细化1.2 Gradual refinement of cloud layers
在1.1得到的结果基础上,结合云的时间和光谱特征来对初始云图层进行逐步细化,剔除其中非云的亮像元,并保留真实的云像元,得到云检测结果。Based on the results obtained in 1.1, the initial cloud layer is gradually refined by combining the time and spectral features of the cloud, and the bright pixels that are not clouds are eliminated, and the real cloud pixels are retained to obtain the cloud detection result.
此步骤的目的为:初始云检测中得到的初始云图层包含了影像中所有的亮目标,除了云之外,还有许多不是云的亮目标,例如建设用地、明亮植被、雪等。这些非云亮像元的存在会对云检测的结果产生干扰。所以,需要对初始云图层进行二次优化,将不是云的亮目标剔除,留下真正的云像元。The purpose of this step is: the initial cloud layer obtained in the initial cloud detection contains all the bright objects in the image. In addition to clouds, there are many bright objects that are not clouds, such as construction land, bright vegetation, snow, etc. The existence of these non-cloud bright pixels will interfere with the results of cloud detection. Therefore, it is necessary to perform secondary optimization on the initial cloud layer to remove the bright objects that are not clouds, leaving the real cloud pixels.
1.2.1结合HOT(Haze optimal transformation,烟雾最优变换)约束对初始云图层进行第一次过滤,晴空条件下的许多陆表覆盖类型在红-蓝光谱空间有很好的线性关系,而被云污染的像元在红-蓝光谱空间的光谱响应和HOT定义的晴空线有很大差别。所以可以利用HOT指数进行云和晴空像元的分离,剔除满足以下条件的像元:1.2.1 The initial cloud layer is filtered for the first time in combination with HOT (Haze optimal transformation) constraints. Many land cover types under clear sky conditions have a good linear relationship in the red-blue spectral space, and are The spectral response of cloud-polluted pixels in the red-blue spectral space is quite different from the clear sky line defined by HOT. Therefore, the HOT index can be used to separate the cloud and clear sky pixels, and eliminate the pixels that meet the following conditions:
BBlue-0.5*BRed-0.08<0B Blue -0.5*B Red -0.08<0
式中,BBlue表示像元蓝光波段反射率,BRed表示像元红光波段反射率。In the formula, B Blue represents the reflectance of the blue light band of the pixel, and B Red represents the reflectance of the red light band of the pixel.
目的:利用该约束将符合晴空约束条件的晴空像元从初始云图层中进行剔除。Purpose: Use this constraint to remove clear sky cells that meet the clear sky constraints from the initial cloud layer.
1.2.2云具有“冷”的特点,而且在时间和空间上表现出随机出现的特点,而建设用地等地物在时间序列上相对稳定。在经过1.2.1的过滤处理后,结合光谱、温度和时间序列概率约束条件,将那些诸如建设用地等温度比较高,而且在时间和空间上相对稳定的非云亮目标地物从初始云图层中进行剔除,也即剔除满足以下条件的像元:1.2.2 Clouds have the characteristics of "cold" and appear randomly in time and space, while land objects such as construction land are relatively stable in time series. After filtering in 1.2.1, combined with the constraints of spectrum, temperature and time series probability, those non-cloud bright target objects with relatively high temperature, such as construction land, which are relatively stable in time and space, are removed from the initial cloud layer. culling, that is, culling pixels that meet the following conditions:
BT>23 and NBLI<-0.2 and Pcloud>90%BT>23 and NBLI<-0.2 and P cloud >90%
NBLI=BRed-BTIR/BRed+BTIR (1)NBLI=B Red -B TIR /B Red +B TIR (1)
Pcloud=Abright/N (2)P cloud =A bright /N (2)
式中,BT表示亮度温度换算得到的地表温度,单位为摄氏度,NBLI表示归一化裸地指数,计算公式如式(1)所示。Pcloud表示亮像元出现的频率,计算公式如式(2)所示。BTIR表示热红外波段亮度温度,BRed表示像元红光波段反射率。Abright表示该像元在所有影像初始检测中被判断为亮目标的次数,N是参与计算的所有影像总数。需要说明的是,地表反射率数据的时间序列的长度越长,参与计算的影像数量越多,Pcloud值就越具有代表性。Pcloud的阈值可以根据数据情况、检测区域特点等进行调整。Pcloud值越大,代表约束条件越苛刻,从初始云图层中剔除的像元越少,反之,则剔除的像元越多。In the formula, BT represents the surface temperature converted from the brightness temperature, in degrees Celsius, NBLI represents the normalized bare ground index, and the calculation formula is shown in formula (1). P cloud represents the frequency of bright pixels, and the calculation formula is shown in formula (2). B TIR represents the brightness temperature in the thermal infrared band, and B Red represents the reflectance of the pixel in the red band. A bright represents the number of times the pixel is judged as a bright target in the initial detection of all images, and N is the total number of all images involved in the calculation. It should be noted that the longer the time series of surface reflectance data is, the more images are involved in the calculation, and the more representative the P cloud value is. The threshold of P cloud can be adjusted according to the data situation and the characteristics of the detection area. The larger the value of P cloud , the stricter the constraints, the less the pixels are eliminated from the initial cloud layer, and the more pixels are eliminated.
目的:云具有“冷”的特点,而且在时间和空间上表现出随机的特征,而建设用地等地物在时间序列上相对稳定。利用该约束,在去除温暖地物的同时,尽可能保留薄云。Purpose: Clouds have the characteristics of "cold" and show random characteristics in time and space, while land objects such as construction land are relatively stable in time series. Using this constraint, keep as thin clouds as possible while removing warm objects.
1.2.3在经过1.2.2过滤后,结合NDSI将雪从初始云图层中进行剔除。1.2.3 After filtering in 1.2.2, combine NDSI to remove snow from the initial cloud layer.
NDSI>0.8NDSI>0.8
NDSI=BGreen-BSWIR1/BGreen+BSWIR1 (3)NDSI=B Green -B SWIR1 /B Green +B SWIR1 (3)
式中,NDSI表示归一化积雪指数,能够有效进行云和雪的区分。其计算公式如式(3)所示,BGreen表示像元绿光波段反射率,BSWIR1表示像元短波红外波段反射率。In the formula, NDSI represents the normalized snow cover index, which can effectively distinguish clouds from snow. Its calculation formula is shown in formula (3), B Green represents the reflectivity of the pixel in the green light band, and B SWIR1 represents the reflectivity of the pixel in the short-wave infrared band.
目的:利用该约束,去除初始云图层中的雪像元。Purpose: Use this constraint to remove snow pixels in the initial cloud layer.
1.2.4在经过1.2.3过滤后,可能与云发生混淆的非云亮目标还有岩石、沙漠等,这些地物在短波红外波段的反射率比近红外波段更高,而云相反。所以,本方法剔除满足以下条件的像元,来进行初始云图层的进一步细化。1.2.4 After filtering in 1.2.3, non-cloud bright objects that may be confused with clouds include rocks, deserts, etc. The reflectivity of these objects in the short-wave infrared band is higher than that in the near-infrared band, while clouds are the opposite. Therefore, this method removes the pixels that meet the following conditions to further refine the initial cloud layer.
BSWIR1/BNIR>1.4B SWIR1 /B NIR >1.4
式中,BSWIR1表示像元短波红外波段反射率,BNIR表示像元近红外波段反射率。In the formula, B SWIR1 represents the reflectivity in the short-wave infrared band of the pixel, and B NIR represents the reflectivity in the near-infrared band of the pixel.
目的:利用该约束,去除初始云图层中的岩石、沙漠等非云亮像元。Purpose: Use this constraint to remove non-cloud bright pixels such as rocks and deserts in the initial cloud layer.
1.2.5生长状况较好的植被在影像上也表现出相对明亮的特征,容易与云发生混淆。在经过1.2.4过滤后,结合NDVI对初始云图层中的这部分混淆像元进行剔除。对比这些明亮植被和云的光谱特征可以发现,归一化植被指数(NDVI)在识别植被以及与云的区分上具有很好的效果,所以结合以下条件来对这部分像元进行剔除,得到最终的云图层。1.2.5 Vegetation with good growth condition also shows relatively bright characteristics on the image, which is easy to be confused with clouds. After filtering in 1.2.4, combined with NDVI, this part of the confused pixels in the initial cloud layer is eliminated. Comparing the spectral characteristics of these bright vegetation and clouds, it can be found that the normalized vegetation index (NDVI) has a good effect in identifying vegetation and distinguishing it from clouds. cloud layer.
NDVI>0.8NDVI>0.8
NDVI=BNIR-BRed/BNIR+BRed (4)NDVI=B NIR -B Red /B NIR +B Red (4)
式中,NDVI表示归一化植被指数,其计算公式如式(4)所示。BRed表示像元红光波段反射率,BNIR表示像元近红外波段反射率。In the formula, NDVI represents the normalized vegetation index, and its calculation formula is shown in formula (4). B Red represents the reflectance in the red band of the pixel, and B NIR represents the reflectance in the near-infrared band of the pixel.
目的:利用该约束,去除初始云图层中的明亮植被等非云亮像元。Purpose: Use this constraint to remove non-cloud bright pixels such as bright vegetation in the initial cloud layer.
2.云阴影检测2. Cloud shadow detection
与云检测类似,云阴影的检测整体上也是基于逐步细化的策略。先基于云阴影的物理性质,结合云阴影的暗特征,采用较为宽松的阈值约束条件,尽可能多地找到影像中的暗像元。再基于云阴影在时间和空间上的随机性,以及云和云阴影形状相似且“有云阴影则一定有云”的共存关系等特点,利用云阴影的时间随机性、光谱特征,以及云和云阴影之间的形状特征、几何关系和共存关系等约束条件对潜在云阴影图层进行逐步细化,剔除不是云阴影的暗像元。Similar to cloud detection, cloud shadow detection is generally based on a step-by-step refinement strategy. First, based on the physical properties of cloud shadows, combined with the dark characteristics of cloud shadows, a relatively loose threshold constraint is used to find as many dark pixels in the image as possible. Then, based on the randomness of cloud shadows in time and space, as well as the coexistence relationship between clouds and cloud shadows that are similar in shape and "there must be cloud shadows", the temporal randomness, spectral characteristics of cloud shadows, and cloud and cloud shadows are used. Constraints such as shape features, geometric relationships, and coexistence relationships between cloud shadows gradually refine the potential cloud shadow layer, and remove dark pixels that are not cloud shadows.
2.1初始云阴影检测2.1 Initial cloud shadow detection
利用云阴影表现出的暗特征,主要利用可见光波段进行约束,结合较为宽松的阈值约束条件,先将影像中的所有暗像元都找到,避免在初始检测中就遗漏可能的云阴影像元。云阴影和水体、地形阴影等混淆像元在光谱上表现很相似,但在近红外和短波红外上存在一定的区分度。所以,在初始云阴影检测中加入近红外和短波红外波段的约束,如下式:Using the dark characteristics of cloud shadows, the visible light band is mainly used for constraints, combined with relatively loose threshold constraints, all dark pixels in the image are found first, so as to avoid missing possible cloud shadow pixels in the initial detection. Cloud shadows, water bodies, terrain shadows and other obfuscated pixels have similar spectral performances, but there is a certain degree of discrimination in near-infrared and short-wave infrared. Therefore, the constraints of near-infrared and short-wave infrared bands are added to the initial cloud shadow detection, as follows:
BGreen<0.08 and BNIR<0.25 and BSWIR1<0.11B Green <0.08 and B NIR <0.25 and B SWIR1 <0.11
式中,BGreen表示像元绿光波段反射率,BNIR表示像元近红外波段反射率,BSWIR1表示像元短波红外波段反射率。In the formula, B Green represents the reflectivity of the pixel in the green light band, B NIR represents the reflectivity of the pixel in the near-infrared band, and B SWIR1 represents the reflectivity of the pixel in the short-wave infrared band.
目的:在生成初始云阴影图层的同时,对水体、地形阴影等混淆像元进行初步排除。Purpose: While generating the initial cloud shadow layer, initially eliminate the confused pixels such as water bodies and terrain shadows.
2.2云阴影逐步细化2.2 Gradual refinement of cloud shadows
在2.1得到的初始云阴影图层的基础上,对非云阴影暗像元进行逐步剔除。On the basis of the initial cloud shadow layer obtained in 2.1, the dark pixels that are not cloud shadows are gradually eliminated.
目的:初始云阴影图层中,包含了影像中的所有暗目标,但是影像中的暗目标不止云阴影,还存在一些可能对云阴影检测结果产生干扰的混淆像元,比如地形阴影、水体等。这些像元在影像上也表现出暗的特点,可能和云阴影发生混淆。所以需要对这部分非云阴影暗像元进行剔除。Purpose: In the initial cloud shadow layer, all dark objects in the image are included, but the dark objects in the image are not only cloud shadows, but also some confused pixels that may interfere with the cloud shadow detection results, such as terrain shadows, water bodies, etc. . These pixels also appear dark in the image, which may be confused with cloud shadows. Therefore, this part of the non-cloud shadow dark pixels needs to be culled.
2.2.1与地形阴影和水体相比,云阴影在时间和空间上表现出更多的随机性。所以,结合时间序列稳定性对初始云阴影图层进行约束,去除影像中稳定存在的暗像元,例如部分地形阴影,水体等。如下式:2.2.1 Compared with terrain shadows and water bodies, cloud shadows exhibit more randomness in time and space. Therefore, combined with the time series stability, the initial cloud shadow layer is constrained, and the dark pixels that exist stably in the image, such as some terrain shadows, water bodies, etc., are removed. The formula is as follows:
Pshadow>90%P shadow >90%
Pshadow=Adark/N (5)P shadow =A dark /N (5)
式中,Pshadow表示暗像元出现的频率,计算公式如式(5)所示。Adark表示该像元在所有影像初始检测中被判断为暗目标的次数,N表示参与计算的所有影像总数。需要说明的是,时间序列的长度越长,参与计算的影像数量越多,Pshadow值越具有代表性。Pshadow的阈值可以根据数据情况、检测区域特点等进行调整。Pshadow值越大,代表约束条件越苛刻,从初始云阴影图层中剔除的像元越少,反之,则剔除的像元越多。In the formula, P shadow represents the frequency of occurrence of dark pixels, and the calculation formula is shown in formula (5). A dark represents the number of times the pixel is judged as a dark target in the initial detection of all images, and N represents the total number of all images participating in the calculation. It should be noted that, the longer the length of the time series is, the more images are involved in the calculation, and the more representative the P shadow value is. The threshold of P shadow can be adjusted according to the data situation and the characteristics of the detection area. The larger the value of P shadow , the stricter the constraints, the less pixels are eliminated from the initial cloud shadow layer, and the more pixels are eliminated.
目的:云阴影表现出在时间和空间上的随机性,而地形阴影和水体等相对稳定。所以利用该条件将地形阴影、水体等在时间序列上表现出稳定特征的非云阴影暗像元从初始云阴影图层中进行剔除。Purpose: Cloud shadows show randomness in time and space, while terrain shadows and water bodies are relatively stable. Therefore, using this condition, the non-cloud shadow dark pixels that show stable characteristics in time series, such as terrain shadows and water bodies, are eliminated from the initial cloud shadow layer.
2.2.2有云不一定有云阴影,但是有云阴影则一定有相应的云存在。利用云和云阴影的“有云阴影则一定有云”的共存关系,以及太阳、云和云阴影的几何关系,基于方位角和高度角计算搜索方向,基于恒温递减率和影像的温度分位数计算确定搜索半径,从云阴影出发,在搜索半径内进行云像元的检索,判断是否有云像元存在。如果有,则进行下一步判断(2.2.3)。如果在搜索半径范围内没有找到云像元,则判断该阴影不是一个真正的云阴影像元,予以剔除。2.2.2 If there are clouds, there may not be cloud shadows, but if there are cloud shadows, there must be corresponding clouds. Using the coexistence relationship between clouds and cloud shadows, "there must be cloud shadows", as well as the geometric relationship between the sun, clouds and cloud shadows, the search direction is calculated based on the azimuth and altitude angles, and the temperature quantile is based on the constant temperature lapse rate and the image. The search radius is determined by numerical calculation. Starting from the cloud shadow, the retrieval of cloud pixels is carried out within the search radius to determine whether there are cloud pixels. If yes, proceed to the next judgment (2.2.3). If no cloud pixel is found within the search radius, it is judged that the shadow is not a real cloud shadow pixel, and it is eliminated.
目的:利用云和云阴影的共存关系来进行云阴影的判断,将找不到对应云的阴影进行剔除。Purpose: Use the coexistence relationship between clouds and cloud shadows to judge cloud shadows, and eliminate shadows that cannot find the corresponding cloud.
2.2.3由于云和云阴影不仅具有共存关系,在形状上还具有相似性。在通过2.2.2判断条件的基础上,对该云阴影和搜索到的云进行形态学判断,判断二者的形状指数是否满足相似性约束。如果满足相似性约束条件,则认为搜索到的云是该云阴影对应的云。如果不满足约束条件,则将该阴影像元进行剔除,得到最终的云阴影图层。2.2.3 Because clouds and cloud shadows not only have a coexistence relationship, but also have similarities in shape. On the basis of passing the judgment conditions in 2.2.2, the morphological judgment of the cloud shadow and the searched cloud is carried out to judge whether the shape indices of the two satisfy the similarity constraint. If the similarity constraint is satisfied, the searched cloud is considered to be the cloud corresponding to the cloud shadow. If the constraints are not met, the shadow cell is culled to obtain the final cloud shadow layer.
目的:以形态学指数为约束,对找到的云和云阴影进行相似性判断,剔除不满足相似性约束的阴影像元。Purpose: Take the morphological index as the constraint, make a similarity judgment on the found clouds and cloud shadows, and remove the shadow pixels that do not satisfy the similarity constraints.
以上已对本发明的陆地卫星影像云和云阴影检测方法进行了详细介绍,下面通过将本发明方法的检测结果与现有检测方法(FMASK算法)进行对比,来说明本发明方法的进步性。其中,本发明提供的逐步细化的陆地卫星影像云和云阴影检测方法与传统的FMASK算法的检测结果对比如图2和图3所示。图中第一列为本发明方法的检测结果,第二列为原始影像,采用4/3/2合成,第三列为现有的FMASK算法的检测结果。检测结果图中,白色代表云,灰色代表云阴影,十字丝代表同一空间位置。从图中可以看出,本发明提供的检测方法可实现准确的陆地卫星数据中云和云阴影的自动化检测,且优于FMASK算法。The land satellite image cloud and cloud shadow detection method of the present invention has been described in detail above. The progress of the method of the present invention is described below by comparing the detection results of the method of the present invention with the existing detection method (FMASK algorithm). The comparison between the detection results of the gradually refined Landsat image cloud and cloud shadow detection method provided by the present invention and the traditional FMASK algorithm is shown in FIG. 2 and FIG. 3 . The first column in the figure is the detection result of the method of the present invention, the second column is the original image, which is synthesized by 4/3/2, and the third column is the detection result of the existing FMASK algorithm. In the detection result graph, white represents clouds, gray represents cloud shadows, and crosshairs represent the same spatial position. As can be seen from the figure, the detection method provided by the present invention can realize accurate automatic detection of clouds and cloud shadows in Landsat data, and is superior to the FMASK algorithm.
综上,本实施例的方法不同于传统算法的直接约束的方式,基于逐步细化的思路进行云和云阴影的检测,在初始检测中利用较为宽松的约束和阈值条件先将尽可能多的云/云阴影像元检测进初始图层中,避免在初始检测中就丢失可能的云和云阴影像元;再结合云/云阴影的光谱、在时间和空间上的随机性、形状相似等特征,通过逐步排除和细化的约束条件来剔除不是真实的云/云阴影像元,从而准确地确定真实的云和云阴影。并且本实施例不同于传统算法的从云出发寻找云阴影的方法,利用“有云阴影则一定有云”的云和云阴影共存关系,以及云和云阴影存在的形状相似性。提出了结合从云阴影出发寻找云以及利用云和云阴影的形态学指数相似性约束判断的方法。避免了传统算法所采用的从云出发寻找云阴影的方式所带来的“有云不一定有阴影”的误差,以及通过估计云高直接匹配云阴影带来的误差。从而提高了云和云阴影检测效果和精度。To sum up, the method of this embodiment is different from the direct constraint method of the traditional algorithm. It detects clouds and cloud shadows based on the idea of gradual refinement. In the initial detection, relatively loose constraints and threshold conditions are used to first detect as many as possible. Cloud/cloud shadow pixels are detected into the initial layer to avoid losing possible cloud and cloud shadow pixels in the initial detection; then combine the cloud/cloud shadow spectrum, randomness in time and space, shape similarity, etc. Features that accurately determine true clouds and cloud shadows by culling out not true cloud/cloud shadow cells by progressively excluding and refining constraints. In addition, this embodiment is different from the method of finding cloud shadows from clouds in traditional algorithms, and utilizes the coexistence relationship between clouds and cloud shadows, and the shape similarity between clouds and cloud shadows. A method is proposed to search for clouds from cloud shadows and to use the similarity constraints of morphological indices between clouds and cloud shadows. It avoids the error of "there is not necessarily a shadow if there is a cloud" caused by the way of looking for cloud shadow from the cloud used by the traditional algorithm, and the error caused by directly matching the cloud shadow by estimating the cloud height. Thereby, the effect and accuracy of cloud and cloud shadow detection are improved.
第二实施例Second Embodiment
本实施例提供了一种逐步细化的陆地卫星影像云和云阴影检测装置,该逐步细化的陆地卫星影像云和云阴影检测装置包括以下模块:This embodiment provides a gradually refined Landsat image cloud and cloud shadow detection device, the gradually refined Landsat image cloud and cloud shadow detection device includes the following modules:
云检测模块,用于基于云的物理性质,采用较为宽松的阈值提取出待检测的陆地卫星影像中尽可能多的亮像元,生成初始云图层;基于云的时间和光谱特征,对所述初始云图层进行逐步细化,以从所述初始云图层中剔除非云的亮像元,并保留真实的云像元,得到云检测结果;其中,所述亮像元为地表反射率大于第一预设值的像元;The cloud detection module is used to extract as many bright pixels as possible in the Landsat image to be detected based on the physical properties of the cloud and use a relatively loose threshold to generate an initial cloud layer; based on the time and spectral characteristics of the cloud, the The initial cloud layer is gradually refined to remove non-cloud bright pixels from the initial cloud layer, and retain the real cloud pixels to obtain a cloud detection result; wherein, the bright pixels are those whose surface reflectivity is greater than the first a pixel with a preset value;
云阴影检测模块,用于基于云阴影的物理性质,采用较为宽松的阈值提取出陆地卫星影像中尽可能多的暗像元,生成初始云阴影图层;基于云和云阴影之间的时间随机性、光谱特征、形状特征、几何关系以及“有云阴影则一定有云”的共存关系,对所述初始云阴影图层进行逐步细化,以从所述初始云阴影图层中剔除非云阴影的暗像元,并保留真实的云阴影像元,得到云阴影检测结果;其中,所述暗像元为地表反射率小于第二预设值的像元。The cloud shadow detection module is used to extract as many dark pixels as possible in the Landsat image based on the physical properties of cloud shadows, using a relatively loose threshold to generate an initial cloud shadow layer; based on the random time between clouds and cloud shadows The initial cloud shadow layer is gradually refined to eliminate non-clouds from the initial cloud shadow layer. The dark pixel of the shadow is retained, and the real cloud shadow pixel is retained to obtain the cloud shadow detection result; wherein, the dark pixel is the pixel whose surface reflectivity is less than the second preset value.
本实施例的逐步细化的陆地卫星影像云和云阴影检测装置与上述第一实施例的逐步细化的陆地卫星影像云和云阴影检测方法相对应;其中,本陆地卫星影像云和云阴影检测装置中的各功能模块所实现的功能与上述第一实施例的陆地卫星影像云和云阴影检测方法中的各流程步骤一一对应;故,在此不再赘述。The gradually refined Landsat image cloud and cloud shadow detection apparatus of this embodiment corresponds to the gradually refined Landsat image cloud and cloud shadow detection method of the first embodiment; wherein, the present Landsat image cloud and cloud shadow The functions implemented by the functional modules in the detection device correspond one-to-one with the flow steps in the above-mentioned first embodiment of the Landsat image cloud and cloud shadow detection method; therefore, details are not repeated here.
第三实施例Third Embodiment
本实施例提供一种电子设备,其包括处理器和存储器;其中,存储器中存储有至少一条指令,所述指令由处理器加载并执行,以实现第一实施例的方法。This embodiment provides an electronic device, which includes a processor and a memory; wherein, at least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the method of the first embodiment.
该电子设备可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)和一个或一个以上的存储器,其中,存储器中存储有至少一条指令,所述指令由处理器加载并执行上述方法。The electronic device may vary greatly due to different configurations or performances, and may include one or more processors (central processing units, CPU) and one or more memories, wherein the memory stores at least one instruction, so The instructions are loaded by the processor and execute the above method.
第四实施例Fourth Embodiment
本实施例提供一种计算机可读存储介质,该存储介质中存储有至少一条指令,所述指令由处理器加载并执行,以实现第一实施例的方法。其中,该计算机可读存储介质可以是ROM、随机存取存储器、CD-ROM、磁带、软盘和光数据存储设备等。其内存储的指令可由终端中的处理器加载并执行上述方法。This embodiment provides a computer-readable storage medium, where at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the method of the first embodiment. Wherein, the computer-readable storage medium may be ROM, random access memory, CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like. The instructions stored therein can be loaded by the processor in the terminal and execute the above method.
此外,需要说明的是,本发明可提供为方法、装置或计算机程序产品。因此,本发明实施例可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质上实施的计算机程序产品的形式。Furthermore, it should be noted that the present invention may be provided as a method, an apparatus or a computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein.
本发明实施例是参照根据本发明实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the present invention are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present invention. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, embedded processor or other programmable data processing terminal to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing terminal produce Means implementing the functions specified in one or more of the flowcharts and/or one or more blocks of the block diagrams.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal equipment to operate in a particular manner, such that the instructions stored in the computer readable memory result in an article of manufacture comprising instruction means, the The instruction means implement the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams. These computer program instructions can also be loaded on a computer or other programmable data processing terminal equipment, so that a series of operational steps are performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby executing on the computer or other programmable terminal equipment The instructions executed on the above provide steps for implementing the functions specified in the flowchart or blocks and/or the block or blocks of the block diagrams.
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。It should also be noted that in this document, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply those entities or operations There is no such actual relationship or order between them. The terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or terminal that includes a list of elements includes not only those elements, but also not expressly listed Other elements, or elements that are inherent to such a process, method, article or end device. Without further limitation, an element defined by the phrase "comprises a..." does not preclude the presence of additional identical elements in the process, method, article or terminal device comprising said element.
最后需要说明的是,以上所述是本发明优选实施方式,应当指出,尽管已描述了本发明优选实施例,但对于本技术领域的技术人员来说,一旦得知了本发明的基本创造性概念,在不脱离本发明所述原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明实施例范围的所有变更和修改。Finally, it should be noted that the above are the preferred embodiments of the present invention. It should be pointed out that although the preferred embodiments of the present invention have been described, for those skilled in the art, once the basic inventive concept of the present invention is known , without departing from the principles of the present invention, several improvements and modifications can also be made, and these improvements and modifications should also be regarded as the protection scope of the present invention. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications that fall within the scope of the embodiments of the present invention.
Claims (2)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111314693.8A CN114049566B (en) | 2021-11-08 | 2021-11-08 | A gradually refined method and device for detecting clouds and cloud shadows in Landsat images |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111314693.8A CN114049566B (en) | 2021-11-08 | 2021-11-08 | A gradually refined method and device for detecting clouds and cloud shadows in Landsat images |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN114049566A CN114049566A (en) | 2022-02-15 |
| CN114049566B true CN114049566B (en) | 2022-05-17 |
Family
ID=80207424
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111314693.8A Active CN114049566B (en) | 2021-11-08 | 2021-11-08 | A gradually refined method and device for detecting clouds and cloud shadows in Landsat images |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114049566B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114240940B (en) * | 2022-02-25 | 2022-06-17 | 航天宏图信息技术股份有限公司 | Cloud and cloud shadow detection method and device based on remote sensing image |
| CN114792322A (en) * | 2022-06-23 | 2022-07-26 | 中国科学院、水利部成都山地灾害与环境研究所 | A method for detecting clouds and cloud shadows in domestic high-resolution satellite images of mountainous areas |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111368817A (en) * | 2020-02-28 | 2020-07-03 | 北京师范大学 | Method and system for quantitatively evaluating heat effect based on earth surface type |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7184890B2 (en) * | 2003-11-24 | 2007-02-27 | The Boeing Company | Cloud shadow detection: VNIR-SWIR |
| CN101452078B (en) * | 2008-12-30 | 2011-04-13 | 国家卫星气象中心 | Daytime and nighttime sea fog detecting method based on remote sensing of polarorbiting meteorological satellite |
| US9001311B2 (en) * | 2013-03-15 | 2015-04-07 | Digitalglobe, Inc. | Using parallax in remote sensing to determine cloud feature height |
| CN105139375B (en) * | 2015-07-15 | 2017-09-29 | 武汉大学 | Combining global DEM and stereoscopic vision a kind of satellite image cloud detection method of optic |
| CN105678777B (en) * | 2016-01-12 | 2018-03-13 | 武汉大学 | A kind of optical satellite image cloud of multiple features combining and cloud shadow detection method |
| CN109101894B (en) * | 2018-07-19 | 2019-08-06 | 山东科技大学 | A method for detecting cloud shadows in remote sensing images supported by surface type data |
| CN110308097A (en) * | 2019-07-05 | 2019-10-08 | 山东科技大学 | Method and system for cloud detection in satellite images |
-
2021
- 2021-11-08 CN CN202111314693.8A patent/CN114049566B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111368817A (en) * | 2020-02-28 | 2020-07-03 | 北京师范大学 | Method and system for quantitatively evaluating heat effect based on earth surface type |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114049566A (en) | 2022-02-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Mohajerani et al. | Cloud and cloud shadow segmentation for remote sensing imagery via filtered jaccard loss function and parametric augmentation | |
| Feyisa et al. | Automated Water Extraction Index: A new technique for surface water mapping using Landsat imagery | |
| CN110648347A (en) | Coastline extraction method and device based on remote sensing image | |
| Miao et al. | An object-based method for road network extraction in VHR satellite images | |
| CN110765934B (en) | Geological disaster identification method based on multi-source data fusion | |
| CN111626269A (en) | Practical large-space-range landslide extraction method | |
| CN114049566B (en) | A gradually refined method and device for detecting clouds and cloud shadows in Landsat images | |
| WO2016053791A1 (en) | Multi-spectral image labeling with radiometric attribute vectors of image space representation components | |
| CN111506759B (en) | Image matching method and device based on depth features | |
| CN104951765B (en) | Remote Sensing Target dividing method based on shape priors and visual contrast | |
| CN112907587B (en) | High mountain forest line extraction method based on Otsu and edge detection algorithm of GEE | |
| CN102622738A (en) | Method for recovering spectral information of hill shade area of Landsat thematic mapper/enhanced thematic mapper plus (TM/ETM+) image | |
| CN113239830A (en) | Remote sensing image cloud detection method based on full-scale feature fusion | |
| CN111339948A (en) | An automatic identification method for newly added buildings in high-resolution remote sensing images | |
| CN103984947A (en) | A house extraction method for high-resolution remote sensing images based on morphological house index | |
| CN109918531A (en) | A kind of the seeking method, apparatus and computer readable storage medium of mother drug plants | |
| CN111310771A (en) | Road image extraction method, device and equipment of remote sensing image and storage medium | |
| CN105718924B (en) | High score satellite image cloud detection method of optic based on combination features and machine learning | |
| Chehata et al. | Object-based forest change detection using high resolution satellite images | |
| Lu et al. | Detecting green citrus fruit on trees in low light and complex background based on MSER and HCA | |
| CN112230299B (en) | Method for detecting northern terrestrial heat abnormity through multi-temporal thermal infrared remote sensing | |
| Zhu et al. | CEDAnet: Individual tree segmentation in dense orchard via context enhancement and density prior | |
| CN108984601B (en) | An image retrieval method and system based on probability histogram area similarity | |
| CN110689549B (en) | Object extraction method, device and equipment | |
| Liu et al. | Identification of Damaged Building Regions from High-Resolution Images Using Superpixel-Based Gradient and Autocorrelation Analysis |
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 |