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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/History.txt +5 -5
- data/README.md +1 -1
- data/examples/contours/contour_retrieval_modes.rb +139 -139
- data/examples/face_detect.rb +20 -20
- data/examples/houghcircle.rb +22 -22
- data/examples/paint.rb +70 -70
- data/examples/snake.rb +43 -43
- data/ext/opencv/cvcondensation.cpp +282 -282
- data/ext/opencv/cvcondensation.h +49 -49
- data/ext/opencv/cvmat.cpp +6 -6
- data/ext/opencv/cvmatnd.cpp +44 -44
- data/ext/opencv/cvmatnd.h +28 -28
- data/ext/opencv/cvmemstorage.cpp +68 -68
- data/ext/opencv/cvmemstorage.h +53 -53
- data/ext/opencv/cvmoments.h +75 -75
- data/ext/opencv/cvpoint.h +64 -64
- data/ext/opencv/cvpoint2d32f.h +63 -63
- data/ext/opencv/cvpoint3d32f.h +66 -66
- data/ext/opencv/cvrect.h +79 -79
- data/ext/opencv/cvscalar.h +71 -71
- data/ext/opencv/cvsize.h +65 -65
- data/ext/opencv/cvsize2d32f.h +64 -64
- data/ext/opencv/cvslice.h +61 -61
- data/ext/opencv/cvsparsemat.cpp +44 -44
- data/ext/opencv/cvsparsemat.h +28 -28
- data/ext/opencv/cvsurfparams.h +58 -58
- data/ext/opencv/cvsurfpoint.h +52 -52
- data/ext/opencv/cvtermcriteria.h +71 -71
- data/ext/opencv/cvtwopoints.cpp +116 -116
- data/ext/opencv/cvtwopoints.h +51 -51
- data/ext/opencv/cvvideowriter.h +43 -43
- data/ext/opencv/gui.cpp +68 -68
- data/ext/opencv/gui.h +30 -30
- data/ext/opencv/iplconvkernel.h +71 -71
- data/ext/opencv/mouseevent.cpp +181 -181
- data/ext/opencv/mouseevent.h +56 -56
- data/ext/opencv/opencv.cpp +5 -0
- data/ext/opencv/trackbar.h +69 -69
- data/ext/opencv/window.h +66 -66
- data/lib/opencv/version.rb +1 -1
- data/ruby-opencv.gemspec +7 -7
- data/test/test_cvmat_imageprocessing.rb +15 -25
- data/test/test_opencv.rb +7 -2
- metadata +7 -7
data/ext/opencv/cvmoments.h
CHANGED
@@ -1,75 +1,75 @@
|
|
1
|
-
/************************************************************
|
2
|
-
|
3
|
-
cvmoments.h -
|
4
|
-
|
5
|
-
$Author: lsxi $
|
6
|
-
|
7
|
-
Copyright (C) 2007 Masakazu Yonekura
|
8
|
-
|
9
|
-
************************************************************/
|
10
|
-
#ifndef RUBY_OPENCV_CVMOMENTS_H
|
11
|
-
#define RUBY_OPENCV_CVMOMENTS_H
|
12
|
-
|
13
|
-
#include "opencv.h"
|
14
|
-
|
15
|
-
#define __NAMESPACE_BEGIN_CVMOMENTS namespace cCvMoments {
|
16
|
-
#define __NAMESPACE_END_CVMOMENTS }
|
17
|
-
|
18
|
-
__NAMESPACE_BEGIN_OPENCV
|
19
|
-
__NAMESPACE_BEGIN_CVMOMENTS
|
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_spatial(VALUE self, VALUE x_order, VALUE y_order);
|
28
|
-
VALUE rb_central(VALUE self, VALUE x_order, VALUE y_order);
|
29
|
-
VALUE rb_normalized_central(VALUE self, VALUE x_order, VALUE y_order);
|
30
|
-
VALUE rb_hu(VALUE self);
|
31
|
-
VALUE rb_gravity_center(VALUE self);
|
32
|
-
VALUE rb_angle(VALUE self);
|
33
|
-
|
34
|
-
VALUE rb_m00(VALUE self);
|
35
|
-
VALUE rb_m10(VALUE self);
|
36
|
-
VALUE rb_m01(VALUE self);
|
37
|
-
VALUE rb_m20(VALUE self);
|
38
|
-
VALUE rb_m11(VALUE self);
|
39
|
-
VALUE rb_m02(VALUE self);
|
40
|
-
VALUE rb_m30(VALUE self);
|
41
|
-
VALUE rb_m21(VALUE self);
|
42
|
-
VALUE rb_m12(VALUE self);
|
43
|
-
VALUE rb_m03(VALUE self);
|
44
|
-
VALUE rb_mu20(VALUE self);
|
45
|
-
VALUE rb_mu11(VALUE self);
|
46
|
-
VALUE rb_mu02(VALUE self);
|
47
|
-
VALUE rb_mu30(VALUE self);
|
48
|
-
VALUE rb_mu21(VALUE self);
|
49
|
-
VALUE rb_mu12(VALUE self);
|
50
|
-
VALUE rb_mu03(VALUE self);
|
51
|
-
VALUE rb_inv_sqrt_m00(VALUE self);
|
52
|
-
|
53
|
-
VALUE new_object(CvArr *arr, int is_binary);
|
54
|
-
|
55
|
-
__NAMESPACE_END_CVMOMENTS
|
56
|
-
|
57
|
-
inline CvMoments*
|
58
|
-
CVMOMENTS(VALUE object)
|
59
|
-
{
|
60
|
-
CvMoments *ptr;
|
61
|
-
Data_Get_Struct(object, CvMoments, ptr);
|
62
|
-
return ptr;
|
63
|
-
}
|
64
|
-
|
65
|
-
inline CvMoments*
|
66
|
-
CVMOMENTS_WITH_CHECK(VALUE object)
|
67
|
-
{
|
68
|
-
if (!rb_obj_is_kind_of(object, cCvMoments::rb_class()))
|
69
|
-
raise_typeerror(object, cCvMoments::rb_class());
|
70
|
-
return CVMOMENTS(object);
|
71
|
-
}
|
72
|
-
|
73
|
-
__NAMESPACE_END_OPENCV
|
74
|
-
|
75
|
-
#endif // RUBY_OPENCV_CVMOMENTS_H
|
1
|
+
/************************************************************
|
2
|
+
|
3
|
+
cvmoments.h -
|
4
|
+
|
5
|
+
$Author: lsxi $
|
6
|
+
|
7
|
+
Copyright (C) 2007 Masakazu Yonekura
|
8
|
+
|
9
|
+
************************************************************/
|
10
|
+
#ifndef RUBY_OPENCV_CVMOMENTS_H
|
11
|
+
#define RUBY_OPENCV_CVMOMENTS_H
|
12
|
+
|
13
|
+
#include "opencv.h"
|
14
|
+
|
15
|
+
#define __NAMESPACE_BEGIN_CVMOMENTS namespace cCvMoments {
|
16
|
+
#define __NAMESPACE_END_CVMOMENTS }
|
17
|
+
|
18
|
+
__NAMESPACE_BEGIN_OPENCV
|
19
|
+
__NAMESPACE_BEGIN_CVMOMENTS
|
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_spatial(VALUE self, VALUE x_order, VALUE y_order);
|
28
|
+
VALUE rb_central(VALUE self, VALUE x_order, VALUE y_order);
|
29
|
+
VALUE rb_normalized_central(VALUE self, VALUE x_order, VALUE y_order);
|
30
|
+
VALUE rb_hu(VALUE self);
|
31
|
+
VALUE rb_gravity_center(VALUE self);
|
32
|
+
VALUE rb_angle(VALUE self);
|
33
|
+
|
34
|
+
VALUE rb_m00(VALUE self);
|
35
|
+
VALUE rb_m10(VALUE self);
|
36
|
+
VALUE rb_m01(VALUE self);
|
37
|
+
VALUE rb_m20(VALUE self);
|
38
|
+
VALUE rb_m11(VALUE self);
|
39
|
+
VALUE rb_m02(VALUE self);
|
40
|
+
VALUE rb_m30(VALUE self);
|
41
|
+
VALUE rb_m21(VALUE self);
|
42
|
+
VALUE rb_m12(VALUE self);
|
43
|
+
VALUE rb_m03(VALUE self);
|
44
|
+
VALUE rb_mu20(VALUE self);
|
45
|
+
VALUE rb_mu11(VALUE self);
|
46
|
+
VALUE rb_mu02(VALUE self);
|
47
|
+
VALUE rb_mu30(VALUE self);
|
48
|
+
VALUE rb_mu21(VALUE self);
|
49
|
+
VALUE rb_mu12(VALUE self);
|
50
|
+
VALUE rb_mu03(VALUE self);
|
51
|
+
VALUE rb_inv_sqrt_m00(VALUE self);
|
52
|
+
|
53
|
+
VALUE new_object(CvArr *arr, int is_binary);
|
54
|
+
|
55
|
+
__NAMESPACE_END_CVMOMENTS
|
56
|
+
|
57
|
+
inline CvMoments*
|
58
|
+
CVMOMENTS(VALUE object)
|
59
|
+
{
|
60
|
+
CvMoments *ptr;
|
61
|
+
Data_Get_Struct(object, CvMoments, ptr);
|
62
|
+
return ptr;
|
63
|
+
}
|
64
|
+
|
65
|
+
inline CvMoments*
|
66
|
+
CVMOMENTS_WITH_CHECK(VALUE object)
|
67
|
+
{
|
68
|
+
if (!rb_obj_is_kind_of(object, cCvMoments::rb_class()))
|
69
|
+
raise_typeerror(object, cCvMoments::rb_class());
|
70
|
+
return CVMOMENTS(object);
|
71
|
+
}
|
72
|
+
|
73
|
+
__NAMESPACE_END_OPENCV
|
74
|
+
|
75
|
+
#endif // RUBY_OPENCV_CVMOMENTS_H
|
data/ext/opencv/cvpoint.h
CHANGED
@@ -1,64 +1,64 @@
|
|
1
|
-
/************************************************************
|
2
|
-
|
3
|
-
cvpoint.h -
|
4
|
-
|
5
|
-
$Author: lsxi $
|
6
|
-
|
7
|
-
Copyright (C) 2005-2006 Masakazu Yonekura
|
8
|
-
|
9
|
-
************************************************************/
|
10
|
-
#ifndef RUBY_OPENCV_CVPOINT_H
|
11
|
-
#define RUBY_OPENCV_CVPOINT_H
|
12
|
-
|
13
|
-
#include "opencv.h"
|
14
|
-
|
15
|
-
#define __NAMESPACE_BEGIN_CVPOINT namespace cCvPoint {
|
16
|
-
#define __NAMESPACE_END_CVPOINT }
|
17
|
-
|
18
|
-
__NAMESPACE_BEGIN_OPENCV
|
19
|
-
__NAMESPACE_BEGIN_CVPOINT
|
20
|
-
|
21
|
-
VALUE rb_class();
|
22
|
-
|
23
|
-
void define_ruby_class();
|
24
|
-
|
25
|
-
VALUE rb_compatible_q(VALUE klass, VALUE object);
|
26
|
-
|
27
|
-
VALUE rb_allocate(VALUE klass);
|
28
|
-
VALUE rb_initialize(int argc, VALUE *argv, VALUE self);
|
29
|
-
VALUE rb_x(VALUE self);
|
30
|
-
VALUE rb_set_x(VALUE self, VALUE x);
|
31
|
-
VALUE rb_y(VALUE self);
|
32
|
-
VALUE rb_set_y(VALUE self, VALUE y);
|
33
|
-
|
34
|
-
VALUE rb_to_s(VALUE self);
|
35
|
-
VALUE rb_to_ary(VALUE self);
|
36
|
-
|
37
|
-
VALUE new_object();
|
38
|
-
VALUE new_object(CvPoint point);
|
39
|
-
|
40
|
-
__NAMESPACE_END_CVPOINT
|
41
|
-
|
42
|
-
inline CvPoint*
|
43
|
-
CVPOINT(VALUE object){
|
44
|
-
CvPoint *ptr;
|
45
|
-
Data_Get_Struct(object, CvPoint, ptr);
|
46
|
-
return ptr;
|
47
|
-
}
|
48
|
-
|
49
|
-
inline CvPoint
|
50
|
-
VALUE_TO_CVPOINT(VALUE object)
|
51
|
-
{
|
52
|
-
if (cCvPoint::rb_compatible_q(cCvPoint::rb_class(), object)) {
|
53
|
-
return cvPoint(NUM2INT(rb_funcall(object, rb_intern("x"), 0)),
|
54
|
-
NUM2INT(rb_funcall(object, rb_intern("y"), 0)));
|
55
|
-
}
|
56
|
-
else {
|
57
|
-
raise_compatible_typeerror(object, cCvPoint::rb_class());
|
58
|
-
}
|
59
|
-
throw "Should never reach here";
|
60
|
-
}
|
61
|
-
|
62
|
-
__NAMESPACE_END_OPENCV
|
63
|
-
|
64
|
-
#endif // RUBY_OPENCV_CVPOINT_H
|
1
|
+
/************************************************************
|
2
|
+
|
3
|
+
cvpoint.h -
|
4
|
+
|
5
|
+
$Author: lsxi $
|
6
|
+
|
7
|
+
Copyright (C) 2005-2006 Masakazu Yonekura
|
8
|
+
|
9
|
+
************************************************************/
|
10
|
+
#ifndef RUBY_OPENCV_CVPOINT_H
|
11
|
+
#define RUBY_OPENCV_CVPOINT_H
|
12
|
+
|
13
|
+
#include "opencv.h"
|
14
|
+
|
15
|
+
#define __NAMESPACE_BEGIN_CVPOINT namespace cCvPoint {
|
16
|
+
#define __NAMESPACE_END_CVPOINT }
|
17
|
+
|
18
|
+
__NAMESPACE_BEGIN_OPENCV
|
19
|
+
__NAMESPACE_BEGIN_CVPOINT
|
20
|
+
|
21
|
+
VALUE rb_class();
|
22
|
+
|
23
|
+
void define_ruby_class();
|
24
|
+
|
25
|
+
VALUE rb_compatible_q(VALUE klass, VALUE object);
|
26
|
+
|
27
|
+
VALUE rb_allocate(VALUE klass);
|
28
|
+
VALUE rb_initialize(int argc, VALUE *argv, VALUE self);
|
29
|
+
VALUE rb_x(VALUE self);
|
30
|
+
VALUE rb_set_x(VALUE self, VALUE x);
|
31
|
+
VALUE rb_y(VALUE self);
|
32
|
+
VALUE rb_set_y(VALUE self, VALUE y);
|
33
|
+
|
34
|
+
VALUE rb_to_s(VALUE self);
|
35
|
+
VALUE rb_to_ary(VALUE self);
|
36
|
+
|
37
|
+
VALUE new_object();
|
38
|
+
VALUE new_object(CvPoint point);
|
39
|
+
|
40
|
+
__NAMESPACE_END_CVPOINT
|
41
|
+
|
42
|
+
inline CvPoint*
|
43
|
+
CVPOINT(VALUE object){
|
44
|
+
CvPoint *ptr;
|
45
|
+
Data_Get_Struct(object, CvPoint, ptr);
|
46
|
+
return ptr;
|
47
|
+
}
|
48
|
+
|
49
|
+
inline CvPoint
|
50
|
+
VALUE_TO_CVPOINT(VALUE object)
|
51
|
+
{
|
52
|
+
if (cCvPoint::rb_compatible_q(cCvPoint::rb_class(), object)) {
|
53
|
+
return cvPoint(NUM2INT(rb_funcall(object, rb_intern("x"), 0)),
|
54
|
+
NUM2INT(rb_funcall(object, rb_intern("y"), 0)));
|
55
|
+
}
|
56
|
+
else {
|
57
|
+
raise_compatible_typeerror(object, cCvPoint::rb_class());
|
58
|
+
}
|
59
|
+
throw "Should never reach here";
|
60
|
+
}
|
61
|
+
|
62
|
+
__NAMESPACE_END_OPENCV
|
63
|
+
|
64
|
+
#endif // RUBY_OPENCV_CVPOINT_H
|
data/ext/opencv/cvpoint2d32f.h
CHANGED
@@ -1,63 +1,63 @@
|
|
1
|
-
/************************************************************
|
2
|
-
|
3
|
-
cvpoint2d32f.h -
|
4
|
-
|
5
|
-
$Author: lsxi $
|
6
|
-
|
7
|
-
Copyright (C) 2005 Masakazu Yonekura
|
8
|
-
|
9
|
-
************************************************************/
|
10
|
-
#ifndef RUBY_OPENCV_CVPOINT2D32F_H
|
11
|
-
#define RUBY_OPENCV_CVPOINT2D32F_H
|
12
|
-
|
13
|
-
#define __NAMESPACE_BEGIN_CVPOINT2D32F namespace cCvPoint2D32f {
|
14
|
-
#define __NAMESPACE_END_CVPOINT2D32F }
|
15
|
-
|
16
|
-
#include "opencv.h"
|
17
|
-
|
18
|
-
__NAMESPACE_BEGIN_OPENCV
|
19
|
-
__NAMESPACE_BEGIN_CVPOINT2D32F
|
20
|
-
|
21
|
-
VALUE rb_class();
|
22
|
-
|
23
|
-
void define_ruby_class();
|
24
|
-
|
25
|
-
VALUE rb_compatible_q(VALUE klass, VALUE object);
|
26
|
-
|
27
|
-
VALUE rb_allocate(VALUE klass);
|
28
|
-
VALUE rb_initialize(int argc, VALUE *argv, VALUE self);
|
29
|
-
VALUE rb_x(VALUE self);
|
30
|
-
VALUE rb_set_x(VALUE self, VALUE x);
|
31
|
-
VALUE rb_y(VALUE self);
|
32
|
-
VALUE rb_set_y(VALUE self, VALUE y);
|
33
|
-
|
34
|
-
VALUE rb_to_s(VALUE self);
|
35
|
-
VALUE rb_to_ary(VALUE self);
|
36
|
-
|
37
|
-
VALUE new_object(CvPoint2D32f point);
|
38
|
-
|
39
|
-
__NAMESPACE_END_CVPOINT2D32F
|
40
|
-
|
41
|
-
inline CvPoint2D32f*
|
42
|
-
CVPOINT2D32F(VALUE object)
|
43
|
-
{
|
44
|
-
CvPoint2D32f *ptr;
|
45
|
-
Data_Get_Struct(object, CvPoint2D32f, ptr);
|
46
|
-
return ptr;
|
47
|
-
}
|
48
|
-
|
49
|
-
inline CvPoint2D32f
|
50
|
-
VALUE_TO_CVPOINT2D32F(VALUE object)
|
51
|
-
{
|
52
|
-
if (cCvPoint2D32f::rb_compatible_q(cCvPoint2D32f::rb_class(), object)) {
|
53
|
-
return cvPoint2D32f(NUM2DBL(rb_funcall(object, rb_intern("x"), 0)),
|
54
|
-
NUM2DBL(rb_funcall(object, rb_intern("y"), 0)));
|
55
|
-
}
|
56
|
-
else {
|
57
|
-
raise_compatible_typeerror(object, cCvPoint2D32f::rb_class());
|
58
|
-
}
|
59
|
-
throw "Should never reach here";
|
60
|
-
}
|
61
|
-
|
62
|
-
__NAMESPACE_END_OPENCV
|
63
|
-
#endif // RUBY_OPENCV_CVPOINT2D32F_H
|
1
|
+
/************************************************************
|
2
|
+
|
3
|
+
cvpoint2d32f.h -
|
4
|
+
|
5
|
+
$Author: lsxi $
|
6
|
+
|
7
|
+
Copyright (C) 2005 Masakazu Yonekura
|
8
|
+
|
9
|
+
************************************************************/
|
10
|
+
#ifndef RUBY_OPENCV_CVPOINT2D32F_H
|
11
|
+
#define RUBY_OPENCV_CVPOINT2D32F_H
|
12
|
+
|
13
|
+
#define __NAMESPACE_BEGIN_CVPOINT2D32F namespace cCvPoint2D32f {
|
14
|
+
#define __NAMESPACE_END_CVPOINT2D32F }
|
15
|
+
|
16
|
+
#include "opencv.h"
|
17
|
+
|
18
|
+
__NAMESPACE_BEGIN_OPENCV
|
19
|
+
__NAMESPACE_BEGIN_CVPOINT2D32F
|
20
|
+
|
21
|
+
VALUE rb_class();
|
22
|
+
|
23
|
+
void define_ruby_class();
|
24
|
+
|
25
|
+
VALUE rb_compatible_q(VALUE klass, VALUE object);
|
26
|
+
|
27
|
+
VALUE rb_allocate(VALUE klass);
|
28
|
+
VALUE rb_initialize(int argc, VALUE *argv, VALUE self);
|
29
|
+
VALUE rb_x(VALUE self);
|
30
|
+
VALUE rb_set_x(VALUE self, VALUE x);
|
31
|
+
VALUE rb_y(VALUE self);
|
32
|
+
VALUE rb_set_y(VALUE self, VALUE y);
|
33
|
+
|
34
|
+
VALUE rb_to_s(VALUE self);
|
35
|
+
VALUE rb_to_ary(VALUE self);
|
36
|
+
|
37
|
+
VALUE new_object(CvPoint2D32f point);
|
38
|
+
|
39
|
+
__NAMESPACE_END_CVPOINT2D32F
|
40
|
+
|
41
|
+
inline CvPoint2D32f*
|
42
|
+
CVPOINT2D32F(VALUE object)
|
43
|
+
{
|
44
|
+
CvPoint2D32f *ptr;
|
45
|
+
Data_Get_Struct(object, CvPoint2D32f, ptr);
|
46
|
+
return ptr;
|
47
|
+
}
|
48
|
+
|
49
|
+
inline CvPoint2D32f
|
50
|
+
VALUE_TO_CVPOINT2D32F(VALUE object)
|
51
|
+
{
|
52
|
+
if (cCvPoint2D32f::rb_compatible_q(cCvPoint2D32f::rb_class(), object)) {
|
53
|
+
return cvPoint2D32f(NUM2DBL(rb_funcall(object, rb_intern("x"), 0)),
|
54
|
+
NUM2DBL(rb_funcall(object, rb_intern("y"), 0)));
|
55
|
+
}
|
56
|
+
else {
|
57
|
+
raise_compatible_typeerror(object, cCvPoint2D32f::rb_class());
|
58
|
+
}
|
59
|
+
throw "Should never reach here";
|
60
|
+
}
|
61
|
+
|
62
|
+
__NAMESPACE_END_OPENCV
|
63
|
+
#endif // RUBY_OPENCV_CVPOINT2D32F_H
|
data/ext/opencv/cvpoint3d32f.h
CHANGED
@@ -1,66 +1,66 @@
|
|
1
|
-
/************************************************************
|
2
|
-
|
3
|
-
cvpoint3d32f.h -
|
4
|
-
|
5
|
-
$Author: lsxi $
|
6
|
-
|
7
|
-
Copyright (C) 2005-2008 Masakazu Yonekura
|
8
|
-
|
9
|
-
************************************************************/
|
10
|
-
#ifndef RUBY_OPENCV_CVPOINT3D32F_H
|
11
|
-
#define RUBY_OPENCV_CVPOINT3D32F_H
|
12
|
-
|
13
|
-
#define __NAMESPACE_BEGIN_CVPOINT3D32F namespace cCvPoint3D32f {
|
14
|
-
#define __NAMESPACE_END_CVPOINT3D32F }
|
15
|
-
|
16
|
-
#include "opencv.h"
|
17
|
-
|
18
|
-
__NAMESPACE_BEGIN_OPENCV
|
19
|
-
__NAMESPACE_BEGIN_CVPOINT3D32F
|
20
|
-
|
21
|
-
VALUE rb_class();
|
22
|
-
|
23
|
-
void define_ruby_class();
|
24
|
-
|
25
|
-
VALUE rb_compatible_q(VALUE klass, VALUE object);
|
26
|
-
|
27
|
-
VALUE rb_allocate(VALUE klass);
|
28
|
-
VALUE rb_initialize(int argc, VALUE *argv, VALUE self);
|
29
|
-
VALUE rb_x(VALUE self);
|
30
|
-
VALUE rb_set_x(VALUE self, VALUE x);
|
31
|
-
VALUE rb_y(VALUE self);
|
32
|
-
VALUE rb_set_y(VALUE self, VALUE y);
|
33
|
-
VALUE rb_z(VALUE self);
|
34
|
-
VALUE rb_set_z(VALUE self, VALUE z);
|
35
|
-
|
36
|
-
VALUE rb_to_s(VALUE self);
|
37
|
-
VALUE rb_to_ary(VALUE self);
|
38
|
-
|
39
|
-
VALUE new_object(CvPoint3D32f point);
|
40
|
-
|
41
|
-
__NAMESPACE_END_CVPOINT3D32F
|
42
|
-
|
43
|
-
inline CvPoint3D32f*
|
44
|
-
CVPOINT3D32F(VALUE object)
|
45
|
-
{
|
46
|
-
CvPoint3D32f *ptr;
|
47
|
-
Data_Get_Struct(object, CvPoint3D32f, ptr);
|
48
|
-
return ptr;
|
49
|
-
}
|
50
|
-
|
51
|
-
inline CvPoint3D32f
|
52
|
-
VALUE_TO_CVPOINT3D32F(VALUE object)
|
53
|
-
{
|
54
|
-
if (cCvPoint3D32f::rb_compatible_q(cCvPoint3D32f::rb_class(), object)) {
|
55
|
-
return cvPoint3D32f(NUM2DBL(rb_funcall(object, rb_intern("x"), 0)),
|
56
|
-
NUM2DBL(rb_funcall(object, rb_intern("y"), 0)),
|
57
|
-
NUM2DBL(rb_funcall(object, rb_intern("z"), 0)));
|
58
|
-
}
|
59
|
-
else {
|
60
|
-
raise_compatible_typeerror(object, cCvPoint3D32f::rb_class());
|
61
|
-
}
|
62
|
-
throw "Should never reach here";
|
63
|
-
}
|
64
|
-
|
65
|
-
__NAMESPACE_END_OPENCV
|
66
|
-
#endif // RUBY_OPENCV_CVPOINT3D32F_H
|
1
|
+
/************************************************************
|
2
|
+
|
3
|
+
cvpoint3d32f.h -
|
4
|
+
|
5
|
+
$Author: lsxi $
|
6
|
+
|
7
|
+
Copyright (C) 2005-2008 Masakazu Yonekura
|
8
|
+
|
9
|
+
************************************************************/
|
10
|
+
#ifndef RUBY_OPENCV_CVPOINT3D32F_H
|
11
|
+
#define RUBY_OPENCV_CVPOINT3D32F_H
|
12
|
+
|
13
|
+
#define __NAMESPACE_BEGIN_CVPOINT3D32F namespace cCvPoint3D32f {
|
14
|
+
#define __NAMESPACE_END_CVPOINT3D32F }
|
15
|
+
|
16
|
+
#include "opencv.h"
|
17
|
+
|
18
|
+
__NAMESPACE_BEGIN_OPENCV
|
19
|
+
__NAMESPACE_BEGIN_CVPOINT3D32F
|
20
|
+
|
21
|
+
VALUE rb_class();
|
22
|
+
|
23
|
+
void define_ruby_class();
|
24
|
+
|
25
|
+
VALUE rb_compatible_q(VALUE klass, VALUE object);
|
26
|
+
|
27
|
+
VALUE rb_allocate(VALUE klass);
|
28
|
+
VALUE rb_initialize(int argc, VALUE *argv, VALUE self);
|
29
|
+
VALUE rb_x(VALUE self);
|
30
|
+
VALUE rb_set_x(VALUE self, VALUE x);
|
31
|
+
VALUE rb_y(VALUE self);
|
32
|
+
VALUE rb_set_y(VALUE self, VALUE y);
|
33
|
+
VALUE rb_z(VALUE self);
|
34
|
+
VALUE rb_set_z(VALUE self, VALUE z);
|
35
|
+
|
36
|
+
VALUE rb_to_s(VALUE self);
|
37
|
+
VALUE rb_to_ary(VALUE self);
|
38
|
+
|
39
|
+
VALUE new_object(CvPoint3D32f point);
|
40
|
+
|
41
|
+
__NAMESPACE_END_CVPOINT3D32F
|
42
|
+
|
43
|
+
inline CvPoint3D32f*
|
44
|
+
CVPOINT3D32F(VALUE object)
|
45
|
+
{
|
46
|
+
CvPoint3D32f *ptr;
|
47
|
+
Data_Get_Struct(object, CvPoint3D32f, ptr);
|
48
|
+
return ptr;
|
49
|
+
}
|
50
|
+
|
51
|
+
inline CvPoint3D32f
|
52
|
+
VALUE_TO_CVPOINT3D32F(VALUE object)
|
53
|
+
{
|
54
|
+
if (cCvPoint3D32f::rb_compatible_q(cCvPoint3D32f::rb_class(), object)) {
|
55
|
+
return cvPoint3D32f(NUM2DBL(rb_funcall(object, rb_intern("x"), 0)),
|
56
|
+
NUM2DBL(rb_funcall(object, rb_intern("y"), 0)),
|
57
|
+
NUM2DBL(rb_funcall(object, rb_intern("z"), 0)));
|
58
|
+
}
|
59
|
+
else {
|
60
|
+
raise_compatible_typeerror(object, cCvPoint3D32f::rb_class());
|
61
|
+
}
|
62
|
+
throw "Should never reach here";
|
63
|
+
}
|
64
|
+
|
65
|
+
__NAMESPACE_END_OPENCV
|
66
|
+
#endif // RUBY_OPENCV_CVPOINT3D32F_H
|