Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Name your imshow window based on the counter in the for loop, such that new window is created for every for loop.

Example:

stringstream ss;

for(int i = 0; i < n; i++)  {

 Mat InputFrame;

 ss << i;

imshow(ss.str(), InputFrame);

ss.str();

waitkey(1);

}

Name your imshow window based on the counter in the for loop, such that new window is created for every for loop.loop instance.

Example:

stringstream ss;

for(int i = 0; i < n; i++)  {
   Mat InputFrame;
   ss << i;
  imshow(ss.str(), InputFrame);
  ss.str();
  waitkey(1);
 }

Name your imshow window based on the counter in the for loop, such that new window is created for every loop instance.

Example:

stringstream ss;
 char wks;
for(int i = 0; i < n; i++)   {
      Mat InputFrame;
      ss << i;
      imshow(ss.str(), InputFrame);
      ss.str();
      wks = waitkey(1);

      if(wks == 27)
          break;
}