I have a python environment (on Windows 10) that uses OpenCV VideoCapture
class to connect to multiple usb cameras.
As far as I know, there is no way to identify a specific camera in OpenCV other than the device
parameter in the VideoCapture
class constructor / open
method.
The problem is that the device parameter changes depending on how many cameras are actually connected and to which usb ports.
I want to be able to identify a specific camera and find its "device index" or "camera index" no matter how many cameras are connected and to which usb ports.
Can somebody please suggest a way to achieve that functionality? python code is preferable but C++ will also do.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…