Available with Spatial Analyst license.
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.
- Open the Search window by clicking the Search window button on the Standard toolbar.
- Search for the Region Group tool and open it by clicking it in the search results.
- Run the tool using the classified image as the input raster. Name the output something meaningful, regiongroup_out.tif for example.
- 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.
- Search for and open the Set Null tool (refer to steps 1 and 2).
- 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.
- Search for and open the Nibble tool (refer to steps 1 and 2).
- 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.
- 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:
Image after generalization: