The GRVI is defined as the normalized ratio between the red and green channel of a RGB image or digital number triplet. However, the blue channel can be used as well using a weighting factor. As such a paramter vector is provided so different channels / DN can be weighted separately.
Inserts a GRVI data column into the provided PhenoCam data structure or file.
if (FALSE) { # \dontrun{
# with defaults, outputting a data frame
# with smoothed values, overwriting the original
# download demo data
download_phenocam(site = "harvard$",
veg_type = "DB",
roi_id = "1000",
frequency = "3")
# calculate and append the GRVI for a file (overwrites the original)
grvi(file.path(tempdir(),"harvard_DB_1000_3day.csv"))
# as all functions this also works on a PhenoCam data structure
df <- read_phenocam(file.path(tempdir(),"harvard_DB_1000_3day.csv"))
df <- grvi(df, par = c(1, 1, 0))
} # }