Student Activity: Classification of an image

This is a tutorial lesson using the MultiSpec program to classify regions on an image as deforested regions or “other “. “Other” is anything else, including fields of crops, grassland, lakes, roads, or buildings.

Earlier we learned to use the MultiSpec program and recognize some features in an image. We later learned methods for finding the area of irregularly shaped regions. If the region we were interested in was available to us on a computer image, we were able to find the area by counting pixels or using other techniques. However, when we did this, we often had to make difficult decisions through a technique called classification. Although classification is a very complex topic used by scientists when they analyze images, we can simplify the process for our purpose.

  • Open the MultiSpec application program. The window labeled Textoutput will appear.
  • From the File menu select Open Image.
  • From the dialogue box labeled “Select Image”, select (click on) BEVERLY,MA.LAN. (Note: If the BEVERLY,MA.LAN file is in another folder, you will have to double click on the folder icon before double clicking on the BEVERLY,MA.LAN file.)
  • A dialogue box allowing you to set display specifications for the image display will appear.
  • Displaytype: Select 3-Channel Color.
  • Bits of color: 24 or 8 bits of color depending on the memory you have available on your computer.
  • Enhancement: Be sure to select treat 0 as data. (“Linear Stretch” remains visible in the box.)
  • Channels:
  • Color monitor: Assign 3 (reflected red light) to the red color gun, 2 (reflected green light) to the green color gun, and 1 (reflected blue light) to the blue color gun, for a true-color image.
  • Click on OK.
  • Spend a few minutes studying the full images with the window scaling box (near the right end of the lower scroll bar) set at X0.500 . Compare features with the map of the region. Try to identify the lake, rivers, towns, and major roads. You may want to enlarge the window to a little more than twice its current size by clicking on the lower right hand corner of the viewing window and dragging to the right and down. Click on the window scaling box so that it shows X1.0 .
  • This image is of a region on the north shore of Massachusetts that has a varied landscape. If we had another image from an earlier time frame we could determine the amount of deforestation that had occurred. This is precisely how scientists are determining deforestation in the tropical rainforests. The Landsat images obtained earlier than 1984 were taken with different sensing equipment than the images that have form the more recent Landsat satellites. Comparing areas on images obtained by sensors with different sensing equipment and unlike spatial resolution is extremely difficult. Although we are unable to make these comparisons in this lesson, researchers have made this comparison with more sophisticated computer software programs.

The task in this activity is to determine the area of the forested region in 1990 using a technique called classification. The directions that follow will help you do this.

Selecting the training field for future classification:

We will place several rectangular boxes on the screen around regions of known forest. The computer will analyze the brightness values in the bands (or channels) for each pixel in that selected region. Then it will compute the arithmetic mean (average) of the brightness values. All pixels on the screen within a certain numerical range of that arithmetic mean will be classified as deforested regions. We will also have to identify all other regions on the image to be classified as “other.” Follow the directions below to accomplish this.

  • Enlarge the viewing window to screen size and click on the window scaling box so that it reads X1.0 . Be sure your image is in true color (R, G, B,: 3, 2, 1).
  • From the Processor menu, select Statistics and click OK in the resulting dialogue box.
  • Notice the new dialogue box labeled Select Field that appears on the screen.
  • To select the training field for the forested region, click and drag a rectangle on the known regions of the images. These are the darker green regions of the images. The rectangle you draw should end up entirely inside the forested region. If you make a mistake, you can click and drag again.
  • To place that training field on a list of training field, click on a blank space on the Select Field window to make it active and then click on the Add To List button. Alternatively, you can click on the Add To List button immediately.
  • When the dialogue box appears, type Forested in the Class Name box and then click OK.
  • We now will add another training field to the Forested training field. Select another region that also appears to be forested (same darker green color). Do this by clicking and dragging another rectangle over this second region. Next click on a blank space on the Select Field window to make it active and then click on the Add To List button. Alternatively, you can click on the Add To List button immediately. When the “Define Class and/or Field Description” dialogue window appears, click OK indicating that Field 2 is also a forested region.
  • Select two more forested regions. Add these regions, one at a time, to the list of Forested training fields by following the steps in the preceding paragraph.

(Note: You may, by mistake end up making lines instead of rectangles whenever you click on the Image Window and try to draw a rectangle. This probably means you have inadvertently clicked on the Polygon Enter box on the Select Field dialogue window. If there is an X in that box, click on the X so the box is empty.)

(Double Note: If you inadvertently click on the -> Project or -> Class button in the Select Field window, you will get a Project or Class dialogue box. To get back to the Select Field dialogue box, click on Select.)

  • We now have four training fields for the Forested class. Now we will select the training field for the second training class. Point and click to the Forest… class name of the “select Field” window. Hold the mouse button down while you drag to highlight and select New. Then let up on the mouse button.
  • Click on the ImageWindow to make it active. Select an all white region on the image. These very bright regions are most likely rocks, gravel, sand, or bare ground. Click and drag down and to the right to form a rectangle that lies entirely within the white region you have chosen.
  • Click on a blank space on the SelectField window to make it active, and then click on the Add To List button as you previously did.
  • Type "Other" in the Class Name box on the “Define Class and/or Field Description” dialogue box that appears, and then click OK. You have assigned Field 5 as "Other".
  • We need a few more descriptive training field of “other.” Select a region on the image window that is in the ocean. Click and drag a rectangle that is entirely within this region. Click on the Add To List button. When the dialogue box appears, click OK.
  • Select another region such as an open field or marsh and click and drag a rectangular box. Click on the Add To List button and again click OK on the dialogue box that appears.
  • Repeat this process at least two more times, including the town region and the lake in the "Other" class.
  • Select the entire image.

Classification:

The training process is now complete. We have two classes and at least nine training fields. We now want the computer to classify the image.

  • From the Processor menu, select Classify. Uncheck the box by Imageselection by clicking on it. The box will become blank or de-selected. The other settings are satisfactory. Click OK.
  • Click Yes on the “Update project statistics before continuing?” dialogue window that appears.
  • From the Window menu, select TextOutput to make that window active. There should be greater than 90% accuracy on the two fields.
  • From the Edit menu choose Select All. Pull down the edit menu again and select Clear.
  • From the processor menu choose Classify.
  • Under Areas to Classify in the “Set Classification Specifications” window that appears, de-select Training Fields by clicking on the checkmark and leaving an empty box.
  • Select Imageselection by clicking on the box labeled “Image selection.” A checkmark should appear in the box.
  • Under the category Write classification results to: click on the subcategory DiskFile so that a disk file will be created for future use. Click OK.
  • When the dialogue box appears, name the file FORESTED.CLASS and click on Save. The computer will now classify the image. The dialogue box keeps you informed of the progress of the computer.
  • From the File menu, select OpenImage. Click on the FORESTED.CLASS file and Open or double click on FORESTED.CLASS.
  • Click OK on the “Set Thematic Display Specifications” dialogue window.
  • On a color monitor, you should have a blue and yellow image with a legend. On a black and white monitor, you should have a gray scale image with a legend.
  • To save the training fields as a project, from the Project menu, select SaveProject. When the dialogue box appears click "Save" to save the project as BEVERLY,MA.Project.
  • From the Project menu, select Close Project.
  • Before the end of class, remember to select Quit from the file menu in order to exit the MultiSpec Application program.

Do the following exercises:

  1. Now that you have classified an image, it should be easier to determine the area of that region that was forested in 1990. What makes it easier to compute the area from this classified image?
  1. Determine the area of the region forested in 1990. Describe the technique you used to determine the area of this irregularly shaped region and why you chose that technique.

Extensions:

  1. To change the colors, double click on the word FORESTED in the legend. When the color wheel appears, select a new color by clicking on the new color you choose and OK. Follow the same procedure to change to color of OTHER.
  1. Classify an image (the Beverly image or another of your own choosing) into numerous classes, such as: urban, forested, water, field, marshes, etc. The same procedures apply. You will just mark training fields for more classes than this activity has done.