% showfaces
% This file plots conveniently some of the faces.  Change Showline and numePerLine to increase/decrease
% number of shown faces.
% Data courtesy of www.cad.zju.edu.cn/home/dengcai/Data/FaceData.html


face_width = 32;
face_height = 32;
numPerLine = 10;
ShowLine = 8;

Y = zeros(faceH*ShowLine,faceW*numPerLine);
for i=0:ShowLine-1
   for j=0:numPerLine-1
     Y(i*faceH+1:(i+1)*faceH,j*faceW+1:(j+1)*faceW) = reshape(X(:,i*numPerLine+j+1),[faceH,faceW]);
   end
end

imagesc(Y);colormap(gray);
