Description Usage Arguments Details Value References Examples
This code uses one of several different algorithms (depending on the settings, see Details) to fill heavy clouds in a Landsat image.
1 2 3 4 5 |
cloudy |
the cloudy image (base image) as a |
clear |
the clear image as a |
cloud_mask |
the cloud mask as a |
out_name |
filename for cloud filled image |
algorithm |
must be one of: "CLOUD_REMOVE", "CLOUD_REMOVE_FAST", "teamlucc", or "simple". Default is "simple". See Details. |
num_class |
set the estimated number of classes in image |
min_pixel |
the sample size of similar pixels (ignored when
|
max_pixel |
the maximum sample size to search for similar pixels
(ignored when |
cloud_nbh |
the range of cloud neighborhood (in pixels) |
DN_min |
the minimum valid DN value (default of 0) |
DN_max |
the maximum valid DN value (default of 10000 assumes 2 byte integer imagery) |
idl |
path to the IDL binary on your machine (on Windows, the path to idl.exe) |
verbose |
whether to print detailed status messages. Set to FALSE or 0 for no status messages. Set to 1 for basic status messages. Set to 2 for detailed status messages. |
byblock |
whether to process images block by block
( |
overwrite |
whether to overwrite |
... |
additional arguments passed to the chosen cloud fill routine |
The algorithm
parameter determines what algorithm is used for the
cloud fill. algorithm
must be one of: "CLOUD_REMOVE",
"CLOUD_REMOVE_FAST", "teamlucc", or "simple" (the default). If set to
"CLOUD_REMOVE" the script uses a (slightly modified to be called from R)
version of Xiaolin Zhu's NSPI IDL code. If set to "CLOUD_REMOVE_FAST", the
algorithm uses the "fast" version of Xiaolin's code. Both of these two
algorithms require an IDL license to run (and therefore idl_path
must
be set). The "teamlucc" algorithm uses a version of the NSPI algorithm
(based on the CLOUD_REMOVE code) that is coded in C++ and can be run from R
without an IDL license. The "simple" algorithm uses a cloud fill model that
is based on fitting a linear model to the surface reflectance from the clear
image in a window around each cloud, and using this linear model to predict
reflectance in unobserved (cloudy) areas.
Raster*
with cloud-filled image
Zhu, X., Gao, F., Liu, D., Chen, J., 2012. A modified neighborhood similar pixel interpolator approach for removing thick clouds in Landsat images. Geoscience and Remote Sensing Letters, IEEE 9, 521–525.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
cloudy <- raster(system.file('tests', 'testthat_idl', 'cloud_remove',
'L20080724_cloudy', package='teamlucc'))
clear <- raster(system.file('tests', 'testthat_idl', 'cloud_remove',
'L20080606', package='teamlucc'))
cloud_mask <- raster(system.file('tests', 'testthat_idl', 'cloud_remove',
'cloud_mask', package='teamlucc'))
filled <- cloud_remove(cloudy, clear, cloud_mask, fast=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.