Note: This document is for an older version of GRASS GIS that is outdated. You should upgrade, and read the current manual page.

GRASS logo

NAME

i.pca - Principal components analysis (PCA) for image processing.

KEYWORDS

imagery, image transformation, PCA

SYNOPSIS

i.pca
i.pca help
i.pca [-n] input=name[,name,...] output_prefix=string [rescale=min,max] [--verbose] [--quiet]

Flags:

-n
Normalize (center and scale) input maps
--verbose
Verbose module output
--quiet
Quiet module output

Parameters:

input=name[,name,...]
Name of two or more input raster maps
output_prefix=string
Base name for output raster maps
A numerical suffix will be added for each component map
rescale=min,max
Rescaling range for output maps
For no rescaling use 0,0
Default: 0,255

DESCRIPTION

i.pca is an image processing program based on the algorithm provided by Vali (1990), that processes n (n >= 2) input raster map layers and produces n output raster map layers containing the principal components of the input data in decreasing order of variance ("contrast"). The output raster map layers are assigned names with .1, .2, ... .n suffixes. The current geographic region definition and MASK settings are respected when reading the input raster map layers. When the rescale option is used, the output files are rescaled to fit the min,max range.

OPTIONS

Parameters:

input=name,name[,name,name,...]
Name of two or more input raster map layers.
output=name
The output raster map layer name to which suffixes are added. Each output raster map layer is assigned this user-specified name with a numerical (.1, .2, ... .n) suffix.
rescale=min,max
The optional output category range. (Default: 0,255) If rescale=0,0, no rescaling is performed on output files.
If output is rescaled, the output raster will be of type CELL. If the output is not rescaled, the output raster will be of type DCELL.
-n normalize input raster maps
By default, the values of the input raster maps are centered for each map separately with x - mean. With -n, the input raster maps are normalized for each map separately with (x - mean) / stddev. Normalizing is highly recommended when the input raster maps have different units, e.g. represent different environmental parameters.

NOTES

Richards (1986) gives a good example of the application of principal components analysis (pca) to a time series of LANDSAT images of a burned region in Australia.

Eigenvalue and eigenvector information is stored in the output maps' history files. View with r.info.

EXAMPLE

Using Landsat imagery in the North Carolina sample dataset:
i.pca in=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70 \
    out=lsat7_2002_pca

r.info -h lsat7_2002_pca.1
   Eigen values, (vectors), and [percent importance]:
   PC1   4334.35 ( 0.2824, 0.3342, 0.5092,-0.0087, 0.5264, 0.5217) [83.04%]
   PC2    588.31 ( 0.2541, 0.1885, 0.2923,-0.7428,-0.5110,-0.0403) [11.27%]
   PC3    239.22 ( 0.3801, 0.3819, 0.2681, 0.6238,-0.4000,-0.2980) [ 4.58%]
   PC4     32.85 ( 0.1752,-0.0191,-0.4053, 0.1593,-0.4435, 0.7632) [ 0.63%]
   PC5     20.73 (-0.6170,-0.2514, 0.6059, 0.1734,-0.3235, 0.2330) [ 0.40%]
   PC6      4.08 (-0.5475, 0.8021,-0.2282,-0.0607,-0.0208, 0.0252) [ 0.08%]

SEE ALSO

Richards, John A., Remote Sensing Digital Image Analysis, Springer-Verlag, 1986.

Vali, Ali R., Personal communication, Space Research Center, University of Texas, Austin, 1990.

i.cca, i.class, i.fft, i.ifft, m.eigensystem, r.covar, r.mapcalc

Principal Components Analysis article (GRASS Wiki)

AUTHOR

David Satnik, GIS Laboratory

Major modifications for GRASS 4.1 were made by
Olga Waupotitsch and Michael Shapiro, U.S.Army Construction Engineering Research Laboratory

Rewritten for GRASS 6.x and major modifications by
Brad Douglas

Last changed: $Date: 2013-09-17 03:53:51 -0700 (Tue, 17 Sep 2013) $


Main index - imagery index - Full index

© 2003-2014 GRASS Development Team