MATLAB: Extract blocks from image

block

i wanted to extract 175 blocks of square size, from an image…. please can someone help me… my image is not divisible by 175… how should i resize it so that i can extract 175 blocks of equal size… please do reply….

Best Answer

[n,m,p]=size(im1) % im1 is your image
n1=mod(-n,75)
m1=mod(-m,75)
new_im1=imresize(im1,[n+n1,m+m1]);