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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: feff117de0280ff57b59285aa76db2724f144938
4
- data.tar.gz: ccdf925278830e065a2d77433037c7983637376a
3
+ metadata.gz: f8384ba1119bb0e1bcdaa51e4dd9e6f672ac531b
4
+ data.tar.gz: 5b128b24d27bdfffcd1465c0dd65c07c2496506b
5
5
  SHA512:
6
- metadata.gz: 52c6b3df2aead4ceb7786594374eeac3b8b4acd88136a77edc6d12a517a2c1754fd78b6fe1d079b44732da37d3becaf52baf2db5d6f8358f159d5b9801bc42b1
7
- data.tar.gz: ea9a61f505b2d88a6aec3342b497462a741fe084d236723bde736afa892d8245e418dfe75838e59342e322fcf74a09bcdd2b1f018b402345a57a392438352be6
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
@@ -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.on("-h", "--help", "Show this message") do |v|
31
+ opts.on_tail("-h", "--help", "Show this message") do
34
32
  puts opts
35
33
  exit
36
34
  end
37
- end.parse!
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]
@@ -1,3 +1,3 @@
1
1
  module OpenCVColor
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opencv-color
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xiao Li