Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Change the logic to:

...
cv::VideoCapture _vc;
if(_cv.open(_ID)) {
   // DO THINGS
} else {
   std::cerr << "Can not open video device with id: " << _ID;
}
...

Change the logic to:

...
cv::VideoCapture _vc;
if(_cv.open(_ID)) if(_vc.open(_ID)) {
   // DO THINGS
} else {
   std::cerr << "Can not open video device with id: " << _ID;
}
...