From 262a592405e86e44d8e0d653f2964ef6f3d9a430 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Thu, 26 Apr 2012 13:15:04 +0200 Subject: harris: Increase neighbour area --- harris.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/harris.c b/harris.c index 700c54c..0fdefb7 100644 --- a/harris.c +++ b/harris.c @@ -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; } -- cgit