normalize: Normalizes two rasters

Description Usage Arguments Details Value References Examples

Description

Performs relative normalization on two rasters using model II regression. Based on the approach in the relnorm function in the landsat package.

Usage

1
normalize(x, y, msk, method = "MA", size = ncell(x))

Arguments

x

a Raster* to use as the base image

y

a Raster* to normalize to the base image

msk

a RasterLayer with missing values in x or in y coded as 1, and all other values coded as 0 (optional)

method

the regression method to use (must be a method recognized by lmodel2

size

the number of pixels to use in developing the model

Details

This function will run in parallel if a parallel backend is registered with foreach.

Value

a Raster* of y normalized to x

References

Sarah Goslee. Analyzing Remote Sensing Data in R: The landsat Package. Journal of Statistical Software, 2011, 43:4, pg 1–25. http://www.jstatsoft.org/v43/i04/

Examples

1
2
3
4
5
6
7
L5TSR_2001_normed_1 <- normalize(L5TSR_1986, L5TSR_2001)
plotRGB(L5TSR_2001_normed_1, stretch='lin')

# Use only half as many pixels to calculate the models
L5TSR_2001_normed_2 <- normalize(L5TSR_1986, L5TSR_2001, 
                                 size=ncell(L5TSR_1986)/2)
plotRGB(L5TSR_2001_normed_2, stretch='lin')

azvoleff/teamlucc documentation built on May 11, 2019, 5:19 p.m.