summaryrefslogtreecommitdiff
path: root/preprocmulti.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2020-04-14 11:37:57 +0100
committerNick White <git@njw.name>2020-04-14 11:37:57 +0100
commit014af190c64b2fecbf5d69e9a13e45858e830e81 (patch)
treec8398b8b2b224f13309156b0554c7aa80bccfdc8 /preprocmulti.go
parent822ce40a7d708ed44d6e638e2e25db9261254d13 (diff)
Improve documentation throughout
Diffstat (limited to 'preprocmulti.go')
-rw-r--r--preprocmulti.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/preprocmulti.go b/preprocmulti.go
index 427ffe7..e671108 100644
--- a/preprocmulti.go
+++ b/preprocmulti.go
@@ -4,8 +4,6 @@
package preproc
-// TODO: come up with a way to set a good ksize automatically
-
import (
"fmt"
"image"
@@ -18,8 +16,8 @@ import (
"rescribe.xyz/integralimg"
)
-// TODO: do more testing to see how good this assumption is
func autowsize(bounds image.Rectangle) int {
+ // TODO: do more testing to see how good this assumption is
return bounds.Dx() / 60
}
@@ -31,11 +29,11 @@ func autowsize(bounds image.Rectangle) int {
// wipe: Whether to wipe (clear sides) the image
// wipeWsize: Window size for wiping algorithm
// wipeMinWidthPerc: Minimum percentage of the image width for the content width calculation to be considered valid
-// Note: copied from cmd/preprocmulti/main.go, should think about the best way
-// to organise this code later.
-// TODO: return errors that encapsulate the err describing where it was encountered
-// TODO: do the post-integral image stuff in separate goroutines for speed
func PreProcMulti(inPath string, ksizes []float64, binType string, binWsize int, wipe bool, wipeWsize int, wipeMinWidthPerc int) ([]string, error) {
+ // Note: copied from cmd/preprocmulti/main.go, should think about the best way to organise this code later.
+ // TODO: return errors that encapsulate the err describing where it was encountered
+ // TODO: come up with a way to set a good ksize automatically
+
// Make outBase inPath up to final .
s := strings.Split(inPath, ".")
outBase := strings.Join(s[:len(s)-1], "")