13
1 Lab #3 Separablity Tests and Vegetation Indices Name: Lab #3: FOR 504 Advanced Topics in Remote Sensing Objectives of this laboratory exercise: Use ENVI to: Perform separablity tests on a TM image Classify a TM image using vegetation indices Perform accuracy assessment The questions provided within this lab are designed to help the student better understand the practical details of programming in IDL and are recommended but are not for assessment. Location: RS/GIS Lab Login: XXXX Password: XXXX

Lab #3 Separablity Tests and Vegetation Indices - Separability... · 5 Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lab #3 Separablity Tests and Vegetation Indices - Separability... · 5 Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi

1

Lab #3 Separablity Tests and Vegetation Indices

Name: Lab #3: FOR 504 Advanced Topics in Remote Sensing Objectives of this laboratory exercise: Use ENVI to:

• Perform separablity tests on a TM image • Classify a TM image using vegetation indices • Perform accuracy assessment

The questions provided within this lab are designed to help the student better understand the practical details of programming in IDL and are recommended but are not for assessment. Location: RS/GIS Lab Login: XXXX Password: XXXX

Page 2: Lab #3 Separablity Tests and Vegetation Indices - Separability... · 5 Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi

2

Before you start: Double click the ENVI icon on the desktop: This starts both ENVI (The Environment for Visualizing Images) and the IDL (Integrated Development Language) programming interface Ignore IDL but don’t close it as this closes ENVI as well.

Task # 1 Introduction to Separablity Analysis This lab is going to introduce you to several separablity analysis techniques. In remote sensing, separablity analysis includes techniques that allow you to determine how distinct, and thus separable, different surface types (or classes, ROIs, etc) are from each other. If classes are spectrally distinct then classification will be easier. Before, conducting the analysis in ENVI, here is some background to two common techniques, which we will make use of in this lab: 1 The M Statistic Please refer to the pdf copies of Kaufman and Remer (1994) and Periera (1999) that can be found on the course ftp site. The M-statistic can be calculated using wither ground-based spectral reflectances or pixel values derived from the imagery or from vegetation indices.

M = (µu-µb) / (σu+σb) (1)

Where, µu = mean value for the unburned class, µb = mean value for the burned areas class,

σu = standard deviation of values for the unburned class, σb = standard deviation of values for the burned area class. The M-statistic assesses the degree of discrimination between the two pixel groups. It operates by evaluating the separation between the histograms that are produced by plotting the frequency of all the pixel values within the two classes (Figure 1). A value of M<1 denotes that the histograms significantly overlap and the ability to separate (or discriminate) the two regions is poor. A value of M>1 denotes that the histogram means are well separated and that the two regions are relatively easy to discriminate.

ENVI 4.0.lnk

Page 3: Lab #3 Separablity Tests and Vegetation Indices - Separability... · 5 Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi

3

The numerator of the M statistic describes the difference in mean pixel values between the two classes, while the denominator describes the degree of noise (Pereira, 1999). Classes with more noise (larger σ’s) will have wider histograms and thus will be more likely to overlap and have lower M values. Therefore, the M-statistic can be effectively used to compare the ability of different techniques to discriminate between two different regions.

2 The Jeffries-Matusita Distance Please refer to the pdf copy of Trigg and Flasse (2001) on the course ftp site. The Jeffries-Matusita (J-M) distance can be used to assess the potential of band pairs to discriminate between two different region classes. Assuming multi-variate normal distributions, the JM distance is defined as: (2) (3) Where, u and b = the two region classes Cu is the covariance matrix of u, µµµµu is the mean vector of u, T is the transposition function.

×

++−

+−=

bu

bu

bubuT

buCC

CCµµCCµµ 2

1

ln21)(

2)(

81 1

α

)1(2M-J α−−= eub

Region 1 Region 2 Pixel Classes Pixel Classes

Region 1 Region 2 Pixel Classes Pixel Classes

M<1 M>>1

Figure 1 Illustrative description of the M-Statistic. (A): When M<1 the histograms overlap –making it difficult to separate (or discriminate) the two regions. (B): When M>>1 thehistograms do not overlap – making it relatively easy to separate the two regions.

Pixel Values Pixel Values

Frequency

Page 4: Lab #3 Separablity Tests and Vegetation Indices - Separability... · 5 Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi

4

The J-M distance is asymptotic to 1.414 (√2) and as such, a value of 1.414 suggests that the two region classes are very separable. Task #2 Creating Classification and Validation ROIs of a TM image To view the image we will use in this lab, select File/Open Image File from the main ENVI menu bar, browse to Lab 6, and choose the filename Moscow_tm. As you might have guessed, this is a TM image of Moscow and Moscow Mountain. Using the Tools/Region of Interest/ROI Tools option from the main Image menu bar, open the ROI Tool box. Now using you knowledge of satellite imagery, create ROIs for each of the following cover types: Urban Veg Non Forest Forest Soil Agriculture After you are finished save this ROI set as classify.roi. Now delete all the ROIs Next, repeat this process and find a new set of ROIs for the same cover types from other areas of the images. Do not use the same areas again. Save this second set of ROIs as validate.roi. Now delete all the ROIs

Page 5: Lab #3 Separablity Tests and Vegetation Indices - Separability... · 5 Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi

5

Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi regions. Next, in the ROI Tool menu bar, select Options/Stats for all Regions and write down the mean and standard deviations for each band of each region into the Excel file M stat.xls that can be found in the lab 6 directory. Fill in the excel spreadsheet and determine which single band is best at separating the Forest from the Veg Non Forest classes. Next, we are going to clump all the vegetation ROIs together. We do this by selecting Options/Merge Regions from the ROI Tool menu bar. In the Merge ROIs window select the forest class on the left and highlight all the other vegetation classes on the right. Make sure the Delete Merged ROIs option is selected and press OK. Now repeat this for the Urban and Soil regions. Next, using the Edit button rename these areas as Veg and No Veg. You should now only have two regions. Now by selecting Options/Stats for all Regions produce the mean and standard deviation for these new regions and type them into the Excel spreadsheet to calculate M. Which single band is best at discriminating between the vegetated and non vegetated areas? Can you give reasons why this might be the case?

Page 6: Lab #3 Separablity Tests and Vegetation Indices - Separability... · 5 Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi

6

Task #4 The Usefulness of Scatter Plots Save the two ROIs with a sensible filename and then delete them from the ROI Tool window. Next, close the ROI Tool window. From the main Image Window menu bar select Tools/2D Scatter Plots and press ok. Now select band 3 on the left and band 4 on the right and then press ok. This will produce a 2D scatter plot OR a plot of Red/NIR bi-spectral space.

These are exceedingly useful in ENVI. With this particular, scatter plot you can observe the SOIL LINE, which I shown here in BLUE. Now if you mouse has a middle mouse button, press is anywhere on the scatter plot and hold it down. Now move the mouse around and watch the image windows. You will notice that the pixels corresponding to the areas you select by your mouse in the scatter plot be highlighted in the image window.

Page 7: Lab #3 Separablity Tests and Vegetation Indices - Separability... · 5 Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi

7

Next, in the scatter plot menu bar select Options/Density Slice to view the relative density of the different points in the scatter plot: Now using your mouse, left click and draw a circle in the scatter plot around the bright red oval shape. You will notice that this highlights the majority of the forested region. Next, right click on the scatter plot and select New Class. Now draw similar circles corresponding to the areas highlighted in the image to the right. What areas do these regions highlight within the image? Now move the scroll window and you will discover one of the limitations of ENVI. The scatter plot only shoes what lies in the Main image window and not in the whole image. Expand the Main image so it covers as much of the mountain and the surrounding areas as possible. You will now find that a second red circle has appeared.

Selecting this with a ROI will show you that it represents the areas surrounding the mountain. We will use scatter plots again in a later lab.

Page 8: Lab #3 Separablity Tests and Vegetation Indices - Separability... · 5 Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi

8

Task #5 Creating Images with Vegetation Indices Below is a table of common vegetation indices and a list of people who have applied them to the task of burned area mapping.

In this task, we are only going to use the archetypal NDVI.

Table 1 Common Vegetation Indices Method Equation(s) Reference(s) Rouse et al. (1973) NDVI1 Razimpanilo et al. (1995) Franca and Setzer (2001) Pereira (1999) Pinty and Vertraete (2002) Barbosa et al. (1999b) GEMI(3)1,2 Chuvieco et al. (2002) VI31 Kaufman and Remer (1994) VI3T1,3 Barbosa et al. (1999b) Vafeidis (2002) Huete (1988) SAVI1,4 Chuvieco et al. (2002) BAI5 Chuvieco et al. (2002) Trigg (2002) MIRBI1 Trigg and Flasse (2001) Trigg (2002) 1 ρ denotes the top-of-atmosphere reflectance of band X, where X is given by the MODIS sensor. 2 For GEMI3: The reflective component of AVHRR band 3 replaces ρ1. 3 BT denotes the brightness temperature of AVHRR band 3. 4 The value of L determines which version of SAVI us being used. L=0.5 is standard by L=0.16 isdefined as OSAVI (optimal SAVI). 5 ρC denotes filed-based spectral reflectance, whilst ρ denotes top-of-atmosphere pixel reflectances.

+−

12

12

ρρρρ

)1()125.0()25.01(

1

1

ρρηη

−−−−=GEMI

)5.0()5.05.1)(2(

12

122

122

++++−=

ρρρρρρη

+−=

32

323ρρρρVI

)1000

(

)1000

(3

32

32

T

T

B

B

TVI+

−=

ρ

ρ

)1(12

12 LL

SAVI +++

−=ρρ

ρρ

])()[(1

22Re NIRCrC NIRd

BAIρρρρ −+−

=

28.910 67 +−= ρρMIRBI

Page 9: Lab #3 Separablity Tests and Vegetation Indices - Separability... · 5 Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi

9

Now we could accomplish this using the Band Math option, but ENVI has a built in NDVI function, which we can access by selecting Transform/NDVI(Vegetation Index) from the main ENVI menu bar. If we now load the ROI Tool and restore the Veg and No Veg classes, we can calculate the M stat for this index. To do this select, Options/Stats for all Regions and place the mean and standard deviation values for each band into the Excel spreadsheet. Is the NDVI better at separating the Veg and non-Veg areas that each of the single band methods? Please explain why your answer might be the case. In your opinion, why do several studies in multiple disciplines continue to use the NDVI? OPTIONAL TASK: Use Band Math to calculate the GEMI and MIRBI indices: Are they better at discriminating the Veg and Non Veg areas?

Page 10: Lab #3 Separablity Tests and Vegetation Indices - Separability... · 5 Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi

10

Task #6 Classification and Validation For better or for worse we are going to classify the TM image using the NIR band (band 4). We will assess the results using the validation set of ROIs that we collected earlier. In the NIR band ROI Tool delete all the ROIs and restore the ROIs classify.roi. Now we only want to classify the image into the classes URBAN, FOREST and Agriculture Therefore, only write down the mean and standard deviations of each of these classes: Then calculate the values of the mean + and – one standard deviation. Mean Standard Dev Mean – ST Mean + ST Urban Forest Agriculture Next, delete all the ROIs in the ROI Tool window. Next, from the ROI Tool menu bar, select Options/Band Threshold to ROI and select the NIR band of the TM image, then press ok. Name the first ROI Urban and for the minimum type in the mean – 1 standard deviation value. For the maximum write in the mean + 1 standard deviation value. Repeat this for the Forest and Agriculture classes. Now in order to assess this classification, we need to convert these ROIs into a class image. To do this, select, Options/Create Class Image from ROIs and when prompted Select All Items. Then choose a suitable filename and press ok. Now, delete all the ROIs from the ROI Tool window and restore the validate.roi set. Next, delete the ROIs for Veg Non Forest and Soil as these are not used. Classification Accuracy Using the Kappa Statistic The kappa statistic, defined by Lillesand and Kiefer (2000) by equation (4), is a measure that incorporates the use of an error matrix with the errors of omission and commission in an assessment of whether a classification is correct or not.

Page 11: Lab #3 Separablity Tests and Vegetation Indices - Separability... · 5 Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi

11

A kappa value close to one suggests that the classification is highly accurate and unlikely to be caused by chance, whilst a value of zero suggests the classification is no better than that which would be obtained randomly. (4) Where, R denotes the number of rows in the error matrix, xii is the number of observations in row i and column x, xi+ denotes the total number of observations in row i, x+I is the total number of observations in column i, and N is the total number of observation within the matrix. In ENVI, we can produce a value of the overall accuracy and the kappa statistic value for our classification by selecting Classification/Post Processing/Confusion Matrix/Using Ground Truth ROIs from the main ENVI menu bar. Select the classified file as make sure all the classes match up, before pressing ok. What does the overall accuracy and the values of the kappa statistic tell you about the quality of this classification?

∑ ∑

=++

= =++

−= r

iii

r

i

r

iiiii

xxN

xxxNk

1

2

1 1

).(

).(

Page 12: Lab #3 Separablity Tests and Vegetation Indices - Separability... · 5 Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi

12

OPTIONAL TASK Open the image Moscow_tm and display it in the false color composite combination of 4:3:2 for RGB. In the top left of the image you will notice what appears to be a patchwork of different shapes. Using the ROI Tool draw two ROIs for two of these green shapes. Make sure they look slightly different. Dave these ROIs as 1 and 2. Calculate M as before for each band. Which band is best at discriminating these two regions? Now lets determine is a band combination exists that could do a better job. For this we use the J-M distance and the Transformed Divergence tests in ENVI. In the ROI Tool menu bar, select Options/ Compute ROI Separablity. The select the filename AND in the spectral subset select only bands 1 and 2, then press OK. When prompted press Select All Items and press OK.

Page 13: Lab #3 Separablity Tests and Vegetation Indices - Separability... · 5 Task #3 Assessing the Separablity of the Different Vegetation Classes Using the ROI Tool restore the classify.roi

13

The first value in brackets is the J-M distance and the second is the Transformed Divergence. The J-M distance is repeated in the Pair Separation line. Each of these statistics has been squared, such that they range from 0 to 2.0. A value less than 1 indicates poor separablity, while values greater than 1.9 demonstrate that the classes are well separated. Now, write down the value of the Pair Separation for all the points = 1.123. Repeat this process for each possible band pair. Band Pairs 1 and 2 = 1 and 3 = 1 and 4 = 1 and 5 = 1 and 7 = 2 and 3 = 2 and 4 = 2 and 5 = 2 and 7 = 3 and 4 = 3 and 5 = 3 and 7 = 4 and 5 = 4 and 7 = 5 and 7 = When you have found the band pair with the highest value, produce an image based on a simple ratios of these two bands and determine whether the M stat for the Veg and Non Veg ROIs is better than using the previous best method. If the optimal J-M distance band combination has a lower M value than say a single band on its own, do you need to investigate vegetation indices? Explain your answer.