# NOT RUN {
# 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'))
# }
Run the code above in your browser using DataLab