Supervised Classifications

The climax of our learning experience with PIT is now upon us - producing a supervised classification of the Israel scene. In this, you will assume some interpretive knowledge, based on your experience and common sense in identifying various categories to establish the classes to be mapped onto the image. In the Israel scene, several are obvious: the Mediterranean Sea; the sand dunes; the towns, active growing vegetation, and fallow fields. This is well-displayed in the standard false color composite, which we will adopt as the image to use in specifying training sites. We will select the cell block method of picking samples within classes that is the easiest to use in the PIT program.

We will start by specifying only 8 classes; later you may elect to rerun the classification using a larger number that depends on your confidence in visually picking out the sites where new classes seem best displayed. Our first attempt will work with the full scene to choose the cells. That has problems which will become obvious as you proceed. After you get your first classified image, you will be encouraged to redo the process using movable enlarged portions of the scene, which in effect makes the sites for cell blockage larger. Also, we will start with the Maximum Likelihood Classifier; the PNN and PDM classifiers will be explained later. So, onward.

  1. As you did before, bring up a band 4, 3, 2 (R,G,B) color image of the Israel scene, going through the View, Display Image Control Window, RGB button routine. After the scene is up, drag the RGB window off the image and place to the right. Make any C and B adjustments you think make class distinctions easier.
  2. Inspection of the Israel image yields these obviously different classes, whose shapes and colors lead to separability: (Sea)water; Town; Sand Dunes; Active Crops (strong red tone). Four others show well enough to warrant designation as classes but their identities are more nebulous: Other Crops (dark red); Dark Fields (darkish grayish); Fallow Fields (grayish brown); Natural Surfaces (yellow brown). Other classes are seemingly present but their areas are too small to be sampled by the cell size we will choose. This is true, for example, for linear features like roads and the airport runways. So, we will stick with only 8 classes at this juncture.
  3. At this point, go to the PIT Window and click on Scheme. One option is in gray; (not activated), the others in black (active). Click on "Add Class". A window will drop down, labeled "Enter a Class Name and Color" In the first Name Box, type "Water". Go to the Browse Color button and click. A long list (requiring a scrolling button) will appear. Click on "Blue" when it appears: part of the window will take on this color. Press Enter and the color name will appear in the Color Box. Press Add and both boxes will be cleared. Next, type in Town, go to the Color Menu, scroll down to Brown, and repeat the rest of the procedure. For the rest of the classes we set up in this first try, the names/colors are: Sand Dunes = Yellow; Mature Crops = Dark Green; Other Crops = Pale Green; Dark Fields = Gray; Fallow Fields = Light Pink, and Natural Surface = Medium Purple. The selection being done, press Done. (Note: if you already know a color name [after familiarity with the list], you can elect to type it directly into the Color box rather than scroll the list itself.)
  4. Raise (de-iconify) the Interpretation window (if it had been minimized). The classes created will now appear as a list of color outlined rectanlges at the left (or top). The scene may be the gray image or the color view, depending on what was saved or minimized earlier. If the gray image, then convert it to the false color version in the usual way (Display Image Control; RGB). You will observe that a black grid, with widely spaced squares, is superimposed. Each square encloses 64 x 64 pixels. For this scene, the square box contains too many different classes - many in their visual expression are much smaller than the box (hearafter called a Cell). It is necessary to either reduce the Cell size (increase the total number) or, as we will do later, greatly enlarge part of the scene (Zoom). To reduce the cell dimensions, go to View, then down to Cell, and click. The small window to the right contains two options. Clicking on Size produces a window with a series of n x n sizes, with the 64 x 64 size checked. Change to 16 x 16 by moving the cursor to that position and clicking, which will check it. If you wish to change the color of the grid, then click on Grid, the other option, to a new color. Here, we will stay with black. Also, if you wish to remove the entire grid (perhaps temporarily), click on View, then Show, and click off the checkmark in the right window next to Grid; to restore, re-enter and click it on.
  5. You are now ready to start filling in the grid cells with local samples of the class you interpret to be in each. Try to find the most "pure" examples but a fraction of a cell containing one or more other classes (visual differences) can be tolerated. Lets start with water in the upper left. Go to the legend box labeled Water and click on the small circle at its left. A black dot (bullet) will fill it. The mouse cursor will change shape to a larger white dot. In the image find the sea (upper left), place that cursor in a cell enclosing water and click. The cell fills with blue. Do this for a few more cells adjacent or near by. Note that in the legend box, each time you add a cell, the total (16 by 16 or 256) increases the score shown. You should try to have at least 1500 and perhaps 2500 or more cells thus picked for each class.
  6. Next, activate the black dot in the next box, Town, outlined in brown. Find what you interpret to be examples in the image and click on enough cells (brown) to meet quota. On to obvious sand dunes below the town. Activating its circle, pick at least 8 boxes (filled with yellow). Do likewise to the remaining five classes. The Mature Crops are those in bright red. You will be able to select perhaps 2-3 cells at any one area of the image,so you must go to several areas to activate at least 8 cells. For Other Crops (darker red), these being smaller in size, you probably have to go to 6 to 9 different locations. Training sites for Dark Fields are apparently sparse, at least in areas large enough to fill a cell. Look at the right center margin for one such site; also in the lower left. You may not find even 6 "good" cells; accept a smaller number. Fallow Fields, present in the color composite as shades of gray-brown, are even smaller, so you have to hunt for cells one at a time that meet the conditions. The last class, Natural Surface, may be "artificial". But the terrain north of Ashdod looks a bit different from sand dunes and may be a barren surface with sand and soil. It has a more subdued yellow-brown color and some texture. Enter several cells there and again at a small similar area in the lower left corner.
  7. You have now selected samples of all classes, associated with certain cells in the grid. There is no Save or Close Button, but the class selection information is saved as long as you are actively working in PIT. However, you need to remove this display while you are engaged in the next classification step. There are two options: 1) you can just close the window by hitting the minimize button [ - ] at the upper right; this will place a PIT - Interpretation button at the bottom of your MS-Windows screen; or 2) you can seemingly close the classes window by pressing [X] at the upper right; to recover this window, just go to the main PIT window (which may be minimized also; click to activate), then to Windows, and then Open - Interpretation - Left Scheme, and the image with the class cells on it will come up; but, if you had saved through [X] as a Zoom enlargement, this will not appear but instead you will see the full scene with all colored cells located (if you wish to revert to an enlargement, use the Zoom routine).
  8. Also, you may have made a mistake or two in coloring a cell with what you decide is the wrong class; to correct that, select the proper class (from the class scheme) and click with the mouse cursor in the cell being corrected. And, you may decide to omit a class. If so, go to Scheme and select Delete a Class; a menu will appear to the right with all classes listed; delete by clicking on the desired class. There is also a Delete All Classes option, if you wish to start over. Or, you can retain the classes and desire only to choose a new set of cells; this involves Scheme - Clear Interpretations, with a list of classes in the right window that appears; click on the class whose cells you want to remove, and then on the Clear Button that appears; or you can remove the entire group with the Clear All Interpretations button.
  9. At this stage, it should prove informative to look at the spectral signatures of each class to judge how much real separability there is between any pair of classes or all the classes together. You can do this now because you have taken samples of each class so that appropriate statistics can be calculated. Go back to the PIT window: click and drag on Windows - Open - Signature - Small View (click). A new window labeled PIT - Signature shows up at the upper left. Click/drag on Plot - Source - Interpretation - Spectral - Image (click). Wait about 10 seconds. Then in the black window you should see spectral curves (as straight line segments) for all 8 classes you set up, each with the color assigned to it. The abscissa is simply the number of spectral bands, plotted at equal intervals; the ordinate is the DN range from 0 - 255. There is a scroll button: by dragging it down you will see each class spectral curve by itself, with its name labeled. Some comments about what you can conclude from the plots: all classes seem separable, i.e., even if several are close in DN value for one band, there always are one or more bands that show significant differences; Town and Fallow Field are most closely alike; there are peaks at bands 3 and 5 (count from the origin to the third and fifth dots on the curves) suggesting that overall, those bands are brighter; all band 2 values are lower, implying that this band may be darker overall owing to either sensor or calibration conditions.There are strong peaks for band 6 and all the curves converge to a narrow range; this indicates that the DN values are similar and radiances were not much different for the classes involved; this is borne out by the image when displayed - it is tonally flat with little variation. In general, if that is the case, it is wise to omit band 6 from the classification; use band 6 only if there tends to be bright and dark patterns that indicate hot spots and cool areas. For the classification we will now do, include band 6, but if you redo this at some other time, you can elect to drop band 6.
  10. We are now at the climax - ready to do the final classification. Make sure the PIT - Interpretation window is minimized. Bring the PIT window up and click on Windows. Then, follow the usual click/drag sequence: Windows - Open - Classification - Supervised - Image - Left Scheme. This will bring forth the large window with the image (Band 1, in this case) and the 8 class legend (color outlined) to its left. Click on the Classifier button (on the menu bar) and select ML... from the drop-down menu that appears. A dialog box will be displayed in which the parameters for using the ML classifier may be selected. We'll use the defaults so just click the Run button. The progress will be shown at the lower-left: Creating temporary PIT file - Creating temporary training set - Running classifier - Determining classifier boxes - Drawing classifier boxes. When that last statement arrives, you will begin to see colors at the top of the gray image that will progress downward until the entire image is filled. This is the Maximum Likelihood classification you sought.
  11. In general, the result should look believable (yours will vary from mine because you almost certainly chose different cell sites for the classes; but there should be strong similarities). The ocean water should just be in blue in the upper left; there is a small lake near the scene center which may or may not be in blue. Probably, the color assigned to Town shows up more widespread than you expect. It should be nearly solid and continuous near the wharves and dominant but mixed with other classes just inland; this color shows up also in local concentrations within the vast agricultural part of the image, and denotes small settlements, the airport, and the village of Lob. Both green patterns look realistic as indicators of active crop growth. Fallow fields, in pink, probably are the most prevalent class in the scene - you may judge that there is perhaps too much of this class, depending on how you selected your cells. The natural surface (purple) seems meaningful.Look at the percentage of each class in the Legend.
  12. One class, Dark Fields, will likely be around 5%. It does not stand out - the gray color given to it doesn't contrast enough. It is easy to change. Click on Scheme, look in the window that drops for Modify Class, and a new window with the eight classes list will appear to the right. Click on Dark Fields and a small version of the window you used to select Class Name and Color appears. Keep the name and browse through the color list. Check any new one you wish, but we suggest Grey 30. After a few moments, that dark color will replace the light gray. Consider this to be the final version - in effect a land use map of the Ashdod coast and inland agriculture. You can now elect to do one of three things: 1) keep it active, but minimized; 2) save it, or 3) delete it. For now, minimize it. Note that both the label at the top of the classified scene and the minimize button call this Classification/1.
  13. So, now we ask you to pause a moment and think through this question: What could you have done to have made this classification easier to do? PAUSE. Well, the biggest problem you no doubt had was to find single cells that were relatively "pure".Other Crops, and particularly, Fallow Fields and Dark Fields, were usually hard to find as the predominant class in many/most cells. They are often just too small and must share the cell with at least a second - sometimes third - class. How can you get around this problem. Make the cells smaller - not practical under the circumstance - OR make the image larger, that is, zoom it up. Lets try the latter. To do this, restore the PIT interpretation window from its minimized button. Click on Scheme and then Clear All Interpretations. This eliminates your previous cell selection. Note that PIT Interpretation has a Mode Button. Click on it and note that its window has a Zoom In option. Click on this. A square cursor appears that can be placed anywhere in the full scene image. Put it somewhere near the middle of the upper left quadrant. Click, and an enlarged (by 2 x 2, the default) scene replaces the full one. But, the cell size in the grid remains the same. However, each individual cell (which encompasses 8 x 8 or 64 cells) in the grid "straddles smaller parts of the scene, so that there is a higher likelihood of finding "pure" classes within some given cell. Note, too, that there are both horizontal and vertical scroll bars. When you move right or down or both, you will traverse through the entire scene (fully down and right moves the image to its lower right corner in the full scene). Thus, you can still choose cell classes over the entire image - each cell filled in just samples smaller areas.
  14. Do this, that is, choose new class cells, minimize this Interpretation, and proceed thru the PIT- Classification as you did before. We suspect you will find it easier to select good examples of dominantly Dark or Fallow Fields, and you can block out the town better than before. After your classification is displayed (as Classification/2), see if you have obtained a reduction in the percent of Fallow Fields and greater percentage of Dark Fields. The Town may also be more "compact" and realistic. As a general rule of thumb, we have concluded that, if you know a fair amount about the categories present in any scene you plan to classify and if there is a high proportion of small areas that nevertheless appear to be valid classes, you will achieve better results if you select your class training cells from at least one level up in Zoom (zooming in too much tends to present a scene with a patchwork of blocky pixels). Close this classification by minimizing it.
  15. What might you do next. We suggest that you repeat the classification, in the steps outlined above, but with one change. Choose PNN instead of ML. Try this now. But, heed these warnings first: The PNN (neural network) classifier is much slower than ML (maximum likelihood) - it took about 15 minutes on a 200 MHz machine to complete "Running Classifier". Part way into an ultimately successful run, the ScreenSaver pattern came on. The processing continued but the image and legend disappeared only to restore towards the end, after repeated pushing on random keys in the usual way to restore the screen. Suggest you hit a key periodically in a time interval less than drives the Screen Saver. In any event, the final PNN classification appeared and subjectively was judged the better of the two (PNN vs ML). The Town was sharply delineated. The amount of Other Crops seemed a better representation in the PNN version. But, reserve judgment for yourself after you succeed with this PNN classification.
  16. As an option, run the PDM (Polynomial Discriminate Method) classifier. Do exactly the same as before, except select the PDM option. It will take about the same time as PNN. Results are similar to PNN but there is a real difference from ML. In the dual run we made, ML distribution for classes Dark Fields and Fallow Fields was 8.5% and 40% and with PDM was 22% and 23% respectively. This could depend much on the choice of specific cells but in this comparison the same cells were used. The distribution of percentages is thus sensitive to the particular areas in which the training site cells are located and on the classifier used. Which classification is best can only be determined by comparing with actual ground truth, but intuition helps.
  17. While we're at it, lets run a revealing experiment. Let us peform a standard ML classification but on only bands 2, 3, and 4. This will in effect simulate a Landsat MSS image. Lets see how well this reduced number of bands can achieve a suitable distribution of classes. Request a ML classification as before but before clicking Run specify that only bands 2, 3, and 4 should be used. Do this by clicking on the buttons labeled 1, 5, 6, and 7 in the "Spectral Bands:" area of the dialog box. This will cause them to change to a light gray (rather than black) indicating that they will not be used. Now click Run to start the classification. After the classification is displayed, look at it and, if you retained any other classification, compare the two. Your conclusion will likely be: the "MSS" classification did almost as well as those based on 6 or 7 TM bands. Why? Largely, because this Israel scene is dominated by vegetation, so MSS 6 and 7 pretty much match TM 4. If the scene had contained considerable rock materials, and certain other classes, these differentiate better when TM bands 5 and 7 are available to distinguish their special characteristics. When (if) you decide to classify the several other scenes in this PIT Appendix, those that contain rock materials (e.g., the Waterpocket Fold scene) should benefit from utilizing TM bands 5 and 7, and probably 6 also.
  18. As an aside, the writer (NMS) experimented with a maximum likelihood classification using TM bands 1 through 4 and selecting 6 of the 8 original classes, eliminating Dark Fields and Natural Surfaces. The result was to make Towns appear more realistic - Ashdod was more widespread - and to replace Dark Fields and Natural Surfaces with Fallow Fields. The overall effect was a "cleaner" (sharper) classification but at the cost of omitting two classes that are discrete and probably real and worth mapping.
  19. PIT also facilitates classification using PCIs rather than spectral bands. If you are curious about the nature and appearance of such a classification, make some number of PCIs, as described before, and run a ML classification, specifying PCIs instead of spectral bands in the dialog box. Interesting, eh!
  20. You may have noticed a button labeled Training Set that appears on both the PIT - Interpretation and the PIT - Classification title bars. Since we won't be using this function, ignore it. But, its purpose is to establish training sites for use with a classifier (e.g., Miminum Distance) not a part of PIT but one that can be used in some other processing software package or with a classifier that can be imported to PIT. Also, under the Image button is an option called Palette. We will not use this either, but it refers to the use of a color palette image control. There are several other functions and procedures on PIT that, again, will not be integral to this training exercise. You can learn something about most of these by scanning through the Help explanation.
  21. The last thing you will want to add to your PIT skills is the ability to save your work. From the PIT window menu bar, click on the PIT button and select "Save As..." from the drop-down menu. A dialog box will appear. Navigate the the PITimages folder (most likely by clicking "Parent Directory" and then double-clicking on PITimage in the new list of files displayed). In the "File:" field type in the name of a file with a ".pit" extension and then click Save. This will save your current PIT session to that file (called a PIT file). A PIT file contains the image you were working on, the image controls selected, classes created, and all of your interpretations. Now, to see it, let's suppose you want to check out the PIT - Interpretation group of training cells you diligently selected earlier. And let's assume you had exited the entire PIT program (after saving the PIT file!). Get back into PIT from scratch. Hit the PIT button on the left end of the title bar. Then on Open. A Select a PIT File window appears. Enter the PITimages directory in the Dir. Box and then insert the file name you chose (can access it through Parent Directory, and it will show up on a list [click on the file desired and it enters automatically; if you remember its name, just type it in) and press Enter. It is now in active memory. To see the training site display image, from the PIT bar, click on Window - Open - Interpretation - Left Scheme, as you've done before, and yesterday's work reappears. You can also save the results of a classification as a GIF file. To do so click the View button on the menu bar of the Classification window and select "Save As - GIF..." from the drop-down menu. You will be prompted for the name of the GIF file to save.


Primary Author: Nicholas M. Short, Sr. email:

Collaborators: Code 935 NASA GSFC, GST, USAF Academy
Contributor Information
Last Updated: September '99

Webmaster: Bill Dickinson Jr.
Site Curator: Nannette Fekete

Please direct any comments to

Next Table of Contents Previous