diff options
author | Nick White <git@njw.name> | 2019-05-14 10:29:29 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2019-05-14 10:29:29 +0100 |
commit | 3b12c59f37f0dc58ad1886052c03f4c81a2a5b78 (patch) | |
tree | 284c4a5edc03f932aa096ba84936f210122e1bb1 /preproc/cmd/preproc | |
parent | 15b05839f91b29319b9d6fd475007ae3ad6224e2 (diff) |
Add preprocmulti tool, that outputs multiple binarisation options quickly
Diffstat (limited to 'preproc/cmd/preproc')
-rw-r--r-- | preproc/cmd/preproc/main.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/preproc/cmd/preproc/main.go b/preproc/cmd/preproc/main.go index 123895f..92e8509 100644 --- a/preproc/cmd/preproc/main.go +++ b/preproc/cmd/preproc/main.go @@ -23,7 +23,7 @@ func autowsize(bounds image.Rectangle) int { func main() { flag.Usage = func() { - fmt.Fprintf(os.Stderr, "Usage: preproc [-bt bintype] [-bw winsize] [-k num] [-t thresh] [-ws wipesize] inimg outimg\n") + fmt.Fprintf(os.Stderr, "Usage: preproc [-bt bintype] [-bw winsize] [-k num] [-wt wipethresh] [-ws wipesize] inimg outimg\n") fmt.Fprintf(os.Stderr, "Binarize and preprocess an image\n") flag.PrintDefaults() } @@ -31,7 +31,7 @@ func main() { ksize := flag.Float64("k", 0.5, "K for sauvola binarization algorithm. This controls the overall threshold level. Set it lower for very light text (try 0.1 or 0.2).") btype := flag.String("bt", "binary", "Type of binarization threshold. binary or zeroinv are currently implemented.") wipewsize := flag.Int("ws", 5, "Window size for wiping algorithm.") - thresh := flag.Float64("t", 0.05, "Threshold for the proportion of black pixels below which a window is determined to be the edge.") + thresh := flag.Float64("wt", 0.05, "Threshold for the wiping algorithm to determine the proportion of black pixels below which a window is determined to be the edge.") flag.Parse() if flag.NArg() < 2 { flag.Usage() |