Use Classification Aggregation to aggregate smaller, adjacent class regions to a larger region. Aggregation is a useful post-classification cleanup process when the classification output includes many small regions.

You can also write a script to perform classification aggregation using the ClassificationAggregation task.

  1. From the Toolbox, select Classification > Post Classification > Classification Aggregation. The Classification Aggregation dialog appears.
  2. Select a classified image and perform any optional spatial subsetting, then click OK.
  3. Enter the Minimum Size in pixels. Regions with a size of this value or smaller are aggregated to an adjacent, larger region. The default is 9.
  4. Enter an Output Raster filename and directory.
  5. Enable the Preview check box to see a preview of the settings before you click OK to process the data. The preview is calculated only on the area in the Image window and uses the resolution level at which you are viewing the image. See Preview for details on the results. To preview a different area in your image, pan and zoom to the area of interest and reenable the Preview option.
  6. Enable the Display result check box to display the aggregated classification raster in the Image window when processing is complete. Otherwise, if the check box is disabled, the raster can be loaded from the Data Manager.
  7. To run the process on a local or remote ENVI Server, click the down arrow and select Run Task in the Background or Run Task on remote ENVI Server name. The ENVI Server Job Console will show the progress of the job and will provide a link to display the result when processing is complete. See the ENVI Servers topic for more information.

  8. Click OK.