evi2¶
Overview¶
evi2 computes the 2-band Enhanced Vegetation Index variant (EVI2):
\[EVI2 = G \cdot \frac{NIR - Red}{NIR + C1 \cdot Red + L}\]
Using common constants: - \(G = 2.5\) - \(C1 = 2.4\) - \(L = 1.0\)
EVI2 is often used when the blue band is unavailable, while retaining some of EVI’s improvements over NDVI.
Usage¶
import numpy as np
from eo_processor import evi2
nir = np.array([0.60, 0.70, 0.35])
red = np.array([0.25, 0.20, 0.15])
out = evi2(nir, red)
print(out)
Shapes & Dtypes¶
Supports 1D and 2D arrays in the public Python API.
Inputs may be any numeric dtype (int/uint/float); coerced to
float64internally.Shapes of
nirandredmust match exactly; mismatch raisesValueError.
Numerical Stability¶
Very small denominators are guarded with an EPSILON (1e-10). When nir + 2.4*red + 1
is ~0 the output is set to 0.0 to avoid instability.
See Also¶
enhanced_vegetation_index()/evi()(3-band EVI)ndvi()(simple 2-band normalized difference)
End of EVI2 documentation.