GRASS logo

Note: A new GRASS GIS stable version has been released: GRASS GIS 7. Go directly to the new manual page here

NAME

i.maxlik - Classifies the cell spectral reflectances in imagery data.
Classification is based on the spectral signature information generated by either i.cluster, i.class, or i.gensig.

KEYWORDS

imagery, classification, MLC

SYNOPSIS

i.maxlik
i.maxlik help
i.maxlik [-q] group=name subgroup=name sigfile=name class=name [reject=name] [--overwrite] [--verbose] [--quiet]

Flags:

-q
Run quietly
--overwrite
Allow output files to overwrite existing files
--verbose
Verbose module output
--quiet
Quiet module output

Parameters:

group=name
Name of input imagery group
subgroup=name
Name of input imagery subgroup
sigfile=name
Name of file containing signatures
Generated by either i.cluster, i.class, or i.gensig
class=name
Name for raster map holding classification results
reject=name
Name for raster map holding reject threshold results

DESCRIPTION

i.maxlik is a maximum-likelihood discriminant analysis classifier. It can be used to perform the second step in either an unsupervised or a supervised image classification.

Either image classification methods are performed in two steps. The first step in an unsupervised image classification is performed by i.cluster; the first step in a supervised classification is executed by the GRASS program i.class. In both cases, the second step in the image classification procedure is performed by i.maxlik.

In an unsupervised classification, the maximum-likelihood classifier uses the cluster means and covariance matrices from the i.cluster signature file to determine to which category (spectral class) each cell in the image has the highest probability of belonging. In a supervised image classification, the maximum-likelihood classifier uses the region means and covariance matrices from the spectral signature file generated by i.class, based on regions (groups of image pixels) chosen by the user, to determine to which category each cell in the image has the highest probability of belonging.

In either case, the raster map layer output by i.maxlik is a classified image in which each cell has been assigned to a spectral class (i.e., a category). The spectral classes (categories) can be related to specific land cover types on the ground.

The program will run non-interactively if the user specifies the names of raster map layers, i.e., group and subgroup names, seed signature file name, result classification file name, and any combination of non-required options in the command line, using the form

i.maxlik[-q] group=name subgroup=name sigfile=name class=name [reject=name]
where each flag and options have the meanings stated below.

Alternatively, the user can simply type i.maxlik in the command line without program arguments. In this case the user will be prompted for the program parameter settings; the program will run foreground.

OPTIONS

Parameters:

group=name
The imagery group contains the subgroup to be classified.
subgroup=name
The subgroup contains image files, which were used to create the signature file in the program i.cluster, i.class, or i.gensig to be classified.
sigfile=name
The name of the signatures to be used for the classification. The signature file contains the cluster and covariance matrices that were calculated by the GRASS program i.cluster (or the region means and covariance matrices generated by i.class, if the user runs a supervised classification). These spectral signatures are what determine the categories (classes) to which image pixels will be assigned during the classification process.
class=name
The name of a raster map holds the classification results. This new raster map layer will contain categories that can be related to land cover categories on the ground.
reject=name
The optional name of a raster map holds the reject threshold results. This is the result of a chi square test on each discriminant result at various threshold levels of confidence to determine at what confidence level each cell classified (categorized). It is the reject threshold map layer, and contains the index to one calculated confidence level for each classified cell in the classified image. 16 confidence intervals are predefined, and the reject map is to be interpreted as 1 = keep and 16 = reject. One of the possible uses for this map layer is as a mask, to identify cells in the classified image that have a low probability (high reject index) of being assigned to the correct class.

NOTES

The maximum-likelihood classifier assumes that the spectral signatures for each class (category) in each band file are normally distributed (i.e., Gaussian in nature). Algorithms, such as i.cluster, i.class, or i.gensig, however, can create signatures that are not valid distributed (more likely with i.class). If this occurs, i.maxlik will reject them and display a warning message.

This program runs interactively if the user types i.maxlik only. If the user types i.maxlik along with all required options, it will overwrite the classified raster map without prompting if this map existed.

The optional name of a reject raster map holds the reject threshold results. This is the result of a chi square test on each discriminant result at various threshold levels of confidence to determine at what confidence level each cell classified (categorized). It is the reject threshold map layer, and contains the index to one calculated confidence level for each classified cell in the classified image. 16 confidence intervals are predefined, and the reject map is to be interpreted as 1 = keep and 16 = reject. One of the possible uses for this map layer is as a mask, to identify cells in the classified image that have a low probability (high reject index) of being assigned to the correct class.

EXAMPLE

Second part of the unsupervised classification of a LANDSAT subscene (VIZ, NIR, MIR channels) in North Carolina (see i.cluster manual page for the first part of the example):
# using here the signaturefile created by i.cluster
i.maxlik group=my_lsat7_2002 subgroup=my_lsat7_2002 sigfile=sig_clust_lsat2002 \
          class=lsat7_2002_clust_classes reject=lsat7_2002_clust_classes.rej

# visually check result
d.mon x0
d.rast.leg lsat7_2002_clust_classes
d.rast.leg lsat7_2002_clust_classes.rej

# see how many pixels were rejected at given levels
r.report lsat7_2002_clust_classes.rej units=k,p

# optionally, filter out pixels with high level of rejection
# here we remove pixels of at least 90% of rejection probability, i.e. categories 12-16
r.mapcalc "lsat7_2002_cluster_classes_filtered = \
           if(lsat7_2002_clust_classes.rej\ <= 12, lsat7_2002_cluster_classes, null())"

SEE ALSO

Image processing and Image classification wiki pages and for historical reference also the GRASS GIS 4 Image Processing manual

i.class, i.cluster, i.gensig, i.group, r.kappa

AUTHORS

Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
Tao Wen, University of Illinois at Urbana-Champaign, Illinois

Last changed: $Date: 2015-11-27 01:47:53 -0800 (Fri, 27 Nov 2015) $


Main index - imagery index - Full index

© 2003-2016 GRASS Development Team