summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--harris.c5
1 files 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;
}