Add NAs to pixels around zero. These NAs then become the clouds
Usage
filter_cloud(cloud, type = "speckled")
Arguments
- cloud
a cloud raster
- type
a choice between speckled and large.
Value
cloud raster with NAs.
Examples
library(nimbus)
library(raster)
cloud <- simulate_cloud(phi = 0.1, seed = 2023)
plot(cloud)
speckled_cloud_raster <- filter_cloud(cloud)
large_cloud_raster <- filter_cloud(cloud, type = "large")
plot(speckled_cloud_raster, colNA = "blue")
plot(large_cloud_raster, colNA = "blue")