I have an image which is 256X256 pixels and that image 'a' has 16 '16X16' pixels similar tiles(random noise distributed over the image). I want to take the average of each tile and replace it with the first tile and then display the result.
I used the following code
im = imread('tiles.tif')
a = blockproc(im, [16 16], @(x)mean(x.data(:)));
I thought it worked but it is displaying the same original image. can someone please tell me what is wrong or what am I missing?Thanks