normImage: Normalize Raster Images: Center and Scale

Description Usage Arguments Value Examples

Description

For each pixel subtracts the mean of the raster layer and optionally divide by its standard deviation.

Usage

1

Arguments

img

Raster* object. Image to transform. Transformation will be performed separately for each layer.

norm

Logical. Perform normalization (scaling) in addition to centering, i.e. divide by standard deviation.

...

further arguments passed to writeRaster.

Value

Returns a Raster* with the same number layers as input layers with each layer being centered and optionally normalized.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(raster)
## Load example data
data(rlogo)

## Normalization: Center and Scale
rlogo_center_norm <- normImage(rlogo)
hist(rlogo_center_norm)

## Centering
rlogo_center <- normImage(rlogo, norm = FALSE)


Search within the RStoolbox package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.