You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating System / Platform => windows7 64bit, windows10
Compiler => VS2015
WebCam => USB webcam
Detailed description
I found that open videocapture will fail when I did it many times.
It always failed around the 99xx times.
The testing code is quite simple as the following.
I show image when loop > 9900 since it will be easier to tell if the webcam still alive.
Is it an known issue or I did something wrong?
Thanks for comments.
Steps to reproduce
int main()
{
Mat image;
VideoCapture cap;
int i = 0;
for (i = 0; i < 11000; i++)
{
cap.open(0);
if (cap.isOpened())
{
printf("open ok at:%d\n", i);
if (i > 9900) //read and show image after loop 9900
{
cap >> image;
imshow("Webcam live", image);
waitKey(100);
}
}
else
{
printf("open fail at:%d\n", i);
}
}
return 0;
}
The text was updated successfully, but these errors were encountered:
OpenCV 2.4.x is very old and will not be fixed anyway. Could you please try and reproduce your issue with OpenCV 4.5.5 (or 4.x branch)? Also post more information about your OpenCV build configuration.
Hint: set environment variables OPENCV_VIDEOIO_DEBUG=1 and OPENCV_LOG_LEVEL=debug to capture more information around the moment of failure.
System information
Detailed description
I found that open videocapture will fail when I did it many times.
It always failed around the 99xx times.
The testing code is quite simple as the following.
I show image when loop > 9900 since it will be easier to tell if the webcam still alive.
Is it an known issue or I did something wrong?
Thanks for comments.
Steps to reproduce
The text was updated successfully, but these errors were encountered: