ropencv 0.0.6 → 0.0.7

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/.gitignore CHANGED
@@ -11,3 +11,4 @@ lib/ruby/ropencv/ropencv_types.rb
11
11
  lib/lib
12
12
  lib/include
13
13
  *.gem
14
+ doc/*
data/ext/opencv.txt CHANGED
@@ -245,6 +245,7 @@ cv.RotatedRect.RotatedRect
245
245
  cv.RotatedRect.boundingRect Rect
246
246
  class cv.FileNode
247
247
  class cv.Vec2d
248
+ double* val
248
249
  cv.Vec2d.Vec2d
249
250
  cv.Vec2d.Vec2d
250
251
  Vec2d vec
@@ -256,12 +257,124 @@ cv.Vec2d.all Vec2d /S
256
257
  cv.Vec2d.mul Vec2d
257
258
  Vec2d other
258
259
  cv.Vec2d.conj Vec2d
259
- cv.Vec2d.operator[] double
260
- int i
260
+ cv.Vec2d.operator== bool
261
+ Vec2d vec
262
+ cv.Vec2d.operator!= bool
263
+ Vec2d vec
264
+ cv.Vec2d.operator+ Vec2d
265
+ Vec2d vec
266
+ cv.Vec2d.operator- Vec2d
267
+ Vec2d vec
268
+ cv.Vec2d.operator* Vec2d
269
+ double val
270
+ cv.Vec2d.operator/ Vec2d
271
+ double val
261
272
  class cv.Vec3d
273
+ double* val
274
+ cv.Vec3d.Vec3d
275
+ cv.Vec3d.Vec3d
276
+ Vec3d vec
277
+ cv.Vec3d.Vec3d
278
+ double t1
279
+ double t2
280
+ double t3
281
+ cv.Vec3d.all Vec3d /S
282
+ double alpha
283
+ cv.Vec3d.mul Vec3d
284
+ Vec3d other
285
+ cv.Vec3d.operator== bool
286
+ Vec3d vec
287
+ cv.Vec3d.operator!= bool
288
+ Vec3d vec
289
+ cv.Vec3d.operator+ Vec3d
290
+ Vec3d vec
291
+ cv.Vec3d.operator- Vec3d
292
+ Vec3d vec
293
+ cv.Vec3d.operator* Vec3d
294
+ double val
295
+ cv.Vec3d.operator/ Vec3d
296
+ double val
262
297
  class cv.Vec4d
298
+ double* val
299
+ cv.Vec4d.Vec4d
300
+ cv.Vec4d.Vec4d
301
+ Vec4d vec
302
+ cv.Vec4d.Vec4d
303
+ double t1
304
+ double t2
305
+ double t3
306
+ double t4
307
+ cv.Vec4d.all Vec4d /S
308
+ double alpha
309
+ cv.Vec4d.mul Vec4d
310
+ Vec4d other
311
+ cv.Vec4d.conj Vec4d
312
+ cv.Vec4d.operator== bool
313
+ Vec4d vec
314
+ cv.Vec4d.operator!= bool
315
+ Vec4d vec
316
+ cv.Vec4d.operator+ Vec4d
317
+ Vec4d vec
318
+ cv.Vec4d.operator- Vec4d
319
+ Vec4d vec
320
+ cv.Vec4d.operator* Vec4d
321
+ double val
322
+ cv.Vec4d.operator/ Vec4d
323
+ double val
263
324
  class cv.Vec4f
325
+ cv.Vec4f.Vec4f
326
+ float* val
327
+ cv.Vec4f.Vec4f
328
+ Vec4f vec
329
+ cv.Vec4f.Vec4f
330
+ float t1
331
+ float t2
332
+ float t3
333
+ float t4
334
+ cv.Vec4f.all Vec4f /S
335
+ float alpha
336
+ cv.Vec4f.mul Vec4f
337
+ Vec4f other
338
+ cv.Vec4f.operator== bool
339
+ Vec4f vec
340
+ cv.Vec4f.operator!= bool
341
+ Vec4f vec
342
+ cv.Vec4f.operator+ Vec4f
343
+ Vec4f vec
344
+ cv.Vec4f.operator- Vec4f
345
+ Vec4f vec
346
+ cv.Vec4f.operator* Vec4f
347
+ float val
348
+ cv.Vec4f.operator/ Vec4f
349
+ float val
264
350
  class cv.Vec6f
351
+ cv.Vec6f.Vec6f
352
+ float* val
353
+ cv.Vec6f.Vec6f
354
+ Vec6f vec
355
+ cv.Vec6f.Vec6f
356
+ float t1
357
+ float t2
358
+ float t3
359
+ float t4
360
+ float t5
361
+ float t6
362
+ cv.Vec6f.all Vec6f /S
363
+ float alpha
364
+ cv.Vec6f.mul Vec6f
365
+ Vec6f other
366
+ cv.Vec6f.operator== bool
367
+ Vec6f vec
368
+ cv.Vec6f.operator!= bool
369
+ Vec6f vec
370
+ cv.Vec6f.operator+ Vec6f
371
+ Vec6f vec
372
+ cv.Vec6f.operator- Vec6f
373
+ Vec6f vec
374
+ cv.Vec6f.operator* Vec6f
375
+ float val
376
+ cv.Vec6f.operator/ Vec6f
377
+ float val
265
378
  class cv.TermCriteria
266
379
  class cv.flann::IndexParams
267
380
  class cv.flann::SearchParams
@@ -355,6 +468,8 @@ cv.Mat.cross Mat
355
468
  Mat m
356
469
  cv.Mat.dot double
357
470
  Mat m
471
+ cv.Mat.diag Mat /S
472
+ Mat d
358
473
  cv.Mat.zeros Mat /S
359
474
  int rows
360
475
  int cols
@@ -44,7 +44,7 @@ else()
44
44
  MESSAGE(STATUS "Ruby library not found. Cannot install ruby extensions")
45
45
  ELSEIF(NOT RUBY_EXTENSIONS_AVAILABLE)
46
46
  STRING(REGEX REPLACE ".*lib(32|64)?/?" "lib/" RUBY_LIBRARY_INSTALL_DIR ${RUBY_RUBY_LIB_PATH})
47
- INSTALL(DIRECTORY ${ROOT_FOLDER}/lib/ruby DESTINATION ${RUBY_LIBRARY_INSTALL_DIR}
47
+ INSTALL(DIRECTORY ${ROOT_FOLDER}/lib/ruby/ DESTINATION ${RUBY_LIBRARY_INSTALL_DIR}
48
48
  FILES_MATCHING PATTERN "*.rb")
49
49
  ENDIF(NOT RUBY_INCLUDE_PATH)
50
50
  endif()
@@ -30,7 +30,75 @@ module OpenCV
30
30
  end
31
31
  end
32
32
 
33
+ class Vec2d
34
+ def [](i)
35
+ raise "Out of bound #{i}" if i < 0 || i > 1
36
+ val.get_float64(i*8)
37
+ end
38
+ def []=(i,val0)
39
+ raise "Out of bound #{i}" if i < 0 || i > 1
40
+ val.put_float64(i*8,val0)
41
+ end
42
+ end
43
+
44
+ class Vec3d
45
+ def [](i)
46
+ raise "Out of bound #{i}" if i < 0 || i > 2
47
+ val.get_float64(i*8)
48
+ end
49
+ def []=(i,val0)
50
+ raise "Out of bound #{i}" if i < 0 || i > 2
51
+ val.put_float64(i*8,val0)
52
+ end
53
+ end
54
+
55
+ class Vec4d
56
+ def [](i)
57
+ raise "Out of bound #{i}" if i < 0 || i > 3
58
+ val.get_float64(i*8)
59
+ end
60
+ def []=(i,val0)
61
+ raise "Out of bound #{i}" if i < 0 || i > 3
62
+ val.put_float64(i*8,val0)
63
+ end
64
+ end
65
+
66
+ class Vec4f
67
+ def [](i)
68
+ raise "Out of bound #{i}" if i < 0 || i > 3
69
+ val.get_float32(i*4)
70
+ end
71
+ def []=(i,val0)
72
+ raise "Out of bound #{i}" if i < 0 || i > 3
73
+ val.put_float32(i*4,val0)
74
+ end
75
+ end
76
+
77
+ class Vec6f
78
+ def [](i)
79
+ raise "Out of bound #{i}" if i < 0 || i > 5
80
+ val.get_float32(i*4)
81
+ end
82
+ def []=(i,val0)
83
+ raise "Out of bound #{i}" if i < 0 || i > 5
84
+ val.put_float32(i*4,val0)
85
+ end
86
+ end
87
+
33
88
  class Mat
89
+ class << self
90
+ alias :rbind_new :new
91
+
92
+ def new(*args)
93
+ # allow Mat.new([123,23],[2332,32])
94
+ if !args.find{|a| !a.is_a?(Array)} && args.size() > 1
95
+ rbind_new(args)
96
+ else
97
+ rbind_new(*args)
98
+ end
99
+ end
100
+ end
101
+
34
102
  def self.to_native(obj,context)
35
103
  if obj.is_a?(VectorPoint2f)
36
104
  cv::Mat.new(obj.size,2,cv::CV_32FC1,obj.data,cv::Mat::AUTO_STEP).__obj_ptr__
data/ropencv.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'ropencv'
3
- s.version = '0.0.6'
3
+ s.version = '0.0.7'
4
4
  s.date = '2013-07-03'
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.authors = ['Alexander Duda']
metadata CHANGED
@@ -1,60 +1,49 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ropencv
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.6
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 0.0.7
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Alexander Duda
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-03 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
12
+
13
+ date: 2013-07-03 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
15
16
  name: rbind
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: 0.0.10
22
- type: :runtime
23
17
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
18
+ requirement: &id001 !ruby/object:Gem::Requirement
25
19
  none: false
26
- requirements:
20
+ requirements:
27
21
  - - ~>
28
- - !ruby/object:Gem::Version
22
+ - !ruby/object:Gem::Version
29
23
  version: 0.0.10
30
- - !ruby/object:Gem::Dependency
31
- name: ffi
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ~>
36
- - !ruby/object:Gem::Version
37
- version: 1.9.0
38
24
  type: :runtime
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
27
+ name: ffi
39
28
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
29
+ requirement: &id002 !ruby/object:Gem::Requirement
41
30
  none: false
42
- requirements:
31
+ requirements:
43
32
  - - ~>
44
- - !ruby/object:Gem::Version
33
+ - !ruby/object:Gem::Version
45
34
  version: 1.9.0
46
- description: This are automated ffi ruby wrappers for opencv 2.4.4 and higher. For
47
- wrapping all marked OpenCV C++ methods the OpenCV hdr parser is used to parse the
48
- OpenCV header files. From there rbind generates a C interface and ruby classes.
49
- The ruby classes are using the C interface via ffi to give the user the same object
50
- oriented experience on the ruby side like he has on the c++ side.
51
- email:
35
+ type: :runtime
36
+ version_requirements: *id002
37
+ description: This are automated ffi ruby wrappers for opencv 2.4.4 and higher. For wrapping all marked OpenCV C++ methods the OpenCV hdr parser is used to parse the OpenCV header files. From there rbind generates a C interface and ruby classes. The ruby classes are using the C interface via ffi to give the user the same object oriented experience on the ruby side like he has on the c++ side.
38
+ email:
52
39
  - Alexander.Duda@dfki.de
53
40
  executables: []
54
- extensions:
41
+
42
+ extensions:
55
43
  - ext/extconf.rb
56
44
  extra_rdoc_files: []
57
- files:
45
+
46
+ files:
58
47
  - .gitignore
59
48
  - .yardopts
60
49
  - CMakeLists.txt
@@ -82,27 +71,31 @@ files:
82
71
  - lib/ruby/ropencv/ropencv_types.rb
83
72
  homepage: http://github.com/D-Alex/ropencv
84
73
  licenses: []
74
+
85
75
  post_install_message:
86
76
  rdoc_options: []
87
- require_paths:
77
+
78
+ require_paths:
88
79
  - lib/ruby
89
- required_ruby_version: !ruby/object:Gem::Requirement
80
+ required_ruby_version: !ruby/object:Gem::Requirement
90
81
  none: false
91
- requirements:
92
- - - ! '>='
93
- - !ruby/object:Gem::Version
94
- version: '0'
95
- required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: "0"
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
87
  none: false
97
- requirements:
98
- - - ! '>='
99
- - !ruby/object:Gem::Version
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
100
91
  version: 1.3.6
101
92
  requirements: []
93
+
102
94
  rubyforge_project:
103
95
  rubygems_version: 1.8.23
104
96
  signing_key:
105
97
  specification_version: 3
106
98
  summary: Automated ffi-bindings for opencv 2.4.4 and higher
107
99
  test_files: []
100
+
108
101
  has_rdoc: