albedo: Calculates surface albedo

Description Usage Arguments Details Value See Also Examples

View source: R/radiationtools.R

Description

albedo is used to calculate surface albedo.

Usage

1
2
3
albedo(blue, green, red, nir, maxval = 255, bluerange = c(430, 490),
  greenrange = c(535, 585), redrange = c(610, 660), nirrange = c(835,
  885))

Arguments

blue

a raster object, two-dimensional array or matrix of reflectance values in the blue spectral band (0 to max.val).

green

a raster object, two-dimensional array or matrix of reflectance values in the green spectral band (0 to max.val).

red

a raster object, two-dimensional array or matrix of reflectance values in the red spectral band (0 to max.val).

nir

a raster object, two-dimensional array or matrix of reflectance values in the near-infrared spectral band (0 to max.val).

maxval

a single numeric value representing the maximum reflectance in any of the spectral bands.

bluerange

an optional numeric vector of length 2 giving the range (minimum, maximum) of wavelength values captured by the blue spectral band sensor (nm).

greenrange

an optional numeric vector of length 2 giving the range (minimum, maximum) of wavelength values captured by the green spectral band sensor (nm).

redrange

an optional numeric vector of length 2 giving the range (minimum, maximum) of wavelength values captured by the red spectral band sensor (nm).

nirrange

an optional numeric vector of length 2 giving the range (minimum, maximum) of wavelength values captured by the near-infrared spectral band sensor (nm).

Details

The function assumes that image reflectance has been captured using four spectral bands. If blue is a raster object, then a raster object is returned.

Value

a raster object or two-dimensional array of numeric values representing surface albedo (range 0 to 1).

See Also

Function albedo_adjust() for adjusted albedo for image brightness and contrast.

Examples

1
2
3
4
library(raster)
alb <- albedo(aerial_image[,,1], aerial_image[,,2], aerial_image[,,3],
              aerial_image[,,4])
plot(if_raster(alb, dtm1m), main = "Albedo", col = gray(0:255/255))

ilyamaclean/microclima documentation built on Dec. 14, 2018, 3:10 p.m.