summaryrefslogtreecommitdiff
path: root/preproc/wipesides.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-05-13 19:23:03 +0100
committerNick White <git@njw.name>2019-05-13 19:23:03 +0100
commit02a6c66eb77a5b455bcf2d0547d2383074eb7e41 (patch)
tree00f2bde1dfa7a1b23e55478309f26ba1b54fdab9 /preproc/wipesides.go
parentd94fb9f7e74aaad335a587030ed2b4ce44c24cbf (diff)
Reorganise image manipulation to separate integral image parts
Also unify everything else under preproc/ Note that the UsefulImg interface should be used by the main functions, to simplify things, but this hasn't been done yet.
Diffstat (limited to 'preproc/wipesides.go')
-rw-r--r--preproc/wipesides.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/preproc/wipesides.go b/preproc/wipesides.go
index c773054..4806e93 100644
--- a/preproc/wipesides.go
+++ b/preproc/wipesides.go
@@ -7,7 +7,7 @@ import (
"image"
"image/color"
- "rescribe.xyz/go.git/binarize"
+ "rescribe.xyz/go.git/integralimg"
)
type IntWindow struct { // TODO: put this in its own package
@@ -126,7 +126,7 @@ func wipesides(img *image.Gray, lowedge int, highedge int) *image.Gray {
// wipe fills the sections of image which fall outside the content
// area with white
func Wipe(img *image.Gray, wsize int, thresh float64) *image.Gray {
- integral := binarize.Integralimg(img)
+ integral := integralimg.ToIntegralImg(img)
lowedge, highedge := findedges(integral, wsize, thresh)
return wipesides(img, lowedge, highedge)
}