X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 30 Nov 2005 12:57 PM by  anon
Band Math
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
30 Nov 2005 12:57 PM
    When I do a simple Normalized Differential Vegitation Index (NDVI) calculation using band math with LandSat 7 TM data using, bands 4 and 3 via (b4-b3)/(b4+b3). I expect to get numbers between -1 and 1, but I do not. When I look at the calcualted band image vs. the "canned" NDVI calculation done via the ENVI NDVI funtion they look very different. Does anyone have any Idea where I am going wrong?

    Deleted User



    New Member


    Posts:
    New Member


    --
    30 Nov 2005 12:57 PM
    It's because the arithmetic is being done with 8-bit numbers, which wrap back to 255 if you go negative (e.g. 0 - 1 = 255). You need to convert the numbers to floating point to get fractional (including negative) numbers. Try (float(b4)-b3)/(b4+b3) Chris
    You are not authorized to post a reply.