ENVI Classification Files

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.

See Also

Classification Workflow

Classification Tools

Classification Tutorial

Class Layers

Thematic Change Detection