0
$\begingroup$

anybody knows what this is?

Mat mat = (Mat_<double>(3, 4) << 0, 0, width, width, 0, height, height, 0, 1, 1, 1, 1);

I dont know what mat would be in this case.. furthermore i got no idea how to fix this error for the above declaration:

Error: Mat and int are incompatible

I know that Mat_ will call

template<typename _Tp> inline Mat_<_Tp>::Mat_(int _rows, int _cols)
    : Mat(_rows, _cols, DataType<_Tp>::type) {}

But i do not understand the purpose of this:

<< 0, 0, width, width, 0, height, height, 0, 1, 1, 1, 1);

Kindly Tape

$\endgroup$
  • $\begingroup$ This question is more appropriate for Stack Overflow. $\endgroup$ – Jason R Jul 23 '15 at 16:50
  • $\begingroup$ Good to know! I ll remember that.. $\endgroup$ – Alex Tape Jul 24 '15 at 9:43
1
$\begingroup$

Hi I do not understand it gives you that error, since my trouble compiling me, on the other hand the operator "<<" is useful to be able to initialize the array, thus "0, 0, width, width" correspond to the first row, "0, height, height, 0" correspond to the second row and "1, 1, 1, 1" correspond to the third row. enter image description here

$\endgroup$
  • $\begingroup$ Well, why i did not see this ;) ? Thank you! $\endgroup$ – Alex Tape Jul 24 '15 at 9:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.