1
0
Fork 0
mirror of https://github.com/ruby-opencv/ruby-opencv synced 2023-03-27 23:22:12 -04:00

add document

This commit is contained in:
ser1zw 2016-04-10 03:44:30 +09:00
parent 3618e2ebf7
commit a78d68279c

View file

@ -716,6 +716,19 @@ namespace rubyopencv {
return mat2obj(retptr, CLASS_OF(self));
}
/*
* Extracts a diagonal from a matrix.
*
* @overload diag(d)
* @param d [Integer] Index of the diagonal, with the following values:
* - +d=0+ is the main diagonal.
* - +d>0+ is a diagonal from the lower half. For example, +d=1+ means
* the diagonal is set immediately below the main one.
* - +d<0+ is a diagonal from the upper half. For example, +d=-1+ means
* the diagonal is set immediately above the main one.
* @return [Mat] Diagonal matrix
* @opencv_func cv::Mat::diag
*/
VALUE rb_diag(int argc, VALUE *argv, VALUE self) {
VALUE d;
rb_scan_args(argc, argv, "01", &d);