MATLAB: How to divide an image of 400x500pixels into 100 blocks each of size 40×50 pixels

blocksdivide an imagefaqImage Processing Toolboxthreshold

how to divide an image of 400×500 pixels into 100 blocks each of size 40×50 pixels.and check each blocks for threshold value and turn whole block into white depending upon threshold value

Best Answer

Two different ways are shown in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_split_an_image_into_non-overlapping_blocks.3F. Inside the loop, you can call graythresh() or some other threshold picking algorithm, and im2bw().
Related Question