1 | initial version |
try that:
VideoCapture cap(0);
if(cap)
{
white(1)
{
Mat image;
cap>>image;
if (!image.data) break;
if (waitKey(30) >= 0) break;
imshow("test",image);
waitKey(1);
}
}
2 | No.2 Revision |
try that:
VideoCapture cap(0);
if(cap)
{
white(1)
while(1)
{
Mat image;
cap>>image;
if (!image.data) break;
if (waitKey(30) >= 0) break;
imshow("test",image);
waitKey(1);
}
}