diff options
author | Pacien TRAN-GIRARD | 2015-10-15 16:06:47 +0200 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2015-10-15 16:06:47 +0200 |
commit | 83779ce640236f3198a58ded18e58d419833b5a4 (patch) | |
tree | be8571be3734e69ee8049f1110cecfc10625afc3 | |
parent | 22f123f0a7d8a0490781067a5326146e17a31882 (diff) | |
download | seam-stitcher-83779ce640236f3198a58ded18e58d419833b5a4.tar.gz |
Fix height/width inversion
-rw-r--r-- | src/main/java/Seam.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/Seam.java b/src/main/java/Seam.java index d3ffa8e..3778f34 100644 --- a/src/main/java/Seam.java +++ b/src/main/java/Seam.java | |||
@@ -53,18 +53,18 @@ public final class Seam { | |||
53 | for (int row = 0; row < height - 1; ++row) { | 53 | for (int row = 0; row < height - 1; ++row) { |
54 | int shift = (row + 1) * width; | 54 | int shift = (row + 1) * width; |
55 | 55 | ||
56 | graph[row * height] = new int[]{ | 56 | graph[row * width] = new int[]{ |
57 | shift, | 57 | shift, |
58 | shift + 1, | 58 | shift + 1, |
59 | }; | 59 | }; |
60 | 60 | ||
61 | graph[row * height + (width - 1)] = new int[]{ | 61 | graph[row * width + (width - 1)] = new int[]{ |
62 | shift + (width - 2), | 62 | shift + (width - 2), |
63 | shift + (width - 1), | 63 | shift + (width - 1), |
64 | }; | 64 | }; |
65 | 65 | ||
66 | for (int col = 1; col < width - 1; ++col) | 66 | for (int col = 1; col < width - 1; ++col) |
67 | graph[row * height + col] = new int[]{ | 67 | graph[row * width + col] = new int[]{ |
68 | shift + (col - 1), | 68 | shift + (col - 1), |
69 | shift + (col), | 69 | shift + (col), |
70 | shift + (col + 1), | 70 | shift + (col + 1), |