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.
Asked
Active
Viewed 109 times
0
-
1What is the shape of your split 64x64 blocks currently? Is it a 4-D array? – Navan May 29 '15 at 20:27
-
@Navan currently i have 64x64 blocks and it is 2D array. – P.Bisoyi May 30 '15 at 03:58
1 Answers
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