imshow255.m 403 B

123456789101112131415161718192021
  1. function imshow255(newfig,imgSz,Xset)
  2. % imshow255 shows a 8-bit quantized picture
  3. % contained in the vector Xset, by splitting
  4. % it into squared pictures of size imgSz
  5. nPics=size(Xset,1);
  6. if(nPics>20)
  7. nPics=20;
  8. end
  9. for kk=1:nPics
  10. if(newfig)
  11. figure()
  12. else
  13. subplot(2,ceil(nPics/2),kk)
  14. end
  15. imshow(255-Vector2PictureMatrix(imgSz,1,Xset(kk,:)),[0 255])
  16. end
  17. end