Learn R Programming

landsat (version 1.1.2)

relnorm: Relative normalization of an image

Description

Use regression methods to adjust distribution of values in image tofix to match those in the master image.

Usage

relnorm(master, tofix, mask, method = "MA", nperm = 1000)

Value

regression.results

The regression results from lmodel2

newimage

The transformed image, in the same format in which tofix was provided.

Arguments

master

The target image, in SpatialGridDataFrame, data frame, matrix or vector format.

tofix

The image to be normalized, in any format.

mask

Areas to be omitted, if any, such as a cloud mask. Only NA values within the mask will be used.

method

Regression method to be used. OLS: Ordinary Least Squares; MA: Major Axis (recommended); SMA: Standard Major Axis.

nperm

Number of permutations to use for significance testing.

Author

Sarah Goslee

Details

The regression coefficients from tofix ~ master will be used to match the distribution of values of tofix to those in the master image.

See Also

histmatch

Examples

Run this code
if (FALSE) {
	data(nov3)
	data(july3)
	par(mfrow=c(2,2))
	image(nov3)
	image(july3)

	nov3.newR <- relnorm(master=july3, tofix=nov3)
	image(nov3.newR$newimage)

	nov3.newH <- histmatch(master=july3, tofix=nov3)
	image(nov3.newH$newimage)
}

Run the code above in your browser using DataLab