Use Clump Classes to clump adjacent similarly classified areas together using morphological operators. Classification images often suffer from a lack of spatial coherency (speckle or holes in classified areas). Low pass filtering could be used to smooth these images, but the class information would be contaminated by adjacent class codes. Clumping classes solves this problem. The selected classes are clumped together by first performing a dilate operation then an erode operation on the classification image using a kernel of the size specified in the parameters dialog.

You can also write a script to perform classification clumping using the ClassificationClumping task.

  1. From the Toolbox, select Classification > Post Classification > Clump Classes. The Data Selection dialog appears.
  2. Select an input file, perform any optional spatial subsetting, and then click OK to display the Classification Clumping dialog. Clumping can only be performed on classification images, identified by a file type of "ENVI Classification" in the image header file.
  3. Specify a Dilate Kernel Value. This field represents the structuring element used to expand shapes contained in the input image. An array size of 3x3 and element values of 1 are used unless otherwise specified.
  4. Specify an Erode Kernel Value. This field represents the structuring element used to reduce shapes contained in the input image. An array size of 3x3 and element values of 1 are used unless otherwise specified.
  5. Use the Class Order list to identify which classes will have clumping applied. Classes may be added, removed or reordered. If no changes are made, all classes have clumping applied and are processed from first to last.
  6. Use Output Raster to specify an output path and filename.
  7. To reuse these task settings in future ENVI sessions, save them to a file. Click the down arrow next to the OK button , select Save Parameter Values, then specify the path and filename to save to. Note that some parameter types, such as rasters, vectors, and ROIs, will not be saved with the file. To apply the saved task settings, click the down arrow and select Restore Parameter Values, then select the file where you previously saved your settings.

  8. You can run the process in the background on your computer or in the background on an ENVI Server (if available). Click the down arrow next to the OK button and select one of the following:

    • Run Task in the Background: Runs the process on your computer. This method does not use an ENVI Server. The job progress will show in the ENVI Job Console's Background Jobs tab.
    • Run Task on envi_server_name. Runs the process on the selected ENVI Server. The job progress will show in the ENVI Job Console's envi_server_name tab.

    See ENVI Job Console for details on monitoring ENVI Server jobs and viewing results. See ENVI Servers for details on configuring and using an ENVI Server.

  9. Click OK.