Uses Landsat band 1 and band 6 to identify clouds and create a cloud mask.
clouds(band1, band6, level = 0.0014, buffer=5)
- File name or image file (matrix, data frame, or SpatialGridDataFrame) for Landsat band 1.
- File name or image file (matrix, data frame, or SpatialGridDataFrame) for Landsat band 6.
- Threshold level for cloud/noncloud decision. The default threshold is appropriate for reflectance and temperature values, and must be adjusted for use with DN.
- Pixel buffer size to expand around thresholded cloud areas.
Clouds are reflective (high) in band 1 and cold (low) in band 6, so the ratio of the two bands is high over clouds. The ratio must be adjusted for data type, whether reflectance, radiance, or DN.
Returns a cloud mask in the same format as band1. Clouds are 1; noncloud areas are NA. Cloud areas are expanded by buffer pixels to ensure that cloud edges are captured.
This function is loosely based on: Martinuzzi, S., Gould, W.A., Ramos Gonzales, O.M. 2007. Creating Cloud-Free Landsat ETM+ Data Sets in Tropical Landscapes: Cloud and Cloud-Shadow Removal. USDA Forest Service General Technical Report IITF-GTR-32.
Documentation reproduced from package landsat, version 1.0.8. License: GPL (>= 2)