Detecting if the video camera has been disconnected with CvCapture

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Detecting if the video camera has been disconnected with CvCapture

stevenjpujia

Hi,

Is there any way to know if the video camera has been disconnected when
using CvCapture?  After creating a CvCapture object via
cvCaptureFromCAM, I can unplug the camera and plug it back in, and
cvRetrieveFrame still pulls "valid" frames the whole time.  I would
like to at least know if the camera needs to be reinitialized, in which
case I could tear down and re-create.

Thanx,

Steve