From 43c2f3e5fa1894c49f875242edf7590f47d18ff4 Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 14 Jul 2020 11:02:10 +0100 Subject: Do vertical wiping before horizontal This should help the horizontal wiping, hopefully, as there will be less inconsistent noise inside of the text area it processes. --- wipesides.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wipesides.go b/wipesides.go index 4af3204..ebfb24f 100644 --- a/wipesides.go +++ b/wipesides.go @@ -212,8 +212,8 @@ func WipeFile(inPath string, outPath string, hwsize int, hthresh float64, hmin i gray := image.NewGray(image.Rect(0, 0, b.Dx(), b.Dy())) draw.Draw(gray, b, img, b.Min, draw.Src) - hclean := Wipe(gray, hwsize, hthresh, hmin) - clean := VWipe(hclean, vwsize, vthresh, vmin) + vclean := VWipe(gray, vwsize, vthresh, vmin) + clean := Wipe(vclean, hwsize, hthresh, hmin) f, err = os.Create(outPath) if err != nil { -- cgit v1.2.1-24-ge1ad