Show original script or download{:target="_blank"} it.
- Sentinel Playground{:target="_blank"}
- EO Browser{:target="_blank"}
In [1] Braaten, Cohen, and Yang describe a very simple cloud detection algorithm. The whole cloud detection is a simple threshold-based test:
where
One can think of this formula as describing a subspace (of the space of Sentinel-2 responses) that contains most of the clouds. The same thing could be written more concisely - the NDGR threshold is really just
On the Hollstein data set this algorithm achieves 73% classification accuracy; most of the error comes from detecting snow as cloud and failing to detect thin clouds. The corresponding confusion matrix (entries along the left column are taken from Hollstein data, so 8% means that from among all pixels in the train set there are 8% that are clouds but weren't detected):
cloud | Ncloud | |
---|---|---|
cloud | 1142085 (20%) | 460329 (8%) |
Ncloud | 1027308 (18%) | 3017989 (53%) |
However, this algorithm doesn't detect thin clouds (e.g. transparent and translucent clouds) as well as misclassifies snow for cloud. One way to alleviate this is to use SWIR bands to help differentiate snow from cloud:
where we use
The threshold for
Try it on Sentinel Playground{:target="_blank"} or download the script from here{:target="_blank"}.
- [1] Braaten J, Cohen WB, Yang Z. 2015. Automated cloud and cloud shadow identification in Landsat MSS imagery for temperate ecosystems. Remote Sensing of Environment. 169:128-138.