I am try to calculate NDVI value after atmospheric correction in ENVI.
The atmospheric correction process is as describe below.
http://www.ittvis.com/Use...e/posts/Default.aspx
If calculating NDVI by ENVI vegetation analysis module, the value range is within -1 and 1, however, if I calculate the NDVI by the band manth tools :(float(b4)-b3)/(float(b4)+b3), the histogram value shown that there are many value are far greater than 1 or below -1.
Basic Stats Min Max Mean Stdev
Band 1 -867.000000 1049.000000 0.151136 2.237053
Part of the histrogram is here:
-108.113725 33 1382 0.0001 0.0035
-100.600000 403 1785 0.0010 0.0045
-93.086275 42 1827 0.0001 0.0046
-85.572549 158 1985 0.0004 0.0050
-78.058824 358 2343 0.0009 0.0060
-70.545098 148 2491 0.0004 0.0063
-63.031373 300 2791 0.0008 0.0071
-55.517647 272 3063 0.0007 0.0078
-48.003922 177 3240 0.0004 0.0082
-40.490196 720 3960 0.0018 0.0101
-32.976471 483 4443 0.0012 0.0113
-25.462745 728 5171 0.0018 0.0131
-17.949020 2951 8122 0.0075 0.0206
-10.435294 20165 28287 0.0512 0.0719
-2.921569 39297578 39325865 99.8458 99.9176
4.592157 23078 39348943 0.0586 99.9763
12.105882 5332 39354275 0.0135 99.9898
19.619608 1222 39355497 0.0031 99.9929
27.133333 371 39355868 0.0009 99.9939
34.647059 599 39356467 0.0015 99.9954
42.160784 108 39356575 0.0003 99.9957
49.674510 177 39356752 0.0004 99.9961
57.188235 41 39356793 0.0001 99.9962
64.701961 66 39356859 0.0002 99.9964
72.215686 373 39357232 0.0009 99.9973
79.729412 42 39357274 0.0001 99.9974
87.243137 27 39357301 0.0001 99.9975
94.756863 56 39357357 0.0001 99.9977
102.270588 5 39357362 0.0000 99.9977
109.784314 26 39357388 0.0001 99.9977
117.298039 18 39357406 0.0000 99.9978
124.811765 61 39357467 0.0002 99.9979
132.325490 24 39357491 0.0001 99.9980
139.839216 23 39357514 0.0001 99.9981
147.352941 5 39357519 0.0000 99.9981
I also write a IDL function to compute the NDVI, the results are also over -1 and 1.
;NDVI Function
FUNCTION TM_NDVI,B3,B4,CHECK=check
Den = float(B3)+B4
IF(KEYWORD_SET(check)) THEN $
Ptr = WHERE(Den EQ 0.,Count)$
ELSE Count=0
IF(Count GT 0) THEN Den[ptr] = 1.0
Result = (float(B4) - B3)/Den
IF(Count GT 0) THEN Result[ptr]=0.0
RETURN, Result
END