필터 지우기
필터 지우기

Re-extract final images after vectorizing a set of images

조회 수: 1 (최근 30일)
fadams18
fadams18 2020년 3월 9일
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by