Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

assuming, all your 2d Mat's have the same num of columns, cv::Mat has a convenient push_back() function:

Mat large; // initially empty, type and size will get determined by push_back.
large.push_back(a);
large.push_back(b);
large.push_back(c);
large.push_back(d);
large.push_back(e);
large.push_back(f);

also, there's hconcat() and vconcat():

Mat large = a;
vconcat(large, b, large);
vconcat(large, c, large);
vconcat(large, d, large);
vconcat(large, e, large);
vconcat(large, f, large);

assuming, all your 2d 1d Mat's have the same num of columns, cv::Mat has a convenient push_back() function:

Mat large; // initially empty, type and size will get determined by push_back.
large.push_back(a);
large.push_back(b);
large.push_back(c);
large.push_back(d);
large.push_back(e);
large.push_back(f);

also, there's hconcat() and vconcat():

Mat large = a;
vconcat(large, b, large);
vconcat(large, c, large);
vconcat(large, d, large);
vconcat(large, e, large);
vconcat(large, f, large);

assuming, all your 1d Mat's have the same num of columns, cv::Mat has a convenient push_back() function:

Mat large; // initially empty, type and size will get determined by push_back.
large.push_back(a);
large.push_back(b);
large.push_back(c);
large.push_back(d);
large.push_back(e);
large.push_back(f);

also, there's hconcat() and vconcat():

Mat large = a;
a.clone(); // clone(), if you want to leave a intact
vconcat(large, b, large);
vconcat(large, c, large);
vconcat(large, d, large);
vconcat(large, e, large);
vconcat(large, f, large);