1 | initial version |
try to reduce it to:
VideoCapture cam(camNum); if (cam.isOpened() { Mat frame; if (! cam.read(frame)) break; imshow("W",frame); if (waitKey(10)>0) break; }
in other words, get rid of all that SDL debris first.
2 | No.2 Revision |
try to reduce it to:
VideoCapture cam(camNum);
if (cam.isOpened() {
Mat frame;
if (! cam.read(frame)) break;
imshow("W",frame);
if (waitKey(10)>0) break;
in other words, get rid of all that SDL debris first.
3 | No.3 Revision |
try to reduce it to:
VideoCapture cam(camNum);
if while (cam.isOpened() {
Mat frame;
if (! cam.read(frame)) break;
imshow("W",frame);
if (waitKey(10)>0) break;
}
in other words, get rid of all that SDL debris first.
4 | No.4 Revision |
try to reduce it to:
VideoCapture cam(camNum);
while (cam.isOpened() {
Mat frame;
if (! cam.read(frame)) break;
imshow("W",frame);
if (waitKey(10)>0) break;
}
in other words, get rid of all that SDL debris first.
5 | No.5 Revision |
try to reduce it to:
VideoCapture cam(camNum);
while (cam.isOpened() {
Mat frame;
if (! cam.read(frame)) break;
imshow("W",frame);
if (waitKey(10)>0) break;
}
in other words, get rid of all that SDL debris first.
6 | No.6 Revision |
try to reduce it to:
VideoCapture cam(camNum);
while (cam.isOpened() {
Mat frame;
if (! cam.read(frame)) break;
imshow("W",frame);
int k = waitKey(10); // NO YOU DON'T NEED SDL !
if (waitKey(10)>0) break;
(k == 27) break; // escape pressed
}
in other words, get rid of all that SDL debris first.
then try to avoid gstreamer, and use v4l instead:
VideoCapture cam(0, CAP_V4L);