diff options
-rw-r--r-- | harris.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -116,10 +116,10 @@ calc_window_sum(struct mat2 *m, int width, int height, int wsize) for (y = 0; y < height; ++y) { for (x = 0; x < width; ++x) { - for (i = -wsize/2; i < wsize/2; ++i) { - for (j = -wsize/2; j < wsize/2; ++j) { - v = &m[(CLAMP(y+i, 0, height-1) * width - + CLAMP(x+j, 0, width-1))]; + for (j = -wsize/2; j < wsize/2; ++j) { + for (i = -wsize/2; i < wsize/2; ++i) { + v = &m[(CLAMP(y+j, 0, height-1) * width + + CLAMP(x+i, 0, width-1))]; w = (M_1_PI * 1.0 / (2.0 * 0.16) * exp(- i*i - j*j / 0.16)); |