albedo: Calculates surface albedo

View source: R/radiationtools.R

albedoR Documentation

Calculates surface albedo

Description

albedo is used to calculate surface albedo.

Usage

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

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 Oct. 31, 2023, 11:41 p.m.