Hi support,
I can't seem to find the answer for this one. Someone had asked it before but he wasn't given a solution and I'm not sure if one was found (this was a year ago or so from the date of it). Here's a snippet of the code I'm running and the only part of it I'm concerned with:
videoStream = new cv::VideoCapture(2);
if ( !videoStream->isOpened() )
{
addDebug("Capture failed!");
delete videoStream;
return;
}
*videoStream >> incFrame;
if ( !incFrame.empty() )
{
incFrame.release();
}
videoStream->release();
delete videoStream;
The problem is that this code will work the first time but never again during the lifetime of my program. If I close it and open the software again it works fine. I notice that after the camera is supposed to be released, it still looks like it is in use from looking at its LED. Is there something else I'm missing in regards to releasing the camera? I'm on OpenCV 2.4.5. I'm compiling on Ubuntu 12.04.