Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Adding row to Mat in Java

I have a problem with adding rows to Mat. I use push_back method but I get error: Sizes of input arguments do not match. Of course my Mats have same column length as it is said in method description.

Mat test = new Mat(new Size(10,100),5); Mat row = new Mat(new Size(1,100),5);

test.push_back(row);

^It will result in error which I described above. Do you have any ideas how insert a row to a matrix?

click to hide/show revision 2
No.2 Revision

Adding row to Mat in Java

I have a problem with adding rows to Mat. I use push_back method but I get error: Sizes of input arguments do not match. Of course my Mats have same column length as it is said in method description.

Mat test = new Mat(new Size(10,100),5);
Mat row = new Mat(new Size(1,100),5);

test.push_back(row);

Size(1,100),5); test.push_back(row);

^It will result in error which I described above. Do you have any ideas how insert a row to a matrix?

click to hide/show revision 3
retagged

updated 2014-01-08 03:41:23 -0600

berak gravatar image

Adding row to Mat in Java

I have a problem with adding rows to Mat. I use push_back method but I get error: Sizes of input arguments do not match. Of course my Mats have same column length as it is said in method description.

Mat test = new Mat(new Size(10,100),5);
Mat row = new Mat(new Size(1,100),5);
test.push_back(row);

^It will result in error which I described above. Do you have any ideas how insert a row to a matrix?