summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-04-26 09:51:14 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-04-26 09:51:14 +0200
commit16787504a05e2098ce6c51508f6c8cd28fb08c98 (patch)
tree052c0ca29a942d4a75a13accc58d71b2316fb2d9
parentb3b3e58b947b525a1f7e27d523cae4f847c57e11 (diff)
downloadcv-16787504a05e2098ce6c51508f6c8cd28fb08c98.zip
cv-16787504a05e2098ce6c51508f6c8cd28fb08c98.tar.gz
cv-16787504a05e2098ce6c51508f6c8cd28fb08c98.tar.bz2
harris: Consistency fix, use i,j as shifts for x,y always
-rw-r--r--harris.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/harris.c b/harris.c
index 55c5414..700c54c 100644
--- a/harris.c
+++ b/harris.c
@@ -116,10 +116,10 @@ calc_window_sum(struct mat2 *m, int width, int height, int wsize)
for (y = 0; y < height; ++y) {
for (x = 0; x < width; ++x) {
- for (i = -wsize/2; i < wsize/2; ++i) {
- for (j = -wsize/2; j < wsize/2; ++j) {
- v = &m[(CLAMP(y+i, 0, height-1) * width
- + CLAMP(x+j, 0, width-1))];
+ for (j = -wsize/2; j < wsize/2; ++j) {
+ for (i = -wsize/2; i < wsize/2; ++i) {
+ v = &m[(CLAMP(y+j, 0, height-1) * width
+ + CLAMP(x+i, 0, width-1))];
w = (M_1_PI * 1.0 / (2.0 * 0.16) *
exp(- i*i - j*j / 0.16));