[GIS] Enhanced vegetation index using ENVI 4.7 bandmath

digital image processingenvierdas-imagineeviremote sensing

I computed Enhanced Vegetation Index using band math in ENVI 4.7 software. The expression used was:

2.5*((float(b1)- float(b2))/(float(b1)+ (6*float(b2)) +(7.5* float(b3))))
BYTSCL(float(b1), min = -1.0, max = 1.0)

The output EVI file has values varying from 0 to 255 rather than -1 to +1. Can anyone suggest an edit to the expression or a method.

Best Answer

The BYTSCL rescales your output from -1 to 1 -> 0 to 255. Remove that last bit, and you don't have your problem. BYTSCL is usually used for minimizing storage and bandwidth requirements associated with displaying data online.

If you want to make sure that you do not have values below -1 and above 1, you can use this function:

(float(b1) lt -1)*(-1)+(float(b1) gt -1)*(float(b1) lt 1)*float(b1)+(float(b1) gt 1)
Related Question