MATLAB: PCA or clustering of an image

hyperspectralimageImage Processing Toolboxmultispectralpcaprincipal components analysisStatistics and Machine Learning Toolbox

I have an image which is a concentration profile of ftir mapped spectra. This said image clearly has certain unique patterns and regions.
My question is how do I use matlab to perform principal component analysis (PCA) on this image to obtain the unique images or regions that make up the full image. Any matlab code on performing PCA or clustering Analysis on the image? Thank you.

Best Answer

I agree with David's comment. An understanding of all the techniques is good before committing to one. You can try several with the Classification Learner app on the Apps tab of the tool ribbon. Attached is my demo of PCA with an image.
Recently (this year I think), I did a program for somebody who had hyperspectral images. Search the Answers forum for it. But it's a straightforward adaptation of the attached demo that does it in RGB space.
Related Question