ruby-opencv 0.0.9-x86-mswin32 → 0.0.10.pre-x86-mswin32

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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/History.txt +5 -5
  4. data/README.md +1 -1
  5. data/examples/contours/contour_retrieval_modes.rb +139 -139
  6. data/examples/face_detect.rb +20 -20
  7. data/examples/houghcircle.rb +22 -22
  8. data/examples/paint.rb +70 -70
  9. data/examples/snake.rb +43 -43
  10. data/ext/opencv/cvcondensation.cpp +282 -282
  11. data/ext/opencv/cvcondensation.h +49 -49
  12. data/ext/opencv/cvmat.cpp +6 -6
  13. data/ext/opencv/cvmatnd.cpp +44 -44
  14. data/ext/opencv/cvmatnd.h +28 -28
  15. data/ext/opencv/cvmemstorage.cpp +68 -68
  16. data/ext/opencv/cvmemstorage.h +53 -53
  17. data/ext/opencv/cvmoments.h +75 -75
  18. data/ext/opencv/cvpoint.h +64 -64
  19. data/ext/opencv/cvpoint2d32f.h +63 -63
  20. data/ext/opencv/cvpoint3d32f.h +66 -66
  21. data/ext/opencv/cvrect.h +79 -79
  22. data/ext/opencv/cvscalar.h +71 -71
  23. data/ext/opencv/cvsize.h +65 -65
  24. data/ext/opencv/cvsize2d32f.h +64 -64
  25. data/ext/opencv/cvslice.h +61 -61
  26. data/ext/opencv/cvsparsemat.cpp +44 -44
  27. data/ext/opencv/cvsparsemat.h +28 -28
  28. data/ext/opencv/cvsurfparams.h +58 -58
  29. data/ext/opencv/cvsurfpoint.h +52 -52
  30. data/ext/opencv/cvtermcriteria.h +71 -71
  31. data/ext/opencv/cvtwopoints.cpp +116 -116
  32. data/ext/opencv/cvtwopoints.h +51 -51
  33. data/ext/opencv/cvvideowriter.h +43 -43
  34. data/ext/opencv/gui.cpp +68 -68
  35. data/ext/opencv/gui.h +30 -30
  36. data/ext/opencv/iplconvkernel.h +71 -71
  37. data/ext/opencv/mouseevent.cpp +181 -181
  38. data/ext/opencv/mouseevent.h +56 -56
  39. data/ext/opencv/opencv.cpp +5 -0
  40. data/ext/opencv/trackbar.h +69 -69
  41. data/ext/opencv/window.h +66 -66
  42. data/lib/opencv/version.rb +1 -1
  43. data/ruby-opencv.gemspec +7 -7
  44. data/test/test_cvmat_imageprocessing.rb +15 -25
  45. data/test/test_opencv.rb +7 -2
  46. metadata +7 -7
@@ -1,56 +1,56 @@
1
- /************************************************************
2
-
3
- mouseevent.h -
4
-
5
- $Author: lsxi $
6
-
7
- Copyright (C) 2005-2006 Masakazu Yonekura
8
-
9
- ************************************************************/
10
- #define __NAMESPACE_BEGIN_MOUSEEVENT namespace cMouseEvent {
11
- #define __NAMESPACE_END_MOUSEEVENT }
12
-
13
- #ifndef RUBY_OPENCV_GUI_MOUSEEVENT_H
14
- #define RUBY_OPENCV_GUI_MOUSEEVENT_H
15
-
16
- #include "opencv.h"
17
-
18
- __NAMESPACE_BEGIN_OPENCV
19
- __NAMESPACE_BEGIN_GUI
20
- __NAMESPACE_BEGIN_MOUSEEVENT
21
-
22
- typedef struct MouseEvent {
23
- CvPoint point;
24
- int event;
25
- int flags;
26
- } MouseEvent;
27
-
28
- VALUE rb_class();
29
-
30
- void define_ruby_class();
31
-
32
- VALUE rb_allocate(VALUE klass);
33
-
34
- VALUE rb_event(VALUE self);
35
-
36
- VALUE rb_left_button_q(VALUE self);
37
- VALUE rb_right_button_q(VALUE self);
38
- VALUE rb_middle_button_q(VALUE self);
39
- VALUE rb_ctrl_key_q(VALUE self);
40
- VALUE rb_shift_key_q(VALUE self);
41
- VALUE rb_alt_key_q(VALUE self);
42
-
43
- VALUE new_object(int event, int x, int y, int flag);
44
-
45
- inline MouseEvent *MOUSEEVENT(VALUE object) {
46
- MouseEvent *ptr;
47
- Data_Get_Struct(object, MouseEvent, ptr);
48
- return ptr;
49
- }
50
-
51
- __NAMESPACE_END_MOUSEEVENT
52
- __NAMESPACE_END_GUI
53
- __NAMESPACE_END_OPENCV
54
-
55
- #endif // RUBY_OPENCV_GUI_MOUSEEVENT_H
56
-
1
+ /************************************************************
2
+
3
+ mouseevent.h -
4
+
5
+ $Author: lsxi $
6
+
7
+ Copyright (C) 2005-2006 Masakazu Yonekura
8
+
9
+ ************************************************************/
10
+ #define __NAMESPACE_BEGIN_MOUSEEVENT namespace cMouseEvent {
11
+ #define __NAMESPACE_END_MOUSEEVENT }
12
+
13
+ #ifndef RUBY_OPENCV_GUI_MOUSEEVENT_H
14
+ #define RUBY_OPENCV_GUI_MOUSEEVENT_H
15
+
16
+ #include "opencv.h"
17
+
18
+ __NAMESPACE_BEGIN_OPENCV
19
+ __NAMESPACE_BEGIN_GUI
20
+ __NAMESPACE_BEGIN_MOUSEEVENT
21
+
22
+ typedef struct MouseEvent {
23
+ CvPoint point;
24
+ int event;
25
+ int flags;
26
+ } MouseEvent;
27
+
28
+ VALUE rb_class();
29
+
30
+ void define_ruby_class();
31
+
32
+ VALUE rb_allocate(VALUE klass);
33
+
34
+ VALUE rb_event(VALUE self);
35
+
36
+ VALUE rb_left_button_q(VALUE self);
37
+ VALUE rb_right_button_q(VALUE self);
38
+ VALUE rb_middle_button_q(VALUE self);
39
+ VALUE rb_ctrl_key_q(VALUE self);
40
+ VALUE rb_shift_key_q(VALUE self);
41
+ VALUE rb_alt_key_q(VALUE self);
42
+
43
+ VALUE new_object(int event, int x, int y, int flag);
44
+
45
+ inline MouseEvent *MOUSEEVENT(VALUE object) {
46
+ MouseEvent *ptr;
47
+ Data_Get_Struct(object, MouseEvent, ptr);
48
+ return ptr;
49
+ }
50
+
51
+ __NAMESPACE_END_MOUSEEVENT
52
+ __NAMESPACE_END_GUI
53
+ __NAMESPACE_END_OPENCV
54
+
55
+ #endif // RUBY_OPENCV_GUI_MOUSEEVENT_H
56
+
@@ -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,69 +1,69 @@
1
- /************************************************************
2
-
3
- trackbar.h -
4
-
5
- $Author: lsxi $
6
-
7
- Copyright (C) 2005 Masakazu Yonekura
8
-
9
- ************************************************************/
10
- #ifndef RUBY_OPENCV_GUI_H
11
- #include "gui.h"
12
- #endif
13
-
14
- #ifndef RUBY_OPENCV_GUI_TRACKBAR_H
15
- #define RUBY_OPENCV_GUI_TRACKBAR_H
16
-
17
- #include "opencv.h"
18
-
19
- #define __NAMESPACE_BEGIN_TRACKBAR namespace cTrackbar {
20
- #define __NAMESPACE_END_TRACKBAR }
21
-
22
- __NAMESPACE_BEGIN_OPENCV
23
- __NAMESPACE_BEGIN_GUI
24
-
25
- typedef struct Trackbar {
26
- char *name;
27
- int maxval;
28
- int val;
29
- VALUE block;
30
- } Trackbar;
31
-
32
- __NAMESPACE_BEGIN_TRACKBAR
33
-
34
- VALUE rb_class();
35
-
36
- void define_ruby_class();
37
- VALUE rb_allocate(VALUE klass);
38
-
39
- void trackbar_mark(void *ptr);
40
- void trackbar_free(void *ptr);
41
-
42
- VALUE rb_initialize(int argc, VALUE *argv, VALUE self);
43
- VALUE rb_name(VALUE self);
44
- VALUE rb_max(VALUE self);
45
- VALUE rb_value(VALUE self);
46
- VALUE rb_set_value(VALUE self, VALUE val);
47
-
48
- __NAMESPACE_END_TRACKBAR
49
-
50
- inline Trackbar*
51
- TRACKBAR(VALUE object) {
52
- Trackbar *ptr;
53
- Data_Get_Struct(object, Trackbar, ptr);
54
- return ptr;
55
- }
56
-
57
- inline Trackbar*
58
- TRACKBAR_WITH_CHECK(VALUE object) {
59
- if (!rb_obj_is_kind_of(object, cTrackbar::rb_class())) {
60
- raise_typeerror(object, cTrackbar::rb_class());
61
- }
62
- return TRACKBAR(object);
63
- }
64
-
65
- __NAMESPACE_END_GUI
66
- __NAMESPACE_END_OPENCV
67
-
68
- #endif // RUBY_OPENCV_GUI_TRACKBAR_H
69
-
1
+ /************************************************************
2
+
3
+ trackbar.h -
4
+
5
+ $Author: lsxi $
6
+
7
+ Copyright (C) 2005 Masakazu Yonekura
8
+
9
+ ************************************************************/
10
+ #ifndef RUBY_OPENCV_GUI_H
11
+ #include "gui.h"
12
+ #endif
13
+
14
+ #ifndef RUBY_OPENCV_GUI_TRACKBAR_H
15
+ #define RUBY_OPENCV_GUI_TRACKBAR_H
16
+
17
+ #include "opencv.h"
18
+
19
+ #define __NAMESPACE_BEGIN_TRACKBAR namespace cTrackbar {
20
+ #define __NAMESPACE_END_TRACKBAR }
21
+
22
+ __NAMESPACE_BEGIN_OPENCV
23
+ __NAMESPACE_BEGIN_GUI
24
+
25
+ typedef struct Trackbar {
26
+ char *name;
27
+ int maxval;
28
+ int val;
29
+ VALUE block;
30
+ } Trackbar;
31
+
32
+ __NAMESPACE_BEGIN_TRACKBAR
33
+
34
+ VALUE rb_class();
35
+
36
+ void define_ruby_class();
37
+ VALUE rb_allocate(VALUE klass);
38
+
39
+ void trackbar_mark(void *ptr);
40
+ void trackbar_free(void *ptr);
41
+
42
+ VALUE rb_initialize(int argc, VALUE *argv, VALUE self);
43
+ VALUE rb_name(VALUE self);
44
+ VALUE rb_max(VALUE self);
45
+ VALUE rb_value(VALUE self);
46
+ VALUE rb_set_value(VALUE self, VALUE val);
47
+
48
+ __NAMESPACE_END_TRACKBAR
49
+
50
+ inline Trackbar*
51
+ TRACKBAR(VALUE object) {
52
+ Trackbar *ptr;
53
+ Data_Get_Struct(object, Trackbar, ptr);
54
+ return ptr;
55
+ }
56
+
57
+ inline Trackbar*
58
+ TRACKBAR_WITH_CHECK(VALUE object) {
59
+ if (!rb_obj_is_kind_of(object, cTrackbar::rb_class())) {
60
+ raise_typeerror(object, cTrackbar::rb_class());
61
+ }
62
+ return TRACKBAR(object);
63
+ }
64
+
65
+ __NAMESPACE_END_GUI
66
+ __NAMESPACE_END_OPENCV
67
+
68
+ #endif // RUBY_OPENCV_GUI_TRACKBAR_H
69
+
@@ -1,66 +1,66 @@
1
- /************************************************************
2
-
3
- window.h -
4
-
5
- $Author: lsxi $
6
-
7
- Copyright (C) 2005-2006 Masakazu Yonekura
8
-
9
- ************************************************************/
10
- #ifndef RUBY_OPENCV_GUI_H
11
- #include "gui.h"
12
- #endif
13
-
14
- #ifndef RUBY_OPENCV_GUI_WINDOW_H
15
- #define RUBY_OPENCV_GUI_WINDOW_H
16
-
17
- #include "opencv.h"
18
- #define __NAMESPACE_BEGIN_WINDOW namespace cWindow {
19
- #define __NAMESPACE_END_WINDOW }
20
-
21
- __NAMESPACE_BEGIN_OPENCV
22
- __NAMESPACE_BEGIN_GUI
23
-
24
- typedef struct Window {
25
- VALUE name;
26
- VALUE image;
27
- VALUE trackbars;
28
- VALUE blocks;
29
- } Window;
30
-
31
- __NAMESPACE_BEGIN_WINDOW
32
-
33
- void define_ruby_class();
34
-
35
- VALUE rb_allocate(VALUE klass);
36
-
37
- void window_mark(void *ptr);
38
- void window_free(void *ptr);
39
- VALUE rb_alive_q(VALUE self);
40
- VALUE rb_initialize(int argc, VALUE *argv, VALUE self);
41
- VALUE rb_destroy(VALUE self);
42
- VALUE rb_destroy_all(VALUE klass);
43
- VALUE rb_resize(int argc, VALUE *argv, VALUE self);
44
- VALUE rb_move(int argc, VALUE *argv, VALUE self);
45
- VALUE rb_show_image(VALUE self, VALUE img);
46
- VALUE rb_set_trackbar(int argc, VALUE *argv, VALUE self);
47
- VALUE rb_set_mouse_callback(int argc, VALUE* argv, VALUE self);
48
-
49
- inline Window*
50
- WINDOW(VALUE object) {
51
- Window *ptr;
52
- Data_Get_Struct(object, Window, ptr);
53
- return ptr;
54
- }
55
-
56
- inline const char*
57
- GET_WINDOW_NAME(VALUE object) {
58
- return StringValueCStr(WINDOW(object)->name);
59
- }
60
-
61
- __NAMESPACE_END_WINDOW
62
- __NAMESPACE_END_GUI
63
- __NAMESPACE_END_OPENCV
64
-
65
- #endif // RUBY_OPENCV_GUI_WINDOW_H
66
-
1
+ /************************************************************
2
+
3
+ window.h -
4
+
5
+ $Author: lsxi $
6
+
7
+ Copyright (C) 2005-2006 Masakazu Yonekura
8
+
9
+ ************************************************************/
10
+ #ifndef RUBY_OPENCV_GUI_H
11
+ #include "gui.h"
12
+ #endif
13
+
14
+ #ifndef RUBY_OPENCV_GUI_WINDOW_H
15
+ #define RUBY_OPENCV_GUI_WINDOW_H
16
+
17
+ #include "opencv.h"
18
+ #define __NAMESPACE_BEGIN_WINDOW namespace cWindow {
19
+ #define __NAMESPACE_END_WINDOW }
20
+
21
+ __NAMESPACE_BEGIN_OPENCV
22
+ __NAMESPACE_BEGIN_GUI
23
+
24
+ typedef struct Window {
25
+ VALUE name;
26
+ VALUE image;
27
+ VALUE trackbars;
28
+ VALUE blocks;
29
+ } Window;
30
+
31
+ __NAMESPACE_BEGIN_WINDOW
32
+
33
+ void define_ruby_class();
34
+
35
+ VALUE rb_allocate(VALUE klass);
36
+
37
+ void window_mark(void *ptr);
38
+ void window_free(void *ptr);
39
+ VALUE rb_alive_q(VALUE self);
40
+ VALUE rb_initialize(int argc, VALUE *argv, VALUE self);
41
+ VALUE rb_destroy(VALUE self);
42
+ VALUE rb_destroy_all(VALUE klass);
43
+ VALUE rb_resize(int argc, VALUE *argv, VALUE self);
44
+ VALUE rb_move(int argc, VALUE *argv, VALUE self);
45
+ VALUE rb_show_image(VALUE self, VALUE img);
46
+ VALUE rb_set_trackbar(int argc, VALUE *argv, VALUE self);
47
+ VALUE rb_set_mouse_callback(int argc, VALUE* argv, VALUE self);
48
+
49
+ inline Window*
50
+ WINDOW(VALUE object) {
51
+ Window *ptr;
52
+ Data_Get_Struct(object, Window, ptr);
53
+ return ptr;
54
+ }
55
+
56
+ inline const char*
57
+ GET_WINDOW_NAME(VALUE object) {
58
+ return StringValueCStr(WINDOW(object)->name);
59
+ }
60
+
61
+ __NAMESPACE_END_WINDOW
62
+ __NAMESPACE_END_GUI
63
+ __NAMESPACE_END_OPENCV
64
+
65
+ #endif // RUBY_OPENCV_GUI_WINDOW_H
66
+
@@ -1,3 +1,3 @@
1
1
  module OpenCV
2
- VERSION = '0.0.9'
2
+ VERSION = '0.0.10.pre'
3
3
  end
@@ -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)