diff options
-rw-r--r-- | harris.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -141,9 +141,10 @@ check_neighbours(struct mat2 *m, int x, int y, int width, int height) { int i, j; gboolean max = TRUE; + int n = 3; - for (j = MAX(0, y-1); j < MIN(y+1, height-1); ++j) { - for (i = MAX(0, x-1); i < MIN(x+1, width-1); ++i) { + for (j = MAX(0, y-n); j < MIN(y+n, height-1); ++j) { + for (i = MAX(0, x-n); i < MIN(x+n, width-1); ++i) { if (m[j * width + i].mc > m[y * width + x].mc) max = FALSE; } |