1

I wish to apply filter motion for certain number of iteration on different images, each image will be divided into different block size.

For example, if the image size is 1024x870,how to divide this image into different block sizes 8x8, 16x16, 64x64, etc. using MATLAB?

toygan kılıç
  • 422
  • 4
  • 16
pyCuda
  • 233
  • 2
  • 13

1 Answers1

1

It's not perfect but I would do:

A=rand(128);
Apatch=im2col(A,[64 64],'distinct');
Apacth=gpuArray(Apatch);

Otherwise you can try (I am not sure it speeds up):

A=rand(128);
A=gpuArray(A);
Apatch=im2col(A,[64 64],'distinct');
Apacth=gpuArray(Apatch);
Adriaan
  • 17,741
  • 7
  • 42
  • 75
Oli
  • 15,935
  • 7
  • 50
  • 66