summaryrefslogtreecommitdiff
path: root/preproc/wipesides.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-10-02 12:34:34 +0100
committerNick White <git@njw.name>2019-10-02 12:34:34 +0100
commita837c7ff966016f0f18f84d988bf441024d3ff5a (patch)
treed2a1a826b5fd96fcf95fb7366eefdc5c00471846 /preproc/wipesides.go
parent94352c6124aed2d85cfb21e83c0dafb6f918fb7d (diff)
gofmt
Diffstat (limited to 'preproc/wipesides.go')
-rw-r--r--preproc/wipesides.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/preproc/wipesides.go b/preproc/wipesides.go
index 1b73791..3d08053 100644
--- a/preproc/wipesides.go
+++ b/preproc/wipesides.go
@@ -55,14 +55,14 @@ func findedges(img integralimg.I, wsize int, thresh float64) (int, int) {
// start 10% left or right of the middle
notcentre := maxx / 10
- for x := maxx / 2 + notcentre; x < maxx-wsize; x++ {
+ for x := maxx/2 + notcentre; x < maxx-wsize; x++ {
if proportion(img, x, wsize) <= thresh {
highedge = findbestedge(img, x, wsize)
break
}
}
- for x := maxx / 2 - notcentre; x > 0; x-- {
+ for x := maxx/2 - notcentre; x > 0; x-- {
if proportion(img, x, wsize) <= thresh {
lowedge = findbestedge(img, x, wsize)
break
@@ -106,7 +106,7 @@ func toonarrow(img *image.Gray, lowedge int, highedge int, min int) bool {
b := img.Bounds()
imgw := b.Max.X - b.Min.X
wipew := highedge - lowedge
- if float64(wipew) / float64(imgw) * 100 < float64(min) {
+ if float64(wipew)/float64(imgw)*100 < float64(min) {
return true
}
return false