aboutsummaryrefslogtreecommitdiff
path: root/extract-green-color.scm
diff options
context:
space:
mode:
Diffstat (limited to 'extract-green-color.scm')
-rwxr-xr-xextract-green-color.scm14
1 files changed, 7 insertions, 7 deletions
diff --git a/extract-green-color.scm b/extract-green-color.scm
index 2d56d6b..3f9e868 100755
--- a/extract-green-color.scm
+++ b/extract-green-color.scm
@@ -75,8 +75,8 @@
Extract green color from input-file and save to output-file.
Options:
- -m, --hue-minus hue threshold to express distance to red (default 60)
- -p, --hue-plus hue threshold to express distance to blue (default 60)
+ -r, --hue-red hue threshold to express distance to red (default 60)
+ -b, --hue-blue hue threshold to express distance to blue (default 60)
-s, --saturation saturation threshold (default 0)
-v, --value value threshold (default 0)
@@ -86,13 +86,13 @@ Options:
(define (show-version)
(format (current-error-port)
- "extract-green-color.scm 1.0~%"))
+ "extract-green-color.scm 2.0~%"))
(define (main args)
(let* ((option-spec `((version (single-char #\V))
(help (single-char #\h))
- (hue-minus (single-char #\m) (value #t) (predicate ,string->number))
- (hue-plus (single-char #\p) (value #t) (predicate ,string->number))
+ (hue-red (single-char #\r) (value #t) (predicate ,string->number))
+ (hue-blue (single-char #\b) (value #t) (predicate ,string->number))
(saturation (single-char #\s) (value #t) (predicate ,string->number))
(value (single-char #\v) (value #t) (predicate ,string->number))))
(options (getopt-long args option-spec)))
@@ -108,8 +108,8 @@ Options:
(exit 1))
(match-let (((input-file output-file) (option-ref options '() '())))
(im-save (extract-green-color (im-load input-file)
- (string->number (option-ref options 'hue-minus "60"))
- (string->number (option-ref options 'hue-plus "60"))
+ (string->number (option-ref options 'hue-red "60"))
+ (string->number (option-ref options 'hue-blue "60"))
(string->number (option-ref options 'saturation "0.0"))
(string->number (option-ref options 'value "0.0")))
output-file))))