summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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));