以某数据集为例:
P=load('PaviaU.mat');
[m,n,band]=size(P.paviaU);
ReshapedP=reshape(P.paviaU,m*n,band);
[coeff,score,latent,tsquared] = pca(ReshapedP);
percent=cumsum(latent)./sum(latent);
disp(percent);
feature_after_PCA=score(:,1:3);
RES=reshape(feature_after_PCA,m,n,3);
subplot(131);imshow(RES(:,:,1));
subplot(132);imshow(RES(:,:,2));
subplot(133);imshow(RES(:,:,3));
本文介绍了一种使用主成分分析(PCA)进行图像特征提取的方法。通过加载PaviaU数据集,将其转换为矩阵形式,应用PCA减少维度并提取关键特征。最后,展示了经过PCA处理后的前三维特征图像。
4515

被折叠的 条评论
为什么被折叠?



