Skip To Content

Classify the imagery

In the previous lesson, you segmented the imagery to simplify it for classification. Next, you'll perform a supervised classification of the segments. A supervised classification is based on user-defined training samples, which indicate what types of pixels or segments should be classified in what way. (An unsupervised classification, by contrast, relies on the software to decide classifications based on algorithms.) You'll first classify the image into broad land-use types, such as vegetation or roads. Then, you'll reclassify those land-use types into either pervious or impervious surfaces.

Create training samples

To perform a supervised classification, you need training samples. Training samples are polygons that represent distinct sample areas of the different land-cover types in the imagery. The training samples then signify that segments with certain spectral characteristics should be classified together to represent the same land-use type. First, you'll modify the default schema (which you chose when you configured the wizard) to contain two parent classes: Impervious and Pervious. Then, you'll add subclasses to each class that represent types of land cover. If you attempted to classify the segmented image into only pervious and impervious surfaces, the classification would be too generalized and likely have many errors. By classifying the image based on more specific land-use types, you'll create a more accurate classification. Later, you'll be able to reclassify these subclasses into their parent classes.

  1. On the Training Samples Manager page of the wizard, right-click each of the default classes and click Remove Class. For each class, click Yes in the Remove Class window.
  2. Right-click NLCD2011 and choose Add New Class.

    Add New Class

  3. In the Add New Class window, for Name, type Impervious. For Value, type 20, and for Color, choose Gray 30%. Click OK.

    Settings for Impervious class

  4. Right-click NLCD2011 again and choose Add New Class. Add a class named Pervious with a value of 40 and a color of Quetzal Green.

    Settings for Pervious class

    Next, you'll add a subclass for gray roof surfaces.

  5. Right-click the Impervious parent class and choose Add New Class. Add a class named Gray Roofs with a value of 21 and a color of Gray 50%.

    Next, you'll create a training sample on the map using this class.

  6. Click the Gray Roofs class to select it. Then, click the Polygon button.

    Polygon button

  7. Zoom to the cul-de-sac to the northwest of the neighborhood.
    Tip:

    You can enable navigation tools while the Polygon tool is active by holding down the C key.

    Northwest neighborhood

  8. On the northernmost roof in the cul-de-sac, draw a polygon. Make sure the polygon covers only pixels that comprise the roof.

    Training sample

    A row is added to the wizard for your new training sample.

    Row added to wizard

    When creating training samples, you want to cover a high number of pixels for each land-use type. For now, you'll create more training samples to represent the roofs of the houses.

  9. Draw more rectangles on some of the nearby houses.

    Training samples

    Every training sample that you make is added to the wizard. Although you have only drawn training samples on roofs, each training sample currently exists as its own class. You'll eventually want all gray roofs to be classified as the same value, so you'll merge the training samples that you've created into one class.

  10. In the wizard, click the first row to select it. Press Shift and click the last row to select all the training samples.
  11. Above the list of training samples, click the Collapse button.

    Collapse button

    The training samples collapse into one class. You can continue to add more training samples for gray roofs and merge them into the Gray Roofs class. Ultimately, the Gray Roofs class should have training samples on roofs throughout the entire image (not every roof needs a training sample, but more coverage is more likely to yield a satisfactory classification).

  12. Create two more impervious subclasses based on the following table:

    Subclass Value Color

    Roads

    22

    Cardovan Brown

    Driveways

    23

    Nubuck Tan

    Impervious subclasses

  13. Create four pervious subclasses based on the following table:

    Subclass Value Color

    Bare Earth

    41

    Medium Yellow

    Grass

    42

    Medium Apple

    Water

    43

    Cretan Blue

    Shadows

    44

    Sahara Sand

    Pervious subclasses

    Note:

    These seven classes are specific to the land-use types for this image. Images of different locations may have different types of land use or ground features that should be represented in a classification. For example, a different location may have houses with both gray roofs and red roofs. Because the spectral signatures of both roof types are very different, it would be more accurate to classify gray roofs and red roofs as two classes.

    Shadows are not actual surfaces and cannot be either pervious or impervious. However, shadows are usually cast by tall objects such as houses or trees and are more likely to cover grass or bare earth, which are pervious surfaces. Some shadows cover roads or driveways, but you'll factor these into your accuracy assessment later in the workflow.

  14. Draw training samples throughout the image to represent these seven main land-use types. Zoom and pan throughout the image as needed.

    Training samples

  15. Collapse training samples that represent the same types of land use into one class.

    Collapsed classes

  16. When you're satisfied with your training samples, click the Save button.

    Save button

    Your customized classification schema is saved in case you want to use it again.

  17. Click Next.

Classify the image

Now that you've created the training samples, you'll choose the classification method. Each classification method uses a different statistical process involving your training samples. You'll use the Support Vector Machine classifier, which can handle larger images and is less susceptible to discrepancies in your training samples. Then, you'll train the classifier with your training samples and create a classifier definition file. This file will be used during the classification. Once you create the file, you'll classify the image. Lastly, you'll reclassify the pervious and impervious subclasses into their parent classes, creating a raster with only two classes.

  1. Confirm that Classifier is set to Support Vector Machine.

    For the next parameter, you can specify the maximum number of samples to use for defining each class. You want to use all your training samples, so you'll change the maximum number of samples per class to 0. Changing the maximum to 0 is a trick to ensure all training samples are used.

  2. For Maximum Number of Samples per Class, type 0.

    Settings for Classifier and Maximum Number of Samples per Class

    Lastly, you have the option to choose statistical attributes to include in the attribute table of any raster dataset created using the classifier. While these statistics can be interesting, you won't need any of them for your purposes, so you'll leave the default parameters unchanged. Next, you'll train the classifier and display a preview.

  3. Click Run.

    The process may take a long time, as multiple processes are run. First, the image is segmented (previously, you only segmented the image on the fly, which isn't permanent). Then, the classifier is trained and the classification performed. When the process finishes, a preview of the classification is displayed on the map.

    Classification preview

    Depending on your training samples, your classification preview should appear to be fairly accurate (the colors in the dataset correspond to the colors you chose for each training sample class). However, you may notice that some features were classified incorrectly. For instance, in the example image, the muddy pond south of the neighborhood was incorrectly classified as a gray roof, when it is actually water. Classification is not an exact science and rarely will every feature be classified correctly. However, because this classification will be used to determine storm water fees for landowners, a high degree of accuracy is expected. If you see only a few inaccuracies, you can correct them manually later in the wizard. If you see a large number of inaccuracies, you may need to create more training samples. Later, you'll run tools to assess the accuracy of your classification.

    Note:

    To go back in the wizard and create more training samples, click the Previous button until you return to the correct page.

  4. If you're satisfied with the classification preview, click Next.

    The next page is the Classify page. You'll use this page to run the actual classification and save it in your geodatabase.

  5. For Output Classified Dataset, change the output name to Classified_Louisville.tif.

    The remaining parameters are optional. They allow you to create additional outputs, such as a classifier definition file or a segmented image. You've already created these files, so you don't need to create them again.

  6. Leave the remaining parameters unchanged and click Run.

    The process runs and the classified raster is added to the map. It looks similar to the preview.

  7. Click Next.

    The next page is the Merge Classes page. You'll use this page to merge subclasses into their parent classes. Your raster currently has seven classes, each representing a type of land use. While these classes were essential for an accurate classification, you're only interested in whether each class is pervious or impervious. You'll merge the subclasses into the Pervious and Impervious parent classes to create a raster with only two classes.

  8. For each class, in the New Class column, choose either Pervious or Impervious.

    New Class column

    When you change the first class, a preview is added to the map. The preview shows what the reclassified image will look like. When you change all of the classes, the preview should only have two classes, representing pervious and impervious surfaces.

  9. Click Next.

Reclassify errors

The final page of the wizard is the Reclassifier page. This page includes tools for reclassifying small errors in the raster dataset. You'll use this page to fix an incorrect classification in your raster.

  1. In the Contents pane, uncheck all layers except the Preview_Reclass and Louisville_Neighborhood.tif layers. Click the Preview_Reclass layer to select it.
  2. On the ribbon, click the Appearance tab. In the Effects group, click Swipe.

    Swipe

  3. Drag the pointer across the map to visually compare the preview to the original neighborhood imagery.

    One inaccuracy that you may notice is the muddy pond south of the neighborhood. Because the pond is muddy, it has a different spectral signature than the other water bodies on the map, so it will likely be classified incorrectly even with thorough training samples. This pond is not connected to any other impervious objects, so you can reclassify it with relative ease.

  4. Zoom to the muddy pond area.

    Muddy pond area

  5. In the wizard, click Reclassify within a region.

    Reclassify within a region

    With this tool, you can draw a polygon on the map and reclassify everything within the polygon.

  6. In the Remap Classes section, confirm that Current Class is set to Any. Change New Class to Pervious.

    Remap Classes

    With these settings, any pixels in the polygon will be reclassified to pervious surfaces. Next, you'll reclassify the muddy pond.

  7. Draw a polygon around the muddy pond. Make sure you don't include any other impervious surfaces in the polygon.

    Polygon drawn around the muddy pond

    The pond is immediately reclassified as a pervious surface.

    Reclassified pond

    Note:

    If you make a mistake, you can undo the reclassification by unchecking it in the Edits Log.

    While you likely noticed other inaccuracies in your classification, for the purposes of this lesson, you won't make any more edits.

  8. For Final Classified Dataset, type Louisville_Impervious.tif (including the .tif extension).
  9. Click Run. Then, click Finish.

    Reclassify output

    The tool runs and the reclassified raster is added to the map.

  10. On the Quick Access Toolbar, click Save to save the project.

In this lesson, you classified imagery of a neighborhood in Louisville to determine land cover that was pervious and land cover that was impervious. In the next lesson, you'll perform an accuracy assessment on your classification to determine if it is within an acceptable range of error. Then, you'll calculate the area of impervious surfaces per land parcel so the local government can assign storm water fees.