ropencv 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/examples/affine3d.rb DELETED
@@ -1,17 +0,0 @@
1
- require 'ropencv'
2
- require 'pp'
3
-
4
- include OpenCV
5
-
6
- first = Vector::Point3f.new
7
- second = Vector::Point3f.new
8
- aff = cv::Mat.new
9
- mask = cv::Mat.new
10
-
11
- 0.upto(5) do |i|
12
- first.push_back(cv::Point3f.new(10*i,10*(i%3),10))
13
- second.push_back(cv::Point3f.new(i,i%3,1))
14
- end
15
-
16
- cv::estimate_affine3d(first, second, aff,mask)
17
- pp aff
data/examples/scalar.rb DELETED
@@ -1,10 +0,0 @@
1
- require 'ropencv'
2
- include OpenCV
3
-
4
- scalar = cv::Scalar.new(1,0,0,0)
5
- scalar[2] = 2
6
- puts scalar[0]
7
- puts scalar[1]
8
- puts scalar[2]
9
- puts scalar[3]
10
-
data/ext/specializing.rb DELETED
@@ -1,50 +0,0 @@
1
-
2
- # specialize some types
3
- module Rbind
4
- class RPtr < RStruct
5
- def initialize(name,root,type)
6
- super(name)
7
- add_operation ROperation.new(self.name,nil,RParameter.new("other",self))
8
- add_operation ROperation.new("addref",root.type("void"))
9
- add_operation ROperation.new("release",root.type("void"))
10
- add_operation ROperation.new("delete_obj",root.type("void"))
11
- add_operation ROperation.new("empty",root.type("bool"))
12
- add_attribute RAttribute.new("obj",type.to_ptr)
13
- end
14
- def specialize_ruby
15
- " def method_missing(m,*args)\n"\
16
- " raise \"Ptr #{self} is empty. Cannot call \#{m} on it!\" if empty\n"\
17
- " obj.method(m).call(*args)\n"\
18
- " end\n"
19
- end
20
- end
21
-
22
- class RVector < RStruct
23
- def specialize_ruby
24
- %Q$ include Enumerable
25
- def each(&block)
26
- if block
27
- s = size
28
- 0.upto(s-1) do |i|
29
- yield self[i]
30
- end
31
- else
32
- Enumerator.new(self)
33
- end
34
- end
35
- def <<(val)
36
- push_back(val)
37
- end
38
- Kernel.eval %Q{module ::OpenCV
39
- module Vector
40
- class #{GeneratorRuby.normalize_type_name(@vector_type.name)}
41
- def self.new
42
- ::#{GeneratorRuby.normalize_type_name(self.name)}.new
43
- end
44
- end
45
- end
46
- end}$
47
- end
48
- end
49
- end
50
-