RGBVI: RGB based Vegetative Indexes (RGBVI)

Description Usage Arguments Details Value References Examples

View source: R/RGBVI.R

Description

This function calculate some useful RGB based vegetative indexes.

Usage

1
2
RGBVI(R, G, B, vi = c('RCC','GCC','ExG2','ExR','ExGR'
,'GRVI','VDVI','VARI','MGRVI','CIVE','VEG'))

Arguments

R

a dataframe or matrix contains 'red' values, RGB should have same class and dimension..

G

a dataframe or matrix contains 'green' values, RGB should have same class and dimension.

B

a dataframe or matrix contains 'blue' values, RGB should have same class and dimension..

vi

vegetative indexes to be calculated(see Details).

Details

The vi parameter should be a characteristic vector and include at least one of the following VI: 'RCC','GCC','ExG2','ExR','ExGR','GRVI','VDVI','VARI','MGRVI','CIVE','VEG'. By default, all of the VIs will be calculated.

Value

A list with length(vi). Each elements represent a vegetative index matrix or data frame.

References

De Swaef, T., Maes, W. H., Aper, J., Baert, J., Cougnon, M., Reheul, D., ... & Lootens, P. (2021). Applying RGB-and thermal-based vegetation indices from UAVs for high-throughput field phenotyping of drought tolerance in forage grasses. Remote Sensing, 13(1), 147.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# generate R, G, B matrix with range 0~255
R <- matrix(sample(0:255,25), nrow=5, ncol=5)
G <- matrix(sample(0:255,25), nrow=5, ncol=5)
B <- matrix(sample(0:255,25), nrow=5, ncol=5)

# calculate all available rgb vi
vi.all <- RGBVI(R,G,B)

# calculate RCC,GCC,ExGR,MGRVI
vi.4 <- RGBVI(R,G,B,vi=c('RCC','GCC','ExGR','MGRVI'))

agrifeature documentation built on Dec. 9, 2021, 9:08 a.m.