nicergb: Pretty Red-Green-Blue plot based on three raster* layers.

Description Usage Arguments Value Author(s) See Also Examples

Description

The nicergb function is a wrapper for plotRGB in package package raster.

Usage

1
2
nicergb(img, r = 1, g = 2, b = 3, stretch = 2, readjust = FALSE,
  fixed = NULL, nodata = NULL)

Arguments

img

RasterBrick or RasterStack

r

integer. Index of the Red channel, between 1 and nlayers(x)

g

integer. Index of the Green channel, between 1 and nlayers(x)

b

integer. Index of the Blue channel, between 1 and nlayers(x)

stretch

numeric. linear stretch to be applied. Values between 0 and 50 describe proportion (in percent) to be cut away from lower and upper quantile.

readjust

logical. If TRUE, the channel with the largest range is scaled to its maximum. The ranges of the other two channels are stretched but maintaining the relative proportion.

fixed

matrix of 3 x 2 with thresholds for RGB

nodata

numeric. no data value to be ignored.

Value

A list with the following objects:

Author(s)

Sebastian Schmidtlein

See Also

plotRGB

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
## Load image
img <- brick(system.file("external/rlogo.grd", package="raster"))
## Plot as RGB
nicergb (img)
## Cut the upper and lower 20% of the histogram and stretch the rest
nicergb (img, stretch = 20)

## End(Not run)

benmack/oneClass documentation built on Dec. 15, 2020, 7:38 p.m.