Description Usage Arguments Details Author(s) References See Also Examples
This function normalise satellite images spatially (see, Hamunyela et al., 2016)
NOTE: This function must always be called within the rasterEngine
function. See the usage example
1 | LandsatDataMaskCloudsShadowWaterSnow(fmasklayerList, vi = vi)
|
inraster |
Input raster stack or single image (e.g. NDVI). The images in the image stack can have different value range |
spatiaNormPercentile |
Numeric. The upper percentile ( e.g. 95th percentile ) for determining the value to use for spatial normalisation. The default is 95 |
To be completed.
Eliakim Hamunyela
1. Hamunyela, E., Verbesselt, J., Herold, M. (2016) Using spatial context to improve early detection of deforestationfrom Landsat time series. Remote Sensing of Environment,172, 126–138. http://dx.doi.org/10.1016/j.rse.2015.11.006
2. Hamunyela, E., Verbesselt, J.,de Bruin, S., Herold, M. (2016). Monitoring Deforestation at Sub-Annual Scales as Extreme Events in Landsat Data Cubes. Remote Sensing, 8(8), 651. http://dx.doi.org/10.3390/rs8080651 ##@return Returns spatially normalised image or image stack
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## Not run:
#create a raster stack
ra <- raster(ncols=360, nrows=180)
ra[] <- rnorm(ncell(ra))
for (i in 1: 86){
ro <- raster(ncols=360, nrows=180)
ro[] <- rnorm(ncell(ro))
ra <- stack(ra, ro)
}
#generate fake date stamps for layers
imagedate <- decimal_date(seq(as.Date("2010-1-1"), as.Date("2016-12-30"), by = "month"))
#single pixel processing example:
rad <- rasterEngine(inraster=rasterBrick, fun=sPTNormaliser,window_dims=c(windowwidth=15,windowwidth =15),
args=list(spatiaNormPercentile =95))
#paralell processing example:
## register the cores
sfQuickInit(cpus=5)
rad <- rasterEngine(inraster=rasterBrick, fun=sPTNormaliser,window_dims=c(windowwidth=15,windowwidth =15),
args=list(spatiaNormPercentile =95))
writeRaster(rad, filename="test.tif",datatype ="FLT4S", overwrite=TRUE)
# Unregister the cores
sfQuickStop()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.