I have this image (2848 x 4288) and i want to divide it into 9 blocks and perform some operations on individual or each block. For example i perform this operations on an image:;
y = rgb2gray(imresize(imread('DSC_0009.jpg'),.2));
z = 255.0 - 1.0 * double(y);
z = z ./5 ;
z2 = imfilter(z, fspecial('average', 15));
z2(z2 > 35) = 35;
z2(z2 < 30) = 0;
I want to do a similar operation on each of the blocks and output it as well.