i.class1grass
Generates spectral signatures for an image by allowing the user to outline regions of interest. the resulting signature file can be used as input for i.maxlik or as a seed signature file for i.cluster.
Usage
i.class
i.class help
i.class map=name
group=name
subgroup=name
outsig=name
[insig=name]
[--verbose]
[--quiet]
Keywords
imagery, classification
Overview
i.class performs the first pass in the GRASS two-pass supervised image classification process; the GRASS program i.maxlik executes the second pass. Both programs must be run to generate a classified map in GRASS raster format.
i.class is an interactive program that allows the user to outline a region on the screen and calculate the spectral signature based on the cells that are within that region. During this process the user will be shown a histogram of the region for each image band. The user can also display the cells of the image bands which fall within a user-specified number of standard deviations from the means in the spectral signature. By doing this, the user can see how much of the image is likely to be put into the class associated with the current signature.
The spectral signatures that result are composed of region means and covariance matrices. These region means and covariance matrices are used in the second pass (i.maxlik) to classify the image.
Alternatively, the spectral signatures generated by i.class can be used for seed means for the clusters in the i.cluster program.
User inputs
At the command line the user is asked to enter the name of the raster map to be displayed during the process of outlining regions. Typically, the user will want to enter the name of a color composite previously created by r.composite. However, the user can enter the name of any existing raster map. This leaves the potential for using a raster map not directly derived from the image as a backdrop on which the user can outline the classes of interest.
The first screen in the program i.class asks the user for the imagery group and subgroup to be analyzed:
LOCATION: location SUPERVISED CLASSIFIER MAPSET: demo
Please select the group and subgroup to be analyzed
GROUP: spot_______ (list will show available groups)
SUBGROUP: 123________ (list will show available subgroups)
AFTER COMPLETING ALL ANSWERS, HIT <ESC> TO CONTINUE
(OR <Ctrl-C> TO CANCEL)
The group should contain the imagery bands that the user wishes to classify. The subgroup is a subset of this group. The user must create a group and a subgroup by running the GRASS program i.group before running i.class. The subgroup should contain only the image bands that the user wishes to classify. Note that this subgroup must contain more than one band.
After the first screen, the program asks the user for the name of the resulting signature file. The signature file is both the output file for i.class and the required input file for the GRASS i.maxlik module. It contains the region means and covariance matrices that are used to classify an image in i.maxlik. The signature file will be saved in the $MAPSET/group/$GROUP/subgroup/$SUBGROUP/sig/ directory.
After entering the resulting signature file name, the user is asked to enter the name of a seed signature file. This is optional. A "seed" signature file is a previously created signature file. Such a seed signature file may be the result of an earlier run of i.class. The seed signature file is copied into the new resulting signature file before any new signatures are added by i.class. In this way, you can collect the work from several sessions with i.class into one signature file.
At this point the i.class graphics screen will be drawn on the graphics monitor and the user will be directed to use the mouse. From this point on the user will primarily work with the mouse, selecting options from the menus and outlining regions on the screen. The only time that the user will need to return to the text terminal is to enter names for the signatures created.
The display frames
The display frame layout that i.class uses is represented below for reference.
+-----------------------+---------------------------+
| | |
| | Map Display Frame |
| | |
| | |
| Histogram Display | |
| Frame | |
| | |
| | |
| | |
| +---------------------------+
| | |
| | Zoom Display Frame |
| | |
| | |
| | |
| | |
| | |
| | |
+-----------------------+---------------------------+
| Menu Frame |
+---------------------------------------------------+
Notes
i.class uses the current MASK to generate the overlay for cells that match a signature. As a result, if a MASK already exists it will be removed during the execution of this program.
The cell values in the image bands cannot fall outside of the range of 0 to 255. i.class will report an error if they do.
i.class, like some of the other imagery programs, does not use the standard GRASS display frames. After running i.class, you will need to create a display frame (e.g., using d.frame or d.erase) before you can use most of the GRASS display (d.) commands.
i.group must be run before i.class to create an imagery group and a subgroup containing the image bands to be classified.
The user can perform a supervised image classification by running i.class followed by i.maxlik. The user can perform an unsupervised classification by running i.cluster followed by i.maxlik.
i.class is interactive and requires the user to be running a graphics display monitor (see d.mon) to run this program.
Releases
5 releases since Debian 4.0 (Etch); the text changed 4 times.