It looks like your expression is pretty much what you would want it to be. It says that if NDVI is greater than or equal to 0.3, classify the pixel as "agri" (green). And otherwise, classify it as "non agri" (blue). So far so good.
But then you specify the variable name inside the curly brackets as ndvi, which is a predefined variable name in ENVI and means that you want ENVI to calculate NDVI from the image that you will associate with that variable. But then it looks like you are pairing the {ndvi} variable with an image that already is NDVI. What will happen here is that ENVI will try to calculate NDVI from the NDVI image, which it can't do because there is only one band. So the expression cannot be fulfilled. Consequently every pixel is assigned to the "No" decision.
What you want to do instead is one of two options:
1) Instead of using {ndvi} in your expression, use b1. Then assign the b1 variable to your NDVI image ndvi_new.
2) Keep the expression the way it is. Then assign the {ndvi} variable to the original multiband image that you used to calculate ndvi_new originally. ENVI will perform the NDVI calculation as it processes the decisions in the classification.
- Peg
Exelis VIS
|