PCT Function
Performs the principle components transform on a multi-layered image.
Usage
result = PCT(images)
Input Parameters
images—A 3D array of byte, integer or float data type that contains image, row or pixel-interleaved images.
Returned Value
result—A 3D complex array.
Keywords
Covar—Specifies a variable which holds the covariance matrix of the sample array formed from the images.
Eigvals—Specifies a variable which holds the Eigenvalues of the covariance matrix, a complex array.
Eigvects—Specifies a variable which holds the Eigenvectors of the covariance matrix, a complex array.
Imaginary—If set, returns only the imaginary portion of result.
Intleave—A scalar string indicating the type of interleaving of 3D input image arrays. Valid strings and the corresponding interleaving methods are:
*'pixel'—The input array arrangement is (pxy) for p  pixel-interleaved images of x-by-y.
*'row'—The 3D image array arrangement is (xpy) for p  row-interleaved images of x-by-y.
*'image'—The 3D image array arrangement is (xyp) for p  image-interleaved images of x-by-y.
Mx—Specifies a variable which holds the mean of the sample array formed from the images.
Offset—If set, result is offset by its minimum value so that the returned result has a minimum of zero.
Pct_transSpecifies a variable which holds the principle components transformation matrix, a complex array.
Real—If set, returns only the real portion of result.
Discussion
The principle components transform (also known as the Hotelling Transform, or the Karhunen-Loève Transform) is commonly used in remote sensing applications. It de-correlates the input images, and the result contains the de-correlated images arranged according to the sample variance; that is, the image with the largest sample variance is first, and so on to the image with the smallest sample variance.
The principle components transform is computed by building a sample matrix, X, from the input image array. Each sample of X  is a vector comprised of the corresponding pixels in each image of the array. The transformation matrix specified using the Pct_trans keyword is then computed from the eigenvectors of the correlation matrix of X.
Example
This example illustrates a principle components transform applied to a pixel-interleaved image.
; Read in a 24 bit image.
rgb_i = IMAGE_READ(!IP_Data + 'boulder_image.tif')
rgb_i = rgb_i('pixels')
; Compute the principle components transform (PCT).
pct_i = PCT(rgb_i, Pct_trans = itrans, Mx = imx, $
Intleave = 'image')
; The first image contains most of the information.
FOR I = 0,2 DO BEGIN & $
TVSCL, pct_i(*, *, I)) & $
HAK, /Mesg
See Also