X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 16 Apr 2015 08:36 AM by  anon
help getting decision tree expression right
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



Basic Member


Posts:228
Basic Member


--
16 Apr 2015 08:36 AM
    In ENVI 5.2, I am trying to run a decision tree on NDVI image derived from Landsat 8 satellite data, but I am not getting proper results. I want to classify the NDVI values which are greater than(>)0.3 as crop lands and lesser then(< )0.3 as non-crop lands. I tried with the expression. {ndvi} GE 0.3 But its giving result as non agri(ppt attached). Please guide me how to write a correct expression. I will look forward for your reply.

    Deleted User



    Basic Member


    Posts:228
    Basic Member


    --
    16 Apr 2015 08:37 AM
    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
    You are not authorized to post a reply.