1 | initial version |
it's possible of course
Suppose you are grabbing in cv::Mat m1,m2,m3,m4;
that have same size and type
//define the tiled image so that it can contains 4 images
Mat tile
tile = Mat(2*m1.size(),m1.type());
//define 4 ROI where the single images will be copied to
Rect r1,r2,r3,r4;
r1 = Rect(0,0,m1.size()); // top left
r2 = Rect(m1.cols,0,m1.size()); // top right
r3 = Rect(0,m1.rows,m1.size()); // bottom left
r4 = Rect(m1.cols,m1.rows,m1.size()); // bottom right
// Transfer the image into tiled one
m1.copyTo(tile(r1)); m2.copyTo(tile(r2));
m3.copyTo(tile(r3)); m4.copyTo(tile(r4));
cv::imshow("Tiled images", tile);