Classification is used to categorize pixels in an image into many classes. ENVI classification files are based on the ENVI image format and are represented as Class layers in the Layer Manager. To qualify as an ENVI classification file, the associated header file must contain the following fields:

file type: ENVI Classification. ENVI automatically sets this field after saving the header file, if the next three fields are defined. You do not need to manually set the file type field.

class lookup: List class colors using RGB color definitions. For example, black is 0,0,0.

class names: List class names.

classes: Provide the number of classes, including unclassified regions.

The bands field should bet set to 1 since classification files are single-band images.

Example:

ENVI
samples = 1024
lines   = 1024
bands   = 1
data type = 1
interleave = bsq
file type = ENVI Classification
header offset = 0
byte order = 0
classes = 5
class names = {Unclassified, Soil, Water, Green vegetation, Dry vegetation, Urban}
class lookup = {0,  0,  0, 255,  0,  0,  0, 128,  0,  0,  0, 255, 255, 255,  0}

See the ENVIRaster help topic for an example of creating a classification file by writing an ENVI API script.

View and Edit Metadata


You can view the metadata for the raster color slices, and you can add and edit header file fields.

  • To view metadata, right-click on the layer name in the Layer Manager and select View Metadata. See View Metadata for details.

  • For descriptions of the metadata fields, see ENVI Header Fields.

  • To add or edit metadata in the header file, see Edit ENVI Headers.

See Also


Classification Workflow, Classification Tools. Classification Tutorial, Class Layers, Thematic Change Detection