PLS_Toolbox Documentation: imgpca< hline imgselct >

imgpca

Purpose

Principal Components Analysis of Multivariate Images.

Synopsis

 

model = imgpca(mwa,scaling,nocomp)

newmod = imgpca(mwa,model,plots)

Description

IMGPCA uses principal components analysis to make psuedocolor maps of multivariate images. The input is the multivariate image mwa.

Optional inputs are scaling the scaling to be used,

            scaling =  'auto', uses autoscaling {default},

            scaling =  'mncn', uses mean centering, and

              caling =  'none', uses no scaling.

and the number of PCs to calculate nocomp.

It is assumed that the image (mwa) is a 3 dimensional (MxNxP) array where each image is MxN pixels and there are P images. IMGPCA presents each scores, residual, and T2 matrix as a psuedocolor image. If 3 are more PCs are selected (nocomp>=3), a composite of the first three PCs is shown as an rgb image, with red for the first PC, green for the second, and blue for the the third.

The output model is a structure with the following fields:

                   xname:   input data name,

                     name:   type of model, always 'IPCA',

                     date:   date of model creation,

                     time:   time of model creation,

                     size:   dimensions of input data,

                 nocomp:   number of PCs in model,

                   scale:   type of scaling used,

                   means:   mean vector for PCA model,

                     stds:   standard deviation vector for PCA model,

                       ssq:   variance captured table data,

                 scores:   PCA scores stored as MxNxnocomp array (uint8),

                   range:   original range of PCA scores before mapping to uint8,

                   loads:   PCA loadings,

                       res:   PCA residuals stored as m x n array (uint8),

                     reslim:   Q limit,

                         tsq:   PCA T2 values stared as MxN array (unit8), and

                     tsqlim:   T2 limit.

Note that the scores, residuals and T2 matrices are stored as unsigned 8 bit integers (uint8) scaled so their range is 0 to 255. These can be viewed with the IMAGE function, but be sure the current colormap has 256 colors. For example, to view the scores on the second PC using the jet colormap:

 

        image(model.scores(:,:,2)), colormap(jet(256)), colorbar

See Also

contrastmod, imgselct, imgsimca, imread, isimcapr


< hline imgselct >