diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-04-26 13:15:04 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-04-26 13:15:38 +0200 |
commit | 262a592405e86e44d8e0d653f2964ef6f3d9a430 (patch) | |
tree | f95da9be39958798a875e96c819991b992357706 | |
parent | 16787504a05e2098ce6c51508f6c8cd28fb08c98 (diff) | |
download | cv-262a592405e86e44d8e0d653f2964ef6f3d9a430.tar.gz cv-262a592405e86e44d8e0d653f2964ef6f3d9a430.tar.bz2 cv-262a592405e86e44d8e0d653f2964ef6f3d9a430.zip |
harris: Increase neighbour area
-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; } |