Digital Signal Processing Reference
In-Depth Information
Fig. 4.14 Two dimensional projection with two eigen vectors corresponding to the largest two
eigen values (PCA basis)
4.4.2.1 projection1d-2d-pca.m
%PCA based Dimensionality reduction
load mri
figure
colormap(map)
montage(D)
tr=[1 3 5 7 9 11 13 15 17 19 21 23];
COLLECT=[ ];
D=double(D);
for i=1:1:12
D1=imresize(D(:,:,1,tr(i)),[12 12]);
COLLECT=[COLLECT; reshape(D1,1,12*12)];
end
C=cov(COLLECT,1);
%1D projection for the training data
[EV1,DV1]=eigs(C,1);
ONEDPV=EV1'*COLLECT'
figure
plot(ONEDPV(1:3),zeros(1,3),'*')
hold on
plot(ONEDPV(4:6),zeros(1,3),'d')
hold on
plot(ONEDPV(7:9),zeros(1,3),'s')
hold on
Search WWH ::




Custom Search