Compute the mean vector and covariance matrix of a multiband image
Computes the mean vector and covariance matrix of a multi-band image. The statistics can be used in the principal components program KARLOV which gives uncorrelated principal components of the specified multi-band image. The statistics are stored under "MEAN_VECTOR" and "COVARIANCE_MATRIX" at the top level in the statistics file.
- IN
- Input image. Must be a multi-band image.
- OUTSTAT
- Output statistics file. Name of the statistics file to contain the mean vector and covariance matrix. Can be an existing file or a new file.
The mean vector and covariance matrix of the multi-band image BALTO are calculated and stored in the statistics file BALTO;STAT.
COVAR computes the mean vector, "m," and the covariance matrix, "V," of a multi-band image. These statistics are written to the level 0 (zero) node of the statistics file OUTSTAT. The bands of the image are variables and the pixels are observation vectors. If there are p bands (variables) and n pixels in the multi-band image, then the mean vector is given by:
COVAR calculates multi-variate statistics and, therefore, needs multi-variate data (i.e., a multi-band image) as input.
Check if file being updated is a statistics file.