play 2 videos simultaneously
I would like to play 2 videos in 1 window, which one is full size and another one is small video screen on the right top corner of the first video. Is it possible?
add a comment
I would like to play 2 videos in 1 window, which one is full size and another one is small video screen on the right top corner of the first video. Is it possible?
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, top right:
Rect roi(large.cols-w-1, 0, w, h);
small.copyTo(large(roi));
imshow("PiP", large);
waitKey(10);
Asked: 2020-05-18 05:09:55 -0600
Seen: 179 times
Last updated: May 18 '20