Class: OpenCV::CvCircle32f
- Inherits:
-
Object
- Object
- OpenCV::CvCircle32f
- Defined in:
- ext/opencv/cvcircle32f.cpp,
ext/opencv/cvcircle32f.cpp
Overview
Combination of center and radius.
see CvMat#hough_circles
Instance Method Summary collapse
-
#[] ⇒ Number
Accesses to parameters of the circle by array-like interface ([X-coordinate, Y-coordinate, radius]).
-
#center ⇒ CvPoint2D32f
Returns center point of the circle.
-
#radius ⇒ Number
Returns radius of the circle.
-
#to_ary ⇒ Array<CvPoint2D32f,Number>
(also: #to_a)
Returns parameters of the circle as an array which contains [center
, radius ].
Instance Method Details
#[] ⇒ Number
Accesses to parameters of the circle by array-like interface ([X-coordinate, Y-coordinate, radius])
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'ext/opencv/cvcircle32f.cpp', line 64 VALUE rb_aref(VALUE self, VALUE index) { switch (NUM2INT(index)) { case 0: return DBL2NUM(CVCIRCLE32F(self)->center.x); break; case 1: return DBL2NUM(CVCIRCLE32F(self)->center.y); break; case 2: return DBL2NUM(CVCIRCLE32F(self)->radius); break; default: rb_raise(rb_eIndexError, "index should be 0...3"); break; } return Qnil; } |
#center ⇒ CvPoint2D32f
Returns center point of the circle
41 42 43 44 45 |
# File 'ext/opencv/cvcircle32f.cpp', line 41 VALUE rb_center(VALUE self) { return cCvPoint2D32f::new_object(CVCIRCLE32F(self)->center); } |
#radius ⇒ Number
Returns radius of the circle
52 53 54 55 56 |
# File 'ext/opencv/cvcircle32f.cpp', line 52 VALUE rb_radius(VALUE self) { return rb_float_new(CVCIRCLE32F(self)->radius); } |
#to_ary ⇒ Array<CvPoint2D32f,Number> Also known as: to_a
Returns parameters of the circle as an array which contains [center
89 90 91 92 93 |
# File 'ext/opencv/cvcircle32f.cpp', line 89 VALUE rb_to_ary(VALUE self) { return rb_ary_new3(2, rb_center(self), rb_radius(self)); } |