ruby-opencv 0.0.9 → 0.0.10.pre

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: fa96af3be79ecae9c81d90111ca2846faffa5772
4
- data.tar.gz: 38159ae00e9b76b4369349f2bbadc1e94c9c221b
3
+ metadata.gz: 8ee7ddd0ca847a2fcb2c2f17f6e7068902352e30
4
+ data.tar.gz: 37da69fff04151c786fd9a9dd30b899bc2d7297b
5
5
  SHA512:
6
- metadata.gz: 75c85cd901e7cd17368b0a9a9dba60c4e48ac40e83a7b76257a3286aa47ac6dee5f7808697a0e6d342606ccb99d904161f55a44a2185b08f53b1df1b701c4856
7
- data.tar.gz: 03ac59968a6856f97b29d7472169a6ec58dcfc61f4939cf2f686f81d00db66f9a29d8284798ab0aca3be50e30cef002704f76352a5a479bdcc32253454c85e75
6
+ metadata.gz: 3c88a48f85e00c9d4ac901af3118ede191feabaa1456ed127ad24d5c2d0576eabe219d9260f1886a9ecb5a7cd81be58c25176d3196a47c5efbdaf9aaa1500685
7
+ data.tar.gz: f2b027d0fe499193a88a7fc3aba2ec28f4d738172c4b4faf46a7e73d5d6e49b4edf4a93b366e3a3007fb2b142c30011080e44de0b3b00c1436a6900ffef8c0f5
data/.gitignore CHANGED
@@ -22,4 +22,5 @@ videowriter_result.avi
22
22
  examples/contours/rotated-boxes-with-detected-bounding-rectangles.jpg
23
23
  Gemfile.lock
24
24
  .RUBYLIBDIR.*
25
+ .RUBYARCHDIR.*
25
26
 
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  An OpenCV wrapper for Ruby.
4
4
 
5
5
  * Web site: <https://github.com/ruby-opencv/ruby-opencv>
6
- * Ruby 1.9.3, 2.0.0 and OpenCV 2.4.5 are supported.
6
+ * Ruby 1.9.3, 2.0.0 and OpenCV 2.4.6.1 are supported.
7
7
 
8
8
  ## Requirement
9
9
 
data/ext/opencv/cvmat.cpp CHANGED
@@ -3945,9 +3945,9 @@ rb_resize(int argc, VALUE *argv, VALUE self)
3945
3945
  VALUE
3946
3946
  rb_warp_affine(int argc, VALUE *argv, VALUE self)
3947
3947
  {
3948
- VALUE map_matrix, flags_val, option, fill_value;
3948
+ VALUE map_matrix, flags_val, fill_value;
3949
3949
  VALUE dest = Qnil;
3950
- if (rb_scan_args(argc, argv, "13", &map_matrix, &flags_val, &option, &fill_value) < 4)
3950
+ if (rb_scan_args(argc, argv, "12", &map_matrix, &flags_val, &fill_value) < 3)
3951
3951
  fill_value = INT2FIX(0);
3952
3952
  CvArr* self_ptr = CVARR(self);
3953
3953
  int flags = NIL_P(flags_val) ? (CV_INTER_LINEAR | CV_WARP_FILL_OUTLIERS) : NUM2INT(flags_val);
@@ -4755,7 +4755,7 @@ rb_flood_fill_bang(int argc, VALUE *argv, VALUE self)
4755
4755
  try {
4756
4756
  CvSize size = cvGetSize(self_ptr);
4757
4757
  // TODO: Change argument format to set mask
4758
- mask = new_object(size.width + 2, size.height + 2, CV_MAKETYPE(CV_8U, 1));
4758
+ mask = new_object(size.height + 2, size.width + 2, CV_MAKETYPE(CV_8U, 1));
4759
4759
  CvMat* mask_ptr = CVMAT(mask);
4760
4760
  cvSetZero(mask_ptr);
4761
4761
  cvFloodFill(self_ptr,
@@ -5261,11 +5261,11 @@ rb_match_template(int argc, VALUE *argv, VALUE self)
5261
5261
  * Compares two shapes(self and object). <i>object</i> should be CvMat or CvContour.
5262
5262
  *
5263
5263
  * A - object1, B - object2:
5264
- * * method=CV_CONTOUR_MATCH_I1
5264
+ * * method=CV_CONTOURS_MATCH_I1
5265
5265
  * I1(A,B)=sumi=1..7abs(1/mAi - 1/mBi)
5266
- * * method=CV_CONTOUR_MATCH_I2
5266
+ * * method=CV_CONTOURS_MATCH_I2
5267
5267
  * I2(A,B)=sumi=1..7abs(mAi - mBi)
5268
- * * method=CV_CONTOUR_MATCH_I3
5268
+ * * method=CV_CONTOURS_MATCH_I3
5269
5269
  * I3(A,B)=sumi=1..7abs(mAi - mBi)/abs(mAi)
5270
5270
  */
5271
5271
  VALUE
@@ -166,6 +166,11 @@ define_ruby_module()
166
166
  rb_define_const(rb_module, "CV_MINOR_VERSION", INT2FIX(CV_MINOR_VERSION));
167
167
  rb_define_const(rb_module, "CV_SUBMINOR_VERSION", INT2FIX(CV_SUBMINOR_VERSION));
168
168
 
169
+ rb_define_const(rb_module, "CV_VERSION_EPOCH", INT2FIX(CV_VERSION_EPOCH));
170
+ rb_define_const(rb_module, "CV_VERSION_MAJOR", INT2FIX(CV_VERSION_MAJOR));
171
+ rb_define_const(rb_module, "CV_VERSION_MINOR", INT2FIX(CV_VERSION_MINOR));
172
+ rb_define_const(rb_module, "CV_VERSION_REVISION", INT2FIX(CV_VERSION_REVISION));
173
+
169
174
  /* 0: 8bit unsigned */
170
175
  rb_define_const(rb_module, "CV_8U", INT2FIX(CV_8U));
171
176
  /* 1: 8bit signed */
@@ -1,3 +1,3 @@
1
1
  module OpenCV
2
- VERSION = '0.0.9'
2
+ VERSION = '0.0.10.pre'
3
3
  end
data/ruby-opencv.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "ruby-opencv"
5
- s.version = "0.0.9.20130505072136"
5
+ s.version = "0.0.10.pre.20130803014724"
6
6
 
7
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
7
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["lsxi", "ser1zw", "pcting"]
9
- s.date = "2013-05-04"
9
+ s.date = "2013-08-02"
10
10
  s.description = "ruby-opencv is a wrapper of OpenCV for Ruby. It helps you to write computer vision programs (e.g. detecting faces from pictures) with Ruby."
11
11
  s.email = ["masakazu.yonekura@gmail.com", "azariahsawtikes@gmail.com", "pcting@gmail.com"]
12
12
  s.extensions = ["ext/opencv/extconf.rb"]
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.rdoc_options = ["--main", "README.md"]
18
18
  s.require_paths = ["lib"]
19
19
  s.rubyforge_project = "ruby-opencv"
20
- s.rubygems_version = "2.0.3"
20
+ s.rubygems_version = "2.0.6"
21
21
  s.summary = "OpenCV wrapper for Ruby"
22
22
  s.test_files = ["test/test_cvhistogram.rb", "test/test_cvconnectedcomp.rb", "test/test_mouseevent.rb", "test/test_opencv.rb", "test/test_cvmat_imageprocessing.rb", "test/test_cvmat.rb", "test/test_cvfeaturetree.rb", "test/test_iplconvkernel.rb", "test/test_cvchain.rb", "test/test_cvmat_drawing.rb", "test/test_cvpoint.rb", "test/test_trackbar.rb", "test/test_cvsize2d32f.rb", "test/test_cvsurfparams.rb", "test/test_cvscalar.rb", "test/test_cverror.rb", "test/test_cvhumoments.rb", "test/test_iplimage.rb", "test/test_cvslice.rb", "test/test_cvtwopoints.rb", "test/test_cvfont.rb", "test/test_cvseq.rb", "test/test_cvcontour.rb", "test/test_curve.rb", "test/test_cvsize.rb", "test/test_window.rb", "test/test_cvbox2d.rb", "test/test_cvpoint2d32f.rb", "test/test_cvcapture.rb", "test/test_pointset.rb", "test/test_cvcontourtree.rb", "test/test_cvavgcomp.rb", "test/test_cvsurfpoint.rb", "test/test_cvrect.rb", "test/test_cvline.rb", "test/test_cvvideowriter.rb", "test/test_cvpoint3d32f.rb", "test/test_cvmat_matching.rb", "test/test_cvcircle32f.rb", "test/test_preliminary.rb", "test/test_cvmat_dxt.rb", "test/test_cvmoments.rb", "test/test_cvtermcriteria.rb", "test/test_cvhaarclassifiercascade.rb"]
23
23
 
@@ -28,17 +28,17 @@ Gem::Specification.new do |s|
28
28
  s.add_development_dependency(%q<rdoc>, ["~> 4.0"])
29
29
  s.add_development_dependency(%q<rake-compiler>, [">= 0"])
30
30
  s.add_development_dependency(%q<hoe-gemspec>, [">= 0"])
31
- s.add_development_dependency(%q<hoe>, ["~> 3.6"])
31
+ s.add_development_dependency(%q<hoe>, ["~> 3.7"])
32
32
  else
33
33
  s.add_dependency(%q<rdoc>, ["~> 4.0"])
34
34
  s.add_dependency(%q<rake-compiler>, [">= 0"])
35
35
  s.add_dependency(%q<hoe-gemspec>, [">= 0"])
36
- s.add_dependency(%q<hoe>, ["~> 3.6"])
36
+ s.add_dependency(%q<hoe>, ["~> 3.7"])
37
37
  end
38
38
  else
39
39
  s.add_dependency(%q<rdoc>, ["~> 4.0"])
40
40
  s.add_dependency(%q<rake-compiler>, [">= 0"])
41
41
  s.add_dependency(%q<hoe-gemspec>, [">= 0"])
42
- s.add_dependency(%q<hoe>, ["~> 3.6"])
42
+ s.add_dependency(%q<hoe>, ["~> 3.7"])
43
43
  end
44
44
  end
@@ -1169,10 +1169,10 @@ class TestCvMat_imageprocessing < OpenCVTestCase
1169
1169
  end
1170
1170
 
1171
1171
  def test_flood_fill
1172
- mat0 = create_cvmat(128, 128, :cv8u, 1) { |j, i, c|
1173
- if (i >= 32 and i < 96) and (j >= 32 and j < 96)
1172
+ mat0 = create_cvmat(128, 256, :cv8u, 1) { |j, i, c|
1173
+ if (i >= 32 and i < 224) and (j >= 32 and j < 96)
1174
1174
  CvScalar.new(255)
1175
- elsif (i >= 16 and i < 112) and (j >= 16 and j < 112)
1175
+ elsif (i >= 16 and i < 240) and (j >= 16 and j < 112)
1176
1176
  CvScalar.new(192)
1177
1177
  else
1178
1178
  CvScalar.new(128)
@@ -1189,50 +1189,40 @@ class TestCvMat_imageprocessing < OpenCVTestCase
1189
1189
  mat5, comp5, mask5 = mat05.flood_fill!(point, 0, CvScalar.new(0), CvScalar.new(64),
1190
1190
  {:connectivity => 8, :fixed_range => true, :mask_only => true})
1191
1191
 
1192
- assert_equal('8c6a235fdf4c9c4f6822a45daac5b1af', hash_img(mat1))
1193
- assert_equal(5120.0, comp1.area)
1192
+ assert_equal(9216.0, comp1.area)
1194
1193
  assert_equal(16, comp1.rect.x)
1195
1194
  assert_equal(16, comp1.rect.y)
1196
- assert_equal(96, comp1.rect.width)
1195
+ assert_equal(224, comp1.rect.width)
1197
1196
  assert_equal(96, comp1.rect.height)
1198
1197
  assert_cvscalar_equal(CvScalar.new(0, 0, 0, 0), comp1.value)
1199
- assert_equal('1fd2537966283987b39c8b2c9d778383', hash_img(mask1))
1200
1198
 
1201
- assert_equal('7456e5de74bb8b4e783d04bbf1904644', hash_img(mat2))
1202
- assert_equal(12288.0, comp2.area)
1199
+ assert_equal(20480.0, comp2.area)
1203
1200
  assert_equal(0, comp2.rect.x)
1204
1201
  assert_equal(0, comp2.rect.y)
1205
- assert_equal(128, comp2.rect.width)
1202
+ assert_equal(256, comp2.rect.width)
1206
1203
  assert_equal(128, comp2.rect.height)
1207
1204
  assert_cvscalar_equal(CvScalar.new(0, 0, 0, 0), comp2.value)
1208
- assert_equal('847934f5170e2072cdfd63e16a1e06ad', hash_img(mask2))
1209
1205
 
1210
- assert_equal('df720005423762ca1b68e06571f58b21', hash_img(mat3))
1211
- assert_equal(9216.0, comp3.area)
1206
+ assert_equal(21504.0, comp3.area)
1212
1207
  assert_equal(16, comp3.rect.x)
1213
1208
  assert_equal(16, comp3.rect.y)
1214
- assert_equal(96, comp3.rect.width)
1209
+ assert_equal(224, comp3.rect.width)
1215
1210
  assert_equal(96, comp3.rect.height)
1216
1211
  assert_cvscalar_equal(CvScalar.new(0, 0, 0, 0), comp3.value)
1217
1212
 
1218
- assert_equal('7833f4c85c77056db71e33ae8072a1b5', hash_img(mat4))
1219
- assert_equal(9216.0, comp4.area)
1213
+ assert_equal(21504.0, comp4.area)
1220
1214
  assert_equal(16, comp4.rect.x)
1221
1215
  assert_equal(16, comp4.rect.y)
1222
- assert_equal(96, comp4.rect.width)
1216
+ assert_equal(224, comp4.rect.width)
1223
1217
  assert_equal(96, comp4.rect.height)
1224
- assert_cvscalar_equal(CvScalar.new(220, 0, 0, 0), comp4.value)
1225
- assert_equal('b34b0269872fe3acde0e0c73e5cdd23b', hash_img(mask4))
1218
+ assert_cvscalar_equal(CvScalar.new(228, 0, 0, 0), comp4.value)
1226
1219
 
1227
- assert_equal('7833f4c85c77056db71e33ae8072a1b5', hash_img(mat5))
1228
- assert_equal('7833f4c85c77056db71e33ae8072a1b5', hash_img(mat05))
1229
- assert_equal(9216.0, comp5.area)
1220
+ assert_equal(21504.0, comp5.area)
1230
1221
  assert_equal(16, comp5.rect.x)
1231
1222
  assert_equal(16, comp5.rect.y)
1232
- assert_equal(96, comp5.rect.width)
1223
+ assert_equal(224, comp5.rect.width)
1233
1224
  assert_equal(96, comp5.rect.height)
1234
- assert_cvscalar_equal(CvScalar.new(220, 0, 0, 0), comp5.value)
1235
- assert_equal('b34b0269872fe3acde0e0c73e5cdd23b', hash_img(mask5))
1225
+ assert_cvscalar_equal(CvScalar.new(228, 0, 0, 0), comp5.value)
1236
1226
 
1237
1227
  assert_raise(TypeError) {
1238
1228
  mat0.flood_fill(DUMMY_OBJ, 0)
data/test/test_opencv.rb CHANGED
@@ -9,10 +9,15 @@ include OpenCV
9
9
  class TestOpenCV < OpenCVTestCase
10
10
  def test_constants
11
11
  # OpenCV version
12
- assert_equal('2.4.3', CV_VERSION)
12
+ assert_equal('2.4.6.1', CV_VERSION)
13
13
  assert_equal(2, CV_MAJOR_VERSION)
14
14
  assert_equal(4, CV_MINOR_VERSION)
15
- assert_equal(3, CV_SUBMINOR_VERSION)
15
+ assert_equal(6, CV_SUBMINOR_VERSION)
16
+
17
+ assert_equal(2, CV_VERSION_EPOCH)
18
+ assert_equal(4, CV_VERSION_MAJOR)
19
+ assert_equal(6, CV_VERSION_MINOR)
20
+ assert_equal(1, CV_VERSION_REVISION)
16
21
 
17
22
  # Depths
18
23
  assert_equal(0, CV_8U)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-opencv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - lsxi
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-05-04 00:00:00.000000000 Z
13
+ date: 2013-08-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rdoc
@@ -60,14 +60,14 @@ dependencies:
60
60
  requirements:
61
61
  - - ~>
62
62
  - !ruby/object:Gem::Version
63
- version: '3.6'
63
+ version: '3.7'
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - ~>
69
69
  - !ruby/object:Gem::Version
70
- version: '3.6'
70
+ version: '3.7'
71
71
  description: ruby-opencv is a wrapper of OpenCV for Ruby. It helps you to write computer
72
72
  vision programs (e.g. detecting faces from pictures) with Ruby.
73
73
  email:
@@ -329,12 +329,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
329
329
  version: '0'
330
330
  required_rubygems_version: !ruby/object:Gem::Requirement
331
331
  requirements:
332
- - - '>='
332
+ - - '>'
333
333
  - !ruby/object:Gem::Version
334
- version: '0'
334
+ version: 1.3.1
335
335
  requirements: []
336
336
  rubyforge_project: ruby-opencv
337
- rubygems_version: 2.0.3
337
+ rubygems_version: 2.0.6
338
338
  signing_key:
339
339
  specification_version: 4
340
340
  summary: OpenCV wrapper for Ruby