diff options
author | Nick White <git@njw.name> | 2020-08-04 16:19:01 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2020-08-04 16:19:01 +0100 |
commit | aa5bd02bd5ed5a6a8d371f953ef128fce64e61a7 (patch) | |
tree | e6512607ffc22727ea6cd3cb25bc7db9a4054976 /wipesides.go | |
parent | b26cb9182b566acac884627d790b0660c4766b62 (diff) |
Update to replace integralimg package with integral package
Diffstat (limited to 'wipesides.go')
-rw-r--r-- | wipesides.go | 6 |
1 files changed, 3 insertions, 3 deletions
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) |