Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV can't capture the frame from the webcam.

Hello All, I am using OpenCV 2.4.6 with VS2010. I think my webcam can't capture the frame. When I executed the code it has builed successfully. But I am not getting output. I think, when I checked "if(!bSuccess)" its executed and can't capture frame from the webcam. Please help me, how can I resolve it. Thanks in advanced.........

Mat frame; bool bSuccess = cap.read(frame); if (!bSuccess) { cout << "Cannot read a frame from video file" << endl; break; }

OpenCV can't capture the frame from the webcam.

Hello All, I am using OpenCV 2.4.6 with VS2010. I think my webcam can't capture the frame. When I executed the code it has builed successfully. But I am not getting output. I think, when I checked "if(!bSuccess)" its executed and can't capture frame from the webcam. Please help me, how can I resolve it. Thanks in advanced.........

Mat frame;
bool bSuccess = cap.read(frame);
if (!bSuccess)
{
 cout << "Cannot read a frame from video file" << endl;
 break;
}

}