erdas imagine exercise 4. - irfanakar.com€¦ · erdas imagine exercise 4. by: sonya remington 1....

11
ERDAS IMAGINE Exercise 4. by: Sonya Remington 1. This exercise will show you how to edit the signature file created from an Unsupervised Classification, perform a Supervised Classification, and check your data for accuracy by using Accuracy Assessment in ERDAS. 2. Begin by opening ERDAS from your Start Menu: Start > Programs > ERDAS IMAGINE Click on the Classifer button located in the main menu bar. Select Signature Editor from the menu and a Signature Editor table will appear. Go to the File menu in the Signature Editor window and open the .sig file that you named in your unsupervised classification. You should now get values in your Signature Editor table. The classes that you see here are those that were generated by the unsupervised classification and are based on spectral properties.

Upload: lykiet

Post on 28-Jul-2018

284 views

Category:

Documents


11 download

TRANSCRIPT

Page 1: ERDAS IMAGINE Exercise 4. - irfanakar.com€¦ · ERDAS IMAGINE Exercise 4. by: Sonya Remington 1. This exercise will show you how to edit the signature file created from an Unsupervised

ERDAS IMAGINE

Exercise 4.

by: Sonya Remington

1. This exercise will show you how to edit the signature file created from an Unsupervised Classification,perform a Supervised Classification, and check your data for accuracy by using Accuracy Assessment inERDAS.

2. Begin by opening ERDAS from your Start Menu: Start > Programs > ERDAS IMAGINE Click on the

Classifer button located in the main menu bar. Select Signature Editor from the menu and aSignature Editor table will appear.

Go to the File menu in the Signature Editor window and open the .sig file that you named in your unsupervisedclassification. You should now get values in your Signature Editor table. The classes that you see here are thosethat were generated by the unsupervised classification and are based on spectral properties.

Page 2: ERDAS IMAGINE Exercise 4. - irfanakar.com€¦ · ERDAS IMAGINE Exercise 4. by: Sonya Remington 1. This exercise will show you how to edit the signature file created from an Unsupervised

3. Now that your .sig file is open, you may begin to edit it. This part of the exercise will show you how tomerge two classes. You may want to do this after you go into the field and decide that two of the classes thatwere separately grouped during the unsupervised classification are really the same thing (i.e. both are alder). Tomerge two classes, you first need to select them from the table. To do this, click on the row of one of the Class#'s that you want to merge. Hold down the shift key and then click on the other class(es) being merged. In thisexample we will be merging classes 2 and 3 that were generated from an unsupervised classification into ninetotal classes.

Now go to Edit > Merge. Notice that a new class containing the data that you merged has been added to the lastrow in your table. With the two merged classes still selected, go to Edit > Delete to get rid them. The tableshould now look like this:

Save the new Signature File and close the Signature Editor table.

4. You will now learn how to perform a Supervised Classification using the edited Signature File. Click on theClassify button again and select Supervised Classification. The following will appear.

Page 3: ERDAS IMAGINE Exercise 4. - irfanakar.com€¦ · ERDAS IMAGINE Exercise 4. by: Sonya Remington 1. This exercise will show you how to edit the signature file created from an Unsupervised

Enter fields as they are in the above example table. Remember, the "Classified File" will be the output file forthe Supervised Classification and you can name it whatever you want. When you are entering the "InputSignature File" by sure that you enter the edited Signature file, not the original signature file from theUnsupervised Classification. Fill in the Decision Rules section as shown above. Don't worry about what theymean for right now. Hit OK and wait for the image to be classified. Hit OK when the classification is finished.

5. Open two Viewer windows. In one Viewer open the image Unsupervised Classification image and in theother viewer open the Supervised Classification image. Open a raster attribute table for each viewer by going toRaster > Attributes from the menu of each.

One of the first things to notice is that if you change to color to red (or any other color) for the two classes thatyou merged together, that they are now "No Data" and the red color does not appear on the image. This isbecause they no longer exist as separate classes.

Page 4: ERDAS IMAGINE Exercise 4. - irfanakar.com€¦ · ERDAS IMAGINE Exercise 4. by: Sonya Remington 1. This exercise will show you how to edit the signature file created from an Unsupervised

Now make Class 10 (your new class from the merge) red and notice that it does appear on the image.

Page 5: ERDAS IMAGINE Exercise 4. - irfanakar.com€¦ · ERDAS IMAGINE Exercise 4. by: Sonya Remington 1. This exercise will show you how to edit the signature file created from an Unsupervised

Another way to see that Classes 2 and 3 have been merged together is to go to the Raster Attribute table for theUnsupervised Image and make Class 2 red. Now you can compared the two images and notice that the red areain the Supervised image is much more extensive than that is in Unsupervised image.

If you make class 3 in the raster attribute table of the Unsupervised image red, then the red areas in the twoimages will cover the same area.

Page 6: ERDAS IMAGINE Exercise 4. - irfanakar.com€¦ · ERDAS IMAGINE Exercise 4. by: Sonya Remington 1. This exercise will show you how to edit the signature file created from an Unsupervised

6. Now that you have classified your image based on spectral properties and field observations, you want todetermine how accurate your classification was by doing an Accuracy Assessment. You will compare pixels in aclassified image to reference pixels, which are the pixel for which you know the correct class. First open the

pnw98_bbc.img in a Viewer. Click on the Classifier button in the ERDAS menu bar. SelectedAccuracy Assessment and close the Classifier menu. The following window will appear:

Page 7: ERDAS IMAGINE Exercise 4. - irfanakar.com€¦ · ERDAS IMAGINE Exercise 4. by: Sonya Remington 1. This exercise will show you how to edit the signature file created from an Unsupervised

In this window, go to File > Open and select the image that resulted from your supervised classification.Navigate to the file and then click OK to load it. This will be that image that will be used in you accuracyassessment.

In the Accuracy Assessment window go to View > Select Viewer and then click on the Viewer that is displayingthe pnw98_bbc.img image.

Now go to View > Change Color and be sure that the Change colors window looks like this:

"Points with no reference" should be white and "Points with Reference" should be yellow. Click OK when thisis done.

7. Now that you have told ERDAS which image you want to use in your accuracy assessment (the supervisedclassification image), you need to enter the GPS coordinates for the reference points (the points for which youare sure of the class because you actually went out in the field and had a look). When you actually do anaccuracy assessment for your project, you will have the GPS coordinates from your ground truth field exerciseentered into a .txt file to import. Since you may not have this at the time that you are trying this exercise, use theGPS points for your samples from the first field trip. These points are currently in an Excel file along with theattributes for each point (i.e. stem density, biomass, or whatever you collected in the field). First you'll want tomake a file in Excel with ONLY the X-Y coordinates for your GPS points. You should end up with an Excel filethat looks something like this:

Do not label the columns X and Y, but be sure that your X values are in the 1st column and your Y values are inthe 2nd. Now save this new file as a .txt file (not a .xls file). You can do this by selecting the "Text (Tabdelimited)" option from the "Save as type:" field when you are saving the file. Doing this will change the filefrom ".xls" to a " .txt" file. (See the below for example.)

Page 8: ERDAS IMAGINE Exercise 4. - irfanakar.com€¦ · ERDAS IMAGINE Exercise 4. by: Sonya Remington 1. This exercise will show you how to edit the signature file created from an Unsupervised

Now that you have done this, go back into ERDAS. From the Accuracy Assessment window go to Edit > ImportUser-defined Points. Select the file with your GPS coordinates from the ASCII Point File window that pops upand hit OK. You now see an Import Options window.

For Field Type, select Delimited by Separator and don't worry about the rest right now. Click OK. YourAccuracy Assessment window should not look something like this:

Page 9: ERDAS IMAGINE Exercise 4. - irfanakar.com€¦ · ERDAS IMAGINE Exercise 4. by: Sonya Remington 1. This exercise will show you how to edit the signature file created from an Unsupervised

In this window, go to View > Show All and notice that the points now appear on the pnw98_bbc.img image inyour Viewer.

If you Zoom In on the image, you can see that these points more clearly.

Now you can enter your class values for the reference numbers in the Accuracy Assessment table. Lets just say,for the purposes of this exercise, that the reference numbers for your points are as follows (Remember, the classvalues that you put in the reference column are determined from field observations):

Page 10: ERDAS IMAGINE Exercise 4. - irfanakar.com€¦ · ERDAS IMAGINE Exercise 4. by: Sonya Remington 1. This exercise will show you how to edit the signature file created from an Unsupervised

The value in the reference column probably do not mean anything to you now, but they will after you have doneyou're field work. Go to Edit > Show Class Values and the Class column will be filled in with the values that arethe actual values of the pixels located at the X-Y coordinates that you indicated.

You can see that the first three points have the same values in the Class and Reference columns. This means thatyour supervised classification was correct ion assigning values to these pixels. Points four through nine do notmatch, meaning that your supervised classification did not assign values correctly to these pixels.

Finally, you can look at the statistics of your accuracy assessment by first going to Report > Options. Check tomake sure that the Error Matrix, Accuracy Totals, and Kappa Statistics options are all turned on. If they are not,do so. Then go to Report > Accuracy Report and the following table will appear:

Page 11: ERDAS IMAGINE Exercise 4. - irfanakar.com€¦ · ERDAS IMAGINE Exercise 4. by: Sonya Remington 1. This exercise will show you how to edit the signature file created from an Unsupervised

In this table, you can find the Confusion Matrix (call the Error Matrix in ERDAS) and the other report optionsthat you selected.

IMPORTANT: When you close ERDAS, you will be asked if you want to print the Log File.Say NO.