summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.name>2020-07-24 18:36:05 +0100
committerNick White <git@njw.name>2020-07-24 18:36:05 +0100
commit41abf458640394dcdf63e874e75b5e06aebd0214 (patch)
treee01e3b4e12d955f08f3a17dd840db4944f1e18aa
parent1ef9df29fb2d5bb6585e0d0ed99e13a900289e7b (diff)
Fix failing tests; happily the test was just not correctly written
-rw-r--r--wipesides_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/wipesides_test.go b/wipesides_test.go
index c6ff711..8aa68ff 100644
--- a/wipesides_test.go
+++ b/wipesides_test.go
@@ -117,8 +117,12 @@ func TestWipeSides(t *testing.T) {
t.Fatalf("Could not open file %s: %v\n", c.filename, err)
}
b := img.Bounds()
+ gray := image.NewGray(b)
+ draw.Draw(gray, b, img, b.Min, draw.Src)
+ rotimg := sideways(img)
+ b = rotimg.Bounds()
intImg := integralimg.NewImage(b)
- draw.Draw(intImg, b, img, b.Min, draw.Src)
+ draw.Draw(intImg, b, rotimg, b.Min, draw.Src)
topedge, bottomedge := findedges(*intImg, c.wsize, c.thresh)
if topedge < c.mintop {
t.Errorf("Top edge %d < minimum %d", topedge, c.mintop)