Description Usage Arguments Value Author(s) See Also Examples
The nicergb
function is a wrapper for plotRGB
in package package raster
.
1 2 |
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 |
fixed |
matrix of 3 x 2 with thresholds for RGB |
nodata |
numeric. no data value to be ignored. |
A list with the following objects:
original.rangeoriginal range of greyscale values
plotted.rangethe plotted range of greyscale values
color.stretchminimum and maximum color values
Sebastian Schmidtlein
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.