Hello Mohaneed,
I understand that you want to use PCA approach on the dataset of images. The signal shared can't be used for PCA as PCA cant be performed on a single observation.
To apply PCA to infrared images stored in a 3D matrix :
- You need to reshape the data such that each row represents the flatenned image.
- Then you can use the 'pca' function to perform pca on the data.
% Reshape the 3D matrix into a 2D matrix
[height, width, num_images] = size(images);
reshaped_images = reshape(images, height * width, num_images)';
% Perform PCA on the reshaped data
[coeff, score, latent, tsquared, explained] = pca(reshaped_images);
You may refer to the following documentation to learn more about the 'pca' function :
Hope this helps!