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

Sign up to get free protection for your applications and to get access to all the features.
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,61 +1,61 @@
1
- /************************************************************
2
-
3
- cvslice.h -
4
-
5
- $Author: lsxi $
6
-
7
- Copyright (C) 2005-2006 Masakazu Yonekura
8
-
9
- ************************************************************/
10
- #ifndef RUBY_OPENCV_CVSLICE_H
11
- #define RUBY_OPENCV_CVSLICE_H
12
-
13
- #include "opencv.h"
14
-
15
- #define __NAMESPACE_BEGIN_CVSLICE namespace cCvSlice {
16
- #define __NAMESPACE_END_CVSLICE }
17
-
18
- __NAMESPACE_BEGIN_OPENCV
19
- __NAMESPACE_BEGIN_CVSLICE
20
-
21
- VALUE rb_class();
22
-
23
- void define_ruby_class();
24
-
25
- VALUE rb_allocate(VALUE klass);
26
- VALUE rb_initialize(VALUE self, VALUE start, VALUE end);
27
- VALUE rb_start_index_aref(VALUE self);
28
- VALUE rb_end_index_aref(VALUE self);
29
- VALUE rb_start_index_aset(VALUE self, VALUE index);
30
- VALUE rb_end_index_aset(VALUE self, VALUE index);
31
-
32
- __NAMESPACE_END_CVSLICE
33
-
34
- inline CvSlice*
35
- CVSLICE(VALUE object)
36
- {
37
- CvSlice *ptr;
38
- Data_Get_Struct(object, CvSlice, ptr);
39
- return ptr;
40
- }
41
-
42
- inline CvSlice
43
- VALUE_TO_CVSLICE(VALUE object)
44
- {
45
- if (rb_obj_is_kind_of(object, cCvSlice::rb_class())) {
46
- CvSlice* ptr = CVSLICE(object);
47
- return *ptr;
48
- }
49
- else if (rb_obj_is_kind_of(object, rb_cRange)) {
50
- return cvSlice(NUM2INT(rb_funcall(object, rb_intern("begin"), 0)),
51
- rb_funcall(object, rb_intern("exclude_end?"), 0) ? NUM2INT(rb_funcall(object, rb_intern("end"), 0)) : NUM2INT(rb_funcall(object, rb_intern("end"), 0)) - 1);
52
- }
53
- else {
54
- raise_compatible_typeerror(object, cCvSlice::rb_class());
55
- }
56
- throw "Should never reach here";
57
- }
58
-
59
- __NAMESPACE_END_OPENCV
60
-
61
- #endif // RUBY_OPENCV_CVSLICE_H
1
+ /************************************************************
2
+
3
+ cvslice.h -
4
+
5
+ $Author: lsxi $
6
+
7
+ Copyright (C) 2005-2006 Masakazu Yonekura
8
+
9
+ ************************************************************/
10
+ #ifndef RUBY_OPENCV_CVSLICE_H
11
+ #define RUBY_OPENCV_CVSLICE_H
12
+
13
+ #include "opencv.h"
14
+
15
+ #define __NAMESPACE_BEGIN_CVSLICE namespace cCvSlice {
16
+ #define __NAMESPACE_END_CVSLICE }
17
+
18
+ __NAMESPACE_BEGIN_OPENCV
19
+ __NAMESPACE_BEGIN_CVSLICE
20
+
21
+ VALUE rb_class();
22
+
23
+ void define_ruby_class();
24
+
25
+ VALUE rb_allocate(VALUE klass);
26
+ VALUE rb_initialize(VALUE self, VALUE start, VALUE end);
27
+ VALUE rb_start_index_aref(VALUE self);
28
+ VALUE rb_end_index_aref(VALUE self);
29
+ VALUE rb_start_index_aset(VALUE self, VALUE index);
30
+ VALUE rb_end_index_aset(VALUE self, VALUE index);
31
+
32
+ __NAMESPACE_END_CVSLICE
33
+
34
+ inline CvSlice*
35
+ CVSLICE(VALUE object)
36
+ {
37
+ CvSlice *ptr;
38
+ Data_Get_Struct(object, CvSlice, ptr);
39
+ return ptr;
40
+ }
41
+
42
+ inline CvSlice
43
+ VALUE_TO_CVSLICE(VALUE object)
44
+ {
45
+ if (rb_obj_is_kind_of(object, cCvSlice::rb_class())) {
46
+ CvSlice* ptr = CVSLICE(object);
47
+ return *ptr;
48
+ }
49
+ else if (rb_obj_is_kind_of(object, rb_cRange)) {
50
+ return cvSlice(NUM2INT(rb_funcall(object, rb_intern("begin"), 0)),
51
+ rb_funcall(object, rb_intern("exclude_end?"), 0) ? NUM2INT(rb_funcall(object, rb_intern("end"), 0)) : NUM2INT(rb_funcall(object, rb_intern("end"), 0)) - 1);
52
+ }
53
+ else {
54
+ raise_compatible_typeerror(object, cCvSlice::rb_class());
55
+ }
56
+ throw "Should never reach here";
57
+ }
58
+
59
+ __NAMESPACE_END_OPENCV
60
+
61
+ #endif // RUBY_OPENCV_CVSLICE_H
@@ -1,44 +1,44 @@
1
- /***********************************************************
2
-
3
- cvsparse.cpp -
4
-
5
- $Author: lsxi $
6
-
7
- Copyright (C) 2007 Masakazu Yonekura
8
-
9
- ************************************************************/
10
- #include "cvsparsemat.h"
11
- /*
12
- * Document-class: OpenCV::CvSparseMat
13
- *
14
- */
15
- __NAMESPACE_BEGIN_OPENCV
16
- __NAMESPACE_BEGIN_CVSPARSEMAT
17
-
18
- VALUE rb_klass;
19
-
20
- VALUE
21
- rb_class()
22
- {
23
- return rb_klass;
24
- }
25
-
26
- void
27
- define_ruby_class()
28
- {
29
- if (rb_klass)
30
- return;
31
- /*
32
- * opencv = rb_define_module("OpenCV");
33
- * cvmat = rb_define_class_under(opencv, "CvMat", rb_cObject);
34
- *
35
- * note: this comment is used by rdoc.
36
- */
37
- VALUE opencv = rb_module_opencv(), cvmat = cCvMat::rb_class();
38
-
39
- rb_klass = rb_define_class_under(opencv, "CvSparseMat", cvmat);
40
- }
41
-
42
- __NAMESPACE_END_CVSPARSEMAT
43
- __NAMESPACE_END_OPENCV
44
-
1
+ /***********************************************************
2
+
3
+ cvsparse.cpp -
4
+
5
+ $Author: lsxi $
6
+
7
+ Copyright (C) 2007 Masakazu Yonekura
8
+
9
+ ************************************************************/
10
+ #include "cvsparsemat.h"
11
+ /*
12
+ * Document-class: OpenCV::CvSparseMat
13
+ *
14
+ */
15
+ __NAMESPACE_BEGIN_OPENCV
16
+ __NAMESPACE_BEGIN_CVSPARSEMAT
17
+
18
+ VALUE rb_klass;
19
+
20
+ VALUE
21
+ rb_class()
22
+ {
23
+ return rb_klass;
24
+ }
25
+
26
+ void
27
+ define_ruby_class()
28
+ {
29
+ if (rb_klass)
30
+ return;
31
+ /*
32
+ * opencv = rb_define_module("OpenCV");
33
+ * cvmat = rb_define_class_under(opencv, "CvMat", rb_cObject);
34
+ *
35
+ * note: this comment is used by rdoc.
36
+ */
37
+ VALUE opencv = rb_module_opencv(), cvmat = cCvMat::rb_class();
38
+
39
+ rb_klass = rb_define_class_under(opencv, "CvSparseMat", cvmat);
40
+ }
41
+
42
+ __NAMESPACE_END_CVSPARSEMAT
43
+ __NAMESPACE_END_OPENCV
44
+
@@ -1,28 +1,28 @@
1
- /************************************************************
2
-
3
- cvsparsemat.h -
4
-
5
- $Author: lsxi $
6
-
7
- Copyright (C) 2005-2006 Masakazu Yonekura
8
-
9
- ************************************************************/
10
- #ifndef RUBY_OPENCV_CVSPARSEMAT_H
11
- #define RUBY_OPENCV_CVSPARSEMAT_H
12
-
13
- #include "opencv.h"
14
-
15
- #define __NAMESPACE_BEGIN_CVSPARSEMAT namespace cCvSparseMat {
16
- #define __NAMESPACE_END_CVSPARSEMAT }
17
-
18
- __NAMESPACE_BEGIN_OPENCV
19
- __NAMESPACE_BEGIN_CVSPARSEMAT
20
-
21
- VALUE rb_class();
22
-
23
- void define_ruby_class();
24
-
25
- __NAMESPACE_END_CVSPARSEMAT
26
- __NAMESPACE_END_OPENCV
27
-
28
- #endif // RUBY_OPENCV_CVSPARSEMAT_H
1
+ /************************************************************
2
+
3
+ cvsparsemat.h -
4
+
5
+ $Author: lsxi $
6
+
7
+ Copyright (C) 2005-2006 Masakazu Yonekura
8
+
9
+ ************************************************************/
10
+ #ifndef RUBY_OPENCV_CVSPARSEMAT_H
11
+ #define RUBY_OPENCV_CVSPARSEMAT_H
12
+
13
+ #include "opencv.h"
14
+
15
+ #define __NAMESPACE_BEGIN_CVSPARSEMAT namespace cCvSparseMat {
16
+ #define __NAMESPACE_END_CVSPARSEMAT }
17
+
18
+ __NAMESPACE_BEGIN_OPENCV
19
+ __NAMESPACE_BEGIN_CVSPARSEMAT
20
+
21
+ VALUE rb_class();
22
+
23
+ void define_ruby_class();
24
+
25
+ __NAMESPACE_END_CVSPARSEMAT
26
+ __NAMESPACE_END_OPENCV
27
+
28
+ #endif // RUBY_OPENCV_CVSPARSEMAT_H
@@ -1,58 +1,58 @@
1
- /************************************************************
2
-
3
- cvsurfparams.h -
4
-
5
- $Author: ser1zw $
6
-
7
- Copyright (C) 2011 ser1zw
8
-
9
- ************************************************************/
10
- #ifndef RUBY_OPENCV_CVSURFPARAMS_H
11
- #define RUBY_OPENCV_CVSURFPARAMS_H
12
-
13
- #include "opencv.h"
14
-
15
- #define __NAMESPACE_BEGIN_CVSURFPARAMS namespace cCvSURFParams {
16
- #define __NAMESPACE_END_CVSURFPARAMS }
17
-
18
- __NAMESPACE_BEGIN_OPENCV
19
- __NAMESPACE_BEGIN_CVSURFPARAMS
20
-
21
- VALUE rb_class();
22
-
23
- void define_ruby_class();
24
-
25
- VALUE rb_allocate(VALUE klass);
26
- VALUE rb_initialize(int argc, VALUE *argv, VALUE self);
27
- VALUE rb_get_hessian_threshold(VALUE self);
28
- VALUE rb_set_hessian_threshold(VALUE self, VALUE value);
29
- VALUE rb_get_extended(VALUE self);
30
- VALUE rb_set_extended(VALUE self, VALUE value);
31
- VALUE rb_get_n_octaves(VALUE self);
32
- VALUE rb_set_n_octaves(VALUE self, VALUE value);
33
- VALUE rb_get_n_octave_layers(VALUE self);
34
- VALUE rb_set_n_octave_layers(VALUE self, VALUE value);
35
-
36
- VALUE new_object(CvSURFPoint *cvsurfparams);
37
-
38
- __NAMESPACE_END_CVSURFPARAMS
39
-
40
- inline CvSURFParams*
41
- CVSURFPARAMS(VALUE object)
42
- {
43
- CvSURFParams* ptr;
44
- Data_Get_Struct(object, CvSURFParams, ptr);
45
- return ptr;
46
- }
47
-
48
- inline CvSURFParams*
49
- CVSURFPARAMS_WITH_CHECK(VALUE object)
50
- {
51
- if (!rb_obj_is_kind_of(object, cCvSURFParams::rb_class()))
52
- raise_typeerror(object, cCvSURFParams::rb_class());
53
- return CVSURFPARAMS(object);
54
- }
55
-
56
- __NAMESPACE_END_OPENCV
57
-
58
- #endif // RUBY_OPENCV_CVSURFPARAMS_H
1
+ /************************************************************
2
+
3
+ cvsurfparams.h -
4
+
5
+ $Author: ser1zw $
6
+
7
+ Copyright (C) 2011 ser1zw
8
+
9
+ ************************************************************/
10
+ #ifndef RUBY_OPENCV_CVSURFPARAMS_H
11
+ #define RUBY_OPENCV_CVSURFPARAMS_H
12
+
13
+ #include "opencv.h"
14
+
15
+ #define __NAMESPACE_BEGIN_CVSURFPARAMS namespace cCvSURFParams {
16
+ #define __NAMESPACE_END_CVSURFPARAMS }
17
+
18
+ __NAMESPACE_BEGIN_OPENCV
19
+ __NAMESPACE_BEGIN_CVSURFPARAMS
20
+
21
+ VALUE rb_class();
22
+
23
+ void define_ruby_class();
24
+
25
+ VALUE rb_allocate(VALUE klass);
26
+ VALUE rb_initialize(int argc, VALUE *argv, VALUE self);
27
+ VALUE rb_get_hessian_threshold(VALUE self);
28
+ VALUE rb_set_hessian_threshold(VALUE self, VALUE value);
29
+ VALUE rb_get_extended(VALUE self);
30
+ VALUE rb_set_extended(VALUE self, VALUE value);
31
+ VALUE rb_get_n_octaves(VALUE self);
32
+ VALUE rb_set_n_octaves(VALUE self, VALUE value);
33
+ VALUE rb_get_n_octave_layers(VALUE self);
34
+ VALUE rb_set_n_octave_layers(VALUE self, VALUE value);
35
+
36
+ VALUE new_object(CvSURFPoint *cvsurfparams);
37
+
38
+ __NAMESPACE_END_CVSURFPARAMS
39
+
40
+ inline CvSURFParams*
41
+ CVSURFPARAMS(VALUE object)
42
+ {
43
+ CvSURFParams* ptr;
44
+ Data_Get_Struct(object, CvSURFParams, ptr);
45
+ return ptr;
46
+ }
47
+
48
+ inline CvSURFParams*
49
+ CVSURFPARAMS_WITH_CHECK(VALUE object)
50
+ {
51
+ if (!rb_obj_is_kind_of(object, cCvSURFParams::rb_class()))
52
+ raise_typeerror(object, cCvSURFParams::rb_class());
53
+ return CVSURFPARAMS(object);
54
+ }
55
+
56
+ __NAMESPACE_END_OPENCV
57
+
58
+ #endif // RUBY_OPENCV_CVSURFPARAMS_H
@@ -1,52 +1,52 @@
1
- /************************************************************
2
-
3
- cvsurfpoint.h -
4
-
5
- $Author: ser1zw $
6
-
7
- Copyright (C) 2011 ser1zw
8
-
9
- ************************************************************/
10
- #ifndef RUBY_OPENCV_CVSURFPOINT_H
11
- #define RUBY_OPENCV_CVSURFPOINT_H
12
-
13
- #include "opencv.h"
14
-
15
- #define __NAMESPACE_BEGIN_CVSURFPOINT namespace cCvSURFPoint {
16
- #define __NAMESPACE_END_CVSURFPOINT }
17
-
18
- __NAMESPACE_BEGIN_OPENCV
19
- __NAMESPACE_BEGIN_CVSURFPOINT
20
-
21
- VALUE rb_class();
22
-
23
- void define_ruby_class();
24
-
25
- VALUE rb_allocate(VALUE klass);
26
- VALUE rb_initialize(VALUE self, VALUE pt, VALUE laplacian, VALUE size, VALUE dir, VALUE hessian);
27
- VALUE rb_get_pt(VALUE self);
28
- VALUE rb_set_pt(VALUE self, VALUE value);
29
- VALUE rb_get_laplacian(VALUE self);
30
- VALUE rb_set_laplacian(VALUE self, VALUE value);
31
- VALUE rb_get_size(VALUE self);
32
- VALUE rb_set_size(VALUE self, VALUE value);
33
- VALUE rb_get_dir(VALUE self);
34
- VALUE rb_set_dir(VALUE self, VALUE value);
35
- VALUE rb_get_hessian(VALUE self);
36
- VALUE rb_set_hessian(VALUE self, VALUE value);
37
-
38
- VALUE new_object(CvSURFPoint *cvsurfpoint);
39
-
40
- __NAMESPACE_END_CVSURFPOINT
41
-
42
- inline CvSURFPoint*
43
- CVSURFPOINT(VALUE object)
44
- {
45
- CvSURFPoint* ptr;
46
- Data_Get_Struct(object, CvSURFPoint, ptr);
47
- return ptr;
48
- }
49
-
50
- __NAMESPACE_END_OPENCV
51
-
52
- #endif // RUBY_OPENCV_CVSURFPOINT_H
1
+ /************************************************************
2
+
3
+ cvsurfpoint.h -
4
+
5
+ $Author: ser1zw $
6
+
7
+ Copyright (C) 2011 ser1zw
8
+
9
+ ************************************************************/
10
+ #ifndef RUBY_OPENCV_CVSURFPOINT_H
11
+ #define RUBY_OPENCV_CVSURFPOINT_H
12
+
13
+ #include "opencv.h"
14
+
15
+ #define __NAMESPACE_BEGIN_CVSURFPOINT namespace cCvSURFPoint {
16
+ #define __NAMESPACE_END_CVSURFPOINT }
17
+
18
+ __NAMESPACE_BEGIN_OPENCV
19
+ __NAMESPACE_BEGIN_CVSURFPOINT
20
+
21
+ VALUE rb_class();
22
+
23
+ void define_ruby_class();
24
+
25
+ VALUE rb_allocate(VALUE klass);
26
+ VALUE rb_initialize(VALUE self, VALUE pt, VALUE laplacian, VALUE size, VALUE dir, VALUE hessian);
27
+ VALUE rb_get_pt(VALUE self);
28
+ VALUE rb_set_pt(VALUE self, VALUE value);
29
+ VALUE rb_get_laplacian(VALUE self);
30
+ VALUE rb_set_laplacian(VALUE self, VALUE value);
31
+ VALUE rb_get_size(VALUE self);
32
+ VALUE rb_set_size(VALUE self, VALUE value);
33
+ VALUE rb_get_dir(VALUE self);
34
+ VALUE rb_set_dir(VALUE self, VALUE value);
35
+ VALUE rb_get_hessian(VALUE self);
36
+ VALUE rb_set_hessian(VALUE self, VALUE value);
37
+
38
+ VALUE new_object(CvSURFPoint *cvsurfpoint);
39
+
40
+ __NAMESPACE_END_CVSURFPOINT
41
+
42
+ inline CvSURFPoint*
43
+ CVSURFPOINT(VALUE object)
44
+ {
45
+ CvSURFPoint* ptr;
46
+ Data_Get_Struct(object, CvSURFPoint, ptr);
47
+ return ptr;
48
+ }
49
+
50
+ __NAMESPACE_END_OPENCV
51
+
52
+ #endif // RUBY_OPENCV_CVSURFPOINT_H