Functions for 10 Vegetation Indices in Python, Matlab and R Languages

The functions provide the mathematical formulas for 10 common vegetation indices, implemented in Python, Matlab and R languages for data analysis and processing in remote sensing applications.

Previous article: 10 Common Vegetation Indices and Their Applications in Remote Sensing

Here are the functions for the 10 vegetation indices in Python, Matlab, and Python:

Vegetation Indices

Python

1. Normalized Difference Vegetation Index (NDVI):

def ndvi(nir, red):
return (nir - red) / (nir + red)

2. Enhanced Vegetation Index (EVI):

def evi(nir, red, blue):
return 2.5 * (nir - red) / (nir + 6 * red - 7.5 * blue + 1)

3. Soil Adjusted Vegetation Index (SAVI):

def savi(nir, red, L=0.5):
return (nir - red) / (nir + red + L) * (1 + L)

4. Transformed Vegetation Index…

--

--