Use Classification Smoothing to remove speckling noise from a classification image. It uses majority analysis to change spurious pixels within a large single class to that class.

You can also write a script to perform classification smoothing using the ClassificationSmoothing task.

  1. From the Toolbox, select Classification > Post Classification > Classification Smoothing. The Classification Smoothing dialog appears.
  2. Select a classified Input Raster and perform any optional spatial subsetting, then click OK.
  3. Enter the smoothing Kernel Size in pixels. Specify an odd number; the minimum value is 3 pixels, and the default value is 3.
  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 view 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 re-enable the Preview option.
  6. Enable the Display result check box to display the output in the view when processing is complete. Otherwise, if the check box is disabled, the result can be loaded from the Data Manager.

  7. To reuse these task settings in future ENVI sessions, save them to a file. Click the down arrow and select Save Parameter Values, then specify the location 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 stored your settings.

  8. To run the process in the background, click the down arrow and select Run Task in the Background. If an ENVI Server has been set up on the network, the Run Task on remote ENVI Server name is also available. 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 ENVI Servers for more information.

  9. Click OK.