Hi! I have a problem with something like this. The case is that if i > a && i < b
(it is just an example, the whole thing is a bit more complex) I need my function to still capture frames but use static variables from //do something1
. Unfortunately, whenever this second while
loop starts, I get an error saying that the frame
object is empty - nothing has been captured. Any idea how to solve it? Cheers.
int i = 0;
while(cap.isOpened())
{
cap >> frame;
//do something1
while (i > a && i < b) //for a < b
{
cap >> frame;
//do something
}
++i;
}