Skip to main content

ndvi

Function ndvi 

Source
pub fn ndvi(red: &[f32], nir: &[f32]) -> Vec<f32>
Expand description

Normalised Difference Vegetation Index: (nir - red) / (nir + red).

Pixels where nir + red == 0 produce 0.0 rather than NaN / infinity, matching the common no-data convention.