for(i = 0; i < height_image - height_window; i += step_h)
{
for(j = 0; j < width_image - width_window; j+= step_w)
{
for(ii = 0; ii < height_window; ii++)
for(jj = 0; jj < width_window; jj++)
window[ii][jj] = image[i + ii][j + jj];
// your window is here
}
}
Thanks for the sample. I have a doubt where the window will run one time only even the loop is as above.

Let's say, height_window = 40, width_window = 110, height_image = 80 and width_image = 142. step_h and step w are set to 10.

Is it possible the loop stop because of the size of my image and window?

Thanks a lot.