mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
add documents of CvBox2D
This commit is contained in:
parent
ef0eed8874
commit
15a524bb20
1 changed files with 32 additions and 35 deletions
|
@ -11,12 +11,7 @@
|
||||||
/*
|
/*
|
||||||
* Document-class: OpenCV::CvBox2D
|
* Document-class: OpenCV::CvBox2D
|
||||||
*
|
*
|
||||||
* C structure is here.
|
* Stores coordinates of a rotated rectangle.
|
||||||
* typdef struct CvBox2D {
|
|
||||||
* CvPoint2D32f center; // center of the box.
|
|
||||||
* CvSize2D32f size; // box width and length
|
|
||||||
* float angle; // angle between the horizonal axis and the first side (i.e length) in radians
|
|
||||||
* } CvBox2D;
|
|
||||||
*/
|
*/
|
||||||
__NAMESPACE_BEGIN_OPENCV
|
__NAMESPACE_BEGIN_OPENCV
|
||||||
__NAMESPACE_BEGIN_CVBOX2D
|
__NAMESPACE_BEGIN_CVBOX2D
|
||||||
|
@ -60,10 +55,12 @@ rb_allocate(VALUE klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
|
||||||
* CvBox2D.new(<i>[center][, size][, angle]</i>) -> cvbox2d
|
|
||||||
*
|
|
||||||
* Create a box
|
* Create a box
|
||||||
|
* @overload new(center=nil, size=nil, angle=nil)
|
||||||
|
* @param center [CvPoint2D32f,nil] Center of the box
|
||||||
|
* @param size [CvSize,nil] Size of the box
|
||||||
|
* @param angle [Number,nil] Angle between the horizontal axis and the first side in degrees
|
||||||
|
* @return [CvBox2D] New box
|
||||||
*/
|
*/
|
||||||
VALUE
|
VALUE
|
||||||
rb_initialize(int argc, VALUE *argv, VALUE self)
|
rb_initialize(int argc, VALUE *argv, VALUE self)
|
||||||
|
@ -84,9 +81,9 @@ rb_initialize(int argc, VALUE *argv, VALUE self)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* Returns center point of the box
|
||||||
* center -> cvpoint2d32f
|
* @overload center
|
||||||
* Return center point of box as CvPoint2D32f.
|
* @return [CvPoint2D32f] Center of the box
|
||||||
*/
|
*/
|
||||||
VALUE
|
VALUE
|
||||||
rb_center(VALUE self)
|
rb_center(VALUE self)
|
||||||
|
@ -95,10 +92,10 @@ rb_center(VALUE self)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* Set center point of the box
|
||||||
* center = <i>value</i>
|
* @overload center=value
|
||||||
*
|
* @param value [CvPoint2D32f] Center of the box
|
||||||
* Set center to <i>value</i>
|
* @return [CvBox2D] self
|
||||||
*/
|
*/
|
||||||
VALUE
|
VALUE
|
||||||
rb_set_center(VALUE self, VALUE value)
|
rb_set_center(VALUE self, VALUE value)
|
||||||
|
@ -108,9 +105,9 @@ rb_set_center(VALUE self, VALUE value)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* Returns size of the box
|
||||||
* size -> cvsize2d32f
|
* @overload size
|
||||||
* Return size of box as CvSize2D32f.
|
* @return [CvSize2D32f] Size of the box
|
||||||
*/
|
*/
|
||||||
VALUE
|
VALUE
|
||||||
rb_size(VALUE self)
|
rb_size(VALUE self)
|
||||||
|
@ -119,10 +116,10 @@ rb_size(VALUE self)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* Set size of the box
|
||||||
* size = <i>value</i>
|
* @overload size=value
|
||||||
*
|
* @param value [CvSize2D32f] Size of the box
|
||||||
* Set size to <i>value</i>
|
* @return [CvBox2D] self
|
||||||
*/
|
*/
|
||||||
VALUE
|
VALUE
|
||||||
rb_set_size(VALUE self, VALUE value)
|
rb_set_size(VALUE self, VALUE value)
|
||||||
|
@ -132,10 +129,9 @@ rb_set_size(VALUE self, VALUE value)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* Returns angle of the box
|
||||||
* angle -> float
|
* @overload angle
|
||||||
*
|
* @return [Float] Angle of the box
|
||||||
* Return angle of box as Float.
|
|
||||||
*/
|
*/
|
||||||
VALUE
|
VALUE
|
||||||
rb_angle(VALUE self)
|
rb_angle(VALUE self)
|
||||||
|
@ -144,10 +140,10 @@ rb_angle(VALUE self)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* Set angle of the box
|
||||||
* angle = <i>value</i>
|
* @overload angle=value
|
||||||
*
|
* @param value [Number] Angle of the box
|
||||||
* Set angle to <i>value</i>
|
* @return [CvBox2D] self
|
||||||
*/
|
*/
|
||||||
VALUE
|
VALUE
|
||||||
rb_set_angle(VALUE self, VALUE value)
|
rb_set_angle(VALUE self, VALUE value)
|
||||||
|
@ -157,9 +153,10 @@ rb_set_angle(VALUE self, VALUE value)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* Find box vertices
|
||||||
* points -> array(include cvpoint2d32f)
|
* @overload points
|
||||||
* Find box vertices. Return Array contain 4 CvPoint2D32f.
|
* @return [Array<CvPoint2D32f>] Vertices of the box
|
||||||
|
* @opencv_func cvBoxPoints
|
||||||
*/
|
*/
|
||||||
VALUE
|
VALUE
|
||||||
rb_points(VALUE self)
|
rb_points(VALUE self)
|
||||||
|
|
Loading…
Add table
Reference in a new issue