Sieve Classes
Use Sieve Classes to solve the problem of isolated pixels occurring in classification images. Sieving classes removes isolated classified pixels using blob grouping. Low pass or other types of filtering could be used to remove these areas, but the class information would be contaminated by adjacent class codes. The sieve classes method looks at the neighboring 4 or 8 pixels to determine if a pixel is grouped with pixels of the same class. If the number of pixels in a class that are grouped is less than the value that you enter, those pixels will be removed from the class. When pixels are removed from a class using sieving, black pixels (unclassified) will be left.
Tip: Use the Clump Classes function after sieving to replace the black pixels.
You can also write a script to perform classification sieving using the ClassificationSieving task.
- From the Toolbox, select Classification > Post Classification > Sieve Classes. The Classification Input File dialog appears.
- Select an input file, perform any optional spatial subsetting, and then click OK to display the Classification Sieving dialog. Sieving can only be performed on classification images, identified by a file type of "ENVI Classification" in the image header file.
- Choose 4 or 8 from the Pixel Connectivity drop-down list. This option specifies the number of neighboring pixels (4 or 8) to look at when determining the number of pixels in a class group. The four-neighbor region around a pixel consists of the two adjacent horizontal and two adjacent vertical neighbors. The eight-neighbor region around a pixel consists of all the immediately adjacent pixels.
- Use the Class Order list to identify which classes will have sieving applied. Classes may be added, removed or reordered. If no changes are made, all classes have sieving applied and are processed from first to last.
- Specify a Minimum Size to determine the minimum size of a blob grouping to keep. A value of 2 is used unless otherwise specified.
- Use Output Raster to specify an output location and filename.
- 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.
- 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.Manager.
-
To reuse these task settings in future ENVI sessions, save them to a file. Click the down arrow next to the OK button 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.
-
To run the process in the background, click the down arrow next to the OK button 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.
- Click OK.