From aa5bd02bd5ed5a6a8d371f953ef128fce64e61a7 Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 4 Aug 2020 16:19:01 +0100 Subject: Update to replace integralimg package with integral package --- wipesides.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'wipesides.go') diff --git a/wipesides.go b/wipesides.go index 7480a7f..644bc9c 100644 --- a/wipesides.go +++ b/wipesides.go @@ -16,7 +16,7 @@ import ( "image/png" "os" - "rescribe.xyz/integralimg" + "rescribe.xyz/integral" ) // ProportionSlice returns the proportion of black pixels in a @@ -171,7 +171,7 @@ func sideways(img image.Image) *image.Gray { // area with white, providing the content area is above min % func Wipe(img *image.Gray, wsize int, thresh float64, min int) *image.Gray { b := img.Bounds() - intImg := integralimg.NewImage(b) + intImg := integral.NewImage(b) draw.Draw(intImg, b, img, b.Min, draw.Src) lowedge, highedge := findedges(*intImg, wsize, thresh) if toonarrow(img, lowedge, highedge, min) { @@ -185,7 +185,7 @@ func Wipe(img *image.Gray, wsize int, thresh float64, min int) *image.Gray { func VWipe(img *image.Gray, wsize int, thresh float64, min int) *image.Gray { rotimg := sideways(img) b := rotimg.Bounds() - intImg := integralimg.NewImage(b) + intImg := integral.NewImage(b) draw.Draw(intImg, b, rotimg, b.Min, draw.Src) // TODO: test whether there are any places where Outin makes a real difference lowedge, highedge:= findedgesOutin(*intImg, wsize, thresh) -- cgit v1.2.1-24-ge1ad