Hi I have a while(1) which does a infinite loop, is there a way to ignore the first 2 frames?
while(1)
{
bool bSuccess = capture.read(fullimage); // read a new frame from video
if (!bSuccess) //if not success, break loop
{
cout << "End of video" << endl;
destroyWindow("Original Video");
destroyWindow("dctBlockImage");
break;
}
imshow("Original Video", fullimage); //show the frame in "Original Video" window
FrameTo8by8(myinput,3.0); //Proccess and algorithm
oVideoWriter.write(dctImage); //write video to file
namedWindow("dctBlockImage");
imshow("dctBlockImage", dctImage); //display watermarked image
if(waitKey(30) == 27) //wait for 'esc' key press for 30 ms. If 'esc' key is pressed, break loop
{
cout << "esc key is pressed by user" << endl;
break;
}
}
Is there a way to skip the first 2 frames?