artoo-opencv 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +18 -17
- data/README.md +41 -4
- data/artoo-opencv.gemspec +2 -2
- data/examples/ardrone_face_tracking.rb +2 -2
- data/examples/ardrone_tracking.rb +2 -2
- data/examples/ball_tracking.rb +2 -2
- data/examples/capture.rb +3 -3
- data/examples/face_detect.rb +2 -2
- data/lib/artoo-opencv/version.rb +1 -1
- data/lib/artoo/adaptors/opencv.rb +0 -7
- data/lib/artoo/drivers/opencv_window.rb +1 -2
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5774c3dbf44876bb967dd73154fa69b3f3f5e9c
|
4
|
+
data.tar.gz: 9bba86907a40abb1a6c7a909d4c83a8443cb6cdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd3acf63cc47c2a6d29814fea985e366d1f10af0f62015826eba82fdeffe10aa8979d352210298cccd00a1973b4764bdf1cc29919f4694fcc4e446586fc59edd
|
7
|
+
data.tar.gz: c9cb62ea836ae96fb67190127f8754257b63221aac4f6b0f51e42025011cb4e9dbaea7a23a47a647b5d5c5fd5a7d32571dd2f4eeb750c8d2271571db2f8657b9
|
data/Gemfile.lock
CHANGED
@@ -1,50 +1,51 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
artoo-opencv (0.0
|
5
|
-
artoo (
|
6
|
-
ruby-opencv (
|
4
|
+
artoo-opencv (0.1.0)
|
5
|
+
artoo (>= 1.6.0)
|
6
|
+
ruby-opencv (>= 0.0.12)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: http://rubygems.org/
|
10
10
|
specs:
|
11
|
-
artoo (1.
|
11
|
+
artoo (1.6.0)
|
12
12
|
celluloid (~> 0.15.0)
|
13
13
|
celluloid-io (~> 0.15.0)
|
14
14
|
multi_json (~> 1.6)
|
15
15
|
pry (~> 0.9)
|
16
|
-
rake
|
16
|
+
rake
|
17
17
|
reel (~> 0.4.0)
|
18
|
+
robeaux (~> 0.0.3)
|
18
19
|
thor (~> 0.18.1)
|
19
|
-
celluloid (0.15.
|
20
|
+
celluloid (0.15.2)
|
20
21
|
timers (~> 1.1.0)
|
21
22
|
celluloid-io (0.15.0)
|
22
23
|
celluloid (>= 0.15.0)
|
23
24
|
nio4r (>= 0.5.0)
|
24
|
-
coderay (1.0
|
25
|
+
coderay (1.1.0)
|
25
26
|
http (0.5.0)
|
26
27
|
http_parser.rb
|
27
|
-
http_parser.rb (0.6.0
|
28
|
+
http_parser.rb (0.6.0)
|
28
29
|
method_source (0.8.2)
|
29
|
-
multi_json (1.8.
|
30
|
-
nio4r (0.
|
31
|
-
pry (0.9.12.
|
32
|
-
coderay (~> 1.0
|
30
|
+
multi_json (1.8.4)
|
31
|
+
nio4r (1.0.0)
|
32
|
+
pry (0.9.12.6)
|
33
|
+
coderay (~> 1.0)
|
33
34
|
method_source (~> 0.8)
|
34
35
|
slop (~> 3.4)
|
35
|
-
rake (10.1.
|
36
|
+
rake (10.1.1)
|
36
37
|
reel (0.4.0)
|
37
38
|
celluloid (>= 0.15.1)
|
38
39
|
celluloid-io (>= 0.15.0)
|
39
40
|
http (>= 0.5.0)
|
40
41
|
http_parser.rb (>= 0.6.0.beta.2)
|
41
42
|
websocket_parser (>= 0.1.4)
|
42
|
-
|
43
|
-
|
43
|
+
robeaux (0.0.3)
|
44
|
+
ruby-opencv (0.0.12)
|
45
|
+
slop (3.4.7)
|
44
46
|
thor (0.18.1)
|
45
47
|
timers (1.1.0)
|
46
|
-
websocket_parser (0.1.
|
47
|
-
http
|
48
|
+
websocket_parser (0.1.6)
|
48
49
|
|
49
50
|
PLATFORMS
|
50
51
|
ruby
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Artoo Adaptor For Opencv
|
2
2
|
|
3
|
-
This repository contains the Artoo (http://artoo.io/) adaptor for Opencv.
|
3
|
+
This repository contains the Artoo (http://artoo.io/) adaptor for [Opencv](http://opencv.org/).
|
4
4
|
|
5
5
|
Artoo is a open source micro-framework for robotics using Ruby.
|
6
6
|
|
@@ -15,9 +15,46 @@ gem install artoo-opencv
|
|
15
15
|
## Using
|
16
16
|
|
17
17
|
```ruby
|
18
|
-
|
18
|
+
require 'artoo'
|
19
|
+
|
20
|
+
connection :capture, :adaptor => :opencv_capture
|
21
|
+
device :capture, :driver => :opencv_capture, :connection => :capture, :interval => 0.01
|
22
|
+
|
23
|
+
connection :window, :adaptor => :opencv_window
|
24
|
+
device :window, :driver => :opencv_window, :connection => :window, :title => "Hello", :interval => 0.01
|
25
|
+
|
26
|
+
work do
|
27
|
+
on capture, :frame => proc { |*value|
|
28
|
+
window.image = value[1].image
|
29
|
+
}
|
30
|
+
end
|
19
31
|
```
|
20
32
|
|
21
|
-
##
|
33
|
+
## Installing OpenCV
|
34
|
+
|
35
|
+
If you do not already have OpenCV installed, plesase consult the artoo-opencv documentation [page](http://artoo.io/documentation/platforms/opencv/)
|
36
|
+
|
37
|
+
## Documentation
|
38
|
+
|
39
|
+
Check out our [documentation](http://artoo.io/documentation/) for lots of information about how to use Artoo.
|
40
|
+
|
41
|
+
## IRC
|
42
|
+
|
43
|
+
Need more help? Just want to say "Hello"? Come visit us on IRC freenode #artoo
|
44
|
+
|
45
|
+
## Contributing
|
46
|
+
|
47
|
+
* All patches must be provided under the Apache 2.0 License
|
48
|
+
* Please use the -s option in git to "sign off" that the commit is your work and you are providing it under the Apache 2.0 License
|
49
|
+
* Submit a Github Pull Request to the appropriate branch and ideally discuss the changes with us in IRC.
|
50
|
+
* We will look at the patch, test it out, and give you feedback.
|
51
|
+
* Avoid doing minor whitespace changes, renamings, etc. along with merged content. These will be done by the maintainers from time to time but they can complicate merges and should be done seperately.
|
52
|
+
* Take care to maintain the existing coding style.
|
53
|
+
* Add unit tests for any new or changed functionality.
|
54
|
+
* All pull requests should be "fast forward"
|
55
|
+
* If there are commits after yours use “git rebase -i <new_head_branch>”
|
56
|
+
* If you have local changes you may need to use “git stash”
|
57
|
+
* For git help see [progit](http://git-scm.com/book) which is an awesome (and free) book on git
|
58
|
+
|
22
59
|
|
23
|
-
|
60
|
+
(c) 2012-2014 The Hybrid Group
|
data/artoo-opencv.gemspec
CHANGED
@@ -19,8 +19,8 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
s.add_runtime_dependency 'artoo', '
|
23
|
-
s.add_runtime_dependency "ruby-opencv", "
|
22
|
+
s.add_runtime_dependency 'artoo', '>= 1.6.0'
|
23
|
+
s.add_runtime_dependency "ruby-opencv", ">= 0.0.12"
|
24
24
|
# s.add_development_dependency 'minitest', '~> 5.0'
|
25
25
|
# s.add_development_dependency 'minitest-happy'
|
26
26
|
# s.add_development_dependency 'mocha', '~> 0.14.0'
|
@@ -3,8 +3,8 @@ require 'artoo'
|
|
3
3
|
connection :capture, :adaptor => :opencv_capture, :source => "tcp://192.168.1.1:5555"
|
4
4
|
device :capture, :driver => :opencv_capture, :connection => :capture, :interval => 0.0033
|
5
5
|
|
6
|
-
connection :video, :adaptor => :opencv_window
|
7
|
-
device :video, :driver => :opencv_window, :connection => :video, :interval => 0.0033
|
6
|
+
connection :video, :adaptor => :opencv_window
|
7
|
+
device :video, :driver => :opencv_window, :connection => :video, :title => "Video", :interval => 0.0033
|
8
8
|
|
9
9
|
connection :ardrone, :adaptor => :ardrone, :port => '192.168.1.1:5556'
|
10
10
|
device :drone, :driver => :ardrone, :connection => :ardrone
|
@@ -3,8 +3,8 @@ require 'artoo'
|
|
3
3
|
connection :capture, :adaptor => :opencv_capture, :source => "tcp://192.168.1.1:5555"
|
4
4
|
device :capture, :driver => :opencv_capture, :connection => :capture, :interval => 0.025
|
5
5
|
|
6
|
-
connection :video, :adaptor => :opencv_window
|
7
|
-
device :video, :driver => :opencv_window, :connection => :video, :interval => 0.025
|
6
|
+
connection :video, :adaptor => :opencv_window
|
7
|
+
device :video, :driver => :opencv_window, :connection => :video, :title => "Video", :interval => 0.025
|
8
8
|
|
9
9
|
connection :ardrone, :adaptor => :ardrone, :port => '192.168.1.1:5556'
|
10
10
|
device :drone, :driver => :ardrone, :connection => :ardrone
|
data/examples/ball_tracking.rb
CHANGED
@@ -3,8 +3,8 @@ require 'artoo'
|
|
3
3
|
connection :capture, :adaptor => :opencv_capture
|
4
4
|
device :capture, :driver => :opencv_capture, :connection => :capture, :interval => 0.01
|
5
5
|
|
6
|
-
connection :video, :adaptor => :opencv_window
|
7
|
-
device :video, :driver => :opencv_window, :connection => :video, :interval => 0.01
|
6
|
+
connection :video, :adaptor => :opencv_window
|
7
|
+
device :video, :driver => :opencv_window, :connection => :video, :title => "Video", :interval => 0.01
|
8
8
|
|
9
9
|
work do
|
10
10
|
on capture, :frame => proc { |*value|
|
data/examples/capture.rb
CHANGED
@@ -3,11 +3,11 @@ require 'artoo'
|
|
3
3
|
connection :capture, :adaptor => :opencv_capture
|
4
4
|
device :capture, :driver => :opencv_capture, :connection => :capture, :interval => 0.01
|
5
5
|
|
6
|
-
connection :window, :adaptor => :opencv_window
|
7
|
-
device :window, :driver => :opencv_window, :connection => :window, :interval => 0.01
|
6
|
+
connection :window, :adaptor => :opencv_window
|
7
|
+
device :window, :driver => :opencv_window, :connection => :window, :title => "My Window", :interval => 0.01
|
8
8
|
|
9
9
|
work do
|
10
10
|
on capture, :frame => proc { |*value|
|
11
|
-
window.image = value[1]
|
11
|
+
window.image = value[1].image
|
12
12
|
}
|
13
13
|
end
|
data/examples/face_detect.rb
CHANGED
@@ -3,8 +3,8 @@ require 'artoo'
|
|
3
3
|
connection :capture, :adaptor => :opencv_capture
|
4
4
|
device :capture, :driver => :opencv_capture, :connection => :capture, :interval => 0.01
|
5
5
|
|
6
|
-
connection :video, :adaptor => :opencv_window
|
7
|
-
device :video, :driver => :opencv_window, :connection => :video, :interval => 0.01
|
6
|
+
connection :video, :adaptor => :opencv_window
|
7
|
+
device :video, :driver => :opencv_window, :connection => :video, :title => "Video", :interval => 0.01
|
8
8
|
|
9
9
|
work do
|
10
10
|
haar = "#{Dir.pwd}/examples/haarcascade_frontalface_alt.xml"
|
data/lib/artoo-opencv/version.rb
CHANGED
@@ -5,15 +5,8 @@ module Artoo
|
|
5
5
|
# Connect to a opencv device
|
6
6
|
# @see device documentation for more information
|
7
7
|
class Opencv < Adaptor
|
8
|
-
finalizer :finalize
|
9
8
|
attr_reader :device
|
10
9
|
|
11
|
-
# Closes connection with device if connected
|
12
|
-
# @return [Boolean]
|
13
|
-
def finalize
|
14
|
-
disconnect if connected?
|
15
|
-
end
|
16
|
-
|
17
10
|
# Creates a connection with device
|
18
11
|
# @return [Boolean]
|
19
12
|
def connect
|
@@ -12,7 +12,7 @@ module Artoo
|
|
12
12
|
def initialize(params={})
|
13
13
|
super
|
14
14
|
title = additional_params[:title] || ""
|
15
|
-
@window = ::OpenCV::GUI::Window.new(title)
|
15
|
+
@window = ::OpenCV::GUI::Window.new(title,2)
|
16
16
|
end
|
17
17
|
|
18
18
|
# Start driver and any required connections
|
@@ -29,7 +29,6 @@ module Artoo
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
|
33
32
|
def show_image
|
34
33
|
begin
|
35
34
|
window.show @image if !@image.nil?
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: artoo-opencv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Zankich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: artoo
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.6.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.6.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ruby-opencv
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0.
|
33
|
+
version: 0.0.12
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0.
|
40
|
+
version: 0.0.12
|
41
41
|
description: Artoo adaptor and driver for Opencv
|
42
42
|
email:
|
43
43
|
- artoo@hybridgroup.com
|
@@ -45,7 +45,7 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
-
- .gitignore
|
48
|
+
- ".gitignore"
|
49
49
|
- Gemfile
|
50
50
|
- Gemfile.lock
|
51
51
|
- LICENSE
|
@@ -78,17 +78,17 @@ require_paths:
|
|
78
78
|
- lib
|
79
79
|
required_ruby_version: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- -
|
86
|
+
- - ">="
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project: artoo-opencv
|
91
|
-
rubygems_version: 2.
|
91
|
+
rubygems_version: 2.2.1
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
94
|
summary: Artoo adaptor and driver for Opencv
|