Hello,
I would like to reshape a photo into 8*8 blocks and have a new matrix with size of
In other words, I am searching for a matlab function that works the same as the code below, but with higher speed:
for i=1:8:size(img,1) for j=1:8:size(img,2) tmp = cat(3,tmp,img(i:i+7, j:j+7)); endend
Best Answer