I have a lena image of 512×512. I want divide the image into 4×4 overlapping blocks, for which i wrote the below code. And i also have to find the no. of 4×4 overlapping blocks. Here I have set a counter to check the no.of 4×4 overlaping blocks. Am i doing it correctly? Please Help.Thanks
[e,f] = size(outImg); counter=0 for i = 1:e-3 for j = 1:f-3 I = double(outImg((i:i+3),(j:j+3))); counter=counter+1; end end
Best Answer