stef_local_spatial_normaliser: Normalise satellite images spatially to reduce seasonal...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

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

Usage

1
stef_local_spatial_normaliser(inraster, spatiaNormPercentile = 95, ...)

Arguments

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

Details

To be completed.

Value

Returns spatially normalised image or image stack

Author(s)

Eliakim Hamunyela

References

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

See Also

rasterEngine

Examples

 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
## 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=stef_local_spatial_normaliser,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=stef_local_spatial_normaliser,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)

hamun001/STEF documentation built on May 23, 2019, 8:37 a.m.