Ask Your Question

mkp118's profile - activity

2020-04-27 11:30:42 -0600 received badge  Popular Question (source)
2015-11-09 10:03:36 -0600 commented question USB camera disconnection/reconnection

@StevenPuttemans: I am already doing that periodically within my script. The point is that, if the camera has a different index on reconnection, even though it is recognised and a new video capture object created to suit it is never activated and images are not captured.

2015-11-09 07:46:38 -0600 asked a question USB camera disconnection/reconnection

I have a project running Python with OpenCV and Pygame under Ubuntu 14.04 that uses two USB cameras, images from which are processed and displayed on the local monitor.

If the system is started with both cameras connected everything runs fine, if I disconnect one camera the associated part of the display freezes as expected. The disconnection is detected and the associated video capture object released. When the camera is reconnected the reconnection is detected and a new video capture object created and the display eventually resumes updating but ONLY if the camera has been allocated the same index, e.g. /dev/video0, as it had before it was disconnected.

I would like to know where I could look to try and find out why the video capture does not start if the device index is different on reconnection. I am new to Ubuntu, Python etc but have many years experience in microcontrollers and Visual Basic.

Thanks