0

example: I have an image,it's size 512X512pixel,then i have splited it into 8x8 blocks.Now i would have 64x64 blocks.Now how to rearrange each block 8x8 into column vector so that the dimension would be 64x4096pixel without inbuilt function "im2col".please help me out. Thanks.

P.Bisoyi
  • 123
  • 1
  • 2
  • 10

1 Answers1

1
x=rand(512,512);
xi=mat2cell(x,8*ones(1,64),8*ones(1,64));
xii=cellfun(@(x)reshape(x,1,64),xi,'UniformOutput',false);
y=cell2mat(xii);
Brethlosze
  • 1,533
  • 1
  • 22
  • 41