- 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.
principal component analysis pca
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mohanned Al Gharawi
el 13 de Nov. de 2019
Respondida: Neelanshu
el 16 de Ag. de 2024 a las 4:43
Hello everybody
I have infrared images (144) for one day for a specific specimen. Anyhow, I transferred these images into 3D matrix that has thousands of signals. I want to subject the PCA approach so I can change the frequencies to get best results for these images.
I uploaded only one signal, please any help on doing that on my signals.
Thanks
0 comentarios
Respuestas (1)
Neelanshu
el 16 de Ag. de 2024 a las 4:43
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 :
% 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!
0 comentarios
Ver también
Categorías
Más información sobre Dimensionality Reduction and Feature Extraction en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!