Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you need to do this in 2 steps:

// 1. make a single *row* of m1:
m1 = m1.reshape(1, 1);
// same for m2: 
m2 = m2.reshape(1, 1);

// 2. append:
Mat final_row;
hconcat(m1, m2, final_row);

you need to do this in 2 steps:

// 1. make a single *row* of m1:
m1 = m1.reshape(1, 1);
// same for m2: 
m2 = m2.reshape(1, 1);

// 2. append:
Mat final_row;
hconcat(m1, final_row = new Mat();
Core.hconcat(m1, m2, final_row);

you need to do this in 2 steps:

Mat m1 = new Mat(515,2,5);
Mat m2 = new Mat(17,12,5);


// 1. make a single *row* *colum* of m1:
m1 = m1.reshape(1, 1);
(int)m1.total());
// same for m2: 
m2 = m2.reshape(1, 1);
(int)m2.total());
 // 2. append:
m1.push_back(m2);
Mat final_row m3 = new Mat();
Core.hconcat(m1, m2, final_row);
m1.reshape(1,1);

you need to do this in 2 steps:

Mat m1 = new Mat(515,2,5);
Mat m2 = new Mat(17,12,5);


// 1. make a single *colum* of m1:
m1 = m1.reshape(1, (int)m1.total());
// same for m2: 
m2 = m2.reshape(1, (int)m2.total());

m1.push_back(m2);
Mat m3 final_row = m1.reshape(1,1);