2

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.

1

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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.