opencv-color 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/bin/opencv-color +13 -5
- data/lib/opencv-color/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8384ba1119bb0e1bcdaa51e4dd9e6f672ac531b
|
4
|
+
data.tar.gz: 5b128b24d27bdfffcd1465c0dd65c07c2496506b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ccb6cc737e2250ba3b99e620995c69d72fa3433dbbcc1cc6a2757035b68ed7b3c372953133f89a6f1c122daaffeb6363c93bcc8d3fc74ae74f8640ac359be41
|
7
|
+
data.tar.gz: d8ca0106ca1a427f7c237fe9f949f8edfe24a8bbed0c54e848fe88642712c4a4b8a4d41f84df3b15979f1c595fd89cf43caf4e012b773bd43217a0e1a7a64412
|
data/README.md
CHANGED
@@ -20,6 +20,10 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
+
Usage: opencv-color [options] <sample images directory path>
|
24
|
+
-f, --format [FORMAT] Output format 'yaml' or 'objc', default is yaml
|
25
|
+
-h, --help Show this message
|
26
|
+
|
23
27
|
Put your color sample images into the following structure:
|
24
28
|
|
25
29
|
* color samples root directory
|
data/bin/opencv-color
CHANGED
@@ -18,23 +18,31 @@ end
|
|
18
18
|
|
19
19
|
require 'optparse'
|
20
20
|
|
21
|
-
sample_images_dir = ARGV.pop
|
22
|
-
|
23
21
|
options = {
|
24
22
|
format: 'yaml'
|
25
23
|
}
|
26
|
-
OptionParser.new do |opts|
|
24
|
+
op = OptionParser.new do |opts|
|
27
25
|
opts.banner = "Usage: opencv-color [options] <sample images directory path>"
|
28
26
|
|
29
27
|
opts.on("-f", "--format [FORMAT]", "Output format 'yaml' or 'objc', default is yaml") do |format|
|
30
28
|
options[:format] = format
|
31
29
|
end
|
32
30
|
|
33
|
-
opts.
|
31
|
+
opts.on_tail("-h", "--help", "Show this message") do
|
34
32
|
puts opts
|
35
33
|
exit
|
36
34
|
end
|
37
|
-
end
|
35
|
+
end
|
36
|
+
op.parse!
|
37
|
+
|
38
|
+
sample_images_dir = ARGV.pop
|
39
|
+
|
40
|
+
unless File.directory?(sample_images_dir)
|
41
|
+
puts "'#{sample_images_dir}' is not a directory"
|
42
|
+
puts
|
43
|
+
puts op
|
44
|
+
exit(-1)
|
45
|
+
end
|
38
46
|
|
39
47
|
data = OpenCVColor.learn(sample_images_dir)
|
40
48
|
puts case options[:format]
|
data/lib/opencv-color/version.rb
CHANGED