1 | initial version |
you could copy the small img into the large one (aka: picture in picture), like:
Mat small, large;
cap1 >> small;
cap2 >> large;
// desired size
int w = 200;
int h = 200;
resize(small,small,Size(w,h));
// dst roi:
Rect roi(large.cols-w-1, large.cols-h-1, w, h);
small.copyTo(large(roi));
imshow("PiP", large);
waitKey(10);
2 | No.2 Revision |
you could copy the small img into the large one (aka: picture in picture), like:
Mat small, large;
cap1 >> small;
cap2 >> large;
// desired size
int w = 200;
int h = 200;
resize(small,small,Size(w,h));
// dst roi:
roi, top right:
Rect roi(large.cols-w-1, large.cols-h-1, 0, w, h);
small.copyTo(large(roi));
imshow("PiP", large);
waitKey(10);