summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-04-26 13:15:04 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-04-26 13:15:38 +0200
commit262a592405e86e44d8e0d653f2964ef6f3d9a430 (patch)
treef95da9be39958798a875e96c819991b992357706
parent16787504a05e2098ce6c51508f6c8cd28fb08c98 (diff)
downloadcv-262a592405e86e44d8e0d653f2964ef6f3d9a430.zip
cv-262a592405e86e44d8e0d653f2964ef6f3d9a430.tar.gz
cv-262a592405e86e44d8e0d653f2964ef6f3d9a430.tar.bz2
harris: Increase neighbour area
-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;
}