I want to divide my image into overlapping blocks and process those blocks individually and store the output of each matrix into a matrix.
I have tried using im2col
but it is not at all practical. My code is:
kek = im2col(images_m{1}, [64 64], 'sliding');
for i = 1: size(kek, 2)
new = reshape(kek(:,i), [64 64]);
%Extract features from the new block and save it in a concatenating
%matrix
end
There are two problems with this, first there is no way to control the overlapping of blocks.
Second the process is very slow and very very memory hungry. I basically ran out of memory on my computer on the third image, even if I clear
the previous images.
is there any efficient way to divide my images into overlapping blocks?
P.S. I cannot create a for image for every image as every image is of varying size :(