Ask Your Question
0

show many images in different windows in a loop using one imshow command

asked 2014-02-11 08:43:34 -0600

zulfiqar gravatar image

I want to show many images in different windows in a loop. I am currently doing this

 for (int i=0; i<keyframesbuffer.size(); i++)
 {
    imshow("Keyframe",keyframesbuffer[i]);
    cv::waitKey(60);

 }

but it creates a single window . can anyone please tell me how to make multiple windows in a loop. thanks for any help.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2014-02-11 10:20:27 -0600

Haris gravatar image

updated 2014-02-11 10:22:13 -0600

Try below code

char winName[20];
for (int i=0; i<keyframesbuffer.size(); i++)
 {
    sprintf(winName,"Window%d",i);
    imshow(winName,keyframesbuffer[i]);
    cv::waitKey(60);

 }
edit flag offensive delete link more

Comments

I don't know if it worked for @zulfiqar to me it doesn't do it...

diegomez_86 gravatar imagediegomez_86 ( 2015-06-13 14:21:48 -0600 )edit

Question Tools

Stats

Asked: 2014-02-11 08:43:34 -0600

Seen: 3,720 times

Last updated: Feb 11 '14