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:
parent
3618e2ebf7
commit
a78d68279c
1 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue