This function calculates a 2-band NDVI using the nsr function.
Usage
ndvi2(s, b1, b2)
Value
ndvi
The returned values are the new NDVI.
Arguments
s
Spectral data in the format of visa's Spectra object, spectra.dataframe or spectra.matrix.
b1
A integer number which defines the wavelength of the 1st spectral band.
b2
A integer number which defines the wavelength of the 2nd spectral band.
Details
Calculate a NDVI with two specific bands of choice. The new NDVI follows the
the standard formula $$NDVI = (\lambda_i + \lambda_j)/(\lambda_i - \lambda_j)$$.
Bands i and j correspond to the b1 and b2 input arguments, respectively. Wavelength
indexes are determined based on the first argument 's'.