summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util.go2
-rw-r--r--wipesides.go3
2 files changed, 4 insertions, 1 deletions
diff --git a/util.go b/util.go
index f0864e9..304b209 100644
--- a/util.go
+++ b/util.go
@@ -79,6 +79,8 @@ func surrounding(img *image.Gray, x int, y int, size int) []int {
return s
}
+// BinToZeroInv converts a binary thresholded image to a zero inverse
+// binary thresholded image
func BinToZeroInv(bin *image.Gray, orig *image.RGBA) (*image.RGBA, error) {
b := bin.Bounds()
if !b.Eq(orig.Bounds()) {
diff --git a/wipesides.go b/wipesides.go
index 0fc4a32..e4b9ad5 100644
--- a/wipesides.go
+++ b/wipesides.go
@@ -175,7 +175,8 @@ func WipeFile(inPath string, outPath string, wsize int, thresh float64, min int)
gray := image.NewGray(image.Rect(0, 0, b.Dx(), b.Dy()))
draw.Draw(gray, b, img, b.Min, draw.Src)
- clean := Wipe(gray, wsize, thresh, min)
+ hclean := Wipe(gray, wsize, thresh, min)
+ clean := VWipe(hclean, wsize, thresh, min)
f, err = os.Create(outPath)
if err != nil {