Class: OpenCV::CvLine
- Inherits:
-
Object
- Object
- OpenCV::CvLine
- Defined in:
- ext/opencv/cvline.cpp,
ext/opencv/cvline.cpp
Overview
Line parameters represented by a two-element (rho, theta) for CvMat#hough_lines
Instance Method Summary collapse
-
#[](index) ⇒ Number
Returns value of rho, theta.
-
#[]=(index, value) ⇒ Number
Set value of rho, theta.
-
#rho ⇒ Number
Returns distance from the coordinate origin (0, 0).
-
#rho=(value) ⇒ Object
Set distance from the coordinate origin (0, 0).
-
#theta ⇒ Number
Returns line rotation angle in radians.
-
#theta=(value) ⇒ Object
Set line rotation angle in radians.
Instance Method Details
#[](index) ⇒ Number
Returns value of rho, theta
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'ext/opencv/cvline.cpp', line 87 VALUE rb_aref(VALUE self, VALUE index) { switch (NUM2INT(index)) { case 0: return DBL2NUM(CVLINE(self)->rho); break; case 1: return DBL2NUM(CVLINE(self)->theta); break; default: rb_raise(rb_eIndexError, "index should be 0...2"); break; } return Qnil; } |
#[]=(index, value) ⇒ Number
Set value of rho, theta
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'ext/opencv/cvline.cpp', line 111 VALUE rb_aset(VALUE self, VALUE index, VALUE value) { switch (NUM2INT(index)) { case 0: CVLINE(self)->rho = NUM2DBL(value); break; case 1: CVLINE(self)->theta = NUM2DBL(value); break; default: rb_raise(rb_eIndexError, "index should be 0...2"); break; } return value; } |
#rho ⇒ Number
Returns distance from the coordinate origin (0, 0)
40 41 42 43 44 |
# File 'ext/opencv/cvline.cpp', line 40 VALUE rb_rho(VALUE self) { return rb_float_new(CVLINE(self)->rho); } |
#rho=(value) ⇒ Object
Set distance from the coordinate origin (0, 0)
51 52 53 54 55 56 |
# File 'ext/opencv/cvline.cpp', line 51 VALUE rb_set_rho(VALUE self, VALUE rho) { CVLINE(self)->rho = NUM2DBL(rho); return self; } |
#theta ⇒ Number
Returns line rotation angle in radians
63 64 65 66 67 |
# File 'ext/opencv/cvline.cpp', line 63 VALUE rb_theta(VALUE self) { return rb_float_new(CVLINE(self)->theta); } |
#theta=(value) ⇒ Object
Set line rotation angle in radians
74 75 76 77 78 79 |
# File 'ext/opencv/cvline.cpp', line 74 VALUE rb_set_theta(VALUE self, VALUE theta) { CVLINE(self)->theta = NUM2DBL(theta); return self; } |