Generalizing classified output by removing small isolated regions

This process removes small isolated regions from a classified image. Regions that are larger than a certain number of pixels will remain on the image. The Region Group, Set Null, and Nibble tools are used to accomplish this task.

In the post-classification processing workflow, this task should be executed after the filtering and smoothing class boundaries steps.

Steps:
  1. Open the Search window by clicking the Search window button Search Window on the Standard toolbar.
  2. Search for the Region Group tool and open it by clicking it in the search results.
  3. Run the tool using the classified image as the input raster. Name the output something meaningful, regiongroup_out.tif for example.
  4. In ArcMap, open the attribute table of the output from the Region Group tool. Examine the Count field and try to identify any regions with a relatively small number of pixels and make note of the counts. These regions will be removed when all the steps are finished.
  5. Search for and open the Set Null tool (refer to steps 1 and 2).
  6. In the tool dialog box, set the output from Step 3 (for example, regiongroup_out.tif) as the Input conditional raster. In the Expression box, type an expression identifying the threshold, such as Count < 40 (where the number 40 in this example represents the minimum count of pixels; you can specify a different number). Type the value 1 in the False raster parameter. Give the output an appropriate name (for example, nibble_mask.tif). Click OK to run the tool.
  7. Search for and open the Nibble tool (refer to steps 1 and 2).
  8. In the tool dialog box, specify the classified image as the Input raster. Specify the output from Step 6 (nibble_mask.tif in this example) as the Input mask raster. Accept the default values for the other parameters.
  9. Click OK to run the tool.

    The small regions with counts of pixels fewer than the selected threshold (40 in this example) should disappear, being essentially dissolved away based on the closest surrounding cell values.

The following images show an example of a generalized output. The first is the initial image, and the second shows the result after being generalized. As you can see, many small regions have been dissolved as a result.

Image before generalization:

Before nibbling

Image after generalization:

After nibbling

Related Topics


Published 6/7/2010