Class ImagePCA

The class ImagePCA provides a tool for performing principal component analysis (PCA) of images. This functionality is available from the main menu in I2K under features, and will be applied immediately to the current image in the main I2K frame. If the current image was obtained by forward PCA then it will be converted back to the orifinal image without any loss of information.



Description: The forward PCA of an image is calculated by first creating a correlation matrix of the image. This matrix will show how each band is related to each other band. The PCA code will use the correlation to compute a new transformation based on eigenvectors. This new foward transformation matrix will convert the original image into a PCA image. Each of the bands in the new PCA image will contain information from all the bands of the original image. The first band in the PCA image has the largest contribution from the original image and each additional band in the PCA image has smaller contribution from the original image.

To recover the original image from the PCA image, coefficients of the transformation matrix ("eigenvectors") are stored in image properties, as well as, the type of the original image ("originaltype"). These image properties are used when reverse PCA is being executed.
An example of a PCA image transformation is shown below for the "Runner" image.

This class also provides utility functions to calculate a covariance of an image, calcCovarianceMatrix, as well as, the correlation, calcCorrelationMatrix.