View source: R/radiationtools.R
| albedo | R Documentation | 
albedo is used to calculate surface albedo.
albedo(
  blue,
  green,
  red,
  nir,
  maxval = 255,
  bluerange = c(430, 490),
  greenrange = c(535, 585),
  redrange = c(610, 660),
  nirrange = c(835, 885)
)
blue | 
 a SpatRaster object, two-dimensional array or matrix of reflectance values in the blue spectral band (0 to   | 
green | 
 a SpatRaster object, two-dimensional array or matrix of reflectance values in the green spectral band (0 to   | 
red | 
 a SpatRaster object, two-dimensional array or matrix of reflectance values in the red spectral band (0 to   | 
nir | 
 a SpatRaster object, two-dimensional array or matrix of reflectance values in the near-infrared spectral band (0 to   | 
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).  | 
The function assumes that image reflectance has been captured using four spectral bands.
If blue is a SpatRaster object, then a SpatRaster object is returned.
a SpatRaster object or two-dimensional array of numeric values representing surface albedo (range 0 to 1).
Function albedo_adjust() for adjusted albedo for image brightness and contrast.
library(terra)
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.