blockproc() can be used overlapping by specifying margins.
Your requirements are confusing. You ask for 16*16 and talk about 4 pixels, but if you subdivide 256*256 into 4 pixel blocks even non-overlapping you are going to get more than 16*16. Are you asking to divide the 256*256 into 16*16 with each of those non-overlapping to each other, and then within each 16*16 block you want to work with overlapping 4x4 pixel blocks (all 225 of them) ??
Best Answer