Re-extract final images after vectorizing a set of images

1 vue (au cours des 30 derniers jours)
fadams18
fadams18 le 9 Mar 2020
I have 20 images each of which is 175 x 200. then i create a matrix X and unfold each image into it. so that X becomes a (175*200, 20 ). I applied Non-negative matrix factorization on this X data. and reconstructed it into a X_hat matrix. Now I would like to extract the individual images back.
m=200;
n=175;
N=20;
X= [];
avg= zeros(m*n,1);
count=0;
for j=1:N
figure(1)
ff=['faces/stallone',num2str(j,'%02d'), '.jpg']; % Load images
u = imread(ff);% read into X
imshow(u)
set(gcf, 'Position',[100 100 500 500])
if (size(u,3)==1)
M= double(u);
else
M= double(rgb2gray(u));
end
pause(0.1);
R= reshape(M,m*n,1); % before (n,m) now (m*n,1)
X= [X,R]; % stack them into X
avg =avg +R;
count=count+1;
end
[ X_hat] = NMF(Q, X_hat,Winit,Hinit); % I applied NMF and obtained X_hat
How do I get the individual 20 images from this X_hat

Réponses (0)

Catégories

En savoir plus sur Geometric Transformation and Image Registration dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by