[GIS] ENVI band math incorrect values

envihyperspectral-sensorraster-calculatorremote sensingvegetation-index

I'm attempting to calculate vegetation indices in ENVI 5.2 using level-2 AVIRIS data in band math.

The indices I'm working with are Vogelmann Red Edge 2, normalized difference red edge, and red edge NDVI (reNDVI). All these indices have the same format as for NDVI.

In band math I am using: float(B1-B2)/float(B1+B2)

These indices are supposed to all be in the range of -1 to 1, however they are typically outside of the -1 to 1 range.

For example, I tested this band math equation for NDVI and got a range of -1.163 to 0.946.

I've tried other iterations of the band math equation (e.g., altering which variables are designated "float"), but they also produce indices that are outside of the valid range.

What am I doing wrong?

EDIT:

Re-doing the indices in ENVI, most values are in the proper range. The table below is for reNDVI using (float(b1)-float(b2))/(float(b1)+float(b2)).
The second column, "count" indicates there are almost 19 million pixels with a value near -0.24, with another 10 million pixels in the two bins next to it. However, a couple hundred pixels are still out of range. I'm not sure why I get this. Does this make the whole band invalid (for the index), or are these really low values to be expected from things like bad pixels?

enter image description here

Best Answer

pay attention that, before spectral index, atmospheric correction must be done. it would be better if you rescaled your corrected values (surface reflectance) between 0 and 1 using below equation:

(b1 le 0) * 0 +(b1 gt 10000) * 1 + (b1 gt 0 and b1 le 10000) * float(b1/10000.0)

after atmospheric correction and rescaling, compute your indices.

Related Question